Unsupervised Dense Retrieval with Relevance-Aware Contrastive Pre-Training

Yibin Lei, Liang Ding, Yu Cao, Changtong Zan, Andrew Yates, Dacheng Tao

Introduction

Dense retrieval has transformed the landscape of information retrieval (IR) and open-domain question answering by mapping queries and documents into a shared continuous embedding space. Unlike traditional keyword-based methods like BM25, dense retrievers can capture semantic nuances. However, the efficacy of these models typically depends on massive human-annotated datasets, such as MS MARCO, which are expensive and difficult to scale for specialized domains like medicine or law.

To mitigate this dependency, researchers have turned to unsupervised contrastive pre-training. A common technique, popularized by models like Contriever, involves treating two randomly cropped spans from the same document as a "positive" pair. While effective, this approach relies on a flawed assumption: that any two spans from the same document are inherently relevant to one another. In reality, text is often dense and multifaceted; adjacent sentences in a Wikipedia entry may discuss entirely different topics. Treating these unrelated snippets as positive pairs introduces significant noise, which can distort the embedding space and degrade retrieval performance.

The ReContriever Framework

To address the noise inherent in unsupervised data, we introduce ReContriever (Relevance-Aware Contrastive Retriever). ReContriever moves beyond the simple assumption of document-level co-occurrence by treating the model itself as an "imperfect oracle" capable of filtering its own training signal. The framework is built on two primary technical innovations:

1. One-Document-Multi-Pair Strategy

Standard contrastive learning often samples a single pair of spans per document. ReContriever instead generates multiple pairs ($n$ pairs) from a single document, keeping one span fixed as the "query" and comparing it against several other "passages" from the same source. This strategy ensures that even if some pairs are identified as noisy and down-weighted, the model still receives sufficient signal to learn meaningful representations from every document in the corpus.

2. Relevance-Aware Contrastive Loss

This is the core mechanism of ReContriever. During the training process, the model uses its current state to calculate a similarity score for each auto-generated pair. This score acts as a proxy for relevance. If the model is confident that a pair is irrelevant, it assigns that pair a lower weight in the loss function. Conversely, pairs that the model identifies as highly similar are given greater weight. By adaptively weighting the loss, ReContriever focuses its learning on the most "trustworthy" pseudo-labels, effectively ignoring the false positives that typically plague unsupervised contrastive learning.

Experimental Evaluation

ReContriever was evaluated across a diverse array of retrieval benchmarks to test its robustness and generalization capabilities:

  • BEIR Benchmark: A comprehensive suite of 15 retrieval datasets covering domains such as COVID-19 research (TREC-COVID), finance (FiQA-2018), and social media.
  • Open-Domain QA: Standard benchmarks including Natural Questions (NQ), TriviaQA, and WebQuestions.
  • Domain-Specific Tasks: Specialized sets such as SciFact (scientific claim verification) and ArguAna (argument retrieval).

Key Results

ReContriever achieved state-of-the-art (SOTA) performance for unsupervised models, outperforming the previous baseline, Contriever, on 10 out of 15 BEIR tasks. Notably, ReContriever consistently outperformed the traditional BM25 algorithm in specialized domains after being pre-trained on the target corpus—a milestone for dense retrieval models which often struggle to beat keyword search in zero-shot settings.

In the context of Open-Domain QA, ReContriever demonstrated a significant leap in performance. On the Natural Questions (NQ) dataset, it achieved a Top-100 Recall of 82.6%, narrowing the gap between unsupervised methods and supervised models like DPR (85.4%). Furthermore, the model showed remarkable data efficiency: when provided with only 128 labeled examples (few-shot learning), ReContriever performed on par with models trained on thousands of human-annotated pairs.

Discussion and Limitations

While ReContriever represents a significant step forward, several challenges remain. The model still occasionally lags behind BM25 when used as a general-purpose retriever without any domain-specific pre-training. Additionally, because ReContriever is initialized from BERT, it may inherit the social and linguistic biases present in its original pre-training data. Finally, while the relevance-aware mechanism is effective, pre-training on specific target corpora for every new domain incurs additional computational costs compared to using a single static model.

Conclusion

ReContriever demonstrates that dense retrievers can be taught to filter their own noise through relevance-aware contrastive pre-training. By leveraging the model's internal state to weight the importance of training pairs, ReContriever achieves superior performance across diverse benchmarks and significantly reduces the need for costly human-labeled data. This approach paves the way for more efficient and scalable retrieval systems across specialized and data-scarce domains.

Summary updated

BibTeX
@inproceedings{lei2023unsupervised,
  author = {Yibin Lei and Liang Ding and Yu Cao and Changtong Zan and Andrew Yates and Dacheng Tao},
  title = {{Unsupervised Dense Retrieval with Relevance-Aware Contrastive Pre-Training}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.695},
}
Figure