Research map / Image generation / Autoregressive and latent generation
A Diffusion-Based Framework for Multi-Class Anomaly Detection
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes DiAD, a latent diffusion-based multi-class anomaly detection framework with a Semantic-Guided network attached to Stable Diffusion's denoiser and a Spatial-aware Feature Fusion block, scoring anomalies with ImageNet-pretrained feature cosine distances.
Problem
Reconstruction-based anomaly detection with diffusion models struggles in the multi-class setting, where reconstructions lose image category and pixel-wise structure, so anomalies are not reconstructed faithfully.
Approach
A trainable Semantic-Guided network replicating the Stable Diffusion denoiser encoder is fed the input image and injects its features into the SD denoiser, preserving semantics while reconstructing anomalous regions; an SFF block fuses multi-scale features with instance normalization and SiLU; anomaly maps come from multi-scale cosine distances of a pre-trained ResNet50's features.
Key results
- On multi-class MVTec-AD, DiAD reaches 97.2/99.0/96.5 (image AUROC/AP/F1max) and 96.8/52.6/55.5 (pixel AUROC/AP/F1max), surpassing UniAD and LDM baselines.
- On VisA, DiAD reports image AUROC 86.8 and pixel AUROC 96.0, versus 85.5 and 95.9 for UniAD.
- On MVTec-AD multi-class PRO, DiAD reaches 90.7 versus 90.4 for UniAD.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Add the SG network to the SD denoising model (ablation) | SD on MVTec-AD · MVTec-AD | AUROC_cls: 79.3 -> 97.2 | Helped |
| Add the SG middle block to SD (ablation) | SD on MVTec-AD · MVTec-AD | AUROC_cls: 79.3 -> 95.1 | Helped |
| Add the SGEB3 skip connection (ablation) | DiAD with SG middle block · MVTec-AD | AUROC_seg: 91.1 -> 89.1 | Hurt |
| Add the SGEB4 skip connection alongside SGEB3 (ablation) | DiAD with SGEB3 · MVTec-AD | AUROC_cls: 95.3 -> 93.8 | Hurt |
| Use IN+SiLU instead of BN+ReLU in the SFF block (ablation) | DiAD · MVTec-AD | AUROC_cls: 96.7 -> 97.2 | Helped |
| Use ResNet50 rather than other tested feature extractors (ablation) | DiAD · MVTec-AD | AUROC_cls: 97.2 | Helped |
| Use WideResNet101 rather than other tested feature extractors (ablation) | DiAD · MVTec-AD | AP_seg: 54.6 | Helped |
| Use feature layers f2, f3, and f4 (ablation) | DiAD with ResNet50 · MVTec-AD | AP_seg: 52.6 | Helped |
| Increase forward diffusion timesteps (ablation) | DiAD · MVTec-AD | anomaly reconstruction ability | Helped |
| Use fewer than 600 forward diffusion steps (ablation) | DiAD · MVTec-AD | performance | Hurt |
| Use 10 DDIM sampling steps rather than 1 (ablation) | DiAD · MVTec-AD | AUROC_seg: 72.5 -> 96.8 | Helped |
| Increase DDIM sampling steps beyond 10 (ablation) | DiAD · MVTec-AD | AUROC_seg: 96.8 -> 96.8 | No clear effect |
Surprising findings
- Plain LDM reconstruction performs poorly in the multi-class setting (image AUROC 56.7 on VisA), indicating that off-the-shelf diffusion models fail at anomaly detection without the semantic guidance.
- Adding SGDB3 and SGDB4 together preserves more texture detail but reduces reconstruction of large anomalies, so the best configuration uses only SGEB3 fusion.
Limitations
- Susceptible to background impurities, causing false positives in image-level and pixel-level results.
- Reconstruction ability depends on large pretrained diffusion models, with plans to use larger models in future work.
- Reported results on some categories (e.g., capsule, screw) are weak at the image level.
Experimental setup
Datasets: MVTec-AD VisA MVTec-3D BraTS2021 BTCV LiTS
Benchmarks: MVTec-AD VisA MVTec-3D BraTS2021 BTCV LiTS
Metrics: AUROC AP F1max PRO DICE
Baselines: DRAEM UniAD PaDiM MKD RD4AD DDPM LDM EdgRec STFPM CFLOW PatchCore DiffusionAD
Builds on: Latent Diffusion Model DDPM DDIM RD4AD ControlNet
Closest papers by meaning
- Correcting Deviations from Normality: A Reformulated Diffusion Model for Multi-Class Unsupervised Anomaly Detection (CVPR 2025 · similarity 0.93)
- DZAD: Diffusion-based Zero-shot Anomaly Detection (AAAI 2025 · similarity 0.90)
- AnomalyDiffusion: Few-Shot Anomaly Image Generation with Diffusion Model (AAAI 2024 · similarity 0.89)
- Vague Prototype-Oriented Diffusion Model for Multi-Class Anomaly Detection (ICML 2024 · similarity 0.88)
- RealNet: A Feature Selection Network with Realistic Synthetic Anomaly for Anomaly Detection (CVPR 2024 · similarity 0.88)
- Dual-Interrelated Diffusion Model for Few-Shot Anomaly Image Generation (CVPR 2025 · similarity 0.88)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
