One-to-More: High-Fidelity Training-Free Anomaly Generation with Attention Control

📅 2026-03-18
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the challenge of industrial anomaly detection under extreme scarcity of anomalous samples, where existing few-shot generation methods often require time-consuming training and fail to faithfully replicate real anomaly distributions. To overcome these limitations, the authors propose O2MAG, a training-free few-shot anomaly generation approach that leverages self-attention from a single anomalous image to drive multiple diffusion processes in parallel. By integrating self-attention grafting, anomaly mask guidance, textual prompt alignment, and dual-attention enhancement, O2MAG generates high-fidelity, semantically consistent anomalous images. Experimental results demonstrate that the generated samples closely approximate the true anomaly distribution and significantly outperform state-of-the-art methods in downstream detection tasks, thereby substantially improving detection performance.

Technology Category

Application Category

📝 Abstract
Industrial anomaly detection (AD) is characterized by an abundance of normal images but a scarcity of anomalous ones. Although numerous few-shot anomaly synthesis methods have been proposed to augment anomalous data for downstream AD tasks, most existing approaches require time-consuming training and struggle to learn distributions that are faithful to real anomalies, thereby restricting the efficacy of AD models trained on such data. To address these limitations, we propose a training-free few-shot anomaly generation method, namely O2MAG, which leverages the self-attention in One reference anomalous image to synthesize More realistic anomalies, supporting effective downstream anomaly detection. Specifically, O2MAG manipulates three parallel diffusion processes via self-attention grafting and incorporates the anomaly mask to mitigate foreground-background query confusion, synthesizing text-guided anomalies that closely adhere to real anomalous distributions. To bridge the semantic gap between the encoded anomaly text prompts and the true anomaly semantics, Anomaly-Guided Optimization is further introduced to align the synthesis process with the target anomalous distribution, steering the generation toward realistic and text-consistent anomalies. Moreover, to mitigate faint anomaly synthesis inside anomaly masks, Dual-Attention Enhancement is adopted during generation to reinforce both self- and cross-attention on masked regions. Extensive experiments validate the effectiveness of O2MAG, demonstrating its superior performance over prior state-of-the-art methods on downstream AD tasks.
Problem

Research questions and friction points this paper is trying to address.

anomaly detection
anomaly generation
few-shot learning
training-free
industrial inspection
Innovation

Methods, ideas, or system contributions that make the work stand out.

training-free
anomaly generation
attention control
diffusion models
few-shot synthesis
🔎 Similar Papers
No similar papers found.
H
Haoxiang Rao
Nanjing University
Z
Zhao Wang
China Mobile Zijin Innovation Institute
C
Chenyang Si
Nanjing University
Y
Yan Lyu
China Mobile Zijin Innovation Institute
Y
Yuanyi Duan
Shandong University of Science and Technology
Fang Zhao
Fang Zhao
Nanjing University
Computer VisionPattern RecognitionDeep Learning
Caifeng Shan
Caifeng Shan
Philips Research
Computer VisionPattern RecognitionMachine LearningImage/Video Analysis