DADM: Denoising and Attention-Driven Diffusion Model for Anomaly Detection
Yu Su, Guodong Wang · IEEE Access · 2025
Anomaly detection is crucial in industrial manufacturing, yet the limited availability of anomaly data restricts the performance of existing methods. Although anomaly generation techniques aim to address this issue, they often produce unrealistic anomalies and poorly aligned masks. Diffusion models, trained solely on normal data, reconstruct normal counterparts by adding noise. However, they apply the same denoising process to all anomalies, which leads to two key challenges. Globally, anomalies vary in reconstruction difficulty. For example, missing parts require more denoising steps compared to scratches. To address this, we propose adaptive denoising steps based on differences between the image content and the prior diffusion model. Locally, even within the same image, abnormal regions deviate from normal ones, causing the predicted noise to deviate from a Gaussian distribution. We mitigate this by training with synthetic anomalies. Additionally, we introduce a dynamic attention mechanism to improve the alignment between anomalies and masks, focusing on less significant abnormal regions for accurate matching. Our approach improves anomaly realism, mask precision, and significantly boosts anomaly detection performance. Extensive experiments on the MVTec-AD dataset show that the proposed method achieves 99. 3% I-AUROC and 98. 9% P-AUROC, outperforming the state-of-the-art methods. Moreover, the generated anomaly data effectively enhance the performance of downstream anomaly detection tasks.