Abstract
Unsupervised industrial anomaly detection aims to identify defects by training models solely on normal samples. However, powerful reconstruction models often encounter the "identical shortcut" problem, where they inadvertently learn to reconstruct unseen anomalies, leading to detection failures. We present the Attention-Guided Perturbation Network (AGPNet), which addresses this by intelligently perturbing critical foreground regions. By leveraging both prior attention from a frozen backbone and learnable attention from a mean teacher, AGPNet compels the network to learn robust representations of salient object features. Our method achieves state-of-the-art results on MVTec-AD and VisA benchmarks and demonstrates exceptional efficiency for real-time deployment.
Introduction
The primary challenge in unsupervised industrial anomaly detection is ensuring that a model trained only on "normal" data fails to reconstruct "anomalous" defects. Modern deep neural networks are often too effective at generalization, falling into an "identical shortcut" where they reconstruct defects they have never encountered. To mitigate this, researchers typically introduce noise (perturbation) to the input, forcing the model to "denoise" or "repair" the image.
However, standard methods apply noise uniformly. In industrial contexts, backgrounds are often static and irrelevant, while the foreground object contains the critical patterns. Uniform noise wastes training capacity on background pixels and fails to sufficiently challenge the model on the most important features.
The AGPNet Framework
The proposed AGPNet (Attention-Guided Perturbation Network) introduces a sample-aware perturbation strategy. Unlike previous methods that use random noise, AGPNet identifies and targets high-importance regions for perturbation.
The architecture consists of two primary branches:
- Reconstruction Branch: Utilizes a frozen DINO (ViT-S-16) backbone for feature extraction and a lightweight four-layer Transformer decoder for reconstruction.
- Auxiliary Attention Branch: Generates a sample-specific attention mask by combining Prior Attention (from the DINO backbone) and Learnable Attention (from an Exponential Moving Average (EMA) version of the decoder).
By applying Gaussian noise more aggressively to these "important" regions at both the image and feature levels, the model is forced to develop a deeper understanding of the object's structure. An "Easy-to-Hard" schedule is employed, increasing noise intensity as training progresses to prevent performance plateaus. Crucially, the auxiliary branch is discarded after training, ensuring high inference speeds.
Key Insights
- Foreground Focus: Effective anomaly detection requires challenging the model on defining features rather than empty space.
- Dynamic Curriculum via Mean Teacher: The EMA decoder tracks regions the model struggles with, allowing the system to dynamically adjust the perturbation mask as the model improves.
- Feature-Level Perturbation: Perturbing abstract features within the network is often more effective than raw pixel manipulation, as features encapsulate richer contextual information.
Experimental Results
AGPNet was evaluated on major industrial benchmarks including MVTec-AD, VisA, and MVTec-3D.
- State-of-the-Art Performance: In multi-class settings, AGPNet achieved 98.7% I-AUC and 98.0% P-AUC on MVTec-AD, surpassing previous leaders like UniAD.
- Few-Shot Robustness: The model remains highly effective with minimal training data. In a 4-shot setup, it achieved 97.3% P-AUC, outperforming memory-bank methods like PatchCore.
- Inference Efficiency: AGPNet operates at 326 FPS on an NVIDIA RTX 4090, making it ideal for real-time factory floor integration.
Conclusion
AGPNet successfully addresses the identical shortcut problem by focusing perturbations on salient foreground regions. While highly effective for industrial inspection, future work will explore its sensitivity to noisy training data and its applicability to other domains such as medical imaging and 3D point cloud integration.
Summary updated