CORTEXA
← Browse
arxivcs.LGstat.ML2026-07-10

Similarity search generalisation in contrastive learning with InfoNCE loss

Nick Whiteley

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.

View free PDFSource page

Related papers

arxivstat.MLcs.AIcs.LGmath.OC2026-06-29

Optimization Dynamics Imprint Semantic Specificity in Contrastive Embedding Norms

Ziwei Su, Junyu Ren, Victor Veitch

Contrastive embedding models trained with scale-invariant losses are typically paired with distance metrics like cosine similarity, effectively ignoring embedding magnitudes. However, surprisingly, empirical studies reveal that despite this, these "discarded" norms seem to correl…

View free PDFSource page
arxivecon.EMcs.LGmath.STstat.MEstat.ML2026-07-20

Vector Search As Nearest Neighbor Matching: RAG-based Policy Learning in Causal Inference

Masahiro Kato, Taka Kato

We propose one-step and two-step methods for policy learning with retrieval-augmented generation (RAG). We formulate RAG-based action selection under the potential outcome framework. In the two-step method, vector search retrieves action-specific neighboring evidence in an embedd…

View free PDFSource page
arxivstat.MLcs.LG2026-07-17

MTSSL: Meta-Thresholding Semi-Supervised Learning

Shuyang Liu, Ziang Zeng, Ruiqiu Zheng, Jiazheng Wang, Zechen Liu, Wenxi Li, et al.

A large body of Semi-supervised Learning~(SSL) algorithms encounter the threshold $τ$ to select pseudo-labels. The value of $τ$ across different SSL algorithms can vary depending on the learning perspective, yet they may achieve similar performance. It motivates us to establish a…

View free PDFSource page