arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.25975cs.LGcs.AIcs.ITmath.IT
收藏

重新思考通过统一信息论目标的KV缓存淘汰

Rethinking KV Cache Eviction via a Unified Information-Theoretic Objective

College of Computer Science, Sichuan University, Chengdu, China(四川大学计算机学院,成都,中国);Institute of High Performance Computing, A STAR, Singapore(高性能计算研究院,新加坡)

Jiaming Yang, Chenwei Tang, Liangli Zhen, Jiancheng Lv

AI总结:

本文提出CapKV方法,通过信息论原理优化KV缓存淘汰,提升内存效率与生成质量。

摘要:

关键-值(KV)缓存对于大型语言模型推理至关重要,但其内存开销却成为长上下文生成的关键瓶颈。现有淘汰策略大多依赖于经验启发式方法,缺乏严谨的理论基础。本文通过信息瓶颈原理重新思考KV缓存淘汰。在注意力的线性高斯近似下,我们推导出一个闭式互信息目标,该目标表征了保留的KV缓存子集的有效信息容量。这一公式揭示了现有大量淘汰策略可以被解释为同一容量最大化原则的不同近似。基于这一洞察,我们引入CapKV,一种容量感知的淘汰方法,通过统计杠杆分数的对数行列式近似直接针对信息保留。该方法取代启发式选择,采用理论支持的机制以保持最大预测信号。在多个模型和长上下文基准上的广泛实验表明,CapKV在内存效率和生成保真度之间取得了更好的权衡,优于先前方法。

英文摘要:

Key-Value (KV) caching is essential for large language model inference, yet its memory overhead poses a critical bottleneck for long-context generation. Existing eviction policies predominantly rely on empirical heuristics, lacking a rigorous theoretical foundation. This work rethinks KV cache eviction through the lens of the Information Bottleneck principle. Under a linear-Gaussian surrogate of attention, we derive a closed-form mutual information objective that characterizes the effective information capacity of a retained KV cache subset. This formulation reveals that a wide range of existing eviction strategies can be interpreted as different approximations of the same capacity-maximization principle. Guided by this insight, we introduce CapKV, a capacity-aware eviction method that directly targets information preservation via a log-determinant approximation using statistical leverage scores. This approach replaces heuristic selection with a theoretically grounded mechanism that preserves the maximum predictive signal. Extensive experiments across multiple models and long-context benchmarks show that CapKV consistently outperforms prior methods, achieving a better trade-off between memory efficiency and generational fidelity. Our code is available at https://github.com/jiamingyy/CapKV

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑