Attention Reveals More Than Tokens: Training-Free Long-Context Reasoning with Attention-guided Retrieval

Yuwei Zhang, Jayanth Srinivasa, Gaowen Liu, Jingbo Shang
3/12/2025
cs.CL

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Large Language Models (LLMs) often exhibit substantially shorter effective context lengths than their claimed capacities, especially when handling complex reasoning tasks that require integrating information from multiple parts of a long context and performing multi-step reasoning. Although Chain-of-Thought (CoT) prompting has shown promise in reducing task complexity, our empirical analysis reveals that it does not fully resolve this limitation. Through controlled experiments, we identify poor recall of implicit facts as the primary cause of failure, which significantly hampers reasoning performance. Interestingly, we observe that the internal attention weights from the generated CoT tokens can effectively ground implicit facts, even when these facts are not explicitly recalled. Building on this insight, we propose a novel training-free algorithm, Attrieval, which leverages attention weights to retrieve relevant facts from the long context and incorporates them into the reasoning process. Additionally, we find that selecting context tokens from CoT tokens further improves performance. Our results demonstrate that Attrieval enhances long-context reasoning capability notably on both synthetic and real-world QA datasets with various models.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhang2025attention,
  title  = {Attention Reveals More Than Tokens: Training-Free Long-Context Reasoning with Attention-guided Retrieval},
  author = {Yuwei Zhang and Jayanth Srinivasa and Gaowen Liu and Jingbo Shang},
  year   = {2025},
  eprint = {2503.09819},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.09819v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2503.09819.svg)](https://codeofpaper.com/paper/2503.09819)

Discussion