忘れてから思い出す:Gist スパース注意による学習可能な圧縮と選択的アンフォールディング

arXiv cs.LG / 2026/4/24

📰 ニュースDeveloper Stack & InfrastructureTools & Practical UsageModels & Research

要点

  • 本論文は、長文コンテキストにおけるフルアテンションの二次的コストという課題に対し、KVキャッシュの選択や既存の圧縮手法とは別の“学習可能でエンドツーエンド”なアプローチを提案している。
  • 相互にインタリーブされた「gist」圧縮トークンを導入し、これらをスパースアテンションのルーティング信号として機能させることで、粗→精のアクセス手順を実現している。
  • 提案手法「GSA による選択的アンフォールディング」では、まずコンテキストを gist トークンに圧縮し、最も関連性の高い gist を選択した後、対応する生トークンのチャンクのみを復元して詳細アテンションを行う。
  • 本手法は外部リトリーバルモジュールを用いずにエンドツーエンド学習に組み込まれ、さらに gist-of-gist の再帰構造により多解像度の文脈アクセスを可能にし、各ステップのデコード計算量を対数オーダーに抑えている。
  • LongBench と RAG ベンチマークで、8×〜32×の圧縮率範囲にわたり、他の圧縮ベースラインや推論時スパース注意手法より一貫して優れた結果が示され、実装コードも GitHub で公開されている。

Abstract

Scaling large language models to long contexts is challenging due to the quadratic computational cost of full attention. Mitigation approaches include KV-cache selection or compression techniques. We instead provide an effective and end-to-end learnable bridge between the two without requiring architecture modification. In particular, our key insight is that interleaved gist compression tokens -- which provide a learnable summary of sets of raw tokens -- can serve as routing signals for sparse attention. Building on this, we introduce selective unfolding via GSA, which first compresses the context into gist tokens, then selects the most relevant gists, and subsequently restores the corresponding raw chunks for detailed attention. This yields a simple coarse-to-fine mechanism that combines compact global representations with targeted access to fine-grained evidence. We further incorporate this process directly into training in an end-to-end fashion, avoiding the need for external retrieval modules. In addition, we extend the framework hierarchically via recursive gist-of-gist construction, enabling multi-resolution context access with logarithmic per-step decoding complexity. Empirical results on LongBench and RAG benchmarks demonstrate that our method consistently outperforms other compression baselines as well as inference-time sparse attention methods across compression ratios from 8\times to 32\times. The code is available at: https://github.com/yuzhenmao/gist-sparse-attention/