acceptodds
Under review as a conference paper at ICLR 2027

AnomalyLoop: Closing the Generation–Detection Loop in Open-Set Training-Free Anomaly Generation

Abstract

Industrial visual anomaly detection has long been constrained by the scarcity of real anomalous samples and the open-ended nature of anomaly types. To alleviate this issue, open-set training-free anomaly generation has gradually emerged as a promising data synthesis paradigm, enabling the synthesis of unseen defects without anomaly specific training. However, existing methods still face two key challenges: spatial control is difficult to confine to fine-grained candidate anomaly formation regions, and generation remains separate from anomaly evaluation, such that insufficiently formed anomalies are only identified after generation and cannot be corrected through detection feedback. To address these challenges, we propose AnomalyLoop, a two-stage framework for open-set training-free anomaly generation comprising the exploration of fine-grained anomaly formation regions and generation–detection closed-loop trajectory optimization. The key idea is to transform anomaly detection from post-generation evaluation into terminal feedback for the full diffusion trajectory, thereby closing the loop between anomaly generation and detection. In the first stage, we propose an Anomaly Specific Region Exploration mechanism (ASRE) to construct fine-grained candidate anomaly formation regions. In the second stage, we use terminal detection results as the primary feedback and propagate this feedback backward through Trajectory Optimal Control (TOC) to optimize control decisions along the full diffusion trajectory, enabling detection-driven anomaly formation. Furthermore, we jointly incorporate semantic consistency and history-aware diversity as auxiliary terminal constraints to preserve target semantics while maintaining sample diversity. Experiments on MVTec AD and VisA show that AnomalyLoop achieves state-of-the-art generation quality and diversity among open-set training-free methods, while overall improving downstream anomaly detection performance.

Then back it, or bet against it.

Related papers

Open the market on this paper to see 7 more related papers.