Bridging Mini-Batch and Asymptotic Analysis in Contrastive Learning: From InfoNCE to Kernel-Based Losses

Panagiotis Koromilas, Giorgos Bouritsas, Theodoros Giannakopoulos, M. Nicolaou, Yannis Panagakis
2/12/2026

No official code found. Best implementation: pakoromilas/DHEL-KCL (10 stars, last commit 2024-09-05).

Abstract

What do different contrastive learning (CL) losses actually optimize for? Although multiple CL methods have demonstrated remarkable representation learning capabilities, the differences in their inner workings remain largely opaque. In this work, we analyse several CL families and prove that, under certain conditions, they admit the same minimisers when optimizing either their batch-level objectives or their expectations asymptotically. In both cases, an intimate connection with the hyperspherical energy minimisation (HEM) problem resurfaces. Drawing inspiration from this, we introduce a novel CL objective, coined Decoupled Hyperspherical Energy Loss (DHEL). DHEL simplifies the problem by decoupling the target hyperspherical energy from the alignment of positive examples while preserving the same theoretical guarantees. Going one step further, we show the same results hold for another relevant CL family, namely kernel contrastive learning (KCL), with the additional advantage of the expected loss being independent of batch size, thus identifying the minimisers in the non-asymptotic regime. Empirical results demonstrate improved downstream performance and robustness across combinations of different batch sizes and hyperparameters and reduced dimensionality collapse, on several computer vision datasets.

View on arXivView PDF

Code Implementations(1)

[ICML'24] Code for the loss functions and metrics presented in "Bridging mini-batch and asymptotic analysis in contrastive learning: From InfoNCE to Kernel-based losses"

101PythonMay 25, 20242 years ago

Similar Papers

Cite this paper

@article{koromilas2026bridging,
  title  = {Bridging Mini-Batch and Asymptotic Analysis in Contrastive Learning: From InfoNCE to Kernel-Based Losses},
  author = {Panagiotis Koromilas and Giorgos Bouritsas and Theodoros Giannakopoulos and M. Nicolaou and Yannis Panagakis},
  year   = {2026},
  eprint = {2405.18045},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2405.18045},
  journal = {ICML 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.18045.svg)](https://codeofpaper.com/paper/2405.18045)

Discussion