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

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Li, Xiaofan, Tan, Xin, Chen, Zhuo, Zhang, Zhizhong, Zhang, Ruixin, Guo, Rizen, Jiang, Guannan, Chen, Yulong, Qu, Yanyun, Ma, Lizhuang, Xie, Yuan
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866913951684493312
author Li, Xiaofan
Tan, Xin
Chen, Zhuo
Zhang, Zhizhong
Zhang, Ruixin
Guo, Rizen
Jiang, Guannan
Chen, Yulong
Qu, Yanyun
Ma, Lizhuang
Xie, Yuan
author_facet Li, Xiaofan
Tan, Xin
Chen, Zhuo
Zhang, Zhizhong
Zhang, Ruixin
Guo, Rizen
Jiang, Guannan
Chen, Yulong
Qu, Yanyun
Ma, Lizhuang
Xie, Yuan
contents 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
format Preprint
id arxiv_https___arxiv_org_abs_2502_19848
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle One-for-More: Continual Diffusion Model for Anomaly Detection
Li, Xiaofan
Tan, Xin
Chen, Zhuo
Zhang, Zhizhong
Zhang, Ruixin
Guo, Rizen
Jiang, Guannan
Chen, Yulong
Qu, Yanyun
Ma, Lizhuang
Xie, Yuan
Computer Vision and Pattern Recognition
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
title One-for-More: Continual Diffusion Model for Anomaly Detection
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2502.19848