语言图像预训练的 Sigmoid 损失函数

Sigmoid Loss for Language Image Pre-Training

翟晓华 Xiaohua Zhai · · 2023-03-27 · arXiv:2303.15343 ↗ · 被引 3336

打开互动全文版(逐段中英对照 + 图/公式 + 论文问答)→

摘要 · Abstract

我们提出了一种简单的成对 Sigmoid 损失用于语言-图像预训练(SigLIP)。与使用 softmax 归一化的标准对比学习不同,sigmoid 损失仅作用于图像-文本对,无需全局视角的成对相似度归一化。该损失函数同时允许进一步扩大批量大小,同时在较小的批量大小下表现更好。结合锁图调优(Locked-image Tuning),仅使用四个 TPUv4 芯片,我们在两天内训练了一个 SigLiT 模型,实现了 84.5%的 ImageNet 零样本准确率。批量大小与损失的解耦进一步使我们能够研究样本与配对以及负正比例的影响。最后,我们将批量大小推向极端,达到一百万,结果发现增大批量大小的收益迅速递减,更合理的批量大小 32k 就足够了。我们在 https://github.com/google-research/big_vision 上发布我们的模型,希望我们的研究能激发进一步探索改进语言-图像预训练质量和效率的方法。

We propose a simple pairwise Sigmoid loss for Language-Image Pre-training (SigLIP). 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. Combined with Locked-image Tuning, with only four TPUv4 chips, we train a SigLiT model that achieves 84.5% ImageNet zero-shot accuracy in two days. The 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 release our models at https://github.com/google-research/big_vision and hope our research motivates further explorations in improving the quality and efficiency of language-image pre-training.

核心贡献 · Key contributions

局限 · Limitations

论文章节 · Sections(共 16)

阅读逐段中英对照全文 →