Skip to main content
QUICK REVIEW

[论文解读] Interpreting CLIP's Image Representation via Text-Based Decomposition

Yossi Gandelsman, Alexei A. Efros|arXiv (Cornell University)|Oct 9, 2023
Generative Adversarial Networks and Image Synthesis被引用 4
一句话总结

本文提出一种基于文本的分解方法,通过将贡献归因于单个注意力头和图像块,来解释CLIP的图像表征。通过利用CLIP的视觉-语言联合表征空间,该方法识别出可解释的、与属性相关的注意力头角色(例如形状、位置),并实现了54.50 mIoU的零样本图像分割性能,优于先前方法。

ABSTRACT

We investigate the CLIP image encoder by analyzing how individual model components affect the final representation. We decompose the image representation as a sum across individual image patches, model layers, and attention heads, and use CLIP's text representation to interpret the summands. Interpreting the attention heads, we characterize each head's role by automatically finding text representations that span its output space, which reveals property-specific roles for many heads (e.g. location or shape). Next, interpreting the image patches, we uncover an emergent spatial localization within CLIP. Finally, we use this understanding to remove spurious features from CLIP and to create a strong zero-shot image segmenter. Our results indicate that a scalable understanding of transformer models is attainable and can be used to repair and improve models.

研究动机与目标

  • 理解CLIP视觉Transformer中各个组件如何贡献于最终的图像表征。
  • 利用CLIP文本编码器提供的自然语言描述,解释注意力头与图像块。
  • 通过消融与虚假线索相关的注意力头,减少下游任务中的虚假相关性。
  • 基于可解释的、属性特定的表征,开发一种强大的零样本图像分割方法。
  • 证明可扩展的Transformer模型解释能力可实现模型修复与性能提升。

提出的方法

  • 利用残差连接,将CLIP的图像表征分解为图像块、注意力头与模型层的总和。
  • 应用TextSpan算法,为每个注意力头的输出空间寻找可解释的自然语言基底,以自然语言描述对方向进行标注。
  • 使用空间注意力机制,为每个基底方向分配对特定图像位置的贡献。
  • 联合分解注意力头与图像标记的表征,可视化哪些区域对每个文本标注方向有贡献。
  • 通过消融特定注意力头以去除虚假特征,并在Waterbirds数据集上进行验证。
  • 通过结合空间分解与属性特定的头表征,构建零样本图像分割器。

实验结果

研究问题

  • RQ1CLIP-ViT中的哪些注意力头负责编码特定视觉属性(如形状、颜色或位置)?
  • RQ2我们能否自动发现能覆盖单个注意力头输出空间的自然语言描述?
  • RQ3CLIP表征中是否出现了涌现的空间定位能力?该能力能否用于零样本分割?
  • RQ4移除与虚假线索相关的注意力头是否能提升有偏数据集中的最差组准确率?
  • RQ5对注意力头与图像标记的联合分解能否验证所发现的基于文本方向的可解释性?

主要发现

  • 仅保留最后四层注意力头对零样本分类准确率影响极小,表明深层主要负责构建图像表征。
  • TextSpan识别出注意力头的可解释、属性特定角色——例如,某一注意力头专门识别‘等腰三角形’或‘椭圆’等形状。
  • 移除与虚假线索相关的注意力头后,Waterbirds数据集上的最差组准确率从48%提升至73%。
  • 注意力头与图像标记的联合分解显示,与文本描述(如‘埃菲尔铁塔’)匹配的区域是对应基底方向的主要贡献者。
  • 所提出的零样本图像分割器在ImageNet-segmentation上达到54.50 mIoU,优于现有方法(包括LRP、GradCAM与rollout)。
  • 该方法支持基于发现的语义相似性(如颜色、位置、纹理)进行检索,证明其在分类之外的实用价值。

更好的研究,从现在开始

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

无需绑定信用卡

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