Lune

NeurIPS2021Top-tier venue

Efficient Training of Retrieval Models using Negative Cache

Erik Lindgren, Sashank J. Reddi, Ruiqi Guo, Sanjiv Kumar

Abstract

Factorized models, such as two tower neural network models, are widely used for scoring (query, document) pairs in information retrieval tasks. These models are typically trained by optimizing the model parameters to score relevant "positive" pairs higher than the irrelevant "negative" ones. While a large set of negatives typically improves the model performance, limited computation and memory budgets place constraints on the number of negatives used during training. In this paper, we develop a novel negative sampling technique for accelerating training with softmax cross-entropy loss. By using cached (possibly stale) item embeddings, our technique enables training with a large pool of negatives with reduced memory and computation. We also develop a streaming variant of our algorithm geared towards very large datasets. Furthermore, we establish a theoretical basis for our approach by showing that updating a very small fraction of the cache at each iteration can still ensure fast convergence. Finally, we experimentally validate our approach and show that it is efficient and compares favorably with more complex, state-of-the-art approaches.

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.

10 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Cache-Augmented Inbatch Importance Resampling for Training Recommender Retriever cites Accelerating Large-Scale Inference with Anisotropic Vector Quantization
  • EMC2: Efficient MCMC Negative Sampling for Contrastive Learning with Global Convergence cites Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrieval
  • Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrieval cites Poly-encoders: Architectures and Pre-training Strategies for Fast and Accurate Multi-sentence Scoring
  • Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrieval cites Accelerating Large-Scale Inference with Anisotropic Vector Quantization
  • TPU-KNN: K Nearest Neighbor Search at Peak FLOP/s cites Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision
  • TPU-KNN: K Nearest Neighbor Search at Peak FLOP/s cites Accelerating Large-Scale Inference with Anisotropic Vector Quantization
  • Optimizing Dense Retrieval Model Training with Hard Negatives cites Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrieval
  • Dual-Encoders for Extreme Multi-label Classification cites Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrieval
  • Dual-Encoders for Extreme Multi-label Classification cites Accelerating Large-Scale Inference with Anisotropic Vector Quantization
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers10

  1. Focused Transformer: Contrastive Training for Context ScalingSzymon Tworkowski, Konrad Staniszewski, Mikolaj Pacek, Yuhuai Wu et al.NeurIPS 2023 · 190 citations
  2. TPU-KNN: K Nearest Neighbor Search at Peak FLOP/sFelix Chern, Blake Hechtman, Andy Davis, Ruiqi Guo et al.NeurIPS 2022 · 31 citations
  3. Cache-Augmented Inbatch Importance Resampling for Training Recommender RetrieverJin Chen, Defu Lian, Yucheng Li, Baoyun Wang et al.NeurIPS 2022 · 14 citations
  4. Dual-Encoders for Extreme Multi-label ClassificationNilesh Gupta, Devvrit, Ankit Singh Rawat, Srinadh Bhojanapalli et al.ICLR 2024 · 8 citations
  5. EMC2: Efficient MCMC Negative Sampling for Contrastive Learning with Global ConvergenceChung-Yiu Yau, Hoi-To Wai, Parameswaran Raman, Soumajyoti Sarkar et al.ICML 2024 · 3 citations

Builds on7

  1. 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
  2. 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
  3. Accelerating Large-Scale Inference with Anisotropic Vector QuantizationRuiqi Guo, Philip Sun, Erik Lindgren, Quan Geng et al.ICML 2020 · 539 citations
  4. Poly-encoders: Architectures and Pre-training Strategies for Fast and Accurate Multi-sentence ScoringSamuel Humeau, Kurt Shuster, Marie-Anne Lachaux, Jason WestonICLR 2020 · 316 citations
  5. Optimizing Dense Retrieval Model Training with Hard NegativesJingtao Zhan, Jiaxin Mao, Yiqun Liu, Jiafeng Guo et al.SIGIR 2021 · 242 citations

Related papers

  1. Improving the Accuracy of Dense Retrieval on the Quantized Indexes via Gradient Optimization of the Target EmbeddingsCong Tan, Yongqi Shao, Hong Huo, Tao FangAAAI 2026
  2. A Fresh Take on Stale Embeddings: Improving Dense Retriever Training with Corrector NetworksNicholas Monath, Will Sussman Grathwohl, Michael Boratko, Rob Fergus et al.ICML 2024 · 1 citation
  3. A Gradient Accumulation Method for Dense Retriever under Memory ConstraintJaehee Kim, Yukyung Lee, Pilsung KangNeurIPS 2024 · 10 citations
  4. A Tale of Two Efficient and Informative Negative Sampling DistributionsShabnam Daghaghi, Tharun Medini, Nicholas Meisburger, Beidi Chen et al.ICML 2021 · 11 citations
  5. Efficiently Teaching an Effective Dense Retriever with Balanced Topic Aware SamplingSebastian Hofstätter, Sheng-Chieh Lin, Jheng-Hong Yang, Jimmy Lin et al.SIGIR 2021 · 297 citations
Dusk over the sea between two cliffs drawn in fine vertical lines