Skip to content

Document Ranking with a Pretrained Sequence-to-Sequence Model

optionalextendedfundamentalpaperrubric 8/122020 · Findings of EMNLP 2020 · ~20 min

Rodrigo Nogueira, Zhiying Jiang, Jimmy Lin

Read first: Reranker map: pointwise, pairwise, setwise, listwise and reasoning rerankers

Status

TL;DR. monoT5 fine-tunes T5 to read Query: q Document: d Relevant: and generate the single word “true” or “false”. At inference it ranks documents by the probability of “true”, computed with a softmax over just the two target logits. In 2020 it matched or beat BERT cross-encoders on MS MARCO, transferred zero-shot to Robust04, and was far better than BERT when training data was scarce. It is the pointwise baseline in RankGPT, RankZephyr and Rank1.

A pointwise reranker scores each (query, document) pair on its own. monoT5 phrases that score as a generation:

s(q,d)=exp⁡ztrueexp⁡ztrue+exp⁡zfalse=σ(ztrue−zfalse)s(q,d) = \frac{\exp z_{\text{true}}}{\exp z_{\text{true}} + \exp z_{\text{false}}} = \sigma\big(z_{\text{true}} - z_{\text{false}}\big)

where zz are the decoder logits at the first output step. Training is ordinary teacher-forced cross-entropy on the target word (class-balanced batches of 128, 100k steps, learning rate 1e-3, 512 input tokens). The paper reports that ranking by the raw “true” logit, or by a softmax over the whole vocabulary, gave near-zero effectiveness. Only the difference between the two target logits is a usable relevance score.

For long documents (Robust04) the model scores 10-sentence windows with a stride of 5 and takes the maximum window score (MaxP). The model is trained only on MS MARCO passages, so Robust04 is zero-shot.

Results (paper-reported). On MS MARCO passage dev (MRR@10, Table 1), BM25 gives 0.184, BERT-large 0.372, T5-base 0.363 and T5-large 0.383. T5-3B gives 0.382; the authors note it was under-trained. On Robust04 (Table 2), reranking BM25+RM3 with T5-3B reaches AP 0.384 and nDCG@20 0.601 zero-shot, above Birch (which tunes weights on Robust04) and CEDR (trained on Robust04 via cross-validation). Training took about 12, 48 and 160 hours on a TPU v3 for base, large and 3B. In later papers monoT5-3B stays a strong yardstick: RankGPT’s Table 1 has it at 71.83 nDCG@10 on DL19, above gpt-3.5-turbo (65.80). It drops sharply on reasoning-heavy queries, where Rank1 reports 16.8 nDCG@10 on BRIGHT.

  • Reranker map: where pointwise rerankers sit against listwise and reasoning rerankers.
  • RankGPT: uses monoT5 as the supervised baseline that zero-shot GPT-4 has to beat.
  • Rank1: the same true/false pointwise read-out, with a reasoning trace generated before the answer token.
  • MICE and MICE-P: an encoder cross-encoder made cheaper by removing interactions instead of changing the output format.
  • BRIGHT: the benchmark where surface-matching pointwise rerankers like monoT5 stop helping.

Questions to think through

These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.

  1. Derive / compute

    monoT5 scores a document by a softmax over only the "true" and "false" logits at the first decoding step. Doc A has logits true = 2.0, false = 0.5; doc B has true = 1.0, false = −2.0. Compute each document's score, compare the ranking with ranking by the raw "true" logit, and explain why a softmax over the whole vocabulary would be a third, different ranking signal.

    What a strong answer covers
    • Two-way softmax equals sigmoid of the logit difference: A = σ(1.5) ≈ 0.818, B = σ(3.0) ≈ 0.953, so B ranks above A.
    • The raw true logit ranks A (2.0) above B (1.0): the order flips, because only the difference between the two logits is calibrated by training.
    • A full-vocabulary softmax also depends on how much mass the model puts on every other token, which varies per input and has nothing to do with relevance.
    • The paper reports that both alternatives (raw logit, full softmax) gave near-zero effectiveness, which is why the two-way softmax is part of the method, not a detail.
  2. Mechanism

    With 2k MS MARCO training examples, T5-base reaches MRR@10 ≈ 0.238 while BERT-base reaches ≈ 0.127; with all data the gap shrinks. Explain the mechanism behind the low-data advantage, and use the target-word probe (true/false vs. hot/cold vs. arbitrary subword tokens) to say what part of the pretrained model is being reused.

    What a strong answer covers
    • BERT needs a freshly initialised classification head on [CLS]; with little data that head and the representation must be learned together. T5 predicts a vocabulary token with its existing decoder and output embedding, so nothing new is initialised.
    • Table 4: with 2k examples, true/false gives 0.238, hot/cold 0.205 and the subword pair _ab/_de 0.163. Words whose pretrained meaning fits the task start closer to a useful decision boundary.
    • With all training data the target words barely matter (0.340 to 0.358): enough supervision overrides the prior, so the benefit is about sample efficiency rather than final quality.
    • Same idea later reused by LLM rerankers that read the probability of a yes/no or true/false token (Rank1 uses true/false after its reasoning trace).
  3. Design

    You want to apply a 512-token pointwise reranker like monoT5-3B to a corpus of long web documents for a deep-research agent. A typical document has 60 sentences, you rerank the top 100 per query, and you follow the paper's Robust04 recipe (10-sentence windows, stride 5, MaxP). Estimate the cost per query relative to passage reranking, and decide whether MaxP is the right aggregation for an agent that will read only the top 5 documents.

    What a strong answer covers
    • Windows start at sentences 1, 6, …, 51, so (60 − 10)/5 + 1 = 11 windows per document and about 1,100 forward passes per query instead of 100: roughly 11× the compute, still fully parallel.
    • MaxP rewards one highly relevant window; that matches an agent that will extract a span, but it hides documents whose relevance is spread across many sections.
    • Alternatives: score only the first windows (cheap, biased to the lead), sum or mean of the top-k windows, or a long-context reranker; a cheaper first-pass reranker could prune candidates before windowing.
    • Validate on judged long-document queries, and check whether the agent's final answer accuracy (not only nDCG) changes when MaxP is swapped for the alternatives.

Done with this page?

Status