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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 4729cc5d-a220-4b65-9e34-96613fc89eb2Cited 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
