Cosine similarity is prevalent in contrastive learning, yet it makes an implicit assumption: embedding magnitude is noise. Prior work occasionally found dot product and cosine similarity comparable, but left unanswered WHAT information magnitude carries, WHEN it helps, and HOW to leverage it. We conduct a systematic study through a $2 \times 2$ ablation that independently controls input-side and output-side normalization across text and vision models. Our findings reveal three key insights. First, in text retrieval, output (document) magnitude strongly correlates with relevance (Cohen's $d$ up to 1.80), yielding the largest gains on reasoning-intensive tasks. Second, input and output magnitudes serve asymmetric roles: output magnitude directly scales similarity scores while input magnitude modulates training dynamics. Third, magnitude learning benefits asymmetric tasks (text retrieval, RAG) but harms symmetric tasks (STS, text-image alignment). These findings establish a task symmetry principle: the choice between cosine and dot product depends on whether the task has distinct input roles, enabling cost-free improvements by simply removing an unnecessary constraint.


翻译:余弦相似度在对比学习中广泛应用,但其隐含了一个假设:嵌入范数是噪声。先前工作偶尔发现点积与余弦相似度效果相当,但未回答范数携带何种信息、何时有益以及如何利用它。我们通过一个 $2 \times 2$ 消融实验展开系统研究,在文本与视觉模型中独立控制输入侧与输出侧的归一化。研究发现揭示了三个关键见解。首先,在文本检索中,输出(文档)范数与相关性强烈相关(Cohen's $d$ 高达 1.80),在推理密集型任务上带来最大增益。其次,输入与输出范数扮演非对称角色:输出范数直接缩放相似度分数,而输入范数调节训练动态。第三,范数学习对非对称任务(文本检索、RAG)有益,但对对称任务(STS、图文对齐)有害。这些发现确立了一项任务对称性原理:在余弦相似度与点积之间的选择取决于任务是否具有不同的输入角色,通过简单地移除不必要的约束即可实现无成本的性能提升。

0
下载
关闭预览

相关内容

专知会员服务
16+阅读 · 2021年10月4日
专知会员服务
90+阅读 · 2021年6月29日
【MIT】反偏差对比学习,Debiased Contrastive Learning
专知会员服务
91+阅读 · 2020年7月4日
【Google】监督对比学习,Supervised Contrastive Learning
专知会员服务
75+阅读 · 2020年4月24日
【AAAI2023】用于图对比学习的谱特征增强
专知
20+阅读 · 2022年12月11日
【MIT】硬负样本的对比学习
专知
13+阅读 · 2020年10月15日
对比自监督学习
深度学习自然语言处理
35+阅读 · 2020年7月15日
【ICML2020】对比多视角表示学习
专知
19+阅读 · 2020年6月28日
图嵌入(Graph embedding)综述
人工智能前沿讲习班
449+阅读 · 2019年4月30日
国家自然科学基金
23+阅读 · 2016年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关VIP内容
专知会员服务
16+阅读 · 2021年10月4日
专知会员服务
90+阅读 · 2021年6月29日
【MIT】反偏差对比学习,Debiased Contrastive Learning
专知会员服务
91+阅读 · 2020年7月4日
【Google】监督对比学习,Supervised Contrastive Learning
专知会员服务
75+阅读 · 2020年4月24日
相关资讯
【AAAI2023】用于图对比学习的谱特征增强
专知
20+阅读 · 2022年12月11日
【MIT】硬负样本的对比学习
专知
13+阅读 · 2020年10月15日
对比自监督学习
深度学习自然语言处理
35+阅读 · 2020年7月15日
【ICML2020】对比多视角表示学习
专知
19+阅读 · 2020年6月28日
图嵌入(Graph embedding)综述
人工智能前沿讲习班
449+阅读 · 2019年4月30日
相关基金
国家自然科学基金
23+阅读 · 2016年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员