Abstract
Universal visual anomaly detection (AD) aims to identify anomaly images and segment anomaly regions towards open and dynamic scenarios, following zero- and few-shot paradigms without any dataset-specific fine-tuning. We have witnessed significant progress in widely use of visual-language foundational models in recent approaches. However, current methods often struggle with complex prompt engineering, elaborate adaptation modules, and challenging training strategies, ultimately limiting their flexibility and generality. To address these issues, this paper rethinks the fundamental mechanism behind visual-language models for AD and presents an embarrassingly simple, general, and effective framework for Universal vision Anomaly Detection (UniADet). Specifically, we first find language encoder is used to derive decision weights for anomaly classification and segmentation, and then demonstrate that it is unnecessary for universal AD. Second, we propose an embarrassingly simple method to completely decouple classification and segmentation, and decouple cross-level features, i.e., learning independent weights for different tasks and hierarchical features. UniADet is highly simple (learning only decoupled weights), parameter-efficient (only 0.002M learnable parameters), general (adapting a variety of foundation models), and effective (surpassing state-of-the-art zero-/few-shot by a large margin and even full-shot AD methods for the first time) on 14 real-world AD benchmarks covering both industrial and medical domains.
Introduction: Moving Beyond Language-Dependent Models
Visual Anomaly Detection (AD)—the task of identifying "weird" images or pixels in industrial or medical settings—has recently been dominated by Vision-Language Models (VLMs) like CLIP. These methods rely on "prompt engineering" (e.g., comparing an image to the text "a photo of a defect") to find anomalies. However, this reliance introduces significant complexity and inflexibility.
The authors identify three major challenges with current VLM-based approaches:
- Complexity: Existing methods require elaborate adaptation modules and convoluted training strategies.
- Inflexibility: They are strictly tied to VLMs, making it difficult to leverage purely visual foundation models like DINOv2 or DINOv3.
- The "Learning Conflict": Most models use shared weights to decide if an entire image is anomalous (classification) and which specific pixels are anomalous (segmentation). Because global image features and local patch features live on different mathematical manifolds, forcing them to share weights often degrades performance.
The UniADet Framework
UniADet is a language-free framework that rethinks how foundation models are utilized for AD. The core insight is that the text encoder in VLM-based AD essentially acts as a "middleman" providing weight vectors for a linear classifier. By learning these vectors directly from visual data, the language component becomes redundant, allowing for a more streamlined and flexible architecture.
Key Pillars of UniADet:
- Language-Free Weight Learning: UniADet learns decision weights directly, removing the need for a text encoder during inference.
- Complete Decoupling:
- Task Decoupling: Independent weights are learned for classification ($W_{cls}$) and segmentation ($W_{seg}$), avoiding the interference found in shared-weight models.
- Hierarchical Decoupling: Specific weights are learned for different layers of the foundation model. This allows shallow layers to focus on fine-grained pixel details while deeper layers handle high-level semantic anomalies.
- Few-Shot Memory Bank: A multi-scale memory bank stores and compares features to handle scenarios where only a few "normal" examples are available.
- Class-Aware Augmentation (CAA): A training strategy using "Grid Mosaic" and "Grid Cropping" helps the model learn contextual discrepancies without losing semantic consistency.
Experimental Evaluation
UniADet was evaluated on 14 real-world benchmarks across industrial (e.g., MVTec AD, VisA, Real-IAD) and medical (e.g., BrainMRI, ISIC) domains. The model used the VisA dataset as an auxiliary training set to learn universal weights and then demonstrated zero-shot generalization across the remaining 13 datasets.
Key Results:
- Extreme Efficiency: UniADet uses only 0.002M (2,000) learnable parameters—roughly 10,000x fewer than some competing state-of-the-art (SOTA) methods.
- Superior Accuracy: On the industrial Real-IAD benchmark, UniADet achieved 82.5% I-AUROC, outperforming the previous SOTA by approximately 8%.
- Beating "Full-Shot" Models: In the few-shot regime (using only 4 normal images), UniADet outperformed several "full-shot" models that were trained on entire normal datasets.
- Real-Time Performance: It achieves an inference time of 15.7ms per image on an H20 GPU, making it highly suitable for real-time industrial inspection.
Conclusion
UniADet demonstrates that an "embarrassingly simple" framework can outperform complex vision-language models by addressing the fundamental learning conflicts between classification and segmentation. By decoupling these tasks and removing language dependency, UniADet provides a highly efficient, parameter-light, and general solution for universal vision anomaly detection.
Summary updated