atlas

Research map / Image generation / Fast diffusion sampling

AnomalyDiffusion: Few-Shot Anomaly Image Generation with Diffusion Model

AAAI 2024 · Image generation › Fast diffusion sampling · approach: Diffusion models as perception tools · 140 citations (OpenAlex)

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 AnomalyDiffusion, a few-shot latent-diffusion method that generates anomaly image-mask pairs for MVTec by disentangling anomaly appearance (learned embedding) from location (mask-encoded spatial embedding), with an adaptive attention re-weighting step to align anomalies with masks.

Problem

Few-shot anomaly image generation for industrial inspection: existing model-free and GAN-based methods produce unauthentic anomalies or anomalies misaligned with their masks, limiting downstream anomaly detection and localization.

Approach

Decompose the textual condition into a learned anomaly-appearance embedding and a spatial embedding encoded from the anomaly mask, and dynamically re-weight cross-attention during denoising using pixel differences between the predicted clean image and the normal sample so that weakly generated regions inside the mask receive more attention.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add Spatial Anomaly Embedding, masked diffusion loss, and adaptive attention re-weighting (ablation)AnomalyDiffusion · MVTec pixel-level localizationAUROC: 81.3 -> 99.1Helped
Add Spatial Anomaly Embedding, masked diffusion loss, and adaptive attention re-weighting (ablation)AnomalyDiffusion · MVTec pixel-level localizationAP: 31.1 -> 81.4Helped
Add Spatial Anomaly Embedding to anomaly embedding-only model (ablation)AnomalyDiffusion · MVTec pixel-level localizationAUROC: 81.3 -> 90.3Helped
Add masked diffusion loss to SAE (ablation)AnomalyDiffusion · MVTec pixel-level localizationAUROC: 90.3 -> 95.0Helped
Add AAR to SAE and masked diffusion loss (ablation)AnomalyDiffusion · MVTec pixel-level localizationAUROC: 95.0 -> 99.1Helped
Reduce anomaly training-data rate from 30% to 10% (ablation)AnomalyDiffusion · MVTec pixel-level localizationAP: 81.4 -> 64.2Hurt
Reduce anomaly training-data rate from 30% to 20% (ablation)AnomalyDiffusion · MVTec pixel-level localizationAP: 81.4 -> 75.5Hurt
Increase anomaly training-data rate from 30% to 40% (ablation)AnomalyDiffusion · MVTec pixel-level localizationAP: 81.4 -> 81.1No clear effect
Increase anomaly training-data rate from 30% to 50% (ablation)AnomalyDiffusion · MVTec pixel-level localizationAP: 81.4 -> 80.0Hurt
Increase spatial embedding and anomaly embedding lengths (ablation)AnomalyDiffusion · MVTec pixel-level localizationAP: 81.4; 80.6; 80.9; 81.2No clear effect
Replace Spatial Anomaly Embedding with Textual Inversion + Prompt-to-Prompt (ablation)AnomalyDiffusion · MVTec pixel-level localizationAP: 81.4 -> 55.1Hurt
Use AnomalyDiffusion-generated data instead of DFMGAN-generated dataResNet-18 anomaly classification · MVTec anomaly classificationaccuracy: 49.61 -> 66.09Helped

Surprising findings

Limitations

Experimental setup

Datasets: MVTec

Benchmarks: MVTec

Metrics: IS IC-LPIPS AUROC AP F1-max PRO classification accuracy

Baselines: DiffAug CDC Crop&Paste SDGAN Defect-GAN DFMGAN DRAEM PRN DevNet DRA CFLOW CFA

Builds on: latent diffusion model textual inversion blended latent diffusion DFMGAN

Closest papers by meaning

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.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy