Query-as-context Pre-training for Dense Passage Retrieval

Xing Wu, Guangyuan Ma, Wanhui Qian, Zijia Lin, Songlin Hu

Introduction

Dense Passage Retrieval (DPR) models are typically initialized via context-supervised pre-training, which assumes that adjacent passages within a document are semantically related. However, empirical analysis suggests this assumption is often flawed; proximity does not guarantee relevance. This "correlation gap" introduces noise during pre-training, limiting the effectiveness of the resulting embeddings for downstream search tasks. This paper introduces Query-as-context (QAC) pre-training, a method that replaces random neighboring passages with synthetically generated queries to provide a higher-quality training signal.

Methodology: Query-as-context (QAC)

The core innovation of QAC is the transition from passage-passage pairs to passage-query pairs during the pre-training phase.

Comparison of standard context-supervised pre-training (left) vs. the proposed Query-as-context pre-training (right).

The process involves three main steps:

  1. Query Generation: A fine-tuned T5 model is used to generate multiple potential search queries for every passage in the corpus (e.g., MS-MARCO).
  2. The QAC Swap: Instead of training the model to associate a passage $p$ with a neighboring passage $p'$, the model is trained to associate $p$ with a generated query $q$.
  3. Architecture Integration: This approach was integrated into two state-of-the-art pre-training frameworks: coCondenser (contrastive learning) and CoT-MAE (generative reconstruction).

By using queries as context, the model learns to bridge the gap between the source distribution (passages) and the target distribution (user queries) much earlier in the training pipeline. Furthermore, because queries are typically shorter than passages, QAC reduces memory overhead and accelerates training.

Experimental Setup

The researchers evaluated QAC using the MS-MARCO passage corpus (3.2M documents) for pre-training. Performance was measured on:

  • In-domain: MS-MARCO Passage Ranking and TREC Deep Learning Tracks (2019, 2020).
  • Zero-shot: The BEIR benchmark, covering 14 diverse datasets to test domain generalization.

Key Insights and Results

Human annotation studies confirmed the superiority of QAC signals: only 35.5% of random passage pairs were found to be highly correlated, compared to 56.5% for passage-query pairs.

Performance Gains

The QAC-enhanced CoT-MAE model achieved a new state-of-the-art for single-vector pre-trained retrievers with an MRR@10 of 40.2 on MS-MARCO. Significant improvements were also noted on TREC DL benchmarks, with NDCG@10 increasing by up to 3.0 points.

Downstream Fine-tuning

The high-quality representations learned during QAC pre-training also benefit the subsequent fine-tuning stage. A "smarter" pre-trained model is better equipped to identify "hard negatives"—documents that are semantically similar but irrelevant—which are crucial for refining retriever accuracy.

The fine-tuning pipeline utilizes the QAC pre-trained model to initialize retrievers and mine hard negatives for iterative improvement.

Conclusion

Query-as-context pre-training effectively addresses the noise inherent in standard context-supervised methods. By aligning the pre-training task with the ultimate goal of passage retrieval, QAC delivers superior accuracy, better cross-domain generalization, and improved computational efficiency. Future work will explore the use of larger LLMs for even higher-quality query generation.

Summary updated

BibTeX
@inproceedings{wu2023query,
  author = {Xing Wu and Guangyuan Ma and Wanhui Qian and Zijia Lin and Songlin Hu},
  title = {{Query-as-context Pre-training for Dense Passage Retrieval}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.emnlp-main.118},
}
Figure