[论文解读] GLAD: Towards Better Reconstruction with Global and Local Adaptive Diffusion Models for Unsupervised Anomaly Detection
GLAD 提出了一种用于无监督异常检测的全局与局部自适应扩散模型,该模型根据重建难度动态选择每张样本的去噪步数,并通过空间自适应特征融合消除残留异常。通过在训练过程中引入合成异常样本,并同时自适应调整全局去噪步数与局部特征融合,GLAD 在 MVTec-AD、MPDD、VisA 和 PCB-Bank 上实现了最先进性能,提升了重建保真度与异常定位能力,同时保持了正常细节。
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.
研究动机与目标
- 为解决基于扩散模型的无监督异常检测中因对所有异常类型采用固定去噪步数而导致的次优重建问题。
- 通过基于输入与扩散模型先验之间差异的分析,自适应调整每张样本的去噪步数,以提升重建质量。
- 通过建模标准高斯噪声预测的偏离程度,提升异常区域的局部重建质量。
- 通过空间自适应特征融合机制减少重建图像中的残留异常。
- 通过使用合成异常样本进行训练,提升模型将异常区域重建为正常区域的能力。
提出的方法
- 提出一种自适应去噪步数(ADS)策略,逐步评估重建质量,为每个测试样本选择最优去噪步数,以最小化重建误差并保留正常细节。
- 引入一种面向异常的训练范式(ATP),在训练过程中合成异常样本,帮助扩散模型学习将异常区域映射为对应正常形态。
- 采用空间自适应特征融合(SAFF)机制,利用在最优去噪步数下生成的异常图掩码,融合测试图像与重建样本的特征。
- 利用每一步去噪过程中噪声污染输入与重建输出之间的差异,指导最优步数的选择,实现全局自适应。
- 利用扩散模型固有的去噪过程预测每一步的噪声,异常区域表现出与标准高斯噪声的偏离,ATP 有助于纠正这些偏离。
- 采用多阶段推理流程,结合 ADS、ATP 和 SAFF,实现在重建过程中的全局与局部自适应。
实验结果
研究问题
- RQ1每张样本自适应调整去噪步数是否能提升基于扩散模型的无监督异常检测中的重建质量与细节保留?
- RQ2如何有效建模正常与异常区域之间的局部重建差异,以减少残留异常?
- RQ3通过使用合成异常样本进行训练,能否提升扩散模型将异常区域重建为正常区域的能力?
- RQ4空间自适应特征融合在多大程度上能减少重建图像中的残留异常信息?
- RQ5结合自适应去噪、面向异常的训练与自适应融合,是否能带来更优的检测与定位性能?
主要发现
- GLAD 在 MVTec-AD、MPDD、VisA 和 PCB-Bank 上均达到最先进性能,使用 750 步时在 MVTec-AD 上取得 99.3 的 I-AUROC。
- 自适应去噪步数(ADS)机制为小异常选择较小步数(如 350),为大范围异常(如缺失部件)选择更大步数(如 900)。
- 面向异常的训练范式(ATP)显著提升了异常区域的重建质量,相比基线 LDM 明显减少了残留异常。
- 空间自适应特征融合(SAFF)进一步减少了残留异常信息,尤其在具有细微差异的正常区域中提升了检测性能。
- 结合 ADS 与 ATP 可实现更优的重建质量,定性对比显示 ATP 使异常更早且更清晰地被去除。
- 通过避免统一采用高去噪步数,该方法保留了更多正常图像细节,从而减少了正常区域的误报。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。