Masked Diffusion Modeling for Anomaly Detection
Abstract
Anomaly detection aims to identify samples that deviate from the nominal data distribution and is central to many safety-critical applications. However, developing effective anomaly detection methods for categorical and discrete data remains challenging and relatively underexplored. Masked diffusion models provide a natural way to model such data by learning to recover masked values from remaining visible context. In this paper, we propose Masked Diffusion for Anomaly Detection (MaskDiff-AD), a forward-only method based on masked diffusion models trained only on nominal data. Given a test sample, MaskDiff-AD calculates anomaly scores from the difficulty of reconstructing randomly masked coordinates, yielding a content-sensitive score that operates directly on discrete state spaces while avoiding reverse-time sampling. We also develop a non-parametric variant of MaskDiff-AD and provide theoretical analysis by characterizing Type-I and Type-II errors under a fixed detection threshold. Experiments on fourteen tabular datasets show that MaskDiff-AD achieves the best overall average rank among all evaluated methods, and experiments on four text anomaly detection datasets also demonstrate competitive performance against the baselines.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.