[Paper Review] GLAD: Towards Better Reconstruction with Global and Local Adaptive Diffusion Models for Unsupervised Anomaly Detection
GLAD proposes a global and local adaptive diffusion model for unsupervised anomaly detection that dynamically selects denoising steps per sample based on reconstruction difficulty and applies spatial-adaptive feature fusion to remove residual anomalies. By introducing synthetic abnormal samples during training and adapting both global denoising steps and local feature fusion, GLAD achieves state-of-the-art performance on MVTec-AD, MPDD, VisA, and PCB-Bank, improving reconstruction fidelity and anomaly localization while preserving normal details.
Diffusion models have shown superior performance on unsupervised anomaly detection tasks. Since trained with normal data only, diffusion models tend to reconstruct normal counterparts of test images with certain noises added. However, these methods treat all potential anomalies equally, which may cause two main problems. From the global perspective, the difficulty of reconstructing images with different anomalies is uneven. Therefore, instead of utilizing the same setting for all samples, we propose to predict a particular denoising step for each sample by evaluating the difference between image contents and the priors extracted from diffusion models. From the local perspective, reconstructing abnormal regions differs from normal areas even in the same image. Theoretically, the diffusion model predicts a noise for each step, typically following a standard Gaussian distribution. However, due to the difference between the anomaly and its potential normal counterpart, the predicted noise in abnormal regions will inevitably deviate from the standard Gaussian distribution. To this end, we propose introducing synthetic abnormal samples in training to encourage the diffusion models to break through the limitation of standard Gaussian distribution, and a spatial-adaptive feature fusion scheme is utilized during inference. With the above modifications, we propose a global and local adaptive diffusion model (abbreviated to GLAD) for unsupervised anomaly detection, which introduces appealing flexibility and achieves anomaly-free reconstruction while retaining as much normal information as possible. Extensive experiments are conducted on three commonly used anomaly detection datasets (MVTec-AD, MPDD, and VisA) and a printed circuit board dataset (PCB-Bank) we integrated, showing the effectiveness of the proposed method.
Motivation & Objective
- To address the suboptimal reconstruction in diffusion-based unsupervised anomaly detection due to fixed denoising steps across diverse anomaly types.
- To improve reconstruction quality by adapting the denoising step per sample based on the discrepancy between input and diffusion model priors.
- To enhance local reconstruction in abnormal regions by modeling deviations from standard Gaussian noise predictions.
- To reduce residual anomalies in reconstructed images through a spatial-adaptive feature fusion mechanism.
- To improve the model's ability to reconstruct anomalous regions as normal by training with synthetic abnormal samples.
Proposed method
- Proposes an Adaptive Denoising Step (ADS) strategy that evaluates reconstruction quality step-by-step to select the optimal denoising step per test sample, minimizing reconstruction error while preserving normal details.
- Introduces an Anomaly-oriented Training Paradigm (ATP) that synthesizes abnormal samples during training to help the diffusion model learn to map anomalous regions to normal counterparts.
- Employs a spatial-adaptive feature fusion (SAFF) mechanism that fuses features from the test image and the reconstructed sample using a mask derived from the anomaly map at the optimal denoising step.
- Uses the difference between the noise-contaminated input and the reconstructed output at each denoising step to guide the selection of the optimal step, enabling global adaptivity.
- Leverages the diffusion model's inherent denoising process to predict noise at each step, with abnormal regions showing deviations from standard Gaussian noise, which ATP helps correct.
- Applies a multi-stage inference pipeline combining ADS, ATP, and SAFF to achieve both global and local adaptivity in reconstruction.
Experimental results
Research questions
- RQ1Can adaptive denoising steps per sample improve reconstruction quality and detail preservation in unsupervised anomaly detection with diffusion models?
- RQ2How can local reconstruction differences between normal and abnormal regions be effectively modeled to reduce residual anomalies?
- RQ3Can training with synthetic abnormal samples improve the diffusion model’s ability to reconstruct anomalies as normal regions?
- RQ4To what extent does spatial-adaptive feature fusion reduce residual anomaly information in reconstructed images?
- RQ5Does combining adaptive denoising, anomaly-oriented training, and adaptive fusion lead to superior detection and localization performance?
Key findings
- GLAD achieves state-of-the-art performance on MVTec-AD, MPDD, VisA, and PCB-Bank, with an I-AUROC of 99.3 on MVTec-AD using 750 steps.
- The Adaptive Denoising Step (ADS) mechanism selects smaller steps (e.g., 350) for small anomalies and larger steps (e.g., 900) for large-scale anomalies like missing elements.
- The Anomaly-oriented Training Paradigm (ATP) significantly improves reconstruction of abnormal regions, reducing residual anomalies compared to the baseline LDM.
- Spatial-Adaptive Feature Fusion (SAFF) further reduces residual anomaly information, improving detection performance, especially in normal regions with subtle differences.
- Combining ADS with ATP leads to better reconstruction quality, as shown in qualitative comparisons where ATP enables earlier and cleaner anomaly removal.
- The method preserves more normal image details by avoiding uniformly high denoising steps, reducing false positives in normal areas.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.