Document Ranking with a Pretrained Sequence-to-Sequence Model

Rodrigo Nogueira, Zhiying Jiang, Jimmy Lin

Introduction

Information Retrieval (IR) has seen significant advancements with the advent of Transformer-based models. The prevailing paradigm for high-accuracy ranking is the "cross-encoder" approach, where a query and a candidate document are concatenated and fed into a model like BERT. A final classification layer then predicts a relevance score. However, this method has a notable limitation: the classification layer is typically initialized randomly, requiring the model to learn the mapping between its internal representations and the concept of "relevance" entirely from task-specific data.

This paper introduces a novel alternative: treating document ranking as a sequence-to-sequence (seq2seq) task using the T5 (Text-to-Text Transfer Transformer) model. By leveraging the pre-trained linguistic knowledge of the decoder, the authors demonstrate that a model can achieve superior ranking performance, particularly when training data is scarce.

The Seq2Seq Ranking Approach

The authors adapt the T5 model for reranking by framing the problem as a text generation task. Instead of a classification head, the model is prompted with a structured string: Query: [q] Document: [d] Relevant:.

During the fine-tuning phase, the model is trained to generate the single token true for relevant query-document pairs and false for non-relevant ones. At inference time, the ranking score is derived not from the top-1 predicted token, but from the raw logits of the true and false tokens. By applying a softmax function specifically to these two tokens, the model produces a probability of relevance that is used to rank candidate documents.

For datasets containing long documents, such as Robust04, the authors employ a sliding window strategy. Documents are segmented into overlapping passages, each ranked independently. The final document score is determined by the maximum score among its constituent passages.

Experimental Results

The proposed method was evaluated on two major benchmarks: the MS MARCO passage ranking task and the Robust04 dataset.

On MS MARCO, which provides a large-scale training set, the T5-based approach demonstrated clear superiority over existing BERT-based baselines. As shown in the table below, the T5-large model achieved an MRR@10 of 0.383, surpassing the previous state-of-the-art BERT-large model.

Comparison of MRR@10 on the MS MARCO passage ranking task. T5-based models consistently outperform the BERT-large baseline.

The model's performance on Robust04 was even more striking. In a zero-shot transfer setting—where the model was trained on MS MARCO and tested on Robust04 without further fine-tuning—the T5-3B model set a new state-of-the-art with an Average Precision (AP) of 0.384. This result highlights the robustness and generalizability of the seq2seq ranking approach.

Probing the Semantic Advantage

A key finding of the research is the "data efficiency" of the T5 ranker. In low-data regimes (e.g., only 2,000 training samples), T5-base significantly outperformed BERT-base. The authors hypothesized that this advantage stems from the model's ability to leverage the semantic meaning of the target tokens "true" and "false" learned during pre-training.

To test this, they conducted probing experiments where the target tokens were replaced with various alternatives, such as "hot/cold" (antonyms), "apple/orange" (related words), or random subwords.

The effect of target token semantics on ranking performance. The use of semantically meaningful tokens like 'true' and 'false' is crucial for high performance in low-data scenarios.

The results confirmed that the choice of tokens matters significantly. When using arbitrary or unrelated tokens, performance dropped sharply in low-data settings. This suggests that the T5 decoder's pre-existing understanding of natural language concepts helps it "bootstrap" the ranking task more effectively than a randomly initialized classifier.

Conclusion and Future Work

By reframing document ranking as a seq2seq task, this work demonstrates that the latent knowledge within pre-trained decoders can be a powerful asset for Information Retrieval. The approach is not only more accurate than standard BERT classifiers but also remarkably more efficient in scenarios with limited training data.

However, challenges remain. The computational cost of large models like T5-3B is substantial, and the cross-encoder architecture necessitates a multi-stage retrieval pipeline where the T5 model acts as a reranker for a smaller set of candidates. Future research may focus on optimizing these models for faster inference or exploring how these semantic advantages can be distilled into more efficient architectures.

Summary updated

BibTeX
@inproceedings{nogueira2020document,
  author = {Rodrigo Nogueira and Zhiying Jiang and Jimmy Lin},
  title = {{Document Ranking with a Pretrained Sequence-to-Sequence Model}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.findings-emnlp.63},
}
Figure