Dual Temperature Helps Contrastive Learning Without Many Negative Samples: Towards Understanding and Simplifying MoCo
Chaoning Zhang, Kang Zhang, Trung X. Pham, Axi Niu, Zhinan Qiao, Chang D. Yoo, In So Kweon
Abstract
Contrastive learning (CL) is widely known to require many negative samples, 65536 in MoCo for instance, for which the performance of a dictionary-free framework is often inferior because the negative sample size (NSS) is limited by its mini-batch size (MBS). To decouple the NSS from the MBS, a dynamic dictionary has been adopted in a large volume of CL frameworks, among which arguably the most popular one is MoCo family. In essence, MoCo adopts a momentum-based queue dictionary, for which we perform a fine-grained analysis of its size and consistency. We point out that InfoNCE loss used in MoCo implicitly attract anchors to their corresponding positive sample with various strength of penalties and identify such inter-anchor hardness-awareness property as a major reason for the necessity of a large dictionary. Our findings motivate us to simplify MoCo v2 via the removal of its dictionary as well as momentum. Based on an InfoNCE with the proposed dual temperature, our simplified frameworks, Sim-MoCo and SimCo, outperform MoCo v2 by a visible margin. Moreover, our work bridges the gap between CL and non-CL frameworks, contributing to a more unified under-standing of these two mainstream frameworks in SSL. Code is available at: https://bit.ly/3LkQbaT.
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 7412b917-02df-4eb3-be06-7dd44346ce45Cited by top-tier papers16
- DomainAdaptor: A Novel Approach to Test-time AdaptationJian Zhang, Lei Qi, Yinghuan Shi, Yang GaoICCV 2023 · 31 citations
- 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
- On the duality between contrastive and non-contrastive self-supervised learningQuentin Garrido, Yubei Chen, Adrien Bardes, Laurent Najman et al.ICLR 2023 · 24 citations
- See Your Emotion from Gait Using Unlabeled Skeleton DataHaifeng Lu, Xiping Hu, Bin HuAAAI 2023 · 21 citations
- Model-Aware Contrastive Learning: Towards Escaping the DilemmasZizheng Huang, Haoxing Chen, Ziqi Wen, Chao Zhang et al.ICML 2023 · 15 citations
Builds on40
- 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
- Emerging Properties in Self-Supervised Vision TransformersMathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou et al.ICCV 2021 · 8,921 citations
Related papers
- Momentum Contrast for Unsupervised Visual Representation LearningKaiming He, Haoqi Fan, Yuxin Wu, Saining Xie et al.CVPR 2020
- InsCLR: Improving Instance Retrieval with Self-SupervisionZelu Deng, Yujie Zhong, Sheng Guo, Weilin HuangAAAI 2022 · 18 citations
- Provable Stochastic Optimization for Global Contrastive Learning: Small Batch Does Not Harm PerformanceZhuoning Yuan, Yuexin Wu, Zi-Hao Qiu, Xianzhi Du et al.ICML 2022 · 43 citations
- Crafting Better Contrastive Views for Siamese Representation LearningXiangyu Peng, Kai Wang, Zheng Zhu, Mang Wang et al.CVPR 2022 · 107 citations
- Parametric Instance Classification for Unsupervised Visual Feature learningYue Cao, Zhenda Xie, Bin Liu, Yutong Lin et al.NeurIPS 2020 · 62 citations
