arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.09333cs.CVcs.AI
收藏

Prompt-CAM:使视觉Transformer可解释以用于细粒度分析

Prompt-CAM: Making Vision Transformers Interpretable for Fine-Grained Analysis

The Ohio State University(俄亥俄州立大学);University of Tsukuba(筑波大学);Virginia Tech(弗吉尼亚理工大学);Princeton University(普林斯顿大学);Rensselaer Polytechnic Institute(伦斯勒理工学院)
Arpita Chowdhury, Dipanjyoti Paul, Zheda Mai, Jianyang Gu, Ziheng Zhang, Kazi Sajeed Mehrab, Elizabeth G. Campolongo, Daniel Rubenstein, Charles V. Stewart, Anu… 展开作者

Arpita Chowdhury, Dipanjyoti Paul, Zheda Mai, Jianyang Gu, Ziheng Zhang, Kazi Sajeed Mehrab, Elizabeth G. Campolongo, Daniel Rubenstein, Charles V. Stewart, Anuj Karpatne, Tanya Berger-Wolf, Yu Su, Wei-Lun Chao

AI总结:

本文提出Prompt-CAM方法,通过为预训练视觉Transformer学习类别特定提示,利用真实类别的多头注意力图定位细粒度判别特征,实现几乎零额外成本的高质量可解释性,并在多个领域数据集上验证了其优越性。

摘要:

我们提出了一种简单的方法,使预训练的视觉Transformer(ViTs)可解释以用于细粒度分析,旨在识别和定位区分视觉相似类别(如鸟类物种)的特征。预训练的ViTs(如DINO)在提取局部化、判别性特征方面表现出卓越的能力。然而,像Grad-CAM这样的显著性图往往无法识别这些特征,产生模糊、粗糙的热力图,反而高亮整个物体。我们提出了一种新方法,即Prompt Class Attention Map(Prompt-CAM),以解决这一局限性。Prompt-CAM为预训练的ViT学习类别特定的提示,并使用相应的输出进行分类。为了正确分类图像,真实类别的提示必须关注其他类别图像中不存在的独特图像块(即特征)。因此,真实类别的多头注意力图揭示了特征及其位置。在实现方面,Prompt-CAM几乎是“免费的午餐”,只需对Visual Prompt Tuning(VPT)的预测头进行修改。这使得Prompt-CAM易于训练和应用,与其他需要设计特定模型和训练过程的可解释方法形成鲜明对比。在来自不同领域(例如鸟类、鱼类、昆虫、真菌、花卉、食物和汽车)的十几个数据集上进行的广泛实证研究验证了Prompt-CAM卓越的解释能力。源代码和演示可在https://github.com/Imageomics/Prompt_CAM获取。

英文摘要:

We present a simple approach to make pre-trained Vision Transformers (ViTs) interpretable for fine-grained analysis, aiming to identify and localize the traits that distinguish visually similar categories, such as bird species. Pre-trained ViTs, such as DINO, have demonstrated remarkable capabilities in extracting localized, discriminative features. However, saliency maps like Grad-CAM often fail to identify these traits, producing blurred, coarse heatmaps that highlight entire objects instead. We propose a novel approach, Prompt Class Attention Map (Prompt-CAM), to address this limitation. Prompt-CAM learns class-specific prompts for a pre-trained ViT and uses the corresponding outputs for classification. To correctly classify an image, the true-class prompt must attend to unique image patches not present in other classes' images (i.e., traits). As a result, the true class's multi-head attention maps reveal traits and their locations. Implementation-wise, Prompt-CAM is almost a ``free lunch,'' requiring only a modification to the prediction head of Visual Prompt Tuning (VPT). This makes Prompt-CAM easy to train and apply, in stark contrast to other interpretable methods that require designing specific models and training processes. Extensive empirical studies on a dozen datasets from various domains (e.g., birds, fishes, insects, fungi, flowers, food, and cars) validate the superior interpretation capability of Prompt-CAM. The source code and demo are available at https://github.com/Imageomics/Prompt_CAM.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑