KVFocus: A Perturbation-Theoretic Token-Risk Score for Selective KV Cache Reuse in RAG
Shizhuo Zhang, Nuowen Kan, Chenglin Li, Ruixiao Zhang, Yifan Zhao, Yuanpeng He, Huixin Zhang, Fan He, Hang Xu, Hao Zhang, Wenrui Dai, Junni Zou, Hongkai Xiong
Abstract
In retrieval-augmented generation (RAG) scenarios, the prefill delay of long inputs to large language models (LLMs) is the dominant component of the time-to-first-token (TTFT). Reusing KV caches across different LLM inputs reduces this cost, but the resulting cross-context mismatch on reused chunks significantly degrades answer quality as it propagates through prefill attention into decode-time logits. Existing selective-recomputation methods mitigate this issue by recomputing tokens chosen by empirical importance heuristics, which overlook the propagation of cache mismatches into answer-side errors, thereby failing to effectively strike the quality-TTFT trade-off. We propose a perturbation-theoretic KV cache reuse framework, KVFocus, which selects the reused tokens to recompute through a token-risk score during the prefill process. We develop a first-order perturbation analysis that traces reuse error in three stages: source mismatch on the reused region, suffix drift during prefill, and decode-time logit stability. This analysis reveals that the contribution of each reused token to the suffix-side drift is the product of its source-side cache deviation and the attention mass it receives from the suffix. Guided by this multiplicative structure, we define a token-risk score that can be computed at a single check layer. A plug-and-play selector is designed for existing RAG-based LLM serving systems to select the top-r% tokens ranked by this score for recomputation in subsequent layers of the same prefill pass. Empirical results across three 7B or 8B instruction-tuned LLMs (Mistral, Qwen2.5, Qwen3) and seven datasets demonstrate that KVFocus achieves a favorable trade-off between answer quality and TTFT compared with state-of-the-art baselines. Compared to full recomputation, KVFocus achieves an average TTFT speedup at the cost of an 18% quality degradation.
Create a lesson
Metadata
- Comments
- Accepted at NeurIPS 2026. 31 pages including appendices, 3 figures
Related papers
Mind the Domain Gap: Post-Training Robustness Is Geometrically Selective
Shared title terminologycs.CLYifan Jiang, Jian Wu, Dongyuan Li et al.
Do LLMs Speak the User's Language? A Study of Personalized Language Selection in Multilingual LLMs
Shared title terminologycs.CLJaehoon Jang, Seunghee Lee, Sanghoon Yoo et al.
Which Signal Should Select a Compressed LLM? An Empirical Study of Pre- and Post-Recovery Selection in Block-Replacement Search
Shared title terminologycs.CLYuefeng Xu, Jun Yu
SHREK: Scoring Hop-chains for Retrieval of Evidence over Knowledge Graphs
Shared title terminologycs.CLDylan Uno Syahfaril, Bao Gia Doan, Aditya Joshi
FlyingStart: Learned Cross-Token Warm Starts for Fixed-Point Decoding in Recurrent-Depth Language Models
Shared title terminologycs.CLRunguo Li, Dezhen Lu, Zixiang Ni
Refusal Is Not Scored: A Coverage Limit in Content-Based Bias Evaluation
Shared title terminologycs.CLAfifah Kashif, Malak Sadek, Jin Huang et al.