A Survey on Diffusion Models for Anomaly Detection

Jing Liu, Zhenchao Ma, Zepu Wang, Yang Liu, Zehua Wang, Peng Sun, Liang Song, Bo Hu, Azzedine Boukerche, Victor C. M. LeungarXiv 2025 · DOI

Abstract

Anomaly Detection (AD) is a fundamental task in computer science, yet it faces significant challenges due to the high dimensionality of modern data. This survey provides the first comprehensive review of Diffusion Models for Anomaly Detection (DMAD). We categorize existing research into a systematic taxonomy based on decision logic—reconstruction-based, density-based, and hybrid methods—and evaluate their performance across diverse data modalities including images, time series, and video.

Introduction

Identifying rare observations that deviate from the norm is crucial for fields ranging from cybersecurity to medical diagnosis. Traditional deep learning models like Generative Adversarial Networks (GANs) and Variational Autoencoders (VAEs) often struggle with high-dimensional data; GANs are prone to mode collapse, while VAEs frequently produce blurry outputs. Diffusion Models (DMs) address these limitations by modeling complex data distributions more effectively, providing superior mode coverage and high-fidelity reconstructions.

Taxonomy of DMAD

The survey introduces a structured taxonomy to organize the rapidly growing field of DMAD, focusing on the underlying "decision logic" used to identify anomalies.

Taxonomy of Diffusion Models for Anomaly Detection (DMAD) categorized by methodologies and tasks.

1. Reconstruction-based Anomaly Detection (RAD)

RAD methods are trained exclusively on normal data. During inference, they attempt to reconstruct an input by "denoising" it. Because the model has not learned to represent anomalous features, the resulting reconstruction error (the difference between input and output) serves as a proxy for the anomaly score.

Architectural variations of reconstruction-based DMAD, including basic, latent space, and conditional approaches.
  • Basic Reconstruction: Direct denoising in the original data space.
  • Latent Space Reconstruction: Using Autoencoders to perform diffusion in a compressed latent space for improved efficiency.
  • Conditional Reconstruction: Leveraging auxiliary information like class labels or masks to guide the denoising process.

2. Density-based Anomaly Detection (DAD)

Instead of direct reconstruction, DAD methods analyze the learned probability density of the data.

  • Score Function: These methods utilize the gradient of the log-probability density. High-magnitude gradients typically point toward low-density regions, signaling potential anomalies.
  • Diffusion Time Estimation (DTE): These models estimate the time required for a sample to reach a fully diffused state. Anomalies often exhibit distinct diffusion trajectories compared to normal data.

3. Hybrid Approaches

Hybrid models combine DMs with other architectures, such as Transformers, or utilize DMs to generate synthetic anomalies, enabling the training of robust supervised classifiers in data-scarce environments.

Benchmarks and Performance

The survey reviews performance across several standard benchmarks:

  • Image (IAD): Industrial inspection (MVTec-AD, VisA) and medical imaging (BraTS).
  • Time Series (TSAD): Industrial sensor data (SWaT, PSM).
  • Video (VAD): Surveillance datasets (UCSD Ped2, ShanghaiTech).

Key results demonstrate the state-of-the-art (SOTA) capabilities of DMAD. For instance, the DRAD method achieved a 99.1% I-AUROC on MVTec-AD, while NGLS-Diff reached a 97.52% F1-score on the SWaT dataset.

Key Insights

  • Superior Mode Coverage: DMs are mathematically incentivized to cover the entire distribution of normal data, significantly reducing false positives.
  • Denoising Advantage: The iterative sampling process allows for sharper reconstructions, which is vital for detecting subtle structural deviations in medical contexts.
  • Synthetic Generation: DMs can generate realistic "fake" anomalies to augment training sets for supervised AD models.

Challenges and Future Directions

Despite their success, several bottlenecks remain:

  • Computational Efficiency: The iterative nature of DMs makes real-time detection difficult.
  • Interpretability: Understanding the specific reasons behind a model's decision remains a "black box" challenge.
  • Adversarial Robustness: DMs are susceptible to adversarial noise, necessitating the development of purification techniques.
  • LLM Integration: Future work may involve integrating DMs with Large Language Models to provide human-readable explanations for detected anomalies.

Summary updated

BibTeX
@misc{liu2025survey,
  author = {Jing Liu and Zhenchao Ma and Zepu Wang and Yang Liu and Zehua Wang and Peng Sun and Liang Song and Bo Hu and Azzedine Boukerche and Victor C. M. Leung},
  title = {{A Survey on Diffusion Models for Anomaly Detection}},
  year = {2025},
  eprint = {2501.11430},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.11430},
}
Figure