Abstract
Visual Anomaly Detection (VAD) has traditionally relied on domain-specific models trained on large amounts of normal data. We present UniVAD, a training-free, unified framework that generalizes across industrial, medical, and logical domains using only a few reference images. By integrating vision foundation models with graph-based component modeling, UniVAD achieves state-of-the-art performance in few-shot settings without any domain-specific fine-tuning or training.
Introduction
Visual Anomaly Detection (VAD) is the critical task of identifying images that deviate from a "normal" pattern, such as finding surface defects in manufacturing, structural errors in logical sequences, or pathological regions in medical imaging. Historically, VAD has been fragmented into three distinct silos: Industrial, Logical, and Medical.
Current state-of-the-art methods typically follow a "one-category-one-model" paradigm, requiring hundreds of normal samples to train a specific model for a specific object. These models struggle to generalize across different domains; a model optimized for industrial defects often fails when applied to logical or medical anomalies. UniVAD aims to break these barriers with a single, "one-for-all" model that requires zero training by leveraging the zero-shot capabilities of large-scale foundation models.
Methodology
UniVAD bypasses the traditional training phase by leveraging powerful pre-trained vision foundation models (such as DINOv2 and CLIP) within a three-part architecture designed to handle diverse anomaly types.
1. Contextual Component Clustering ($C^3$)
To understand an image, the model first segments it into its constituent parts. UniVAD uses the Recognize Anything Model (RAM) for object tagging and Grounded SAM for initial segmentation. These segments are refined using K-means clustering on deep features to ensure consistent component masks across both "normal" reference images and "query" test images.
2. Component-Aware Patch Matching (CAPM)
Standard patch-matching methods often suffer from false positives by comparing unrelated regions. CAPM restricts the search space: it only compares a specific component patch in the test image (e.g., a "bolt") to corresponding component patches in the reference images. It also incorporates text-image similarity to distinguish between normal and abnormal semantic states.
3. Graph-Enhanced Component Modeling (GECM)
Logical anomalies are challenging because individual parts may look normal, but their arrangement is incorrect. GECM treats each segmented component as a node in a graph. Using a Graph Attention Network (GAT), the model learns the spatial and logical relationships between parts. If a component is missing or misplaced, the resulting change in graph structure triggers an anomaly alert.
Evaluation and Results
The authors evaluated UniVAD on a suite of nine datasets spanning industrial (MVTec-AD, VisA), logical (MVTec LOCO), and medical (BrainMRI, LiverCT, RESC, HIS, ChestXray, OCT17) domains. This broad evaluation demonstrates the model's truly unified nature.
UniVAD sets a new benchmark for 1-shot (using only one normal reference image) anomaly detection:
- Industrial: On MVTec-AD, it achieved 97.8% Image-level AUC, significantly outperforming previous leaders like AnomalyGPT (94.1%).
- Logical: On the challenging MVTec LOCO dataset, it reached 71.0% AUC, whereas industrial-focused models like PatchCore dropped to 62.0%.
- Medical: It showed massive improvements in specialized fields, such as a 70.0% AUC on LiverCT, nearly doubling the performance of some previous unified attempts.
Discussion and Conclusion
UniVAD demonstrates that semantic constraints and graph-based reasoning can drastically reduce the noise and false positives common in traditional VAD. By forcing the model to match features within the same semantic component, UniVAD achieves high precision across disparate domains.
The primary trade-off for this performance is computational latency. Because UniVAD relies on several heavy foundation models (RAM, Grounded SAM, DINOv2) during inference, it is currently unsuitable for high-speed real-time applications. Future work will likely focus on distilling these complex modules into a more lightweight architecture to maintain unified accuracy while increasing processing speed.
Summary updated