Understanding the Behaviour of Contrastive Loss
Feng Wang, Huaping Liu
Abstract
Unsupervised contrastive learning has achieved outstanding success, while the mechanism of contrastive loss has been less studied. In this paper, we concentrate on the understanding of the behaviours of unsupervised contrastive loss. We will show that the contrastive loss is a hardness-aware loss function, and the temperature τ controls the strength of penalties on hard negative samples. The previous study has shown that uniformity is a key property of contrastive learning. We build relations between the uniformity and the temperature τ . We will show that uniformity helps the contrastive learning to learn separable features, however excessive pursuit to the uniformity makes the contrastive loss not tolerant to semantically similar samples, which may break the underlying semantic structure and be harmful to the formation of features useful for downstream tasks. This is caused by the inherent defect of the instance discrimination objective. Specifically, instance discrimination objective tries to push all different instances apart, ignoring the underlying relations between samples. Pushing semantically consistent samples apart has no positive effect for acquiring a prior informative to general downstream tasks. A well-designed contrastive loss should have some extents of tolerance to the closeness of semantically similar samples. Therefore, we find that the contrastive loss meets a uniformity-tolerance dilemma, and a good choice of temperature can compromise these two properties properly to both learn separable features and tolerant to semantically similar samples, improving the feature qualities and the downstream performances.
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 d2874d0b-7be6-4e96-8102-b98b2fb65445Cited by top-tier papers191
- Mind the Gap: Understanding the Modality Gap in Multi-modal Contrastive Representation LearningWeixin Liang, Yuhui Zhang, Yongchan Kwon, Serena Yeung et al.NeurIPS 2022 · 834 citations
- Delving into Out-of-Distribution Detection with Vision-Language RepresentationsYifei Ming, Ziyang Cai, Jiuxiang Gu, Yiyou Sun et al.NeurIPS 2022 · 308 citations
- Multi-Modal Self-Supervised Learning for RecommendationWei Wei, Chao Huang, Lianghao Xia, Chuxu ZhangWWW 2023 · 256 citations
- Balanced Contrastive Learning for Long-Tailed Visual RecognitionJianggang Zhu, Zheng Wang, Jingjing Chen, Yi-Ping Phoebe Chen et al.CVPR 2022 · 194 citations
- Can contrastive learning avoid shortcut solutions?Joshua Robinson, Li Sun, Ke Yu, Kayhan Batmanghelich et al.NeurIPS 2021 · 185 citations
Builds on9
- A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
- Understanding Contrastive Representation Learning through Alignment and Uniformity on the HypersphereTongzhou Wang, Phillip IsolaICML 2020 · 2,360 citations
- What Makes for Good Views for Contrastive Learning?Yonglong Tian, Chen Sun, Ben Poole, Dilip Krishnan et al.NeurIPS 2020 · 1,631 citations
- Data-Efficient Image Recognition with Contrastive Predictive CodingOlivier J. HénaffICML 2020 · 1,553 citations
- Local Aggregation for Unsupervised Learning of Visual EmbeddingsChengxu Zhuang, Alex Lin Zhai, Daniel YaminsICCV 2019 · 462 citations
Related papers
- Model-Aware Contrastive Learning: Towards Escaping the DilemmasZizheng Huang, Haoxing Chen, Ziqi Wen, Chao Zhang et al.ICML 2023 · 15 citations
- Contrastive Learning with Hard Negative SamplesJoshua David Robinson, Ching-Yao Chuang, Suvrit Sra, Stefanie JegelkaICLR 2021 · 999 citations
- Difficult Examples Hurt Unsupervised Contrastive Learning: A Theoretical PerspectiveYi-Ge Zhang, Jingyi Cui, Qiran Li, Yisen WangICLR 2026 · 2 citations
- Intriguing Properties of Contrastive LossesTing Chen, Calvin Luo, Lala LiNeurIPS 2021 · 206 citations
- Self-Supervised Image-to-Point Distillation via Semantically Tolerant Contrastive LossAnas Mahmoud, Jordan S. K. Hu, Tianshu Kuai, Ali Harakeh et al.CVPR 2023
