RankT5

What it is

RankT5 (Zhuang et al., 2022) frames document reranking as a sequence generation task where T5 outputs a permutation of document identifiers, ordered by relevance. This listwise formulation avoids the independence assumption of pointwise rerankers (MonoBERT, MonoT5) and the quadratic complexity of pairwise approaches — the model sees all candidates at once and produces a ranked order in a single forward pass.

[illustrate: Query + all candidate passages → T5 → sequence of document IDs in relevance order]

How it works

  1. Input format:

    Query: {query}
    Passage [1]: {passage_1}
    Passage [2]: {passage_2}
    ...
    Passage [k]: {passage_k}
    Rank the passages.
    
  2. Output:

    • Sequence of passage indices: [2] [5] [1] [3] ...
    • Decoded as a ranked list
  3. Training:

    • Fine-tuned on MS MARCO with gold relevance judgments
    • Cross-entropy over the target permutation
  4. Sliding window for long lists:

    • T5 context window limits candidate count to ~20 passages at once
    • Slide a window over the full candidate list with overlap, merge rankings

Variants and history

RankT5 (2022) and the concurrent LLM Reranker (RankGPT, Sun et al., 2023) both use the listwise generation framing. RankT5 requires fine-tuning; RankGPT uses GPT-4 zero-shot with chain-of-thought. PRP (Pairwise Ranking Prompting) compares the listwise approach against pairwise GPT-4 scoring. The sliding window approach for handling long lists was formalized in the RankGPT paper.

When to use it

Use RankT5 when:

  • You want listwise ranking signals rather than pointwise independence
  • Fine-tuning data (MS MARCO or domain-specific) is available
  • Candidate list is manageable (≤ 20 per window pass)
  • You want to avoid the quadratic cost of all-pairs pairwise comparison

For zero-shot reranking without fine-tuning, prefer RankGPT or MonoT5-3B.

See also