ChatPaper.aiChatPaper

推理模型的价值感知随机KV缓存淘汰策略

Value-Aware Stochastic KV Cache Eviction for Reasoning Models

June 2, 2026
作者: Ting-Yun Chang, Harvey Yiyun Fu, Deqing Fu, Chenghao Yang, Jesse Thomason, Robin Jia
cs.AI

摘要

推理模型通过扩展思维链提升准确性,但长输出造成了内存与计算瓶颈。KV缓存淘汰方法通过从缓存中移除不重要的键值对来降低成本,然而其准确性往往低于基于选择性稀疏注意力(保留完整KV缓存)的替代方案。我们识别出影响KV缓存淘汰准确性的关键因素:首先,极少部分值状态具有异常大的幅度,移除它们会导致灾难性失败——模型陷入重复推理循环;其次,在淘汰过程中引入随机性可通过增加缓存多样性来提升准确性。基于这些发现,我们提出值感知随机KV缓存淘汰(VaSE),这是一种无需训练的方案,可保护大幅值状态并促进多样化的淘汰决策。在六项推理任务中,采用VaSE且KV缓存压缩4倍的Qwen3模型,在相同稀疏度下比最先进的选择性方法获得更高平均准确率,同时超越最强淘汰方法超过4%。总体而言,VaSE弥合了效率与准确性之间的差距,支持FlashAttention2,并为推理模型实现了静态内存占用。
English
Reasoning models improve accuracy through extended chains of thought, but their long outputs create a memory and compute bottleneck. KV cache eviction methods reduce this cost by evicting unimportant key-value pairs from the cache, yet they often yield worse accuracy than selection-based sparse attention alternatives, which keep the full KV cache. We identify key factors crucial to KV cache eviction accuracy. First, a small fraction of value states have abnormally large magnitudes, and evicting them causes catastrophic failure where models enter repetitive reasoning loops. Second, introducing stochasticity during eviction improves accuracy by increasing cache diversity. Based on these findings, we propose Value-aware Stochastic KV Cache Eviction (VaSE), a training-free recipe that protects large-magnitude value states and promotes diverse eviction decisions. Across six reasoning tasks, Qwen3 models using VaSE with 4x KV cache compression yield higher average accuracies than SOTA selection method at the same sparsity, while outperforming the strongest eviction method by more than 4%. Overall, VaSE bridges the gap between efficiency and accuracy, supporting FlashAttention2 and enabling a static memory footprint for reasoning models.