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

在类别嵌入空间中分析用于图像分类的视觉Transformer

Analyzing Vision Transformers for Image Classification in Class Embedding Space

Goethe University Frankfurt(法兰克福大学);Ernst Strüngmann Institute(恩斯特·斯特伦曼研究所);The Hessian Center for AI(黑森人工智能中心)

Martina G. Vilas, Timothy Schaumlöffel, Gemma Roig

AI总结:

本文提出将视觉Transformer内部表示投影到类别嵌入空间的方法,揭示了图像token、自注意力和MLP层在构建类别表示中的作用,并证明其在定位关键图像区域和机制可解释性方面优于线性探测。

摘要:

尽管Transformer模型在计算机视觉中的应用日益广泛,但对这些网络的机制性理解仍然有待深入。本文提出了一种方法,用于逆向工程那些经过训练以解决图像分类任务的视觉Transformer。受先前自然语言处理研究的启发,我们展示了如何将层级结构中任意层次的内部表示投影到学习到的类别嵌入空间上,从而揭示这些网络如何为其预测构建类别表示。我们利用所提出的框架展示了图像token如何发展出依赖于注意力机制和上下文信息的类别特定表示,并深入分析了自注意力和MLP层如何以不同方式对这一类别组合过程做出贡献。此外,我们还证明了该方法(1)可用于确定图像中对检测目标类别重要的部分,并且(2)相较于传统的线性探测方法具有显著优势。综合来看,我们的结果将所提出的框架定位为机制可解释性和可解释性研究中的一个有力工具。

英文摘要:

Despite the growing use of transformer models in computer vision, a mechanistic understanding of these networks is still needed. This work introduces a method to reverse-engineer Vision Transformers trained to solve image classification tasks. Inspired by previous research in NLP, we demonstrate how the inner representations at any level of the hierarchy can be projected onto the learned class embedding space to uncover how these networks build categorical representations for their predictions. We use our framework to show how image tokens develop class-specific representations that depend on attention mechanisms and contextual information, and give insights on how self-attention and MLP layers differentially contribute to this categorical composition. We additionally demonstrate that this method (1) can be used to determine the parts of an image that would be important for detecting the class of interest, and (2) exhibits significant advantages over traditional linear probing approaches. Taken together, our results position our proposed framework as a powerful tool for mechanistic interpretability and explainability research.

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

↑