arXiv:2505.22259cs.CV2025-05被引 3

通过可学习头权重提升零样本异常检测性能

Domain Adaptation of Attention Heads for Zero-shot Anomaly Detection

  • 在文本和图像编码器中引入可学习提示与注意力头权重
  • 工业领域像素级准确率提升4.9%,图像级提升3.7%
  • 适合无正常样本的工业与医疗异常检测场景

零样本异常检测(ZSAD)可在无目标类别正常样本的情况下实现异常识别,适用于缺乏特定任务训练数据的场景。现有方法或忽略视觉-语言模型对异常检测的适配,或仅实现部分适配。本文提出Head-adaptive CLIP(HeadCLIP),有效适配文本与图像编码器。HeadCLIP在文本编码器中引入可学习提示以泛化正常与异常概念,并在图像编码器中加入可学习头权重,动态调整注意力头特征以实现任务特定适配。进一步提出联合异常得分,利用适配后的像素级信息增强图像级检测。在17个跨工业与医疗领域的数据集上实验表明,HeadCLIP在像素与图像级别均优于现有方法,工业领域像素级平均异常检测得分(mAD)提升达4.9%点,图像级提升3.7%点;医疗领域分别提升3.2%点与3.2%点。代码与预训练权重已开源。

原文摘要 · Abstract (English)

Zero-shot anomaly detection (ZSAD) enables anomaly detection without normal samples from target categories, addressing scenarios where task-specific training data is unavailable. However, existing ZSAD methods either neglect adaptation of vision-language models to anomaly detection or implement only partial adaptation. This paper proposes Head-adaptive CLIP (HeadCLIP), which effectively adapts both text and image encoders. HeadCLIP employs learnable prompts in the text encoder to generalize normality and abnormality concepts, and introduces learnable head weights in the image encoder to dynamically adjust attention head features for task-specific adaptation. A joint anomaly score is further proposed to leverage adapted pixel-level information for enhanced image-level detection. Experiments on 17 datasets across industrial and medical domains demonstrate that HeadCLIP outperforms existing ZSAD methods at both pixel and image levels, achieving improvements of up to 4.9\%p in pixel-level mean anomaly detection score (mAD) and 3.7%p in image-level mAD in the industrial domain, with comparable gains (3.2%p, 3.2%p) in the medical domain. Code and pretrained weights are available at https://github.com/kiyoonjeong0305/HeadCLIP.

异常检测零样本CLIP适配

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。