Global Minimizers of Sigmoid Contrastive Loss

Kiril Bangachev, Guy Bresler, Iliyas Noman, Yury Polyanskiy · OpenReview

Abstract

The meta-task of obtaining and aligning representations through contrastive pretraining is steadily gaining importance since its introduction in CLIP and ALIGN. In this paper we theoretically explain the advantages of synchronizing with trainable inverse temperature and bias under the sigmoid loss, as implemented in the recent SigLIP and SigLIP2 models of Google DeepMind. Temperature and bias can drive the loss function to zero for a rich class of configurations that we call $(\mathsf{m}, \mathsf{b}_{\mathsf{rel}})$-Constellations. $(\mathsf{m}, \mathsf{b}_{\mathsf{rel}})$-Constellations are a novel combinatorial object related to spherical codes and are parametrized by a margin $\mathsf{m}$ and relative bias $\mathsf{b}_{\mathsf{rel}}$. We use our characterization of constellations to theoretically justify the success of SigLIP on retrieval, to explain the modality gap present in SigLIP and CLIP, and to identify the necessary dimension for producing high-quality representations. Finally, we propose a reparameterization of the sigmoid loss with explicit relative bias, which improves training dynamics in experiments with synthetic data.

Introduction

Contrastive learning has revolutionized vision-language modeling by aligning representations across disparate modalities. While the InfoNCE loss used in CLIP has been the industry standard, the Sigmoid Contrastive Loss (SigLIP) has recently demonstrated superior performance and efficiency. However, a theoretical understanding of SigLIP has been largely confined to regimes where the embedding dimension $d$ is larger than the number of data points $N$. In practice, the opposite is true: models embed billions of items into a few thousand dimensions ($N \gg d$).

This paper fills this gap by providing the first rigorous characterization of SigLIP's global minima in the $N \gg d$ regime. We demonstrate that SigLIP does not merely "align" representations but creates a flexible geometric structure we term an $(\mathsf{m}, \mathsf{b}_{\mathsf{rel}})$-Constellation. This framework explains why the "modality gap" is a mathematical necessity and offers a more efficient path for training future models.

From Alignment to Synchronization

Traditional contrastive learning aims for "alignment," where image and text embeddings for the same concept are forced to become identical. SigLIP shifts this paradigm toward "representation synchronization." In this framework, the two modalities do not need to overlap in the embedding space; they only need to be sufficiently separated to ensure that nearest-neighbor search remains accurate.

We define the $(\mathsf{m}, \mathsf{b}_{\mathsf{rel}})$-Constellation as a configuration where matching pairs achieve an inner product exceeding a margin $\mathsf{m}$ plus a relative bias $\mathsf{b}_{\mathsf{rel}}$, while mismatched pairs remain below this threshold. This characterization allows us to treat the problem of finding optimal embeddings as a packing problem on a hypersphere, drawing direct links to the theory of spherical codes.

The Necessity of the Modality Gap

A persistent observation in contrastive models is the "modality gap"—a spatial separation between the clusters of different modalities. Previously, researchers hypothesized this was an architectural quirk or an artifact of training noise. Our analysis proves that when $N > d$, this gap is a fundamental property of the global minimum of the sigmoid loss.

Using tools from convex geometry, including Helly’s and Carathéodory’s theorems, we show that the embeddings must be linearly separable to drive the loss to zero. In other words, the modality gap is not a bug; it is a mathematical requirement for reaching the perfect loss state in SigLIP.

Reparameterizing for Stability

During standard training, the relative bias in SigLIP often collapses toward zero, which can lead to suboptimal training dynamics. To address this, we propose a new loss function, $L^{RB-Sig}$, which utilizes an explicit "relative bias" parameter. This reparameterization decouples the bias from the temperature, allowing for more stable optimization.

In synthetic experiments, $L^{RB-Sig}$ reached zero loss significantly faster than the standard SigLIP loss used in production models. This suggests that "steering" the model toward specific constellation configurations can improve pretraining efficiency.

Empirical Validation

We validated our theoretical framework against eight production-scale SigLIP models (ranging from "Base" to "SO400M") available on Hugging Face. Our findings include:

  • Geometric Consistency: Pre-trained models almost perfectly match the predicted $(\mathsf{m}, \mathsf{b}_{\mathsf{rel}})$-Constellation structure.
  • Scaling Laws: We found a strong correlation (0.948) between embedding dimension and the margin $\mathsf{m}$. Larger models do not just have more parameters; they create more "room" on the hypersphere, making retrieval more robust.
  • Perfect Retrieval: We prove that any zero-loss configuration (a constellation) guarantees perfect nearest-neighbor retrieval, even if the modalities are completely disjoint in space.

Conclusion and Future Work

By providing a rigorous geometric framework for SigLIP, this work clarifies why sigmoid-based losses excel in large-scale pretraining. While we have identified the global minima, future work is needed to provide strict optimization guarantees for gradient descent and to validate the $L^{RB-Sig}$ reparameterization on billion-scale datasets. Understanding the combinatorial bounds of these constellations remains an open challenge in coding theory that will directly impact how we determine the necessary embedding dimensions for future foundation models.

Summary updated

BibTeX
@inproceedings{bangachev2025global,
  author = {Kiril Bangachev and Guy Bresler and Iliyas Noman and Yury Polyanskiy},
  title = {{Global Minimizers of Sigmoid Contrastive Loss}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=IeM6Io4Rsh},
}
Figure