Not All Semantics are Created Equal: Contrastive Self-supervised Learning with Automatic Temperature Individualization
Zi-Hao Qiu, Quanqi Hu, Zhuoning Yuan, Denny Zhou, Lijun Zhang, Tianbao Yang
Abstract
In this paper, we aim to optimize a contrastive loss with individualized temperatures in a principled and systematic manner for self-supervised learning. The common practice of using a global temperature parameter τ ignores the fact that "not all semantics are created equal", meaning that different anchor data may have different numbers of samples with similar semantics, especially when data exhibits long-tails. First, we propose a new robust contrastive loss inspired by distributionally robust optimization (DRO), providing us an intuition about the effect of τ and a mechanism for automatic temperature individualization. Then, we propose an efficient stochastic algorithm for optimizing the robust contrastive loss with a provable convergence guarantee without using large minibatch sizes. Theoretical and experimental results show that our algorithm automatically learns a suitable τ for each sample. Specifically, samples with frequent semantics use large temperatures to keep local semantic structures, while samples with rare semantics use small temperatures to induce more separable features. Our method not only outperforms prior strong baselines (e.g., Sim-CLR, CLIP) on unimodal and bimodal datasets with larger improvements on imbalanced data but also is less sensitive to hyper-parameters. To our best knowledge, this is the first methodical approach to optimizing a contrastive loss with individualized temperatures. Most work of Z.H. Qiu was done when visiting the OptMAI lab at TAMU.
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.
Cited by top-tier papers11
- Learning to Scale Logits for Temperature-Conditional GFlowNetsMinsu Kim, Joohwan Ko, Taeyoung Yun, Dinghuai Zhang et al.ICML 2024 · 31 citations
- Contextual Stochastic Bilevel OptimizationYifan Hu, Jie Wang, Yao Xie, Andreas Krause et al.NeurIPS 2023 · 22 citations
- To Cool or not to Cool? Temperature Network Meets Large Foundation Models via DROZi-Hao Qiu, Siqi Guo, Mao Xu, Tuo Zhao et al.ICML 2024 · 11 citations
- Not All Embeddings are Created Equal: Towards Robust Cross-domain Recommendation via Contrastive LearningWenhao Yang, Yingchun Jian, Yibo Wang, Shiyin Lu et al.WWW 2024 · 10 citations
- NeuCLIP: Efficient Large-Scale CLIP Training with Neural Normalizer OptimizationXiyuan Wei, Chih-Jen Lin, Tianbao YangICLR 2026 · 3 citations
Builds on34
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 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
- Scaling Up Visual and Vision-Language Representation Learning With Noisy Text SupervisionChao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen et al.ICML 2021 · 5,401 citations
- Unsupervised Learning of Visual Features by Contrasting Cluster AssignmentsMathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal et al.NeurIPS 2020 · 5,249 citations
Related papers
- Temperature Schedules for self-supervised contrastive methods on long-tail dataAnna Kukleva, Moritz Böhle, Bernt Schiele, Hilde Kuehne et al.ICLR 2023 · 7 citations
- Understanding Contrastive Learning via Distributionally Robust OptimizationJunkang Wu, Jiawei Chen, Jiancan Wu, Wentao Shi et al.NeurIPS 2023 · 55 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
- On the Effectiveness of Out-of-Distribution Data in Self-Supervised Long-Tail LearningJianhong Bai, Zuozhu Liu, Hualiang Wang, Jin Hao et al.ICLR 2023 · 6 citations
- Exploring Balanced Feature Spaces for Representation LearningBingyi Kang, Yu Li, Sa Xie, Zehuan Yuan et al.ICLR 2021 · 296 citations
