DiAD
A diffusion model that reconstructs an image so that anomalies show up as differences from the input.
Diffusion and generative · 2,977 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Parameters
- 1.5B
- Operations
- 2,977
- Framework
- PyTorch
- Recurrent
- No
- Published
- AAAI 2024
- Cited by
- 11 (as of 27 October 2026)
- Authors
- Haoyang He, Jiangning Zhang, Hongxu Chen and others
- Source
- GitHub: lewandofskee/DiAD
- License
- Apache-2.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m16075
- Graph hash
- 3723a103d74ee920495212a82b5546f407737af194c79159cba8711314d97f3f
- Skeleton hash
- db36fe6ae785f9443b3dbb0b516091678717adb984265b6fd33c3cd970326c6b
- Architecture hash
- 569dc046baa941a47671ef35d74c24aba301f38d25f1b4866bde81bc87c31c4d
- Diagram SHA-256
- ead4fcf265f55a84a491d2672ae772f638817908cfdd60db98ffa7edf161651d
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
DiAD is a diffusion-based framework for multi-class anomaly detection, built from a pixel-space autoencoder, a latent-space Semantic-Guided (SG) network connected to Stable Diffusion's denoising network, and a pre-trained feature extractor. The paper's starting point is that diffusion-based reconstruction can fail to preserve image categories and pixel-wise structure in the multi-class setting.
The SG network, which replicates the Stable Diffusion parameters as its starting point, is meant to reconstruct anomalous regions while preserving the original image's semantic information. A Spatial-aware Feature Fusion (SFF) block is added to keep reconstruction accurate when large areas have to be reconstructed. The input and reconstructed images then go through a pre-trained feature extractor, and anomaly maps are generated from the features extracted at different scales.
The released code builds the full model from the pre-trained Stable Diffusion v1.5, fine-tuned autoencoders and the Semantic-Guided network. On the multi-class MVTec-AD dataset, the paper reports AUROC/AP of 96.8/52.6 for localization and 97.2/99.0 for detection.
Key idea. DiAD connects a Semantic-Guided network to the Stable Diffusion denoising network so that reconstructions keep consistent semantic information while the anomalies are reconstructed.
- diad
- diffusion-based anomaly detection
- multi-class anomaly detection
- anomaly localization
- industrial anomaly detection
- mvtec-ad
- visa
- reconstruction-based anomaly detection
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{he2023diaddiffusionbasedframeworkmulticlass,
title={DiAD: A Diffusion-based Framework for Multi-class Anomaly Detection},
author={Haoyang He and Jiangning Zhang and Hongxu Chen and Xuhai Chen and Zhishan Li and Xu Chen and Yabiao Wang and Chengjie Wang and Lei Xie},
year={2023},
eprint={2312.06607},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2312.06607},
}