Skip to main content
QUICK REVIEW

[论文解读] Exploring Visual Interpretability for Contrastive Language-Image Pre-training

Yi Li, Hualiang Wang|arXiv (Cornell University)|Sep 15, 2022
Multimodal Machine Learning Applications被引用 11
一句话总结

本文提出ECLIP方法,通过识别对比语言-图像预训练(CLIP)在池化层中因语义偏移导致错误地优先关注背景区域而非前景区域,从而提升其视觉可解释性。通过在训练过程中用自监督注意力图引导的掩码最大池化(Masked Max Pooling)替代注意力池化,ECLIP在不损失识别准确率的前提下纠正了可视化偏差,在三个基准测试上实现了最先进的可解释性表现。

ABSTRACT

Contrastive Language-Image Pre-training (CLIP) learns rich representations via readily available supervision of natural language. It improves the performance of downstream vision tasks, including but not limited to the zero-shot, long tail, segmentation, retrieval, caption, and video. However, the visual explainability of CLIP is rarely studied, especially for the raw feature map. To provide visual explanations of its predictions, we propose the Image-Text Similarity Map (ITSM). Based on it, we surprisingly find that CLIP prefers the background regions than the foregrounds, and shows erroneous visualization results against human understanding. This phenomenon is universal for both vision transformers and convolutional networks, which suggests this problem is unique and not owing to certain network. Experimentally, we find the devil is in the pooling part, where inappropriate pooling methods lead to a phenomenon called semantic shift. For this problem, we propose the Explainable Contrastive Language-Image Pre-training (ECLIP), which corrects the explainability via the Masked Max Pooling. Specifically, to avoid the semantic shift, we replace the original attention pooling by max pooling to focus on the confident foreground, with guidance from free attention during training. Experiments on three datasets suggest that ECLIP greatly improves the explainability of CLIP, and beyond previous explainability methods at large margins. The code will be released later.

研究动机与目标

  • 探究CLIP的视觉解释为何与人类感知相悖,特别是其倾向于优先关注背景区域而非前景区域的原因。
  • 识别该反直觉行为在池化机制中的根本原因,尤其是平均类池化操作的作用。
  • 开发一种方法,在保持原始识别性能的同时提升CLIP预测的视觉可解释性。
  • 提出一种训练时解决方案,利用免费的注意力掩码引导特征选择,聚焦于具有判别性的前景区域。

提出的方法

  • 引入图像-文本相似度图(ITSM),通过计算文本特征与图像标记特征之间的相似性,可视化CLIP的原始预测结果。
  • 将CLIP原始的注意力池化替换为最大池化,以减少语义偏移,增强对置信前景区域的关注。
  • 在训练过程中使用来自MoCoV3或DINO的自监督注意力图作为掩码,引导最大池化操作,推理阶段不作修改。
  • 引入一对可学习的线性投影层,将可解释性与分类任务解耦,从而保持CLIP原始性能。
  • 使用冻结的CLIP主干进行训练,仅微调新增的线性层和掩码最大池化模块,确保准确率不下降。
  • 提出两种变体:RCLIP(反向CLIP,无需训练)和ECLIP(使用掩码最大池化),两者均实现了可解释性的提升。

实验结果

研究问题

  • RQ1为何CLIP生成的视觉解释与人类理解相悖,倾向于关注背景而非前景区域?
  • RQ2CLIP中的背景偏差是由架构设计导致,还是由网络中特定模块引起?
  • RQ3能否在不微调整个模型或使用人工标注掩码的前提下,纠正由平均类池化引起的语义偏移?
  • RQ4在训练过程中使用自监督注意力图是否能提升文本与判别性图像区域之间的对齐?
  • RQ5是否一种简单、无需反向传播的方法可优于现有的基于梯度或注意力的可解释性方法?

主要发现

  • 无论使用ResNet还是视觉Transformer主干网络,CLIP在视觉解释中始终优先关注背景区域,这一现象通过图像-文本相似度图得以揭示。
  • 该行为的根本原因被识别为池化层中的语义偏移,特别是由于注意力池化和全局平均池化等平均类操作所致。
  • 将注意力池化替换为最大池化可减少背景偏差并提升可解释性,相较于基线模型,mIoU提升17.55%,mSC提升30.53%。
  • 在训练过程中引入自监督注意力掩码可进一步提升性能,使用DINO引导时,mIoU达到45.52,mSC达到26.16。
  • ECLIP在保持与原始CLIP相同识别准确率(如ImageNet-S50上的90.54 mAP)的同时,显著提升了可解释性。
  • 在定性和定量评估中,ECLIP均优于现有可解释性方法(如Grad-CAM和最新ViT-based方法[9]),展现出对相关图像区域更优的定位能力。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。