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

Xiaofan Li, Xin Tan, Zhuoran Chen, Zhizhong Zhang, Ruixin Zhang +6 more
2/10/2026

No official code found. Best implementation: FuNz-0/One-for-More (64 stars, Unlicense, last commit 2025-05-07).

Abstract

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

View on arXivView PDF

Code Implementations(1)

FuNz-0/One-for-MoreCommunity100%
Unlicense

The official implementation of “One-for-More: Continual Diffusion Model for Anomaly Detection” (CVPR2025)

646Shell, PythonFeb 27, 20251 years agoUnlicense

Similar Papers

Cite this paper

@article{li2026oneformore,
  title  = {One-for-More: Continual Diffusion Model for Anomaly Detection},
  author = {Xiaofan Li and Xin Tan and Zhuoran Chen and Zhizhong Zhang and Ruixin Zhang and Rizen Guo and Guannan Jiang and Yulong Chen and Yanyun Qu and Lizhuang Ma and Yuan Xie},
  year   = {2026},
  eprint = {2502.19848},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2502.19848},
  journal = {CVPR 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.19848.svg)](https://codeofpaper.com/paper/2502.19848)

Discussion