ランダムアテンション:効率的な推論のためのKVキャッシュ退避の再考

Random Attention: Rethinking KV Cache Eviction for Efficient Reasoning

September 3, 2026
著者: Heng Wang, Jielin Qiu, Wenting Zhao, Cheng Qian, Liangwei Yang, Jiawei Han, Heng Ji, Silvio Savarese, Shelby Heinecke, Huan Wang
cs.AI

要旨

大規模言語モデルは、長大な推論を必要とするタスクで優れた性能を発揮するが、そのような長い思考連鎖はKVキャッシュを深刻なメモリボトルネックにする。既存のKVキャッシュ圧縮手法はすべて同じパラダイムを共有している。すなわち、キャッシュされた各トークンを、後でどれほど重要になるかの推定値でスコアリングし、上位スコアのものを保持する。我々は、この選択シグナルがほとんど寄与しないことを示す。Random Attentionは、プロンプトを保持し、各アテンションヘッド内ではスコアを一切計算せずに、(プロンプト以外のトークンを)一様ランダムに破棄する。この手法は、4つのモデルと6つの推論タスクにおいて既存の最強の破棄手法と同等の性能を示し、しかもvLLMデプロイメントではその手法より32〜43%高いスループットを実現する。制御実験はこの理由を次のように説明する。第一に、プロンプトはキャッシュの中で脆弱な部分であり、選択手法間の性能差の大半は、その選択シグナルがたまたまプロンプトを保持したかどうかにすぎない。第二に、推論トレースは、テキスト内の冗長性(モデルは作業を進める中で、引き続き必要となる内容を言い直す)と、アテンションヘッド間の冗長性(各ヘッドがトレースのコピーを独自に保持する)という2つのレベルでの冗長性によって、破棄から自己防衛する。したがって、プロンプトが安全に保持されれば、ランダムな抽出でもモデルがまだ必要とするものの十分なコピーが残り、それらを選ぶためのスコアは不要である。我々のコードは https://github.com/SalesforceAIResearch/Random-Attention で公開されている。
English
Large language models achieve superior performance on tasks that require extended reasoning, but long chains of thought make the KV cache a severe memory bottleneck. Existing KV cache compression methods share one paradigm: score each cached token by some estimate of how much it will matter later, and keep the top-scoring ones. We show that the selection signal contributes almost nothing. Random Attention keeps the prompt and evicts uniformly at random within each attention head, computing no score at all; across four models and six reasoning tasks it matches the strongest prior evictor while serving 32-43% higher throughput than it in vLLM deployment. Controlled experiments explain this by showing that 1) the prompt is the fragile part of the cache, and most of the gap between selectors is just whether their selection signal happened to keep it; 2) the reasoning trace protects itself against eviction with redundancy at two levels, in the text (the model restates what it still needs as it works) and across attention heads (each keeps its own copy of the trace), so once the prompt is safe, a random draw retains enough copies of what the model still needs, and no score is required to pick them. Our code is publicly available at https://github.com/SalesforceAIResearch/Random-Attention.
PDF1231September 5, 2026