[Paper Review] Longformer for MS MARCO Document Re-ranking Task
This paper proposes using Longformer, a BERT-like transformer model optimized for long sequences, to re-rank documents in the MS MARCO document re-ranking task. By leveraging local and global attention mechanisms, Longformer processes up to 4096 tokens, achieving an MRR@100 of 0.329 on the dev set and 0.305 on the test set, outperforming previous methods on this long-document ranking benchmark.
Two step document ranking, where the initial retrieval is done by a classical information retrieval method, followed by neural re-ranking model, is the new standard. The best performance is achieved by using transformer-based models as re-rankers, e.g., BERT. We employ Longformer, a BERT-like model for long documents, on the MS MARCO document re-ranking task. The complete code used for training the model can be found on: https://github.com/isekulic/longformer-marco
Motivation & Objective
- To improve document re-ranking performance on the MS MARCO dataset using a transformer-based model capable of handling long documents.
- To evaluate Longformer, a BERT-like model with sparse attention, on the long-document re-ranking task where standard BERT struggles due to sequence length limits.
- To demonstrate that Longformer's combination of local and global attention enables effective relevance scoring for long documents in a two-stage retrieval pipeline.
- To achieve state-of-the-art results on the MS MARCO document re-ranking task using a fine-tuned Longformer model.
Proposed method
- Fine-tune a pre-trained Longformer model on the MS MARCO document re-ranking dataset using a two-stream input format: query as sentence A and document as sentence B.
- Concatenate query and document with [CLS] and [SEP] tokens, truncating to a maximum of 4096 tokens to fit Longformer’s context window.
- Use the [CLS] token representation from Longformer as input to a two-layer feed-forward classifier head with dropout and non-linear activation for relevance prediction.
- Train the model with cross-entropy loss using a batch size of 128, Adam optimizer, initial LR of 3×10⁻⁵, and linear warmup over 2500 steps for 150k iterations.
- Adjust the positive-to-negative document ratio from 1:100 to 1:10 during training to improve model generalization and convergence.
- Implement training using PyTorch Lightning and Longformer via Hugging Face Transformers.
Experimental results
Research questions
- RQ1Can Longformer effectively re-rank long documents in the MS MARCO document re-ranking task, where standard BERT models are limited by sequence length?
- RQ2How does Longformer’s sparse attention mechanism, combining local and global attention, improve relevance estimation compared to standard self-attention in long documents?
- RQ3What performance gains does Longformer achieve over previous neural re-rankers like Conformer-Kernel and DRMM on the MS MARCO document re-ranking benchmark?
- RQ4Does fine-tuning Longformer on a balanced positive-to-negative document ratio improve ranking effectiveness compared to the original 1:100 ratio?
Key findings
- Longformer achieved an MRR@100 of 0.329 on the official MS MARCO dev set, outperforming the baseline Indri Query Likelihood (0.192) and other neural models.
- On the test set, Longformer achieved an MRR@100 of 0.305, surpassing the best previous submission (Conformer-Kernel with QTI, 0.307 on dev, but lower on test).
- The model's ability to process sequences up to 4096 tokens enabled effective modeling of long documents, which is critical for the document re-ranking task.
- Fine-tuning with a 1:10 positive-to-negative ratio improved training stability and performance compared to the original 1:100 ratio.
- Longformer demonstrated strong generalization on the MS MARCO document re-ranking task, achieving state-of-the-art results among transformer-based re-rankers at the time of submission.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.