发表机构
School of Mathematics, University of Bristol(布里斯托大学数学学院)
机构由 AI 辅助整理,请以论文原文为准。AI 中文总结
研究对比学习中InfoNCE损失用于相似性搜索的泛化,通过加托微分引入新连续性界,量化泛化性能,证明随着k增长,InfoNCE损失中k个负样本平均效应可使泛化误差稳定。
AI 中文摘要
相似性搜索是对比学习训练的嵌入模型的主要应用。对于最流行的对比学习损失函数之一InfoNCE,我们表明,具有k个负样本的总体风险与期望交叉熵的差距为O(1/k),该期望交叉熵量化了:i)使用学习到的嵌入函数对未见数据进行softmax相似性搜索,与ii)对相同数据但使用正样本生成器中隐式表示的相似性进行理想化softmax搜索之间的偏差。这补充了在k→∞极限下对InfoNCE的现有解释。为了量化泛化性能,我们通过加托微分引入了InfoNCE损失的新连续性界。该界保留了损失函数中对负样本求平均的结构,并具有一个“逆温度”参数,可以进行调整以考虑算法温度。对于在参数上是利普希茨的嵌入函数,这简单证明了随着k的增长,InfoNCE损失中k个负样本的平均效应会转化为泛化误差的稳定。
英文摘要
Similarity search is a primary application of embedding models trained by contrastive learning. For one of the most popular contrastive learning loss functions, InfoNCE, we show that the population risk with $k$ negative samples is $O(1/k)$ close to an expected cross-entropy which quantifies deviation between i) a softmax similarity search over unseen data using the learned embedding function, and ii) an idealised softmax search over the same data but using similarity implicitly represented in the positive sample generator. This complements existing interpretations of InfoNCE in the $k\to\infty$ limit which are phrased in terms of mutual information, and alignment versus uniformity in embeddings. To quantify generalisation performance, we introduce a new continuity bound for the InfoNCE loss, obtained via Gâteaux differentiation. The bound preserves the structure of averaging over negative samples present in the loss function and features an ``inverse temperature'' parameter which can be tuned to account for the algorithmic temperature. For embedding functions which are Lipschitz in a parameter, this yields a simple demonstration that the averaging effect of $k$ negative samples in the InfoNCE loss carries over to stabilisation of the generalisation error as $k$ grows.