Abstract
Modern Large Language Models (LLMs) possess expansive context windows but often fail at complex multi-hop reasoning within them. This failure is frequently attributed to poor recall of "implicit" facts—information present in the context but not explicitly surfaced during reasoning. We introduce ATTRIEVAL, a training-free method that utilizes internal attention weights to identify and retrieve these overlooked facts. By reintegrating these facts into the prompt, ATTRIEVAL significantly enhances multi-hop reasoning performance across various benchmarks without requiring additional training or fine-tuning.
The Retrieval Bottleneck in Long-Context Reasoning
While LLMs excel at "needle-in-a-haystack" tasks involving explicit fact retrieval, their performance degrades significantly when required to connect multiple pieces of information scattered across long contexts. A primary failure mode is the inability to explicitly recall necessary supporting facts during Chain-of-Thought (CoT) generation.
As illustrated in Figure 1, even when a model identifies one relevant fact (e.g., the relationship between Quinn and Nancy's ages), it may fail to retrieve the second necessary fact (Nancy's age), leading to an incorrect "not enough information" conclusion. This suggests that the bottleneck is often retrieval, not the logical reasoning capability itself. Experimental "Leak Info" tests confirm that when missing facts are provided, models can typically perform the required logic correctly.
ATTRIEVAL: Leveraging Latent Attention Signals
ATTRIEVAL addresses this by treating internal attention as a latent signal of relevance. The method operates in three primary stages:
- Multi-Layer Attention Aggregation: During an initial CoT pass, attention weights from the final 1/4 of the model's layers are aggregated and averaged.
- Fact Scoring & Filtering: The context is segmented into discrete facts. Each is scored based on the attention it received, with "attention sinks" (common tokens like periods) filtered out to reduce noise.
- Refined Retrieval (The "kl" variant): To improve precision, the method identifies "retriever tokens"—those most influenced by the context via KL divergence—and prioritizes their attention weights for final fact selection.
The top-scoring facts are then prepended to the original query for a final, informed inference pass.
Experimental Results and Performance
The efficacy of ATTRIEVAL was evaluated on a new Deduction benchmark, as well as MuSiQue, HotpotQA, and BABILONG.
Figure 2 demonstrates that while standard CoT and direct retrieval recall drop sharply as context length increases to 32k tokens, Attention-guided Retrieval maintains high recall for both the first and second hops of reasoning. On the Deduction benchmark, this translated to a jump in accuracy for Llama-3.2-3B from 14% to 61%. Similar substantial gains were observed in real-world datasets like MuSiQue, where Llama-3.1-8B saw a 21-point improvement over the CoT baseline.
Conclusion
ATTRIEVAL demonstrates that LLMs often "know" more than they "say." By tapping into internal attention mechanisms, we can recover critical information that the model fails to explicitly generate, effectively extending the functional reasoning capacity of long-context LLMs without the need for costly retraining. While it roughly doubles inference costs, the performance gains suggest a powerful new path for training-free context management.
Summary updated