Skip to main content
QUICK REVIEW

[Paper Review] Optimizing Dense Retrieval Model Training with Hard Negatives

Jingtao Zhan, Jiaxin Mao|arXiv (Cornell University)|Apr 16, 2021
Topic ModelingComputer Science31 references11 citations
TL;DR

This paper proposes two novel training strategies—STAR and ADORE—to optimize dense retrieval models by addressing the limitations of static hard negative sampling. STAR enhances training stability by combining random and hard negatives, while ADORE dynamically selects hard negatives during training to directly optimize ranking performance, achieving state-of-the-art results with significant efficiency gains on benchmark datasets.

ABSTRACT

Ranking has always been one of the top concerns in information retrieval researches. For decades, the lexical matching signal has dominated the ad-hoc retrieval process, but solely using this signal in retrieval may cause the vocabulary mismatch problem. In recent years, with the development of representation learning techniques, many researchers turn to Dense Retrieval (DR) models for better ranking performance. Although several existing DR models have already obtained promising results, their performance improvement heavily relies on the sampling of training examples. Many effective sampling strategies are not efficient enough for practical usage, and for most of them, there still lacks theoretical analysis in how and why performance improvement happens. To shed light on these research questions, we theoretically investigate different training strategies for DR models and try to explain why hard negative sampling performs better than random sampling. Through the analysis, we also find that there are many potential risks in static hard negative sampling, which is employed by many existing training methods. Therefore, we propose two training strategies named a Stable Training Algorithm for dense Retrieval (STAR) and a query-side training Algorithm for Directly Optimizing Ranking pErformance (ADORE), respectively. STAR improves the stability of DR training process by introducing random negatives. ADORE replaces the widely-adopted static hard negative sampling method with a dynamic one to directly optimize the ranking performance. Experimental results on two publicly available retrieval benchmark datasets show that either strategy gains significant improvements over existing competitive baselines and a combination of them leads to the best performance.

Motivation & Objective

  • To theoretically analyze and compare different negative sampling strategies in dense retrieval training.
  • To identify the risks and limitations of static hard negative sampling, which is widely used but unstable and poorly optimized.
  • To develop a stable training method (STAR) that combines random and hard negatives to improve training robustness.
  • To propose a dynamic hard negative sampling method (ADORE) that directly optimizes ranking performance during training.
  • To achieve both higher effectiveness and greater training efficiency compared to existing state-of-the-art methods.

Proposed method

  • STAR introduces a hybrid loss that combines random negatives and hard negatives to stabilize the training process and reduce performance collapse on difficult queries.
  • ADORE replaces static hard negatives with dynamically generated hard negatives that are re-computed at each training step based on the current model parameters.
  • The method uses a differentiable ranking objective that directly optimizes top-k retrieval performance, aligning training with the final evaluation metric.
  • ADORE leverages compressed product quantization (PQ) indexes to reduce GPU memory usage, enabling training on a single 11GB GPU.
  • Theoretical analysis shows that random negative sampling minimizes total pairwise errors, while hard negative sampling minimizes top-K errors, explaining its superiority for ranking tasks.
  • Experiments use two public benchmarks: MS MARCO passage and TREC Natural Questions, with standard evaluation metrics including MRR@10 and NDCG@10.

Experimental results

Research questions

  • RQ1Why does hard negative sampling outperform random negative sampling in dense retrieval training?
  • RQ2What are the theoretical and practical limitations of static hard negative sampling in DR training?
  • RQ3Can dynamic hard negative sampling lead to better ranking performance than static counterparts?
  • RQ4How can training stability and efficiency be improved without sacrificing model effectiveness?
  • RQ5Can compressed indexes enable efficient training of dense retrieval models on limited hardware?

Key findings

  • ADORE achieves a 179x speedup over ANCE in training time, reducing 645 hours to 4 hours on a single GPU.
  • STAR improves training stability, reducing performance collapse on hard queries compared to static hard negative baselines.
  • The combination of ADORE and STAR achieves the best performance, with MRR@10 of 0.329 on the MS MARCO passage dataset.
  • With PQ=96, ADORE reduces GPU memory usage to 3% of the original while losing only 0.003 in MRR@10, enabling single-GPU training.
  • ADORE with PQ=6 degrades to near-random negative sampling, achieving MRR@10 of 0.304, confirming the importance of index quality.
  • Theoretical analysis confirms that hard negative sampling minimizes top-K errors, which aligns better with ranking objectives than random sampling.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.