AA-CLIP: Enhancing Zero-Shot Anomaly Detection via Anomaly-Aware CLIP

Wenxin Ma, Xu Zhang, Qingsong Yao, Fenghe Tang, Chenxu Wu +4 more
2/10/2026

No official code found. Best implementation: Mwxinnn/AA-CLIP (267 stars, Apache-2.0, last commit 2025-05-26).

Abstract

Anomaly detection (AD) identifies outliers for applications like defect and lesion detection. While CLIP shows promise for zero-shot AD tasks due to its strong generalization capabilities, its inherent Anomaly-Unawareness leads to limited discrimination between normal and abnormal features. To address this problem, we propose Anomaly-Aware CLIP (AA-CLIP), which enhances CLIP's anomaly discrimination ability in both text and visual spaces while preserving its generalization capability. AA-CLIP is achieved through a straightforward yet effective two-stage approach: it first creates anomaly-aware text anchors to differentiate normal and abnormal semantics clearly, then aligns patch-level visual features with these anchors for precise anomaly localization. This two-stage strategy, with the help of residual adapters, gradually adapts CLIP in a controlled manner, achieving effective AD while maintaining CLIP's class knowledge. Extensive experiments validate AA-CLIP as a resource-efficient solution for zero-shot AD tasks, achieving state-of-the-art results in industrial and medical applications. The code is available at https://github.com/Mwxinnn/AA-CLIP.

View on arXivView PDF

Code Implementations(1)

Mwxinnn/AA-CLIPCommunity100%
Apache-2.0

The official implementation of AA-CLIP: Enhancing Zero-shot Anomaly Detection via Anomaly-Aware CLIP

26724Shell, PythonMar 9, 20251 years agoApache-2.0

Similar Papers

Cite this paper

@article{ma2026aaclip,
  title  = {AA-CLIP: Enhancing Zero-Shot Anomaly Detection via Anomaly-Aware CLIP},
  author = {Wenxin Ma and Xu Zhang and Qingsong Yao and Fenghe Tang and Chenxu Wu and Yingtai Li and Rui Yan and Zihang Jiang and S.Kevin Zhou},
  year   = {2026},
  eprint = {2503.06661},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2503.06661},
  journal = {CVPR 2025 2025}
}

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/2503.06661.svg)](https://codeofpaper.com/paper/2503.06661)

Discussion