Retrospective Sparse Attention for Efficient Long-Context Generation

Seonghwan Choi, Beomseok Kang, Dongwon Jo, Jae-Joon Kim
8/12/2025
cs.CLcs.AIcs.LG

No confident code implementation found for this paper. 6 possible matches can be shown below.

Abstract

Large Language Models (LLMs) are increasingly deployed in long-context tasks such as reasoning, code generation, and multi-turn dialogue. However, inference over extended contexts is bottlenecked by the Key-Value (KV) cache, whose memory footprint grows linearly with sequence length and dominates latency at each decoding step. While recent KV cache compression methods identify and load important tokens, they focus predominantly on input contexts and fail to address the cumulative attention errors that arise during long decoding. In this paper, we introduce RetroAttention, a novel KV cache update technique that retrospectively revises past attention outputs using newly arrived KV entries from subsequent decoding steps. By maintaining a lightweight output cache, RetroAttention enables past queries to efficiently access more relevant context, while incurring minimal latency overhead. This breaks the fixed-attention-output paradigm and allows continual correction of prior approximations. Extensive experiments on long-generation benchmarks show that RetroAttention consistently outperforms state-of-the-art (SOTA) KV compression methods, increasing effective KV exposure by up to 1.6$\times$ and accuracy by up to 21.9\%.

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. 6 weaker matches are 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{choi2025retrospective,
  title  = {Retrospective Sparse Attention for Efficient Long-Context Generation},
  author = {Seonghwan Choi and Beomseok Kang and Dongwon Jo and Jae-Joon Kim},
  year   = {2025},
  eprint = {2508.09001},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2508.09001v1}
}

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/2508.09001.svg)](https://codeofpaper.com/paper/2508.09001)

Discussion