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

面向动态上下文的预算型KV缓存修复

Budgeted KV-Cache Repair for Evolving Contexts

LinkedIn(领英);Clemson University(克莱姆森大学);Arizona State University(亚利桑那州立大学);Rice University(莱斯大学)
Han Yu, Wenhui Zhu, Jincheng Cao, Rui Cai, Yuanda Xu, Zhengze Zhou, Xiwen Chen, Hao Wang, Xuanzhao Dong, Han Shi, Menglin Zhou, Shayan Mohajer Hamidi, Lin Su, M… 展开作者

Han Yu, Wenhui Zhu, Jincheng Cao, Rui Cai, Yuanda Xu, Zhengze Zhou, Xiwen Chen, Hao Wang, Xuanzhao Dong, Han Shi, Menglin Zhou, Shayan Mohajer Hamidi, Lin Su, Mina Razghandi, Sayan Ghosh, Qing Lan, Rohit Jain, Alborz Geramifard

AI总结:

针对语言模型删除上下文后缓存计算残留影响的问题,提出无需训练的语义单元刷新(SUR)方法,仅重新计算2-5%的后缀即可实现强性能恢复,且执行器加速碎片化刷新最高达16.1倍。

摘要:

语言模型智能体在信息过时后会修改其工作上下文,但删除文本并不会消除其对缓存计算的影响:后续的键值(KV)状态仍受已删除内容的影响,而重新计算所有保留的后缀可能成本高昂。我们提出预算型KV缓存修复:通过重新计算用户选定比例的保留后缀来恢复任务性能。在相同相关性分数和token预算下比较修复分配,我们发现刷新连贯区域的性能远优于刷新孤立token。这一发现启发了语义单元刷新(Semantic-Unit Refresh, SUR),该方法利用低成本嵌入分数将预算分配给与查询相关的文本区域,无需训练或辅助Transformer前向传播。为高效执行这些修复,分层打包执行器在每一层共同处理选定状态,同时保留完整的因果缓存访问。在5个模型上,SUR在受控删除任务中实现了强恢复,仅重新计算2-5%的后缀;在4个自然多跳问答数据集上,其在5%预算下达到接近全重新计算的精确匹配,且编辑后延迟更低;该执行器对碎片化刷新的加速比区间式执行最高达16.1倍。

英文摘要:

Language-model agents revise their working context as information becomes obsolete, but deleting text does not erase its influence on cached computation. Later key-value (KV) states remain conditioned on the deleted content, while recomputing the entire retained suffix can be costly. We introduce budgeted KV-cache repair: recovering task performance by recomputing a user-chosen fraction of the retained suffix. Comparing repair allocations under identical relevance scores and token budgets, we find that refreshing coherent regions can substantially outperform refreshing isolated tokens. This finding motivates Semantic-Unit Refresh (SUR), which allocates the budget to query-relevant text regions using inexpensive embedding scores, without training or an auxiliary transformer forward. To execute these repairs efficiently, a layer-packed executor processes selected states together at each layer while preserving full causal cache access. Across five models, SUR achieves strong recovery in controlled deletion tasks while recomputing only 2-5% of the suffix. On four natural multi-hop QA datasets, it achieves near-full-recompute exact match at a 5% budget with lower post-edit latency. The executor accelerates fragmented refresh by up to 16.1x over interval-wise execution.

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

↑