Longformer for MS MARCO Document Re-ranking Task

Ivan Sekulic, Fabio Crestani, Amir Soleimani, Mohammad Aliannejadi

Introduction

In Information Retrieval (IR), the prevailing architecture for document ranking is a multi-stage pipeline. Typically, a computationally efficient retriever (e.g., BM25) identifies a candidate set of documents, which are then re-ranked by a more sophisticated neural model. While BERT-based models have set new benchmarks for short-text passage ranking, they are constrained by a 512-token input limit due to the quadratic scaling of self-attention. This technical report evaluates the Longformer architecture, which utilizes a sliding window attention mechanism to process up to 4,096 tokens, thereby capturing broader document context for the MS MARCO document re-ranking task.

Methodology

The Longformer addresses the "quadratic memory problem" of standard Transformers by replacing full self-attention with a combination of local windowed attention and global attention. In this implementation, the input is formatted as <s> query </s> document </s>.

  • Local Attention: Each token attends to a fixed-size neighborhood, allowing the model to scale linearly with sequence length.
  • Global Attention: The <s> token is assigned global attention, enabling it to aggregate information from the entire 4,096-token sequence.
  • Training: The model was fine-tuned using cross-entropy loss with a 1:10 positive-to-negative document ratio to address class imbalance. A linear classifier head on the <s> token predicts the final relevance score.

Experimental Setup and Datasets

The experiments were conducted using the MS MARCO (Microsoft Machine Reading Comprehension) document ranking dataset. This large-scale corpus requires models to identify relevant documents from millions of candidates.

Table 1: Statistics of the MS MARCO document ranking dataset, including document count and query splits for training, development, and testing.

As detailed in the dataset statistics, the corpus consists of 3.2 million documents. Relevance labels were derived from the MS MARCO passage task; a document is considered relevant if it contains a passage previously labeled as relevant to the query.

Results and Analysis

The primary metric for evaluation was Mean Reciprocal Rank (MRR@100). The Longformer model demonstrated significant improvements over traditional IR baselines and competitive performance against other neural architectures.

Table 2: Comparison of Longformer performance against traditional and neural baselines on the MS MARCO dev and test sets.

As shown in the comparative results, the Longformer achieved an MRR@100 of 0.336 on the development set and 0.305 on the test set. This significantly outperforms the Indri Query Likelihood baseline (0.192) and is competitive with specialized models like Conformer-kernel with QTI (NDRM1: 0.307). Additionally, on the TREC Deep Learning 2020 leaderboard, a single-run Longformer submission achieved an MRR of 0.8889 and a MAP of 0.3503.

Discussion and Limitations

The results validate that increasing the input window from 512 to 4,096 tokens allows the model to leverage deep-seated document context that is otherwise lost during truncation. However, several areas for improvement remain:

  • Hyperparameter Optimization: The current results were obtained with a fixed learning rate ($3 \times 10^{-5}$) and 150k iterations; further tuning could yield higher gains.
  • Ensembling: While competitive, the single Longformer model still trails behind complex transformer-based ensembles on official leaderboards.
  • Residual Truncation: Despite the 8x increase in context window, extremely long documents still face truncation, suggesting a need for even more scalable architectures or hierarchical processing.

Summary updated

BibTeX
@inproceedings{sekulic2020longformer,
  author = {Ivan Sekulic and Fabio Crestani and Amir Soleimani and Mohammad Aliannejadi},
  title = {{Longformer for MS MARCO Document Re-ranking Task}},
  booktitle = {Trec},
  year = {2020},
}
Figure