Query-driven Segment Selection for Ranking Long Documents

Youngwoo Kim, Razieh Rahimi, Hamed R. Bonab, James Allan

TL;DR

Standard Transformer-based rankers struggle with long documents due to their limited input length, often relying on the "first 512 tokens" heuristic which misses relevant information. This paper introduces BeST (BEst Segment Training), an iterative approach that automatically identifies and selects the most query-relevant segments within long documents to create higher-quality training data. The result is a standard BERT ranker that performs as well as specialized, complex "long-document" architectures.

What Problem Does This Paper Address?

The "Achilles' heel" of models like BERT in Information Retrieval (IR) is the quadratic complexity of self-attention. Most BERT-based rankers are capped at 512 tokens, while real-world documents are often much longer.

To bridge this gap, researchers usually employ heuristics—most commonly training the model only on the first segment of a document. However, in ad-hoc retrieval, the "smoking gun" that makes a document relevant might be buried in the middle or end. Training a model on a non-relevant segment of a relevant document introduces "label noise," teaching the model to associate query-irrelevant text with a positive label. Conversely, training on random segments of non-relevant documents might be too easy for the model. The authors seek a way to find the "best" segments to train on without requiring manual human labels for every passage.

Methods

The authors propose BeST (BEst Segment Training), an iterative framework inspired by the Expectation-Maximization (EM) algorithm.

  1. Initial Scoring: They start with a base model (like BERT) to score all segments of the documents in the training set.
  2. Segment Selection: For each query-document pair, they select the segment that receives the highest score from the current model.
  3. For relevant documents, this identifies the most likely "evidence" for relevance.
  4. For non-relevant documents, this identifies "hard negatives"—segments that look relevant but aren't, which forces the model to learn finer distinctions.
  5. Iterative Training: The ranker is then retrained using only these selected "best" segments. This process can be repeated, with each new version of the model providing better segment selections for the next round of training.

Crucially, the authors use a standard BERT-Base architecture, proving that the data selection is often more important than the model complexity.

Datasets

The researchers evaluated their approach on two major benchmarks:

  • TREC 2019 Deep Learning (DL) Track: A large-scale dataset based on MS MARCO, containing roughly 384,000 judged query-document pairs.
  • Robust04: A classic, smaller collection of news articles (249 topics) used to test the model's robustness across different query types (titles vs. descriptions).

Key Insights and Ideas

  • Noise Reduction is Key: The primary "aha moment" is that standard rankers aren't necessarily "weak"; they are just being fed noisy data. By selecting segments that actually contain query-related info, the training signal becomes much clearer.
  • Hard Negatives Matter: BeST doesn't just find better positive examples; it finds the most "deceptive" segments in non-relevant documents. Training on these "hard negatives" significantly boosts the model's discriminative power.
  • The "Gold P" Comparison: The authors compared BeST to an "Oracle" model (BERT Gold P) trained on human-labeled relevant passages. BeST achieved nearly identical performance, suggesting that the automated selection process is as effective as human labeling for training purposes.
  • Simplicity vs. Sophistication: BeST allows a standard BERT model (512-token limit) to match or beat specialized models like QDS-Transformer or TKL, which use complex hierarchical or local attention mechanisms to handle long sequences.

Key Results

  • Significant Gains: On the TREC 2019 DL dataset, BeST achieved an NDCG@10 of 0.664, significantly outperforming the standard "First Segment" baseline (0.637).
  • Robustness: On Robust04, BeST showed consistent improvements on both short "title" queries and longer "description" queries, outperforming specialized long-input models like Longformer-QA.
  • Efficiency at Inference: Because the final model is just a standard BERT ranker, it remains compatible with existing optimized inference pipelines, unlike some more exotic hierarchical architectures.

Limitations and Future Work

  • Computational Overhead: The iterative nature of BeST requires scoring every segment of every document in the training set at least once per iteration. For massive datasets, this "selection phase" adds significant pre-processing time.
  • Overfitting: The authors noted that later iterations (beyond 3 or 4) can lead to overfitting, as the model becomes too specialized in the segments it previously selected. Careful early stopping based on a validation set is required.
  • Inference Bottleneck: While BeST improves training, the model still needs to see multiple segments during inference (e.g., using a Max-P strategy) to find the relevant part of a new document, which is still slower than a single-pass approach. Future work could involve using the segment selector to speed up the inference stage as well.

Summary updated

BibTeX
@inproceedings{kim2021query,
  author = {Youngwoo Kim and Razieh Rahimi and Hamed R. Bonab and James Allan},
  title = {{Query-driven Segment Selection for Ranking Long Documents}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2021},
  url = {https://openreview.net/forum?id=OCEtXTUsdP},
}

Loading related content...

Figure