ABounD: Adversarial Boundary-Driven Few-Shot Learning for Multi-Class Anomaly Detection

Runzhi Deng, Yundi Hu, Xinshuang Zhang, Zhao Wang, Xixi Liu, Wang-Zhou Dai, Caifeng Shan, Fang ZhaoarXiv 2025 · DOI · arXiv

Abstract

ABounD is a single-stage learning framework designed for multi-class, few-shot anomaly detection. It addresses the "boundary blurring" issue common in vision-language models by utilizing class-adaptive semantic anchors and adversarially synthesized "fence features." This approach enables the creation of precise decision boundaries across multiple product categories simultaneously, achieving state-of-the-art performance with high efficiency.

Introduction

In industrial quality control, detecting defects (anomalies) is critical but faces two major hurdles: data scarcity and scalability. Real-world anomalies are rare, and collecting thousands of "normal" samples for every new product is expensive. Furthermore, most current models require "one-model-per-class" retraining. Moving to a "one-for-all" multi-class model often leads to feature space collapse and cross-class interference, where the model struggles to distinguish a normal variation in one product from a defect in another.

Comparison of decision boundaries between original CLIP, existing few-shot methods, and the proposed ABounD framework.

Existing vision-language models like CLIP provide a strong foundation but often produce "loose" decision boundaries that miss subtle defects or misclassify atypical normal samples. ABounD (Adversarial Boundary-Driven learning) addresses this by "sculpting" the feature space to create tighter, more accurate boundaries.

Methodology

ABounD employs two primary mechanisms to refine the decision boundary in a single-stage training process:

Dynamic Concept Fusion (DCF)

Instead of using static text prompts, DCF creates class-adaptive semantic anchors. It utilizes a Mixture-of-Experts (MoE) to capture universal anomaly patterns and a Query-Aware Calibration module to adjust for specific image conditions like lighting or texture. This ensures each class has a stable, tailored "center" in the feature space.

Adversarial Boundary Forging (ABF)

To compensate for the lack of real anomaly data during training, ABF acts as a "Geometric Sculptor." It uses Projected Gradient Descent (PGD) to synthesize "fence features"—adversarial hard examples that sit on the edge of the normal distribution. By training the model to distinguish these fence points from true normal points, the decision boundary becomes sharp and tight.

The ABounD architecture, featuring the Dynamic Concept Fusion (DCF) and Adversarial Boundary Forging (ABF) modules integrated with a ViT backbone.

The entire system is optimized using a Concept-Boundary Loss (CBL), which balances semantic alignment with geometric boundary optimization. To ensure stability during the iterative PGD process, the authors implement a stop-gradient operator, allowing the model to learn from the adversarial search results without destabilizing the training loop.

Evaluation and Results

The model was evaluated on seven major industrial anomaly detection benchmarks, including MVTec-AD, VisA, BTAD, MVTec-3D, DTD, MPDD, and Real-IAD. This broad evaluation demonstrates robustness across diverse categories ranging from hardware to food products.

  • State-of-the-Art Performance: ABounD consistently outperformed existing few-shot methods. In a 4-shot setting, it achieved an average AUROC of 90.8% across all seven benchmarks.
  • Efficiency: The model is highly efficient, completing 1-shot training in just 2.5 minutes on a single RTX 4090 and maintaining an inference speed of 11.7 FPS.
  • Automatic Routing: The framework can automatically identify product categories with over 99% accuracy, enabling label-free deployment in multi-product environments.

Discussion and Limitations

ABounD shifts the paradigm from passive alignment to active boundary defense. By disentangling concepts—separating object identity from defectiveness—the model effectively transfers knowledge across categories. However, the method relies heavily on a pre-trained ViT-L/14 backbone, and its performance on smaller architectures remains to be explored. Additionally, while the "fence features" are powerful, future work could integrate more sophisticated generative models to create even more realistic synthetic defects for spatial supervision. Extremely similar categories (e.g., two different types of screws) may still present challenges for cross-class interference despite the high routing accuracy.

Summary updated

Abstract

Few-shot multi-class industrial anomaly detection identifies diverse defects across multiple categories using a single unified model and limited normal samples. Although vision-language models offer strong generalization, modeling multiple distinct category manifolds concurrently without actual anomalous data causes feature space collapse and cross-class interference. Consequently, existing methods often fail to balance scalability and precision, leading to either isolated single-class retraining or excessively loose decision margins. To address this limitation, we present a one-for-all learning framework called ABounD that unites semantic concept anchoring with geometric boundary optimization. This method employs two lightweight mechanisms to resolve multi-class ambiguity. First, the Dynamic Concept Fusion module generates class-adaptive semantic anchors via query-aware hierarchical calibration, disentangling overlapping category concepts. Second, using these anchors, the Adversarial Boundary Forging module constructs a tight, class-tailored decision margin by synthesizing adversarial boundary-level fence features to prevent cross-class boundary blurring. Optimized in a single stage, ABounD removes the requirement for isolated per-category retraining in few-shot settings. Experiments on seven industrial benchmarks show that the proposed method achieves state-of-the-art detection and localization performance for multi-class few-shot anomaly detection while maintaining low computational costs during training and inference.
BibTeX
@misc{deng2025abound,
  author = {Runzhi Deng and Yundi Hu and Xinshuang Zhang and Zhao Wang and Xixi Liu and Wang-Zhou Dai and Caifeng Shan and Fang Zhao},
  title = {{ABounD: Adversarial Boundary-Driven Few-Shot Learning for Multi-Class Anomaly Detection}},
  year = {2025},
  eprint = {2511.22436},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.22436},
}
Figure