@article{Zhang2026, 
author = {Haigang Zhang and Zican Baolin and Zhitao Wu and Wei Zhang and Bochao Su and Jinfeng Yang},
title = {Masked Denoising Diffusion for Accurate Anomaly Recognition and Reconstruction},
year = {2026},
journal = {CAAI Artificial Intelligence Research},
keywords = {Stable Diffusion, Anomaly Detection, Masked Image Modeling, Unsupervised Learning},
url = {https://www.sciopen.com/article/10.26599/AIR.2026.9150005},
doi = {10.26599/AIR.2026.9150005},
abstract = {In data-driven industrial anomaly detection, the scarcity of defect samples and the emergence of unknown defect types pose significant challenges to quality control. While unsupervised generative models offer a viable solution, existing diffusion-based methods (e.g., DDAD) face a critical limitation: they often fail to distinguish between normal and anomalous patterns during reconstruction. Consequently, these models may inadvertently reconstruct the defects themselves rather than restoring the healthy state, leading to missed detections and inaccurate anomaly localization. To address this dilemma, we propose Masked DDAD (mDDAD), which integrates Masked Image Modeling (MIM) to enforce the learning of global semantic context, thereby enhancing sensitivity to anomalies. We further introduce a Dynamic Noise Adjustment Mechanism (DNAM) that selectively reduces noise intensity in masked regions to preserve essential structural information. Additionally, we optimize the training process via Dynamic Weighted Loss Optimization (DWLO) to prioritize critical regions. Experiments on the MVTec-AD and VisA datasets demonstrate that mDDAD effectively mitigates the reconstruction failure of baseline methods, significantly outperforming existing approaches in both anomaly detection and reconstruction accuracy. Code is available at https://github.com/zhg-SZPT/mDDAP.}
}