Provable Stochastic Optimization for Global Contrastive Learning: Small Batch Does Not Harm Performance
Zhuoning Yuan, Yuexin Wu, Zi-Hao Qiu, Xianzhi Du, Lijun Zhang, Denny Zhou, Tianbao Yang
Abstract
In this paper, we study contrastive learning from an optimization perspective, aiming to analyze and address a fundamental issue of existing contrastive learning methods that either rely on a large batch size or a large dictionary of feature vectors. We consider a global objective for contrastive learning, which contrasts each positive pair with all negative pairs for an anchor point. From the optimization perspective, we explain why existing methods such as SimCLR require a large batch size in order to achieve a satisfactory result. In order to remove such requirement, we propose a memory-efficient Stochastic Optimization algorithm for solving the Global objective of Contrastive Learning of Representations, named SogCLR. We show that its optimization error is negligible under a reasonable condition after a sufficient number of iterations or is diminishing for a slightly different global contrastive objective. Empirically, we demonstrate that SogCLR with small batch size (e.g., 256) can achieve similar performance as SimCLR with large batch size (e.g., 8192) on self-supervised learning task on ImageNet-1K. We also attempt to show that the proposed optimization technique is generic and can be applied to solving other contrastive losses, e.g., two-way contrastive losses for bimodal contrastive learning. The proposed method is implemented in our open-sourced library LibAUC (www.libauc.org).
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
24 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Not All Semantics are Created Equal: Contrastive Self-supervised Learning with Automatic Temperature Individualization cites A Simple Framework for Contrastive Learning of Visual Representations
- Not All Semantics are Created Equal: Contrastive Self-supervised Learning with Automatic Temperature Individualization cites Bootstrap Your Own Latent - A New Approach to Self-Supervised Learning
- Not All Semantics are Created Equal: Contrastive Self-supervised Learning with Automatic Temperature Individualization cites Learning Transferable Visual Models From Natural Language Supervision
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites A Simple Framework for Contrastive Learning of Visual Representations
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites Learning Transferable Visual Models From Natural Language Supervision
- Generalization Analysis for Contrastive Representation Learning cites A Simple Framework for Contrastive Learning of Visual Representations
- Generalization Analysis for Contrastive Representation Learning cites Learning Transferable Visual Models From Natural Language Supervision
- Bootstrap Your Own Latent - A New Approach to Self-Supervised Learning cites A Simple Framework for Contrastive Learning of Visual Representations
- Learning Transferable Visual Models From Natural Language Supervision cites A Simple Framework for Contrastive Learning of Visual Representations
- Learning Transferable Visual Models From Natural Language Supervision cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Learning Transferable Visual Models From Natural Language Supervision cites Bootstrap Your Own Latent - A New Approach to Self-Supervised Learning
- Tight Mutual Information Estimation With Contrastive Fenchel-Legendre Optimization cites A Simple Framework for Contrastive Learning of Visual Representations
- Tight Mutual Information Estimation With Contrastive Fenchel-Legendre Optimization cites Bootstrap Your Own Latent - A New Approach to Self-Supervised Learning
- Tight Mutual Information Estimation With Contrastive Fenchel-Legendre Optimization cites Learning Transferable Visual Models From Natural Language Supervision
- The Role of Entropy and Reconstruction in Multi-View Self-Supervised Learning cites A Simple Framework for Contrastive Learning of Visual Representations
- The Role of Entropy and Reconstruction in Multi-View Self-Supervised Learning cites Bootstrap Your Own Latent - A New Approach to Self-Supervised Learning
- The Role of Entropy and Reconstruction in Multi-View Self-Supervised Learning cites Learning Transferable Visual Models From Natural Language Supervision
Cited by top-tier papers24
- Not All Semantics are Created Equal: Contrastive Self-supervised Learning with Automatic Temperature IndividualizationZi-Hao Qiu, Quanqi Hu, Zhuoning Yuan, Denny Zhou et al.ICML 2023 · 29 citations
- Generalization Analysis for Contrastive Representation LearningYunwen Lei, Tianbao Yang, Yiming Ying, Ding-Xuan ZhouICML 2023 · 28 citations
- Tight Mutual Information Estimation With Contrastive Fenchel-Legendre OptimizationQing Guo, Junya Chen, Dong Wang, Yuewei Yang et al.NeurIPS 2022 · 28 citations
- The Role of Entropy and Reconstruction in Multi-View Self-Supervised LearningBorja Rodríguez Gálvez, Arno Blaas, Pau Rodríguez, Adam Golinski et al.ICML 2023 · 14 citations
- Non-Smooth Weakly-Convex Finite-sum Coupled Compositional OptimizationQuanqi Hu, Dixian Zhu, Tianbao YangNeurIPS 2023 · 13 citations
Builds on24
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
- A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Bootstrap Your Own Latent - A New Approach to Self-Supervised LearningJean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec et al.NeurIPS 2020 · 9,171 citations
Related papers
- AUC-CL: A Batchsize-Robust Framework for Self-Supervised Contrastive Representation LearningRohan Sharma, Kaiyi Ji, Zhiqiang Xu, Changyou ChenICLR 2024 · 5 citations
- EMC2: Efficient MCMC Negative Sampling for Contrastive Learning with Global ConvergenceChung-Yiu Yau, Hoi-To Wai, Parameswaran Raman, Soumajyoti Sarkar et al.ICML 2024 · 3 citations
- On the duality between contrastive and non-contrastive self-supervised learningQuentin Garrido, Yubei Chen, Adrien Bardes, Laurent Najman et al.ICLR 2023 · 24 citations
- Crafting Better Contrastive Views for Siamese Representation LearningXiangyu Peng, Kai Wang, Zheng Zhu, Mang Wang et al.CVPR 2022 · 107 citations
- InsCLR: Improving Instance Retrieval with Self-SupervisionZelu Deng, Yujie Zhong, Sheng Guo, Weilin HuangAAAI 2022 · 18 citations
