Global Contrastive Batch Sampling via Optimization on Sample Permutations
Not on the map. Why?
Abstract (arXiv)
Contrastive Learning has recently achieved state-of-the-art performance in a wide range of tasks. Many contrastive learning approaches use mined hard negatives to make batches more informative during training but these approaches are inefficient as they increase epoch length proportional to the number of mined negatives and require frequent updates of nearest neighbor indices or mining from recent batches. In this work, we provide an alternative to hard negative mining, Global Contrastive Batch Sampling (GCBS), an efficient approximation to the batch assignment problem that upper bounds the gap between the global and training losses, LGlobal - LTrain, in contrastive learning settings. Through experimentation we find GCBS improves state-of-the-art performance in sentence embedding and code-search tasks. Additionally, GCBS is easy to implement as it requires only a few additional lines of code, does not maintain external data structures such as nearest neighbor indices, is more computationally efficient than the most minimal hard negative mining approaches, and makes no changes to the model being trained.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 37 of its 55 references that are in the map. First posted on arXiv 23 Oct 2022.
Builds on
37 of 55 references.
References · 37
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
- 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 12,049
- 2019Momentum Contrast for Unsupervised Visual Representation Learningcited by 7,513
- 2017mixup: Beyond Empirical Risk Minimizationcited by 5,183
- 2021Zero-Shot Text-to-Image Generationcited by 4,288
- 2015FaceNet: A Unified Embedding for Face Recognition and Clusteringcited by 2,849
- 2020Supervised Contrastive Learningcited by 2,829
- 2020Improved Baselines with Momentum Contrastive Learningcited by 2,287
- 2021SimCSE: Simple Contrastive Learning of Sentence Embeddingscited by 2,173
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2022CoCa: Contrastive Captioners are Image-Text Foundation Modelscited by 1,274
- 2020Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrievalcited by 849
25 more
- 2020CURL: Contrastive Unsupervised Representations for Reinforcement Learningcited by 760
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
- 2020Contrastive Learning with Hard Negative Samplescited by 628
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
- 2019A Theoretical Analysis of Contrastive Unsupervised Representation Learningcited by 530
- 2015Deep Metric Learning via Lifted Structured Feature Embeddingcited by 449
- 2020Hard Negative Mixing for Contrastive Learningcited by 402
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
- 2020Debiased Contrastive Learningcited by 356
- 2017Sampling Matters in Deep Embedding Learningcited by 285
- 2017Working hard to know your neighbor's margins: Local descriptor learning losscited by 212
- 2018An efficient framework for learning sentence representationscited by 198
- 2020Contrastive Learning of General-Purpose Audio Representationscited by 169
- 2020Adversarial Self-Supervised Contrastive Learningcited by 139
- 2018Deep Metric Learning with Hierarchical Triplet Losscited by 112
- 2017Smart Mining for Deep Metric Learningcited by 96
- 2020Contrastive Learning with Adversarial Examplescited by 91
- 2020Hard negative examples are hard, but usefulcited by 82
- 2021Mutual Contrastive Learning for Visual Representation Learningcited by 42
- 2021Understanding Hard Negatives in Noise Contrastive Estimationcited by 39
- 2018Mining on Manifolds: Metric Learning without Labelscited by 36
- 2020Universal Sentence Representation Learning with Conditional Masked Language Modelcited by 34
- 2022Improved Universal Sentence Embeddings with Prompt-based Contrastive Learning and Energy-based Learningcited by 30
- 2019Locality and compositionality in zero-shot learningcited by 29
- 2021Cross-Batch Negative Sampling for Training Two-Tower Recommenderscited by 24
Built on by
Citing papers per year: 2024: 3; 2025: 2.
5 papers.
- 2025Breaking the Batch Barrier (B3) of Contrastive Learning via Smart Batch Miningcited by 28
- 2024MoDE: CLIP Data Experts via Clusteringcited by 22
- 2024Contextual Document Embeddingscited by 19
- 2024Active Data Curation Effectively Distills Large-Scale Multimodal Modelscited by 19
- 2025LogiCoL: Logically-Informed Contrastive Learning for Set-based Dense Retrievalcited by 3
- 2025LogiCoL: Logically-Informed Contrastive Learning for Set-based Dense Retrieval26 May 2025
- 2025Breaking the Batch Barrier (B3) of Contrastive Learning via Smart Batch Mining16 May 2025
- 2024Active Data Curation Effectively Distills Large-Scale Multimodal Models27 Nov 2024
- 2024Contextual Document Embeddings3 Oct 2024
- 2024MoDE: CLIP Data Experts via Clustering24 Apr 2024