Skip to main navigation Skip to search Skip to main content

MSWA-CLIP: Multi-Scale Window Attention Adaptation of CLIP for Zero-Shot Industrial Anomaly Detection

  • Lei Zhou
  • , Long Chen
  • , Tianjun Li
  • , Zhiyang Xie
  • , Yu Zhou
  • , Luotao Li
  • , Wei Wang
  • , Zongze Wu
  • Guangdong Laboratory of Artificial Intelligence and Digital Economy (SZ)
  • Shenzhen University

Research output: Contribution to journal › Conference article › peer-review

Abstract

Visual anomaly detection is widely applied in industrial inspection. Existing methods typically require abundant normal samples from the target domain, limiting their applicability in zero-shot scenarios. Recent CLIP-based approaches have shown promising zero-shot anomaly detection capability, but they mainly focus on text prompt design while overlooking the optimization of visual features. CLIP's visual encoder is pretrained for global semantic recognition, making it insensitive to local anomalous regions. In this paper, we propose MSWA-CLIP, which adapts CLIP for zero-shot industrial anomaly detection through three lightweight modules. First, a Multi-Scale Window Attention (MSWA) adapter is inserted at the output of each ViT block. It groups attention heads into different window sizes to capture anomalies at multiple scales. Second, a Class-Centered Context Aggregation (CCA) module uses Cross-Attention to let the [CLS] token aggregate anomaly-related information from the updated patch tokens, enhancing image-level classification. Third, learnable text prompts replace hand-crafted ones to better characterize normal and abnormal states. The entire framework freezes the CLIP encoder and only trains the lightweight adaptation modules on a source domain (VisA). It is then directly transferred to the target domain (MVTec AD) for zero-shot inference. Experimental results demonstrate the effectiveness of MSWA-CLIP, achieving competitive performance compared with recent state-of-the-art methods.

Original languageEnglish
Pages (from-to)2497-2501
Number of pages5
JournalYouth Academic Annual Conference of Chinese Association of Automation, YAC
Issue number2026
DOIs
StatePublished - 2026
Externally publishedYes
Event41st Youth Academic Annual Conference of Chinese Association of Automation, YAC 2026 - Changsha, China
Duration: 8 May 2026 → 10 May 2026

Keywords

  • CLIP
  • Industrial Inspection
  • Learnable Prompts
  • Multi-scale Adapter
  • Zero-shot Anomaly Detection

Fingerprint

Dive into the research topics of 'MSWA-CLIP: Multi-Scale Window Attention Adaptation of CLIP for Zero-Shot Industrial Anomaly Detection'. Together they form a unique fingerprint.

Cite this