arXiv:2604.10900cs.AIcs.LG2026-04

通过保护核心推理片段,实现更稳定的长文本生成。

CASK: Core-Aware Selective KV Compression for Reasoning Traces

  • 区分核心与冗余记忆,只压缩非核心部分。
  • 在相同内存预算下,比TriAttention更保全推理连续性。
  • 适合需要长序列推理的模型优化场景。

大型语言模型在执行长文本推理时,解码过程中的键值缓存(KV cache)随生成长度快速膨胀,导致内存瓶颈和推理不稳定性。现有针对推理的KV压缩方法多基于淘汰中心思想:更精准地评估令牌重要性后,舍弃低权重项。但我们分析发现,仅优化评分器往往无法显著改变实际保留内容,难以成为维持推理行为的关键手段。因此,我们提出将推理阶段的KV压缩视为一种行为保持的结构化整合问题。CASK将解码过程中的推理轨迹划分为两个部分:一个保护核心,用于锚定答案生成与中间状态;另一个可合并的冗余区域。核心部分被完整保留,而仅对冗余部分进行选择性压缩。为应对前缀过长导致压缩未激活的问题,CASK采用两阶段设计:先对前缀进行淘汰,再在解码阶段实施整合。在H100推理门测试中,CASK在匹配预算条件下,于AIME24与AIME25任务上均表现出优于TriAttention的完整KV延续性,且多次出现cask@384 > triattention@512的现象。在前缀密集型回放测试中,multi_news与vcsum作为解码活跃的验证样本,qmsum与gov_report则揭示了前缀预算耗尽的临界点。整体证据支持一个简单结论:有效的推理KV压缩并不依赖复杂的评分器设计,而在于结合核心保护与选择性冗余压缩,从而降低可用预算的门槛。

原文摘要 · Abstract (English)

In large language models performing long-form reasoning, the KV cache grows rapidly with decode length, creating bottlenecks in memory and inference stability. Existing reasoning-oriented KV compression has mostly followed an eviction-centered view: estimate token importance more accurately, then discard lower-ranked entries. Our analysis suggests that scorer refinement alone often fails to substantially reorganize the actual keep-set and may therefore not be the main lever for preserving reasoning behavior. We instead frame reasoning KV compression as a behavior-preserving structured consolidation problem. CASK partitions the decode-time reasoning trace into a protected core that anchors answer formation and intermediate state, and mergeable scratch with high redundancy. The core is preserved, while selective consolidation is applied only to the scratch. To address prompt-heavy regimes where the prefix can exhaust the budget before decode-stage compression becomes active, CASK further uses a two-stage design: prefix eviction followed by decode-stage consolidation. On the H100 reasoning gate, CASK shows higher full-KV continuation fidelity than TriAttention at matched budgets on both AIME24 and AIME25, with recurring cask@384 > triattention@512 crossings. In prompt-heavy replay, multi_news and vcsum act as decode-active witnesses, while qmsum and gov_report expose the prefix_budget_exhausted boundary. The overall evidence supports a simple conclusion: effective reasoning KV compression depends less on more elaborate scorer engineering than on combining core preservation with selective scratch consolidation to lower the usable budget frontier.

KV压缩推理优化大模型

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