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

在CLIP之外的ViT中通过文本分解与解释图像表示

Decomposing and Interpreting Image Representations via Text in ViTs Beyond CLIP

University of Maryland, College Park(马里兰大学帕克分校)

Sriram Balasubramanian, Samyadeep Basu, Soheil Feizi

AI总结:

本文提出一个通用框架,通过将ViT各组件贡献线性映射到CLIP空间并用文本解释,结合新评分函数识别组件重要性,从而在CLIP之外理解ViT组件与图像特征的关系,并应用于图像检索、热图可视化和虚假相关性缓解。

摘要:

最近的工作利用CLIP共享的图像-文本表示空间,探索了CLIP-ViT模型的各个组件如何对最终表示做出贡献。这些组件(如注意力头和MLP)已被证明能够捕获不同的图像特征,例如形状、颜色或纹理。然而,理解这些组件在任意视觉Transformer(ViT)中的作用具有挑战性。为此,我们提出了一个通用框架,能够识别CLIP之外的ViT中各个组件的作用。具体来说,我们(a)自动将最终表示分解为来自不同模型组件的贡献,并(b)将这些贡献线性映射到CLIP空间,以通过文本对其进行解释。此外,我们引入了一种新颖的评分函数,用于根据组件对特定特征的重要性对其进行排序。将我们的框架应用于各种ViT变体(例如DeiT、DINO、DINOv2、Swin、MaxViT),我们深入了解了不同组件在特定图像特征方面的作用。这些见解促进了诸如图像检索(使用文本描述或参考图像)、可视化token重要性热图以及减轻虚假相关性等应用。我们在https://github.com/SriramB-98/vit-decompose发布了代码以复现实验。

英文摘要:

Recent work has explored how individual components of the CLIP-ViT model contribute to the final representation by leveraging the shared image-text representation space of CLIP. These components, such as attention heads and MLPs, have been shown to capture distinct image features like shape, color or texture. However, understanding the role of these components in arbitrary vision transformers (ViTs) is challenging. To this end, we introduce a general framework which can identify the roles of various components in ViTs beyond CLIP. Specifically, we (a) automate the decomposition of the final representation into contributions from different model components, and (b) linearly map these contributions to CLIP space to interpret them via text. Additionally, we introduce a novel scoring function to rank components by their importance with respect to specific features. Applying our framework to various ViT variants (e.g. DeiT, DINO, DINOv2, Swin, MaxViT), we gain insights into the roles of different components concerning particular image features. These insights facilitate applications such as image retrieval using text descriptions or reference images, visualizing token importance heatmaps, and mitigating spurious correlations. We release our code to reproduce the experiments at https://github.com/SriramB-98/vit-decompose

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

↑