atlas

Research map / Large language models / Language, safety and interpretability

Attention in Large Language Models Yields Efficient Zero-Shot Re-Rankers

ICLR 2025 · Large language models › Language, safety and interpretability · approach: LLM pruning and scaling data · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes in-context re-ranking (ICR), which scores documents by the attention an LLM's query tokens pay to them, calibrated with a content-free "N/A" query, to rerank in two forward passes without generation.

Problem

LLM-based zero-shot re-rankers rely on autoregressive generation, which is costly (O(N) forward passes) and unreliable for open-weight models that struggle with instruction following and output formatting.

Approach

Use attention weights from query tokens to document tokens inside the LLM prompt as relevance signals, aggregated over all query tokens, layers and heads, and calibrated by subtracting scores from a content-free "N/A" query; this needs only two forward passes and always yields a well-formed ranking.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use attention-based ICR instead of RankGPTMistral 7B re-ranking · BEIR micro-averagenDCG@10: 13.3 pointsHelped
Use attention-based ICR instead of RankGPTLlama-3.1 8B re-ranking · Multi-hop averageRecall@2: 5.4%-6.3%Helped
Use attention-based ICR instead of RankGPTLlama-3.1 8B re-ranking · DBPedia-EntitynDCG@10: 41.4 -> 35.3Hurt
Add content-free-query calibration (ablation)ICR with Llama-3.1 8B · Single-hop macro-averagenDCG@10: 9.3 pointsHelped
Add content-free-query calibration (ablation)ICR with Llama-3.1 8B · Multi-hop macro-averageRecall@5: 6.1 percentHelped
Aggregate attention over all query tokens rather than only the last query token (ablation)ICR with Llama-3.1 8B · Single-hop macro-averagenDCG@10: 13.7 pointsHelped
Aggregate attention over all query tokens rather than only the last query token (ablation)ICR with Llama-3.1 8B · Multi-hop macro-averageRecall@5: 17.1 percentHelped

Surprising findings

Limitations

Experimental setup

Datasets: TREC DL19 TREC DL20 BEIR MuSiQue 2WikiMultiHopQA HotpotQA

Benchmarks: TREC DL19 TREC DL20 BEIR (TREC-COVID, NFCorpus, DBPedia-Entity, SciFact, SciDocs, FiQA, FEVER, Climate-FEVER, NQ) MuSiQue 2WikiMultiHopQA HotpotQA

Metrics: nDCG@10 recall@2 recall@5 All-Recall@5 success rate latency

Baselines: RankGPT ColBERT v2 BM25 RankVicuna Setwise FIRST

Builds on: RankGPT attention sorting FIRST

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy