arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.08585cs.LGcs.AI
收藏

预测未来效用:任务无关的KV缓存驱逐的全局组合优化

Predicting Future Utility: Global Combinatorial Optimization for Task-Agnostic KV Cache Eviction

Fudan University(复旦大学);Baige AI Team, Baidu inc(百度AI团队);Work done during an internship at Baidu(百度实习)

Ziyao Tang, Pengkun Jiao, Xinhang Chen, Wei Liu, Shiyong Li, Jingjing Chen

AI总结:

提出LU-KV框架,通过全局组合优化分配注意力头预算以最大化长期边际贡献,实现80%的KV缓存压缩且性能损失极小。

摘要:

鉴于注意力的二次复杂度,KV缓存驱逐对于加速模型推理至关重要。当前的KV缓存驱逐方法通常依赖于瞬时启发式度量,隐含地假设分数幅度是所有注意力头的重要性一致代理。然而,这忽略了注意力头之间预测保真度的异质性。虽然某些头优先考虑令牌的瞬时贡献,但其他头致力于捕捉长期效用。在本文中,我们提出最优预算分配应由保留长期语义信息的边际效用决定。基于这一见解,我们提出了LU-KV,这是一个新颖的框架,将头级预算分配表述为全局组合优化问题,以最大化保留令牌的长期边际贡献。为了解决这个非凸问题,我们采用凸包松弛和基于边际效用的贪婪求解器,实现接近最优的解。此外,我们实现了一个数据驱动的离线分析协议,以促进LU-KV的实际部署。在LongBench和RULER基准上的评估表明,LU-KV将KV缓存大小减少了80%,性能下降最小,同时降低了推理延迟和GPU内存占用。

英文摘要:

Given the quadratic complexity of attention, KV cache eviction is vital to accelerate model inference. Current KV cache eviction methods typically rely on instantaneous heuristic metrics, implicitly assuming that score magnitudes are consistent proxies for importance across all heads. However, this overlooks the heterogeneity in predictive fidelity across attention heads. While certain heads prioritize the instantaneous contribution of tokens, others are dedicated to capturing long-horizon utility. In this paper, we propose that optimal budget allocation should be governed by the marginal utility in preserving long-term semantic information. Building on this insight, we propose LU-KV, a novel framework that formulates head-level budget allocation as a global combinatorial optimization problem to maximize the long-horizon marginal contribution of reserved tokens. To solve this non-convex problem, we employ a convex-hull relaxation and a marginal-utility-based greedy solver, achieving near-optimal solutions. Furthermore, we implement a data-driven offline profiling protocol to facilitate the practical deployment of LU-KV. Evaluations on LongBench and RULER benchmarks demonstrate that LU-KV reduces KV cache size by 80% with minimal performance degradation, while also decreasing inference latency and GPU memory footprint.

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

↑