Similarity search generalisation in contrastive learning with InfoNCE loss
Not on the map. Why?
Abstract (arXiv)
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→∞ 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 Gateaux 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.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 18 of its 23 references that are in the map. First posted on arXiv 10 Jul 2026.
Builds on
18 of 23 references.
References · 18
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
- 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 12,049
- 2018Representation Learning with Contrastive Predictive Codingcited by 7,777
- 2019Momentum Contrast for Unsupervised Visual Representation Learningcited by 7,513
- 2020Supervised Contrastive Learningcited by 2,829
- 2018Unsupervised Feature Learning via Non-Parametric Instance-level Discriminationcited by 1,845
- 2020Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hyperspherecited by 1,405
- 2019Contrastive Multiview Codingcited by 1,301
- 2017Spectrally-normalized margin bounds for neural networkscited by 686
- 2019Data-Efficient Image Recognition with Contrastive Predictive Codingcited by 673
- 2019A Theoretical Analysis of Contrastive Unsupervised Representation Learningcited by 530
- 2015Norm-Based Capacity Control in Neural Networkscited by 299
6 more
- 2017Size-Independent Sample Complexity of Neural Networkscited by 290
- 2021Contrastive Learning Inverts the Data Generating Processcited by 221
- 2016A vector-contraction inequality for Rademacher complexitiescited by 142
- 2023Generalization Analysis for Contrastive Representation Learningcited by 25
- 2024A Rescaling-Invariant Lipschitz Bound Based on Path-Metrics for Modern ReLU Network Parameterizationscited by 4
- 2025Generalization Analysis for Supervised Contrastive Representation Learning under Non-IID Settingscited by 4
Built on by
Not cited yet.