CAFE: Retrieval Head-based Coarse-to-Fine Information Seeking to Enhance Multi-Document QA Capability

Han Peng, Jinhao Jiang, Zican Dong, Wayne Xin Zhao, Fang Lei2025

Abstract

CAFE (Coarse-to-Fine Information Seeking) is a training-free, two-stage framework designed to boost the multi-document reasoning capabilities of Large Language Models (LLMs). By leveraging the model’s internal "retrieval heads" to first filter out irrelevant background noise and then "steer" attention toward gold evidence, CAFE significantly outperforms standard Retrieval-Augmented Generation (RAG) and even supervised fine-tuning (SFT) methods in long-context QA tasks.

Introduction

While modern LLMs boast massive context windows (up to 128K or even 10M tokens), their actual performance often craters as the input length increases. This is largely due to two issues: the "lost-in-the-middle" phenomenon, where models struggle to access information buried in the center of a prompt, and the "distraction" effect, where irrelevant documents dilute the model's focus.

Existing solutions like Retrieval-Augmented Generation (RAG) or In-Context Retrieval (ICR) often struggle with a precision-recall trade-off. External retrievers might miss the "gold" document (low recall), while prompting the model to find its own evidence can be unreliable (low precision). CAFE addresses these challenges by utilizing the model’s own internal mechanics to prioritize information without requiring expensive retraining.

Methods

CAFE operates on a "three-phase" paradigm inspired by human problem-solving: Identification, Focusing, and Reasoning. It achieves this through a two-stage process:

  1. Coarse-Grained Filtering:
    • Retrieval Head Detection: Specific "retrieval heads"—attention heads that naturally assign high scores to relevant tokens—are identified using a small validation set.
  2. Filtering & Reranking: These heads identify a subset of relevant documents, which are then reranked using a "locality-based" mechanism, placing the most relevant information at the end of the context where LLMs perform best.
  3. Fine-Grained Steering:
    • Attention Steering: Once the document pool is narrowed, CAFE uses a second set of retrieval heads to pinpoint exact "gold" evidence.
  4. Inference-Time Bias: Instead of deleting other documents, CAFE applies a constant positive bias to the attention scores of the identified gold evidence tokens, steering the model’s focus during final answer generation.
The CAFE framework: Stage-1 Coarse-Grained Filtering and Stage-2 Fine-Grained Steering.

Datasets and Evaluation

The authors evaluated CAFE across three representative long-context question-answering benchmarks:

  • SQuAD: A standard single-hop QA dataset.
  • HotpotQA: A multi-hop dataset requiring reasoning across multiple documents (tested at 8k, 16k, and 32k context lengths).
  • MusiQue: A complex multi-hop reasoning dataset.

Samples were drawn from the RULER and LongBench benchmarks to ensure a rigorous evaluation of long-context capabilities.

Key Insights and Results

CAFE demonstrated substantial improvements over strong baselines across Llama-3.1-8B, Mistral-3-7B, and Phi-3.5-Mini. A primary finding is that internal attention signals from specific "retrieval heads" are far more accurate at identifying evidence than external retrieval models or prompting the LLM to list relevant documents (ICR).

Comparison of retrieval methods across datasets, showing the superiority of Retrieval Head signals.
  • Outperforming SFT and RAG: On HotpotQA, CAFE achieved an average SubEM (Substring Exact Match) improvement of 22.1% over standard supervised fine-tuning and outperformed Vanilla RAG by up to 13.7%.
  • Robustness to Length: While other methods saw performance drop sharply as context grew (e.g., Llama-3.1-8B dropping 28% with ICR), CAFE’s performance remained stable, with only a 1.4% to 2.1% decrease.
  • Implicit Reasoning is a Myth: Empirical studies suggest that LLMs do not engage in "implicit reasoning" while encoding long inputs; masking the attention between the question and gold evidence leads to failure even if the evidence is present.

Limitations and Future Work

Because CAFE requires at least two prefilling operations (one for detection/filtering and one for generation with steering), it increases inference latency compared to single-pass methods. Additionally, while CAFE excels at finding information, it does not improve the model's underlying reasoning logic. Future work may explore CAFE's application in broader tasks like long-form book summarization or code repository understanding.

Summary updated

BibTeX
@misc{peng2025cafe,
  author = {Han Peng and Jinhao Jiang and Zican Dong and Wayne Xin Zhao and Fang Lei},
  title = {{CAFE: Retrieval Head-based Coarse-to-Fine Information Seeking to Enhance Multi-Document QA Capability}},
  year = {2025},
  doi = {10.18653/v1/2025.emnlp-main.655},
}
Figure