用自然语言描述LLM中视觉令牌的含义,提升可解释性。
LatentLens: Revealing Highly Interpretable Visual Tokens in LLMs
- 通过对比文本语境表征,将视觉令牌映射为自然语言描述。
- 在15个VLM模型各层中,多数视觉令牌都可被准确解释。
- 适合研究模型对齐、可解释性及跨模态理解的学者使用。
将大语言模型(LLM)转化为视觉语言模型(VLM)可通过将视觉编码器的视觉令牌映射到LLM的嵌入空间实现。有趣的是,这种映射仅需浅层MLP即可完成。为理解为何LLM能轻松处理视觉令牌,需具备揭示其在各层中编码内容的可解释性方法。本文提出LatentLens,一种将潜在表示映射为自然语言描述的新方法。该方法编码大规模文本语料库,并存储每个词元的上下文化表征。随后将视觉令牌表征与这些表征进行比对,最近邻表征即作为视觉令牌的描述。我们在15种不同VLM上评估该方法,发现常用方法如LogitLens严重低估了视觉令牌的可解释性。使用LatentLens后,几乎所有模型和所有层级中的视觉令牌均具有可解释性。定性分析表明,生成的描述语义合理,且比单个词元提供更精细的人类可读解释。本研究为视觉与语言表征间的对齐提供了新证据,并开辟了分析LLM潜在表示的新方向。
原文摘要 · Abstract (English)
Transforming a large language model (LLM) into a vision-language model (VLM) can be achieved by mapping the visual tokens from a vision encoder into the embedding space of an LLM. Intriguingly, this mapping can be as simple as a shallow MLP transformation. To understand why LLMs can so readily process visual tokens, we need interpretability methods that reveal what is encoded in the visual token representations at every layer of LLM processing. In this work, we introduce LatentLens, a novel approach for mapping latent representations to descriptions in natural language. LatentLens encodes a large text corpus and stores contextualized token representations for each token in that corpus. Visual token representations are then compared to these contextualized representations and the top-nearest neighbor representations serve as descriptions of the visual token. We evaluate this method on 15 different VLMs, showing that commonly used methods, such as LogitLens, substantially underestimate the interpretability of visual tokens. With LatentLens instead, the majority of visual tokens are interpretable across all studied models and all layers. Qualitatively, we show that the descriptions produced by LatentLens are semantically meaningful and provide more fine-grained interpretations for humans compared to individual tokens. More broadly, our findings contribute new evidence on the alignment between vision and language representations and open up new directions for analyzing the latent representations of LLMs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。