arXiv:2505.20229cs.LGcs.AI2025-05被引 6

揭示CLIP模型隐藏组件的语义依赖,发现意外关联的误导性模式。

From What to How: Attributing CLIP's Latent Components Reveals Unexpected Semantic Reliance

  • 用归因修补法分析每个组件对预测的具体影响
  • 发现数百个与多义词、字体等相关的异常激活组件
  • 适合研究模型可解释性或医疗影像误判的学者

基于Transformer的CLIP模型广泛用于图文探测与特征提取,理解其内部机制至关重要。尽管稀疏自编码器(SAEs)能生成可解释的潜在组件,但现有研究仅关注其编码内容,忽略其如何驱动预测。本文提出一种可扩展框架,揭示组件激活目标、语义对齐程度及其对预测的重要性。通过适配归因修补法实现实例级组件归因,并指出广泛使用的Logit Lens技术在忠实性上的关键缺陷。结合归因与语义对齐得分,可自动识别出编码语义意外或虚假概念的组件。在多个CLIP变体上应用该方法,发现了数百个与多义词、复合名词、视觉排版及数据集伪影相关的异常组件。尽管文本嵌入仍存在语义模糊,但相比基于图像嵌入训练的线性分类器更具鲁棒性。皮肤病变检测的案例研究显示,此类分类器会放大隐藏捷径,凸显全面机制解释的必要性。代码已开源:https://github.com/maxdreyer/attributing-clip。

原文摘要 · Abstract (English)

Transformer-based CLIP models are widely used for text-image probing and feature extraction, making it relevant to understand the internal mechanisms behind their predictions. While recent works show that Sparse Autoencoders (SAEs) yield interpretable latent components, they focus on what these encode and miss how they drive predictions. We introduce a scalable framework that reveals what latent components activate for, how they align with expected semantics, and how important they are to predictions. To achieve this, we adapt attribution patching for instance-wise component attributions in CLIP and highlight key faithfulness limitations of the widely used Logit Lens technique. By combining attributions with semantic alignment scores, we can automatically uncover reliance on components that encode semantically unexpected or spurious concepts. Applied across multiple CLIP variants, our method uncovers hundreds of surprising components linked to polysemous words, compound nouns, visual typography and dataset artifacts. While text embeddings remain prone to semantic ambiguity, they are more robust to spurious correlations compared to linear classifiers trained on image embeddings. A case study on skin lesion detection highlights how such classifiers can amplify hidden shortcuts, underscoring the need for holistic, mechanistic interpretability. We provide code at https://github.com/maxdreyer/attributing-clip.

模型解释CLIP归因分析语义偏差

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。