Generalization Analysis for Contrastive Representation Learning
Yunwen Lei, Tianbao Yang, Yiming Ying, Ding-Xuan Zhou
Abstract
Recently, contrastive learning has found impressive success in advancing the state of the art in solving various machine learning tasks. However, the existing generalization analysis is very limited or even not meaningful. In particular, the existing generalization error bounds depend linearly on the number of negative examples while it was widely shown in practice that choosing a large is necessary to guarantee good generalization of contrastive learning in downstream tasks. In this paper, we establish novel generalization bounds for contrastive learning which do not depend on , up to logarithmic terms. Our analysis uses structural results on empirical covering numbers and Rademacher complexities to exploit the Lipschitz continuity of loss functions. For self-bounding Lipschitz loss functions, we further improve our results by developing optimistic bounds which imply fast rates in a low noise condition. We apply our results to learning with both linear representation and nonlinear representation by deep neural networks, for both of which we derive Rademacher complexity bounds to get improved generalization bounds.
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 papers16
- Generalization Bounds for Rank-sparse Neural NetworksAntoine Ledent, Rodrigo Alves, Yunwen LeiNeurIPS 2025 · 4 citations
- A Statistical Learning Perspective on Semi-dual Adversarial Neural Optimal Transport SolversRoman Tarasov, Petr Mokrov, Milena Gazdieva, Evgeny Burnaev et al.ICLR 2026 · 2 citations
- Statistical Consistency and Generalization of Contrastive Representation LearningYuanfan Li, Xiyuan Wei, Tianbao Yang, Yiming YingICML 2026 · 1 citation
- Generalization Analysis for Deep Contrastive Representation LearningNong Minh Hieu, Antoine Ledent, Yunwen Lei, Cheng Yeaw KuAAAI 2025 · 1 citation
- Adv-SSL: Adversarial Self-Supervised Representation Learning with Theoretical GuaranteesChenguang Duan, Yuling Jiao, Huazhen Lin, Wensen Ma et al.NeurIPS 2025 · 1 citation
Builds on15
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- 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
- Supervised Contrastive LearningPrannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna et al.NeurIPS 2020 · 7,049 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
- Generalization Analysis for Supervised Contrastive Representation Learning under Non-IID SettingsNong Minh Hieu, Antoine LedentICML 2025
- Nearly-tight Bounds for Deep Kernel LearningYifan Zhang, Min-Ling ZhangICML 2023 · 3 citations
- Relative Deviation Margin BoundsCorinna Cortes, Mehryar Mohri, Ananda Theertha SureshICML 2021 · 16 citations
- Tight and Fast Bounds for Multi-Label LearningYifan Zhang, Min-Ling ZhangICML 2025
- Optimistic Bounds for Multi-output LearningHenry W. J. Reeve, Ata KabánICML 2020 · 14 citations
