Passage Re-ranking with BERT

Rodrigo Nogueira, Kyunghyun ChoarXiv 2019

Introduction

In modern information retrieval (IR), finding the most relevant document among millions is typically a multi-stage process. Initial stages use efficient but relatively simple keyword-matching algorithms like BM25 to retrieve a candidate set. The subsequent "re-ranking" stage employs more sophisticated models to sort these candidates. Historically, neural ranking models struggled due to a lack of large-scale training data. This paper explores the application of BERT (Bidirectional Encoder Representations from Transformers) to this task, demonstrating that pre-trained language models can be effectively repurposed as high-performance passage re-rankers.

Methodology

The authors propose a straightforward adaptation of BERT for re-ranking, treating it as a binary classification problem. Given a query and a candidate passage, the model predicts the probability of relevance.

  1. Input Construction: The query is treated as "Sentence A" and the candidate passage as "Sentence B." These are concatenated into a single sequence, separated by a [SEP] token, and prefixed with a [CLS] token.
  2. Relevance Prediction: The final hidden state of the [CLS] token is passed through a single linear layer to compute a relevance score.
  3. Ranking Pipeline: For a given query, the top 1,000 passages are first retrieved using BM25. Each query-passage pair is then scored by the BERT model, and the passages are re-ranked based on these scores.

The study primarily utilizes $BERT_{LARGE}$, fine-tuned using standard cross-entropy loss on the target datasets.

Datasets

The model was evaluated on two major benchmarks:

  • MS MARCO: A large-scale dataset featuring real-world Bing queries and human-annotated relevant passages. The training set contains approximately 400 million query-passage pairs.
  • TREC-CAR: A dataset based on Wikipedia where section headings serve as queries and the constituent paragraphs are the relevant passages.

Key Insights and Data Efficiency

One of the most significant findings is the efficiency of fine-tuning BERT for IR. Despite the massive size of the MS MARCO dataset, the authors discovered that the model reaches peak performance with relatively little task-specific data.

BERT Large performance relative to training data size compared to previous SOTA.

As shown in Figure 1, $BERT_{LARGE}$ outperforms the previous state-of-the-art (IR-Net) with as few as 100,000 training pairs—less than 0.3% of the available data. Performance plateaus after approximately 10 million pairs (less than 2% of the total data), suggesting that the pre-trained knowledge within BERT provides a robust foundation that requires only minimal alignment for the ranking task. This success is attributed to BERT's cross-attention mechanism, which allows for deep interaction between query and passage terms across all layers.

Experimental Results

The BERT-based re-ranker achieved substantial improvements over existing baselines on both benchmarks.

Comparison of BERT models against traditional and neural IR baselines.

On MS MARCO, $BERT_{LARGE}$ achieved an MRR@10 of 35.8 on the evaluation set, a 27% relative improvement over the previous state-of-the-art, IR-Net (28.1). On TREC-CAR, the model achieved a MAP of 33.5, more than doubling the performance of tuned BM25 (15.3) and significantly outperforming specialized neural models like Co-PACRR (14.8). These results underscore the effectiveness of general-purpose pre-trained models over complex, task-specific architectures.

Limitations and Future Work

Despite its performance, the BERT re-ranker faces practical challenges:

  • Computational Intensity: Ranking 1,000 documents per query is computationally expensive, making it unsuitable for the initial retrieval stage. Training even a fraction of the dataset required 30 hours on a TPU v3-8.
  • Sequence Length: BERT's 512-token limit necessitates the truncation of longer documents, potentially losing relevant information.
  • Latency: The high inference cost of large transformer models remains a barrier to real-time deployment at scale.

Future research focuses on improving the efficiency of these models and addressing the challenges of long-document ranking.

Summary updated

BibTeX
@misc{nogueira2019passage,
  author = {Rodrigo Nogueira and Kyunghyun Cho},
  title = {{Passage Re-ranking with BERT}},
  year = {2019},
  eprint = {1901.04085},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1901.04085},
}
Figure