VisualAD: Language-Free Zero-Shot Anomaly Detection via Vision Transformer

Yanning Hou, Peiyuan Li, Zirui Liu, Yitong Wang, Yanran Ruan +2 more
3/9/2026
20 citations
cs.CV
transformer-attention

Official code: 7HHHHH/VisualAD (144 stars, Python, last commit 2026-03-26).

Abstract

Zero-shot anomaly detection (ZSAD) requires detecting and localizing anomalies without access to target-class anomaly samples. Mainstream methods rely on vision-language models (VLMs) such as CLIP: they build hand-crafted or learned prompt sets for normal and abnormal semantics, then compute image-text similarities for open-set discrimination.

Show full abstract

While effective, this paradigm depends on a text encoder and cross-modal alignment, which can lead to training instability and parameter redundancy. This work revisits the necessity of the text branch in ZSAD and presents VisualAD, a purely visual framework built on Vision Transformers. We introduce two learnable tokens within a frozen backbone to directly encode normality and abnormality. Through multi-layer self-attention, these tokens interact with patch tokens, gradually acquiring high-level notions of normality and anomaly while guiding patches to highlight anomaly-related cues. Additionally, we incorporate a Spatial-Aware Cross-Attention (SCA) module and a lightweight Self-Alignment Function (SAF): SCA injects fine-grained spatial information into the tokens, and SAF recalibrates patch features before anomaly scoring. VisualAD achieves state-of-the-art performance on 13 zero-shot anomaly detection benchmarks spanning industrial and medical domains, and adapts seamlessly to pretrained vision backbones such as the CLIP image encoder and DINOv2. Code: https://github.com/7HHHHH/VisualAD

View on arXivView PDF

Code Implementations(1)

7HHHHH/VisualADOfficial100%

VisualAD: Language-Free Zero-Shot Anomaly Detection via Vision Transformer (CVPR 2026)

14416Python, ShellJan 31, 20268 months ago

Similar Papers

Cite this paper

@article{hou2026visualad,
  title  = {VisualAD: Language-Free Zero-Shot Anomaly Detection via Vision Transformer},
  author = {Yanning Hou and Peiyuan Li and Zirui Liu and Yitong Wang and Yanran Ruan and Jianfeng Qiu and Ke Xu},
  year   = {2026},
  eprint = {2603.07952},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2603.07952v1},
  journal = {CVPR 2026 2026}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2603.07952.svg)](https://codeofpaper.com/paper/2603.07952)

Discussion