arXiv:2609.03430cs.CL2026-09

随机淘汰键值缓存也能高效推理,比现有方法快43%。

Random Attention: Rethinking KV Cache Eviction for Efficient Reasoning

  • 不计算得分,直接随机淘汰缓存
  • 在六项推理任务中表现媲美最强压缩方法
  • 适合追求高吞吐的部署场景

大语言模型在需要长链条推理的任务上表现优异,但思维链过长导致键值(KV)缓存成为严重内存瓶颈。现有缓存压缩方法均基于同一范式:根据某项估计为每个缓存标记打分,保留得分最高的部分。我们发现选择信号几乎无贡献。Random Attention 保留提示词,且在每个注意力头内均匀随机淘汰;在四个模型和六个推理任务中,其性能与最强先验淘汰器相当,同时在vLLM部署中吞吐量提升32%-43%。受控实验表明:1)提示词是缓存中最脆弱的部分,多数差异仅源于选择信号是否恰好保住了它;2)推理过程通过双重冗余自我保护——文本层面(模型重复关键信息)和注意力头层面(每头独立保存副本),因此只要提示词安全,随机淘汰仍能保留足够必要信息,无需评分选择。代码已公开于 https://github.com/SalesforceAIResearch/Random-Attention。

原文摘要 · Abstract (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.

推理优化键值缓存随机策略

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。