Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

One-for-More: Continual Diffusion Model for Anomaly Detection

About

With the rise of generative models, there is a growing interest in unifying all tasks within a generative framework. Anomaly detection methods also fall into this scope and utilize diffusion models to generate or reconstruct normal samples when given arbitrary anomaly images. However, our study found that the diffusion model suffers from severe ``faithfulness hallucination'' and ``catastrophic forgetting'', which can't meet the unpredictable pattern increments. To mitigate the above problems, we propose a continual diffusion model that uses gradient projection to achieve stable continual learning. Gradient projection deploys a regularization on the model updating by modifying the gradient towards the direction protecting the learned knowledge. But as a double-edged sword, it also requires huge memory costs brought by the Markov process. Hence, we propose an iterative singular value decomposition method based on the transitive property of linear representation, which consumes tiny memory and incurs almost no performance loss. Finally, considering the risk of ``over-fitting'' to normal images of the diffusion model, we propose an anomaly-masked network to enhance the condition mechanism of the diffusion model. For continual anomaly detection, ours achieves first place in 17/18 settings on MVTec and VisA. Code is available at https://github.com/FuNz-0/One-for-More

Xiaofan Li, Xin Tan, Zhuo Chen, Zhizhong Zhang, Ruixin Zhang, Rizen Guo, Guannan Jiang, Yulong Chen, Yanyun Qu, Lizhuang Ma, Yuan Xie• 2025

Related benchmarks

TaskDatasetResultRank
Continual Anomaly DetectionVisA Setting 5: 11-1 with 1 Step
A-AUROC (Image-level)93.7
18
Anomaly DetectionVisA 12-class
Instance-level AUC (Avg)62.8
13
Anomaly DetectionMVTec-AD 15-class
I-AUC (Average)74.3
13
Anomaly LocalizationMVTec-AD 15-class
AP (Pixel, Avg)28
12
Anomaly Detection and LocalizationVisA 12 classes 1.0 (test)--
12
Continual Anomaly DetectionVisA Setting 6: 8-4 with 1 Step
Image-level A-AUROC85.3
10
Continual Anomaly DetectionVisA Setting 7: 8-1x4 with 4 Steps
Image-level A-AUROC83.4
10
Continual Anomaly DetectionMVTec 14 - 1 with 1 Step AD (test)
A-AUROC (Image-level)96.4
10
Continual Anomaly DetectionMVTec 10 - 5 with 1 Step AD (test)
Image-level A-AUROC94.2
10
Continual Anomaly DetectionMVTec 3 x 5 with 5 Steps AD (test)
Image-level A-AUROC89.1
10
Showing 10 of 43 rows

Other info

Code

Follow for update