[论文解读] A Closer Look at the Explainability of Contrastive Language-Image Pre-training
本文提出 CLIP Surgery,一种通过推理阶段的架构和特征修改来提升 CLIP 的可解释性的方法,在不重新训练的情况下在开放词汇任务上取得显著提升。
Contrastive language-image pre-training (CLIP) is a powerful vision-language model that has shown great benefits for various tasks. However, we have identified some issues with its explainability, which undermine its credibility and limit the capacity for related tasks. Specifically, we find that CLIP tends to focus on background regions rather than foregrounds, with noisy activations at irrelevant positions on the visualization results. These phenomena conflict with conventional explainability methods based on the class attention map (CAM), where the raw model can highlight the local foreground regions using global supervision without alignment. To address these problems, we take a closer look at its architecture and features. Based on thorough analyses, we find the raw self-attentions link to inconsistent semantic regions, resulting in the opposite visualization. Besides, the noisy activations are owing to redundant features among categories. Building on these insights, we propose the CLIP Surgery for reliable CAM, a method that allows surgery-like modifications to the inference architecture and features, without further fine-tuning as classical CAM methods. This approach significantly improves the explainability of CLIP, surpassing existing methods by large margins. Besides, it enables multimodal visualization and extends the capacity of raw CLIP on open-vocabulary tasks without extra alignment. The code is available at https://github.com/xmed-lab/CLIP_Surgery.
研究动机与目标
- 识别为何 CLIP 在其相似性图中表现出与直观前景相反的可视化以及噪声激活的原因。
- 开发一种基于手术的推理技术,在不重新训练的情况下纠正可视化并抑制噪声。
- 证明解释性框架在开放词汇分割、多标签识别和多模态可视化方面的改进。
- 展示在骨干网络(CNNs 与 ViTs)和数据集上的鲁棒性。
提出的方法
- 提出 CLIP Architecture Surgery,在推理阶段用 v-v 自注意力取代 q-k 自注意力并引入双路径在推理阶段合并多层输出。
- 引入 CLIP Feature Surgery,通过使用空文本提示和类别权重估计并减去公共激活来去除冗余特征。
- 分析自注意力和 FFN 对贡献,以解释为何会出现相反的可视化以及为何会产生噪声激活。
- 提供在推理时的修改,无需对标签进行微调或反向传播。
实验结果
研究问题
- RQ1为何在不同的骨干网络下,CLIP 会产生与真实前景相反的可视化?
- RQ2CLIP 相似性图中的噪声激活是由何原因引起的,是否可以在不重新训练的情况下缓解?
- RQ3在推理阶段进行的架构和特征层面干预,是否能在跨数据集和骨干网络的场景中提升解释性与开放词汇任务的表现?
- RQ4CLIP Surgery 如何影响开放词汇的语义分割和多标签识别性能?
- RQ5该方法是否适用于多模态可视化和交互式分割工具?
主要发现
- 相反的可视化与自注意力查询-键(q-k)参数有关;在推理阶段用 v-v 自注意力替换可将注意力对齐至同一语义区域。
- 噪声激活来自冗余的 CLIP 特征;通过 CLIP Feature Surgery 去除冗余特征可显著降低虚假激活。
- CLIP Surgery 在不同骨干网络(CNNs 与 ViTs)和数据集上带来显著的可解释性提升,解释性指标的改进最大可达 mIoU 提升 38.42%、mSC 提升 72.48%。
- 开放词汇多标签识别在 NUS-Wide 上的 mAP 提升了 4.41%,且无需额外训练。
- 开放词汇语义分割在 Cityscapes 上提升了 8.74% mIoU,在 COCO Stuff 和 PASCAL Context 上分别提升了 4.56%/4.44%(相对基线)。
- 该方法亦有利于多模态可视化和交互式分割工具(如 SAM)。
- 该方法在推理时即可工作,避免微调,并实现了在广泛骨干网络和任务上的适用性。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。