DuoAD: Leveraging [CLS] Dual Characteristics for Training-Free Few-Shot Anomaly Detection
Jyun-Ze Tang, Po-Han Huang, Ming-Ching Chang, Chih-Fan Hsu, Jeng-Lin Li
Abstract
Vision foundation models have enabled strong training-free anomaly detection (AD). However, most existing approaches rely primarily on independent local patch features, leaving the global contextual information encoded by Vision Transformers (ViTs) underexploited. In this work, we identify the dual characteristics of the ViT [CLS] token: its embedding provides anomaly-invariant global semantic representation, while its attention maps implicitly highlight spatially abnormal regions. Building on this observation, we propose a fully automated AD framework leveraging global context to remove manual tunings. Our framework introduces (1) an automatic augmentation selection strategy driven by [CLS]-level semantic consistency, and (2) an attention-guided feature reweighting mechanism that dynamically adjusts patch contributions according to [CLS] attention saliency. By integrating these components over multi-level features, our method achieves stable anomaly scoring and precise localization without training or parameter tuning. Under the one-shot setting, it achieves Image-AUC scores of 97.7%, 93.2%, and 84.5% on MVTec-AD, VisA, and Real-IAD. Using a single fixed configuration across categories, backbones, and datasets, the method establishes a new state-of-the-art for plug-and-play, training-free anomaly detection while maintaining strong robustness and practical scalability.
Create a lesson
Metadata
- Categories
- cs.CV, cs.AI
- Comments
- Code: https://github.com/inventec-ai-center/DuoAD
Related papers
Focus Only on What's Important: Training-Free Focus Maps for Frozen Vision Transformers in Long-Video Object Segmentation
Shared title terminologycs.CVHarsha Karipineni, Rajesh Reddy Chintha
ReflexTrack: A Feedback-Driven Agent for Training-Free Referring Video Object Segmentation
Shared title terminologycs.CVYuanjia Li, Tianyang Xu, Tao Zhou et al.
Closing the Loop: Training-Free Revisit Consistency for Autoregressive Generative Rendering
Shared title terminologycs.CVWenchao Ma, Changran Liu, Sharon X. Huang et al.
ADClaw: A Programmable Visual Agent for Industrial Anomaly Detection and Understanding
Shared title terminologycs.CVXinyi Wu, Rongxin Gao, YuHui Lin et al.
Impact Detection in Fall Events: Leveraging Spatio-Temporal Graph Convolutional Networks and Recurrent Neural Networks Using 3D Skeletons Data
Shared title terminologycs.CVTresor Y. Koffi, Youssef Mourchid, Mohammed Hindawi et al.
Few-Shot Open-Vocabulary Remote Sensing Segmentation via Textual Inversion
Shared title terminologycs.CVJunhyuk Heo, Junghwan Park