arXiv(opens in a new tab)cs.LGSep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.31415

Evaluating the accuracy of KV cache reuse techniques

Samuel Cestola, Tianxiang Xia, Pengfei Zheng, Weiyan Zheng, Bo Wang, Yi Zhao, Diego Didona

ABSTRACT

Position-independent KV cache reuse aims to reduce latency in retrieval-augmented generation by reusing chunk-level KV caches across prompts. We show that current evaluations of KV cache reuse techniques rely on measurements that fail to faithfully capture the loss of accuracy attributable to reuse, often artificially inflating the reported effectiveness. We also show that existing datasets do not exhibit the reuse dynamics needed to thoroughly evaluate such techniques. To address these issues, we propose an evaluation methodology that measures this accuracy loss without ambiguity and we introduce Boxoffice, a tool that programmatically generates evaluation datasets that exercise challenging KV cache reuse patterns.

1 INTRODUCTION

Retrieval-augmented generation (RAG) systems augment user queries with retrieved text chunks, supplying large language models (LLMs) with up-to-date and domain-specific context that improves answer accuracy and reduces hallucinations (Lewis et al., 2020; Ray et al., 2025; Hu et al., 2025). The additional text chunks, however, inflate the prompt. Because attention cost is quadratic in prompt length, the resulting prefill stage, where the Key-Value (KV) caches are computed, becomes the dominant component of latency (Vaswani et al., 2017). A promising direction for mitigating this overhead is position-independent KV cache reuse (Yao et al., 2025; Hu et al., 2024; Agarwal et al., 2025; Wang et al., 2026a): each chunk's KV cache is computed once, stored, and subsequently reused at any position within future prompts that contain it. Position-independent KV cache reuse is strictly more general than prefix caching, the current industry standard (Kwon et al., 2023; Zheng et al., 2024b), which amortizes prefill cost only when chunks recur as the same ordered prefix.

The main challenge in reusing KV caches at arbitrary positions is the absence of cross-chunk attention: tokens in one chunk carry no attention to tokens in other chunks. This is critical for accuracy: naive reuse of independently-prefilled chunks leads to severe accuracy degradation (Yao et al., 2025; Gim et al., 2024). The widespread solution to recover cross-chunk attention is to recompute the KV cache for few tokens at query time. To preserve the performance benefits of KV cache reuse, such recomputation has to involve as few tokens as possible. An emerging line of work, which we refer to as warm approaches (Agarwal et al., 2025; Wang et al., 2026a; Liu et al., 2025), aims to reduce the recomputation cost by embedding cross-chunk attention into the saved KV already at store time, so that less of it needs to be reconstructed at query time.

Pitfalls of KV cache reuse evaluations. We identify two issues in the evaluation methodology adopted in the literature on KV cache reuse approaches.

The first issue is methodological. The headline metric for evaluating KV cache reuse should measure its core objective: preserving full prefill accuracy on queries where the correct answer genuinely depends on the provided context. However, existing work evaluates performance by reporting an aggregate accuracy metric, such as F1F_{1} score, computed over every query in a dataset. This includes queries the baseline cannot answer even with full prefill (so there is no accuracy to preserve), queries the model can answer from parametric memory alone (so the KV cache is not what produces the answer), and yes/no or disjunctive questions prone to lucky guesses. Including such queries conflates accidental regularization brought by approximated attention states, parametric leakage, and chance correctness into the accuracy metric; as we show in Section 4.1, this systematically inflates the reported accuracy of reuse techniques, masking the true loss of accuracy attributable to the approximation.

The second issue lies in the chunk and query distributions of the datasets themselves. We identify two structural properties of commonly used datasets that systematically mislead, or even prevent, the evaluation of emerging warm approaches. The first property is clustered queries. The chunks in the context of a query tend to be semantically very similar, because they concentrate on the same topic, and chunks are hardly reused in queries with a substantially different context. In a more general case the same chunk is included in different queries with different contexts: a chunk on Richard Feynman could appear in prompts together with chunks on other physicists, but also Nobel prize winners, or bongo players. We show in Section 4.2 that this clustering effect makes it overly easy to identify offline what cross-attention to bake into KV caches at construction time, just by relying on semantic proximity of chunks and without requiring any knowledge about the query and context distributions. The second property is the limited presence of cross-query chunk reuse. A direct approach to warm KV cache reuse is to run a full prefill the first time a chunk is encountered, so that the saved KV carries the cross-attention from the preceding chunks present in that first query. We show in Section 4.3 that in the most widely used datasets, queries are mostly composed of chunks that appear only once across the workload.

Contributions. We make two contributions. First, in Section 4, we present an evaluation methodology that isolates the accuracy loss attributable to KV cache reuse by removing its principal confounds. We define the meaningful subset of a benchmark as the set of queries on which the baseline answers correctly with full prefill, the model cannot answer without context, and the answer space is non-trivial. We quantify the gap from the aggregate scores reported by prior work: on the Q&A subset of the widely used LongBench benchmark (Bai et al., 2024), up to 42% of a reuse method's F1F_{1} comes from queries that the full-prefill baseline cannot answer at all. Second, in Section 5, we propose a tool that generates a new dataset, which we call Boxoffice, specifically tailored to evaluate KV cache reuse strategies. Boxoffice is meaningful by construction: chunks are drawn from a fictional corpus, so the LLM parametric memory cannot help, answers have a low chance of being guessed by chance, and the baseline with full prefill answers the query correctly. Boxoffice also guarantees cross-query chunk reuse, and exhibit controlled, nuanced reuse patterns, including a new dynamic we call stale cache, where the same chunk is reused in conflicting contexts. We show that the same reuse method can score an F1F_{1} of 0.98 or 0.00 depending only on the context in which a chunk was cached in the first place. These dynamics reproduce across three query templates and on models of different sizes (8B and 32B), and the reuse regime Boxoffice generates matches what production RAG traces report. Code and datasets are available at (Cestola et al., 2026b;c).

References (68)