提出无需训练的IsoCLIP,提升CLIP在图像检索中的对齐精度与速度。
IsoCLIP: Decomposing CLIP Projectors for Efficient Intra-modal Alignment
- 分解CLIP投影器,分离跨模态对齐与模态内归一化机制。
- 移除各模态特有方向后,图像检索准确率提升5.2%以上。
- 适用于所有预训练CLIP模型,零训练成本,部署更快。
视觉-语言模型如CLIP广泛用于跨模态任务,但在图像到图像检索等模态内任务中表现下降,源于模态内错位。本文研究CLIP中投影器的作用,发现其包含一个跨模态对齐算子和一个仅执行模态内归一化的算子。通过谱分析,识别出一个近似各向同性的对齐子空间及各模态特有的各向异性方向。实验表明,直接从投影器权重获取该子空间并去除各向异性方向,可显著改善模态内对齐。在多个图像检索与分类基准上,该无训练方法有效降低错位,大幅减少延迟,并优于现有方法,适用于多种预训练CLIP模型。代码已开源。
原文摘要 · Abstract (English)
Vision-Language Models like CLIP are extensively used for inter-modal tasks which involve both visual and text modalities. However, when the individual modality encoders are applied to inherently intra-modal tasks like image-to-image retrieval, their performance suffers from the intra-modal misalignment. In this paper we study intra-modal misalignment in CLIP with a focus on the role of the projectors that map pre-projection image and text embeddings into the shared embedding space. By analyzing the form of the cosine similarity applied to projected features, and its interaction with the contrastive CLIP loss, we show that there is an inter-modal operator responsible for aligning the two modalities during training, and a second, intra-modal operator that only enforces intra-modal normalization but does nothing to promote intra-modal alignment. Via spectral analysis of the inter-modal operator, we identify an approximately isotropic subspace in which the two modalities are well-aligned, as well as anisotropic directions specific to each modality. We demonstrate that this aligned subspace can be directly obtained from the projector weights and that removing the anisotropic directions improves intra-modal alignment. Our experiments on intra-modal retrieval and classification benchmarks show that our training-free method reduces intra-modal misalignment, greatly lowers latency, and outperforms existing approaches across multiple pre-trained CLIP-like models. The code is publicly available at: https://github.com/simomagi/IsoCLIP.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。