RelaxKV:基于查询的稀疏上下文注意力重计算指导,用于高效KV缓存复用
RelaxKV: Recomputation Guided by the Query with Sparse Context Attention for Efficient KV Cache Reuse
浏览论文内容
中文总结 AI 辅助
RelaxKV提出联合分配修复目标与重计算上下文,依据用户查询进行稀疏上下文注意力重计算,以高效复用KV缓存,提升RAG性能并优于ProphetKV。
中文摘要 AI 辅助
跨请求的KV缓存减少了检索增强生成(RAG)的预填充成本,但传统的前缀缓存严重限制了跨请求的缓存复用。位置无关缓存(PIC)通过复用独立的块来消除这一限制,但它们的KV状态缺少跨块交互。现有方法选择性地重计算令牌状态以恢复这些缺失的交互,但主要将重计算预算分配给选择要重计算的状态,而将重计算上下文固定为完整的因果前缀。我们引入了RelaxKV,它将选择性缓存修复表述为关于修复目标和重计算上下文的联合分配问题。在用户查询的引导下,RelaxKV识别特定层的修复目标,并将其重计算限制在与查询相关的上下文中,从而减少注意力计算。在四个解码器模型上,RelaxKV在15%锚点比率下,在所有模型上相比ProphetKV提高了聚合LongBench性能。在Qwen3-14B上,RelaxKV在5%-30%锚点比率扫描中提供了比ProphetKV更强的质量-TTFT权衡,并在16K和32K上下文长度下在RULER-MV和LV-Eval上取得了最佳的选择性结果。受控消融进一步证明了重计算上下文选择的重要性。
英文摘要
Cross-request KV caching reduces the prefill cost of Retrieval-Augmented Generation (RAG), but conventional prefix caching severely limits cache reuse across requests. Position-Independent Caching (PIC) removes this constraint by reusing independent chunks, but their KV states miss cross-chunk interactions. Existing methods selectively recompute token states to recover these missing interactions, but primarily allocate the recomputation budget to selecting which states to recompute, while fixing the recomputation context to the full causal prefix. We introduce RelaxKV, which formulates selective cache repair as a joint allocation problem over repair targets and recomputation context. Guided by the user query, RelaxKV identifies layer-specific repair targets and restricts their recomputation to a query-relevant context, reducing attention computation. Across four decoder models, RelaxKV at a 15% anchor ratio improves aggregate LongBench performance over ProphetKV on all models. On Qwen3-14B, RelaxKV provides a stronger quality-TTFT trade-off than ProphetKV across a 5%-30% anchor-ratio sweep, and achieves the best selective results on RULER-MV and LV-Eval at 16K and 32K context lengths. Controlled ablations further demonstrate the importance of recomputation context selection.
发表机构
- Shanghai Jiao Tong University(上海交通大学)
- Institute of Artificial Intelligence, China Telecom (TeleAI)(中国电信人工智能研究院(TeleAI))
- State University of New York at Buffalo(纽约州立大学布法罗分校)
机构由 AI 辅助整理,请以论文原文为准。