HOBIT: Hardness Optimized Batch Sampling for InfoNCE Training
Himanshu Dutta, Lokesh Nagalapatti, Yashoteja Prabhu
Abstract
Contrastive training with InfoNCE loss and in-batch negatives is the standard approach for learning dual-encoder models. Its effectiveness, however, critically depends on the availability of hard negatives; in their absence, learning quickly saturates. Existing methods address this via explicit hard-negative mining, which is often costly or heuristic-driven. We introduce HOBIT, a principled mini-batch construction method that improves in-batch negative quality by reordering training examples at every epoch. solves an optimization problem motivated by the InfoNCE objective to yield mini-batches such that each query in the batch is exposed to hard yet non-contradictory, informative negative examples. We show that the optimization objective is monotone and submodular which in turn leads us to a greedy algorithm that admits the standard approximation guarantee. Empirically, we show that incurs negligible computational overhead while significantly outperforming state-of-the-art batching methods, and remains complementary to existing hard negative mining techniques.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
Lineage
- Contrastive Learning with Hard Negative Samples cites Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere
- Contrastive Learning with Hard Negative Samples cites Debiased Contrastive Learning
- Debiased Contrastive Learning cites Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere
- Optimizing Dense Retrieval Model Training with Hard Negatives cites Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrieval
Builds on29
- Understanding Contrastive Representation Learning through Alignment and Uniformity on the HypersphereTongzhou Wang, Phillip IsolaICML 2020 · 2,360 citations
- Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text RetrievalLee Xiong, Chenyan Xiong, Ye Li, Kwok-Fung Tang et al.ICLR 2021 · 1,547 citations
- Contrastive Learning with Hard Negative SamplesJoshua David Robinson, Ching-Yao Chuang, Suvrit Sra, Stefanie JegelkaICLR 2021 · 999 citations
- Debiased Contrastive LearningChing-Yao Chuang, Joshua Robinson, Yen-Chen Lin, Antonio Torralba et al.NeurIPS 2020 · 761 citations
- Optimizing Dense Retrieval Model Training with Hard NegativesJingtao Zhan, Jiaxin Mao, Yiqun Liu, Jiafeng Guo et al.SIGIR 2021 · 242 citations
Related papers
- Global Selection of Contrastive Batches via Optimization on Sample PermutationsVin Sachidananda, Ziyi Yang, Chenguang ZhuICML 2023 · 6 citations
- When Softmax Fails at the Top: Extreme‑Value Corrections for InfoNCEHasan Sabri Melihcan Erol, Suat Evren, Oktay Ozel, Alexander Morgan et al.ICML 2026
- Improving Contrastive Learning of Sentence Embeddings with Focal InfoNCEPengyue Hou, Xingyu LiEMNLP Findings 2023 · 7 citations
- Empowering Collaborative Filtering with Principled Adversarial Contrastive LossAn Zhang, Leheng Sheng, Zhibo Cai, Xiang Wang et al.NeurIPS 2023 · 56 citations
- HaSa: Hardness and Structure-Aware Contrastive Knowledge Graph EmbeddingHonggen Zhang, June Zhang, Igor MolybogWWW 2024 · 13 citations
