Paper commentary
Where Should a KV-Cache Repair Budget Go? Distractor Structure and Contextual Compatibility in Non-Prefix Reuse
Repair budgets recover more when spent on the target than on distractors
- Problem Non-prefix KV-cache reuse encodes retrieved chunks separately and joins their caches, so it loses 19 to 100 percent of context-dependent questions that full prefill answers. Similar distractor chunks make the loss larger.
- Method The authors recompute only the known target chunk while the other chunks keep their reused caches. The question then attends to the target together with that context, instead of a copy of its full-prefill KV.
- Results Recomputing the target beat inserting its full-prefill KV in all seven settings tested. Recomputing the top retrieved chunk beat InfoFlow-style reordering in six of nine open-domain QA and API-documentation settings.

Table 1 : Recomputing chosen chunks instead of tokens. Token: retention of the token-level selector at the budget. The other columns give paired gains over Token when the same budget is spent on the target chunk alone (Target), on the target and its four most similar chunks (Target+4), or on the BGE-M3 top-1 chunk alone or with its four most similar chunks (Retrieved, Retrieved+4). On open-domain QA and API documentation, a single chunk is about 3% of the context and is recomputed in full, except on a few questions at 5%. Target and Retrieved therefore score identically at both budgets outside LoCoMo, and their 10% gains differ from their 5% gains only because the 10% Token baseline is stronger. Bold gains have 95% intervals that exclude zero (Appendix Tables 20 and 21). A LoCoMo session is longer than a passage, and a whole session fits within the 5% budget on few questions (Section 5).
Original paper · CC BY 4.0 · Yuxing Peng, Zhiqing Tang, Weijia Jia · Where Should a KV-Cache Repair Budget Go? Distractor Structure and Contextual Compatibility in Non-Prefix Reuse · Original paper figure · Extracted the figure area from page 7 of the original PDF.Where reuse loses answers
Non-prefix KV-cache reuse skips much of the prefill work for retrieved context, because each chunk is encoded once and its caches are joined at query time. On the questions that full prefill answers and that need the retrieved context, called Q∗, position-corrected reuse loses 19 to 100 percent across the settings. The loss is larger when the other chunks resemble the target, which matters because retrievers return exactly such chunks.
To separate these causes, the authors fix the answer-bearing target and its position, and they vary only the other chunks. Qwen3-8B, Llama-3.1-8B-Instruct and Mistral-7B-Instruct-v0.2 are run on LoCoMo, NQ-Open, TriviaQA and Gorilla, and each model and dataset pair counts as one setting. In the Figure 1 example, Qwen3-8B answers Jessica Simpson from full prefill but answers Catherine Bach under reuse, because a similar passage supplies a different actress.
Why restoring distractors costs too much
The damage from reuse is spread over the distractors rather than sitting in the target chunk. If the loss sat in one chunk, restoring that chunk would recover most of it, but that is not what the paper finds. That gap is significant in eleven of the twelve settings.
Restoring a single distractor is a much smaller intervention, and it barely moves the numbers. The authors read this as evidence that the effects of distractors add up rather than come from any one chunk. From those two points it predicts how retention grows as random distractors are restored.
Restoring distractors needs the full prefill that reuse is meant to avoid. The authors argue that the same budget does more when it goes to the target. Recomputing only the known target chunk makes up a median of 2.5 to 3.3% of the context. That recomputation beats the token-level selector chosen for each setting at a 5% budget, by 0.10 to 0.49.
The odds model was fitted to the paper's own restoration curves, so its fit is worth checking on the data. At k equal to 24, the odds prediction falls below the measured interval in three of the settings. Restoring the 16 distractors most similar to the target first changes retention by −0.05 to +0.03, and never significantly.
Recomputing the target in reused context
Recomputing the target in reused context is the repair that the authors favour when the budget is small. The target chunk is recomputed while the other chunks keep their reused caches, so the question attends to the target together with those caches. The authors call this contextual compatibility, and they treat it as different from closeness to full prefill.
The target gets the context that the question actually reads, rather than a copy of its full-prefill KV.
Four of those seven comparisons stay significant after Holm's correction. This holds even though the recomputed KV stays at a median relative distance of 0.23 to 0.30 from the full-prefill KV. Because the recomputed KV stays that far from full prefill, the gain cannot come from closeness to the full-prefill cache.
At a 5% budget, the known target makes up a median of 2.5 to 3.3% of the context. Recomputing only this chunk beats the token-level selector chosen for each setting by 0.10 to 0.49 in all nine open-domain QA and API-documentation settings. Budgets are counted in recomputed tokens, so the comparison holds the token count fixed. On dialogue memory, the 7B to 8B models showed no significant gain over the token-level selector.
The target is unknown in deployment, so the authors also test how to find it. A retriever finds the target more often, so the authors move its top-ranked chunk next to the question and recompute it there. These gains are bounded by retrieval, because a wrong top chunk leaves the moved chunk doing worse than selected tokens.
Why the position term does not explain the gain
Proposition 1 compares the attention output of a token under full prefill with its output under reuse, for one head. Under full prefill, the keys a token sees split into its own chunk and the earlier chunks, with the output weighted by alpha_u. Under reuse, the token sees only the keys of its own chunk and the shared prefix, so the cross-chunk term disappears.
The authors subtract the reuse output from the full-prefill output, which gives Equation 3.
The equivalence depends on the hidden states of the two encodings being the same. If they match, the queries, keys and values agree up to the rotary position, and values carry no rotation. Within a chunk the logit differences are identical under both encodings, so the logits on the chunk's own keys agree. On the prefix the logits differ, because reuse shortens the distance by si minus P, so the second term vanishes only when si equals P.
For the first chunk there are no earlier chunks, so both encodings give the same output in the first layer. In later layers the hidden states of the earlier and current chunks differ, so the second term is no longer only a position effect.
The authors measured both sides of Equation 3 in the first layer on the first 30 Q* questions of each setting. The attention mass that a chunk places on earlier chunks rises with its position in all nine settings. Its Spearman correlation with slot ranges from 0.94 to 1.00. The position term is 0.31 to 0.63 times the size of the cross-chunk term, so the two terms partly cancel.
Restoring distractors then tests how the effects of the reused caches add up.
Moving the top-ranked chunk next to the question
When question attention can't find the target, the paper moves the retriever's top-ranked chunk to the position just before the question. The reason is that a recomputed chunk attends only to the chunks before it, so a chunk placed last sees every other cached chunk. Instead, the question's summed attention selects the last chunk before the question in 58 to 100% of them.
The retriever sees only the request, and the moved chunk is then recomputed under the 5% budget.
The authors use a 5% budget, while the InfoFlow default is 15%, and they use their question suffix as the query. Five of those differences remain significant after Holm's correction. The gap in these six settings runs from 0.14 to 0.34.
It is significantly better in four settings, which the authors report in the same section. The comparison matches the token budget, not latency. Table 28 spends the same 5% budget on the same reordered prompts, and the moved chunk uses 48 to 67% as many tokens as the token-level rule.
The gain is bounded by retrieval, because on questions where the top chunk is not the target, moving it does worse than recomputing selected tokens.
How far the moved-chunk gain goes when the retriever misses the target
Gains from the moved chunk are therefore bounded by how often the retriever ranks the target first.
On questions where the retriever does not rank the target first, recomputing the retrieved chunk with its four most similar chunks, called Retrieved+4, beats recomputing the retrieved chunk alone. That gain is significant in seven of nine settings at 10%, but Retrieved+4 never significantly beats the token-level selector. Retrieved+4 mostly stays with the retrieved chunk, so the extra chunks help only where the selector is not already strong.
Replacing a single distractor changes retention significantly in only two of 24 cases, so one distractor rarely matters much. The retriever's misses are a separate limit: the moved chunk cannot recover a target it never ranks first.
Limitations of the repair study
The results rest on 7B–8B instruction-tuned models, and the authors don't test larger models or other languages beyond two larger Qwen3 models. The two larger Qwen3 models repeat only the main conditions, so the wider comparison stays limited to the 7B–8B models. Four English datasets carry all the evidence, so other languages remain outside what these experiments can support.
Models fine-tuned for chunked encoding are represented by one released model, Tulu3-Block-FT, and the authors don't test repairs on it. The Tulu3 comparison uses the released checkpoints and their block-mode inference procedure, so it doesn't cover other fine-tuned models.
The study covers only small budgets, and the authors count them in recomputed tokens. Latency is measured only in the authors' research engine, and an optimised serving system may time a contiguous chunk and scattered tokens differently. Table 26 reports time to first token for Qwen3-8B in that engine, so its absolute times don't transfer to other systems.
InfoFlow KV was compared through the authors' own re-implementation, on their models and datasets. The re-implementation follows the released code at commit 725b75c, but it still differs from the original runs.
The Gorilla development settings contain only 11–16 questions that full prefill answers, so the estimates there are coarse. Even the strongest existing combinations leave retention at 0.41–0.63 on NQ-Open and at 0.33–0.39 on Gorilla. Gorilla also has a Q∗ set where retention under RAND is zero, so some similarity estimates there are coarse too.
Paper info
- Authors
- Yuxing Peng, Zhiqing Tang, Weijia Jia
- Venue
- arXiv · Preprint
- First published
- 2026-11-4
- Added
- 2026-11-6
- Updated
- 2026-11-4
- Version
- v1
- arXiv
- 2611.06397
- Category
- cs.CL
- Original paper terms
- CC BY 4.0
- What we show
- Paper info, commentary and permitted figures from the original paper
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Abstract
Non-prefix KV-cache reuse encodes retrieved chunks independently and concatenates their caches. To find where a small repair budget should be spent, we vary the chunks around the answer-bearing one (the target) across three 7B-8B models and four datasets of dialogue memory, open-domain QA and API documentation. Reuse loses 19-100% of the context-dependent questions that full prefill answers, and it loses more when the other chunks are of the same kind as the target. Because the recoverable damage is spread over these other chunks, restoring a few of them recovers little, and the budget is better spent on the target. This works through contextual compatibility: recomputing the target against the reused cache beats inserting its full-prefill KV in all seven settings tested, although the recomputed KV stays far from the full-prefill KV. Question attention over reused caches, however, selects the target in at most 18.8% of development questions. A retriever finds it more often, and recomputing its top chunk after moving it next to the question significantly beats InfoFlow-style reordering at the same 5% budget in six of nine open-domain QA and API-documentation settings. On dialogue memory, though, recomputing chunks never significantly beats the token-level selector chosen for each setting.
Figures from the paper

Table 2 : Qwen3-14B and Qwen3-32B on Q∗ (67–157 questions per setting): the five results tested for replica- tion. Loss is 1−R(SIM) , and Same and Sim. are the same-category and similarity terms of Equation 1. Tar- get and Chunk moved are the gains over the token-level selector (ProphetKV) at 5% when the budget recom- putes the target or the retriever’s top chunk moved to the last position. Bold: the 95% interval excludes zero. †Retention under RAND is zero, so the term cannot be positive and is not set in bold. Appendix Table 32 gives the intervals.
Original paper · CC BY 4.0
Table 3 : Accuracy on every evaluated question under SIM (the Questions column of Table 4): without context, with full prefill and with position-corrected reuse; the differences have paired 95% bootstrap intervals. N middle: the number of questions answered wrongly without context and correctly with full prefill under SIM, before the RAND and OTHER conditions of Q∗ are applied. Retention middle: the share of these questions that reuse still answers correctly.
Original paper · CC BY 4.0
Table 4 : Number of questions left after each condition, from the evaluated questions to Q∗ (test set and, where used, the second question set).
Original paper · CC BY 4.0
Table 5 : Families of settings whose count of significant differences the text reports. m: number of settings in the family. Uncorrected and Holm: settings in which the difference is significantly positive / significantly negative, before and after Holm’s correction within the family. Each difference is the first condition named minus the second.
Original paper · CC BY 4.0
Table 7 : Replacing the KV of k distractors with their full-prefill KV under SIM, with the target left reused and the distractors taken in a random order fixed per question. The columns k= 0 and k=n (every distractor replaced) come from the main experiments. Predicted R(16) is computed from R(0) and R(n) alone in three ways: additive odds of failure (Equation 2), linear in the probit ofR, and linear in R. Last column: retention when the 16 distractors most similar to the target are replaced first.
Original paper · CC BY 4.0
Figure 4 : Retention after restoring the full-prefill KV ofkrandom distractors under SIM. Filled markers show the measured retention with 95% paired bootstrap intervals. Open markers show the two end points, k= 0 and k=n (every distractor restored), taken from the main experiments. The lines show the three predictions made from these two end points: additive odds of failure (Equation 2), linear in the probit of R, and linear in R. The vertical line marksk= 16, where the predictions differ most and are tested (Table 7).
Original paper · CC BY 4.0
Table 10 : Reuse loss and its decomposition on Q∗. Loss is 1−R(SIM) , the universal term is 1−R(OTHER) , the same-category term is R(OTHER)−R(RAND) and the similarity term is R(RAND)−R(SIM) , all for position-corrected reuse. Intervals are 95% paired bootstrap intervals, with questions resampled (conversations for LoCoMo); bold intervals exclude zero. †Retention under RAND is zero, so the term cannot be positive; these intervals are not set in bold.
Original paper · CC BY 4.0
Table 11 : Retention on Q∗ under existing repairs, under SIM. None: no repair. Pad: each chunk encoded after 512 tokens of in-domain text, of the SurroKV Wikipedia surrogate, or of neutral prose. SurroKV full: a 1,024-token surrogate followed by recomputing 10% of the tokens ranked by question attention. Token 10%: the online method chosen for the setting on development questions, with EPIC applied to each chunk and CacheBlend in a one-step version (Appendix B). Token 10% + pad: this method combined with the in-domain pad.
Original paper · CC BY 4.0
Table 13 : KV replacement under SIM. Columns give retention with no replacement (R), after replacing the target chunk (Target KV), all distractor chunks (All distr.), the single distractor most similar to the target (1 similar) and one random distractor (1 random) with their full-prefill KV . The last two columns are paired differences. The random distractor coincides with the most similar one on 0–6% of questions.
Original paper · CC BY 4.0
Table 14 : KV replacement under SIM: change in retention against no replacement (R), with 95% paired bootstrap intervals.
Original paper · CC BY 4.0
Table 16 : Reuse answers under SIM and RAND that name an entity found in some distractor chunk but not in the target chunk. SIM and RAND: share of all Q∗ questions (%); SIM − RAND: paired difference in percentage points with 95% bootstrap interval. Abstain: share of abstentions among wrong reuse answers. Conditional (entity): the SIM − RAND difference among wrong answers that are not abstentions. Conditional (phrase): the same difference when any 1–5-word phrase, rather than only an entity, counts as a match. Bold differences have intervals that exclude zero.
Original paper · CC BY 4.0
Table 19 : Questions on which the retriever misses the target chunk (10% budget): retention of the token-level selector, of Retrieved+4 and of Retrieved (the retrieved chunk alone), with paired differences.
Original paper · CC BY 4.0
Table 21 : Paired gains over the token-level selector at a 10% budget, with 95% bootstrap intervals (point estimates in Table 1).
Original paper · CC BY 4.0
Table 23 : Change in retention on Q∗ from recomputing the target chunk (Target, 5%) instead of applying no repair, by the slot of the target in the prompt. Slot 1: the number of questions whose target is the first chunk after the instruction prefix; for these questions the recomputed KV equals the reused KV and the output does not change. The other questions are split into thirds of the prompt by the slot of the target; N gives their number and Gain the change in retention.
Original paper · CC BY 4.0
Figure 5 : Change in retention on Q∗ from recomputing the known target chunk at 5% instead of applying no repair, by the slot of the target (Table 23). In slot 1 the recomputed KV equals the reused KV . Targets in later slots miss more of their context under reuse, and recomputing them raises retention more on average.
Original paper · CC BY 4.0
Table 24 : The 5% allocation of Table 1 with ProphetKV as the token-level rule, in the settings where the rule selected on development questions is not ProphetKV . Token (own rule) repeats the baseline of Table 1; the gains (with 95% bootstrap intervals) are over the ProphetKV baseline. A chosen chunk that exceeds the budget has its tokens ranked by ProphetKV here; on LoCoMo the session exceeds it on 32 of the 36 questions. Target and Retrieved nevertheless give the same scores as in Table 1, except for 3 scores, each on a question where a chosen chunk exceeds the budget.
Original paper · CC BY 4.0
Table 26 : Time to first token (TTFT) with Qwen3-8B in our engine on one RTX 4090 D, measured on the first 50Q∗ questions of each dataset (taken from the second question set for NQ-Open and Gorilla). The time for each question is the median of three runs; the table gives the median over questions and, in parentheses, the 95th percentile (p95). The median context length of these questions is given in parentheses below each dataset name. Reuse assembles stored chunk caches (RoPE shift and concatenation); the repairs add selection (question-attention scoring where the rule needs it, and BGE-M3 question encoding and chunk ranking for Retrieved) and recomputation. All conditions use the same attention kernels; an optimised serving system would change the absolute times.
Original paper · CC BY 4.0
Table 28 : Token-level selection after the move. On the prompt with the retriever’s top chunk moved to the last slot (Table 27), Token moved spends the 5% budget with the setting’s token-level rule over all chunks, and Chunk moved recomputes the moved chunk. Token: the token-level selector on the original prompt. Paired differences with 95% bootstrap intervals.
Original paper · CC BY 4.0
Table 29 : Comparison with InfoFlow-KV-style reordering (Teng et al., 2026), re-implemented in our engine at the 5% budget. InfoFlow style: tokens are scored by the L2 norm of question attention (layers 22–25) on the cache with chunk-local positions; chunks are ordered by the fraction of their tokens among the top 5%, with the highest fraction last; tokens are scored again on the reordered prompt; and the top 5% are recomputed. Token 5%: the token-level selector at 5% on the original prompt. Chunk moved: the retriever’s top chunk moved last and recomputed (Table 27). InfoFlow chunk: the last chunk of the InfoFlow order recomputed with the setting’s rule. InfoFlow 15%: the same procedure at its default budget of 15% in both passes. Hit: the share of questions on which the chunk placed last at 5% is the target. Differences are paired, with 95% bootstrap intervals.
Original paper · CC BY 4.0
Table 30 : Moving the retriever’s top-kchunks to the slots before the question, in reverse order of rank (top-1 last), and recomputing them at the 10% budget. Hit: share of questions whose target is the top-1 chunk or among the top three. Rhit (upper) and Rmiss (lower): retention of the moved top-1 chunk at 5% on the questions where it is and is not the target (Table 27), the values the prediction uses. Chunks: the k moved chunks recomputed with the setting’s rule; tokens: the setting’s token-level rule over all chunks on the same reordered prompt. Predicted: the gain predicted from the hit rates and from the retention of the moved top-1 chunk on hits and misses (Appendix F). Token, orig.: the token-level selector at 10% on the original prompt. Paired 95% bootstrap intervals; bold intervals exclude zero.
Original paper · CC BY 4.0
Table 31 : Moving the top chunks of a second retriever, BM25. Predicted values use the BM25 hit rates h1 (top-1) and h3 (top-3) and the retention of the moved BGE-M3 chunk at 5% on the questions where it is and is not the target (Rhit and Rmiss, listed in Table 30): top-1 retention h1Rhit + (1−h 1)Rmiss, and the gain of moving three chunks at 10%, (h3 −h 1)(Rhit −R miss). Measured values: the retention of the moved BM25 top chunk when all its tokens are recomputed at the 10% budget, and the paired gain of the three moved chunks at 10%, with 95% bootstrap intervals. Top-1 moved, BM25 − BGE: the paired difference in retention between the moved BM25 and BGE-M3 top chunks. Bold differences have intervals that exclude zero.
Original paper · CC BY 4.0
Figure 6 : Predicted and measured effects of moving a retriever’s top chunks last at the 10% budget, on NQ-Open, Gorilla and TriviaQA. (a) Retention of the moved BM25 top chunk against h1Rhit + (1−h 1)Rmiss, where h1 is the BM25 top-1 hit rate and Rhit and Rmiss are the BGE-M3 values from Table 27. (b) Gain of moving the top three chunks over the top one against (h3 −h 1)(Rhit −R miss), where h3 is the top-3 hit rate, for BGE-M3 (filled; Table 30) and BM25 (open; Table 31). Bars are 95% paired bootstrap intervals, and the dashed line isy=x.
Original paper · CC BY 4.0
Table 33 : Repairing the target chunk in the reused SIM cache, for the first 40 Q∗ questions (30 for Llama-3.1-8B) in identifier order whose target is not in the first slot. Retention with the target unrepaired (None), with its full-prefill KV inserted (Target KV), recomputed against the reused cache (Recomp.), and recomputed against the full-prefill cache (Recomp. on full; by causality it equals full prefill up to numerical differences). KV dist.: median relative L2 distance of the target KV from its full-prefill value. Attention: the share of the question’s attention mass on the target chunk, aggregated as for the detector d1 (Table 12), for the three caches (None, Target KV , and Rec. for Recomp.) and for full prefill (Full).
Original paper · CC BY 4.0
Table 34 : Inserting the target’s full-prefill KV with the chunks before it reused or restored to their full-prefill KV (the chunks after the target stay reused), on the questions of Table 33. Earlier chunks full: the chunks before the target restored to their full-prefill KV . Target recomp.: the target recomputed against the reused cache. Full target effect: retention with the target’s full-prefill KV inserted minus retention with the target reused, when the earlier chunks are reused (reused) or restored to their full-prefill KV (full). Effects are paired differences with 95% bootstrap intervals; Interaction is the second effect minus the first.
Original paper · CC BY 4.0Quote from the paper
Yuxing Peng, Zhiqing Tang, Weijia Jia (2026). Where Should a KV-Cache Repair Budget Go? Distractor Structure and Contextual Compatibility in Non-Prefix Reuse. arXiv:2611.06397v1. https://arxiv.org/abs/2611.06397v1
BibTeX
@misc{peng2026where,
title = {{Where Should a KV-Cache Repair Budget Go? Distractor Structure and Contextual Compatibility in Non-Prefix Reuse}},
author = {Yuxing Peng and Zhiqing Tang and Weijia Jia},
year = {2026},
eprint = {2611.06397},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2611.06397v1}
}