发现模态间隙能提升模型鲁棒性,调整后不损准确率
Is the Modality Gap a Bug or a Feature? A Robustness Perspective
- 理论证明对比损失会导致模态间出现正交的全局间隙向量
- 间隙越小模型越易受扰动影响,但清洁准确率不变
- 仅通过平移一个模态即可显著增强鲁棒性,适合部署优化
许多现代多模态模型(如CLIP)旨在对齐图像与文本的嵌入空间。然而,几乎所有现有模型均表现出明显的模态间隙:图像与文本在共享嵌入空间中分布分离。尽管已有研究关注此现象,其成因及是否应消除仍不明确。本文表明,在特定条件下,最小化对比损失会生成一个模态间由正交于嵌入的全局间隙向量分隔的表示。我们进一步证明,模态间隙与模型鲁棒性单调相关:减小间隙不影响清洁准确率,但会降低模型在嵌入扰动下的输出稳定性。实验显示,对于多个真实世界视觉语言模型,仅通过简单后处理将一模态移向另一模态的均值,即可显著提升鲁棒性,且无清洁准确率损失。
原文摘要 · Abstract (English)
Many modern multi-modal models (e.g. CLIP) seek an embedding space in which the two modalities are aligned. Somewhat surprisingly, almost all existing models show a strong modality gap: the distribution of images is well-separated from the distribution of texts in the shared embedding space. Despite a series of recent papers on this topic, it is still not clear why this gap exists nor whether closing the gap in post-processing will lead to better performance on downstream tasks. In this paper we show that under certain conditions, minimizing the contrastive loss yields a representation in which the two modalities are separated by a global gap vector that is orthogonal to their embeddings. We also show that under these conditions the modality gap is monotonically related to robustness: decreasing the gap does not change the clean accuracy of the models but makes it less likely that a model will change its output when the embeddings are perturbed. Our experiments show that for many real-world VLMs we can significantly increase robustness by a simple post-processing step that moves one modality towards the mean of the other modality, without any loss of clean accuracy.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。