Sigmoid Loss for Language Image Pre-Training

Xiaohua Zhai, Basil Mustafa, Alexander Kolesnikov, Lucas Beyer
2/14/2026

No official code found. Best implementation: google-research/big_vision (3,478 stars, Apache-2.0, last commit 2025-05-19). 2 more below.

Abstract

We propose a simple pairwise sigmoid loss for imagetext pre-training. Unlike standard contrastive learning with softmax normalization, the sigmoid loss operates solely on image-text pairs and does not require a global view of the pairwise similarities for normalization. The sigmoid loss simultaneously allows further scaling up the batch size, while also performing better at smaller batch sizes. With only four TPUv4 chips, we can train a Base CLIP model at 4k batch size and a Large LiT model at 20k batch size, the latter achieves 84.5% ImageNet zero-shot accuracy in two days. This disentanglement of the batch size from the loss further allows us to study the impact of examples vs pairs and negative to positive ratio. Finally, we push the batch size to the extreme, up to one million, and find that the benefits of growing batch size quickly diminish, with a more reasonable batch size of 32k being sufficient. We hope our research motivates further explorations in improving the quality and efficiency of language-image pre-training.

View on arXivView PDF

Code Implementations(3)

Apache-2.0

Official codebase used to develop Vision Transformer, SigLIP, MLP-Mixer, LiT and more.

3,478222HTML, SCSSApr 4, 20221 years agoApache-2.0
PyTorch

Unofficial implementation for Sigmoid Loss for Language Image Pre-Training

110PythonSep 23, 20233 years ago
contrastive-learningdistributed-data-parallelmultimodal-deep-learningpython3pytorch+6 more
MIT

RuSigLIP (русская реализация статьи Sigmoid Loss for Language Image Pre-Training)

30Python, DockerfileJan 31, 20242 years agoMIT

Similar Papers

Cite this paper

@article{zhai2026sigmoid,
  title  = {Sigmoid Loss for Language Image Pre-Training},
  author = {Xiaohua Zhai and Basil Mustafa and Alexander Kolesnikov and Lucas Beyer},
  year   = {2026},
  eprint = {2303.15343},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2303.15343},
  journal = {ICCV 2023 2023}
}

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/2303.15343.svg)](https://codeofpaper.com/paper/2303.15343)

Discussion