Make Each Token Count: Towards Improving Long-Context Performance with KV Cache Eviction
Ngoc Bui, Hieu Trung Nguyen, Arman Cohan, Rex Ying
NeurIPS 2026
TL;DR. Learned global KV eviction selectively retains future-useful tokens, reducing memory while often improving long-context reasoning beyond full-cache attention.
Abstract. The key--value (KV) cache is a major bottleneck in long-context inference, where memory and computation grow with sequence length. Existing KV eviction methods reduce this cost but typically degrade performance relative to full-cache inference. Our key insight is that full-cache attention is not always optimal: in long contexts, irrelevant tokens can dilute attention away from useful evidence, so selective, learnable eviction can improve generation rather than merely approximate the full cache. We introduce a global retention-based KV eviction method that learns each token's future utility under a unified memory budget. Lightweight retention gates assign utility scores to cached KV entries, and a shared final scoring projection calibrates these scores across all layers and heads. This enables a single global eviction policy in which tokens from different layers, heads, and modalities compete directly for cache capacity. We further provide theoretical analysis showing that preferentially retaining useful tokens reduces attention dilution, and we justify geometric retention as a query-agnostic proxy for future utility. Across long-context language and vision--language benchmarks, our method substantially reduces KV memory while matching or surpassing full-cache inference. These results suggest that learned, globally calibrated KV eviction is not only a compression technique, but also a mechanism for improving long-context reasoning.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:46 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
Overall, the paper is well presented and offers both theoretical and empirical contributions to an important problem. The work could be further strengthened by addressing the following issues:
(1) Detailed breakdown of the efficiency comparison. Figure 6 shows that DBTrimKV underperforms TrimKV in efficiency, but the current explanation is too brief to clarify the source of this gap. A more detailed breakdown of the computational and memory overhead is needed to identify which components of DBTrimKV account for the performance lag and under what settings the additional cost becomes significant.
(2) Comparison with a broader range of baselines. As suggested by Reviewer UeJL, the empirical evaluation would benefit from including additional relevant baselines, such as CAKE and HeadKV. These comparisons would help position DBTrimKV more clearly relative to closely related methods.
(3) Connection between the theoretical analysis and practical implementation. Although the theoretical results are potentially valuable, their relationship to the proposed implementation should be explained more explicitly. Establishing a clearer theory-to-practice connection would improve the coherence and significance of the paper. For example, it is currently unclear how Propositions 3.1 and 3.2 motivate or inform the design of DBTrimKV. The authors should clarify whether these propositions directly lead to specific algorithmic components, design choices, or empirical predictions.
One reviewer also raised concerns about novelty. Although the paper studies a relatively established problem, its novelty could be better substantiated by articulating the unique contributions more clearly. In particular, the authors could emphasize how the theoretical analysis informs the practical method, what new insights are revealed by the empirical results, and how DBTrimKV differs fundamentally from existing approaches.
Final justification
As the initial reviews are positive, I keep my original recommendation.
- Final justification
- As the initial reviews are positive, I keep my original recommendation.
Read meta-review
Meta-review
Overall, the paper is well presented and offers both theoretical and empirical contributions to an important problem. The work could be further strengthened by addressing the following issues:
(1) Detailed breakdown of the efficiency comparison. Figure 6 shows that DBTrimKV underperforms TrimKV in efficiency, but the current explanation is too brief to clarify the source of this gap. A more detailed breakdown of the computational and memory overhead is needed to identify which components of DBTrimKV account for the performance lag and under what settings the additional cost becomes significant.
(2) Comparison with a broader range of baselines. As suggested by Reviewer UeJL, the empirical evaluation would benefit from including additional relevant baselines, such as CAKE and HeadKV. These comparisons would help position DBTrimKV more clearly relative to closely related methods.
(3) Connection between the theoretical analysis and practical implementation. Although the theoretical results are potentially valuable, their relationship to the proposed implementation should be explained more explicitly. Establishing a clearer theory-to-practice connection would improve the coherence and significance of the paper. For example, it is currently unclear how Propositions 3.1 and 3.2 motivate or inform the design of DBTrimKV. The authors should clarify whether these propositions directly lead to specific algorithmic components, design choices, or empirical predictions.
One reviewer also raised concerns about novelty. Although the paper studies a relatively established problem, its novelty could be better substantiated by articulating the unique contributions more clearly. In particular, the authors could emphasize how the theoretical analysis informs the practical method, what new insights are revealed by the empirical results, and how DBTrimKV differs fundamentally from existing approaches.
- Rating
- 4/6
- Confidence
- 4/5
- Quality
- 2/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The paper proposes DBTrimKV, a learnable KV-cache eviction method that extends TrimKV by weight-tying the final retention-gate projection across all layers and heads, so retention scores become globally comparable and a single global ranking replaces per-layer/per-head budgets. Its distinguishing thesis is not merely compression but that selective eviction can match or surpass full-cache inference by suppressing "attention dilution," supported by theory (Props 3.1/3.2), survival-curve diagnostics, and broad experiments across image/video reasoning, math, and multi-turn dialogue.
Strengths and weaknesses
Strengths
- The core mechanism is clean and well-motivated: tying the final scoring projection converts per-layer/head/modality budget allocation into one global ranking, it is specified precisely enough to reimplement, and it is genuinely ablated (Table 3: tying lifts DBTrimKV from 40.13 to 51.64 at budget 256).
- The fixed-budget compression result is strong and legitimate: at budget 128 DBTrimKV retains 98.3% of vanilla accuracy versus 68.1% for the next-best trained baseline (TrimKV) and ~35% for heuristics — and this contribution stands independently of the contested "beats full cache" claim.
- The evaluation is unusually broad for the subarea and is backed by a real PagedAttention implementation and a 5-seed efficiency-scaling study.
Weakness
-
The "eviction beats full cache" claim is confounded with task adaptation: the gates are answer-supervised on in-domain data (Eq. 3) while "Vanilla" is an untrained frozen model, and the decisive control (train identical gates at full-sequence budget, or LoRA-tune the same 0.43% of params with full cache) is absent.
-
The surpass margins have no statistical support; several reported "wins" are ties or losses folded into an average (MMStar 71.5 vs 71.52), and the effect fails to generalize — the authors concede no gain on GSM8K/MATH-500, and those numbers are not even shown.
-
The supporting theory assumes its own conclusion: dilution is defined as distance to an oracle whose superiority is only motivated empirically, and Prop 3.2's precondition () is never shown to hold for the query-agnostic learned gate.
-
Eviction is irreversible: a dropped token cannot be recovered, so when the query-agnostic gate guesses wrong, information is lost permanently if a later turn needs it. The paper never lists this risk in its Limitations and gives no worst-case analysis.
Questions
- If you train the identical gates with the identical objective (Eq. 3) but set the budget equal to the full sequence length (no eviction), or LoRA-tune the same 0.43% of params with full cache, does it still match/exceed DBTrimKV? If so, isn't the "beats full cache" effect task adaptation rather than eviction?
- Can you provide paired significance tests and error bars (over training-subset seeds and gate init) for every "surpasses full cache" cell? Are margins like MMStar 71.5 vs 71.52 distinguishable from a tie?
- What are the deferred GSM8K and MATH-500 numbers at every budget, and on how many (benchmark × budget) cells does DBTrimKV actually exceed full cache rather than merely match or fall below?
- SeerAttn-R is introduced as a SOTA learnable baseline but appears in no table. Can you report it (and main-text Locret) head-to-head at matched budgets, or explain the omission?
- How do you reconcile the MMDU gains on subjective Creativity (+0.57) and Richness (+0.48) with a distractor-suppression mechanism, and were the Gemini3 judge prompts blind to method?
- Since eviction is permanent, how often does the query-agnostic gate drop a token a later turn needs, and what is the accuracy cost on those cases?
Limitations
The effect fails to generalize by the authors' own measurement, and the permanent information loss from irreversible eviction is never flagged as a risk.
Final justification
The authors ran the paired tests I asked for: of the 17 cells claimed to exceed full cache, one is significant, one borderline, and fifteen are ties. That result came from them inside the discussion window, it is not in the paper, and no revision is permitted.
I hold at 4 because the fixed-budget compression result is untouched, retaining 98.27 percent of vanilla at budget 128 against 68.13 percent for the next best trained baseline.
Formatting concerns
Fig. 5 defers GSM8K/MATH-500 to an Appendix that contains two sentences and no table.
5 comments
Thanks for your response.
I am holding at 4 rather than raising for one reason: significance was declined rather than supplied. One request that needs no retraining, run paired McNemar or an item-level bootstrap on your already-saved per-item predictions for the cells you claim surpass Vanilla (counting from Table 1, 17 of 35 exceed, but 6 of those by under 1 point).
Separately, if you already hold both checkpoints, evaluating the math-trained gate on MMDU would settle whether the effect is a general dilution effect or in-domain-learned selection; either result would further strengthen this work.
Response to Reviewer uKJ5 Comment (1/2)
We thank the reviewer for the prompt and actionable feedback, and we apologize for the delayed response. We had to re-run Vanilla (full-cache) inference for MathVision, MMStar, and MMMU-Pro, as the original per-item predictions were no longer available. These reasoning evaluations generate up to 32K-token trajectories and are therefore expensive to reproduce. The re-run Vanilla numbers differ slightly from those reported in the paper (e.g., MathVision 48.68 → 49.01, MMStar 71.52 → 71.98) because lmms-eval is not deterministic across batch sizes (due to their padding mechanism): to accelerate the re-run we used a smaller batch size (4) on more GPUs, whereas the original experiments used a batch size of 32.
Paired significance tests. We ran the requested tests on all 17 (benchmark × budget) cells the paper marks as exceeding full cache — exact McNemar and an item-level bootstrap (10,000 resamples, 95% CI) on the saved per-item predictions:
| Task | M | Vanilla | DBTrimKV | Δ | p (McNemar) | p (bootstrap) | verdict |
|---|---|---|---|---|---|---|---|
| MMStar | 512 | 71.98 | 71.85 | −0.13 | 0.771 | 0.721 | tie * |
| MathVision-mini | 1024 | 49.01 | 52.63 | +3.62 | 0.193 | 0.162 | tie |
| MathVision-mini | 512 | 49.01 | 51.97 | +2.96 | 0.343 | 0.312 | tie |
| MathVision-mini | 256 | 49.01 | 51.64 | +2.63 | 0.382 | 0.348 | tie |
| MMMU-Pro-vision | 1024 | 40.98 | 41.21 | +0.23 | 0.871 | 0.848 | tie |
| MMMU-Pro-vision | 512 | 40.98 | 43.99 | +3.01 | 0.007 | 0.003 | significant |
| MMMU-Pro-vision | 256 | 40.98 | 41.91 | +0.92 | 0.451 | 0.420 | tie |
| VideoMME | 1024 | 54.22 | 54.93 | +0.71 | 0.290 | 0.269 | tie |
| VideoMME | 512 | 54.22 | 54.41 | +0.19 | 0.817 | 0.774 | tie |
| VideoMME | 128 | 54.22 | 54.85 | +0.63 | 0.424 | 0.403 | tie |
| VideoMMMU-adapt | 1024 | 35.67 | 37.00 | +1.33 | 0.720 | 0.665 | tie |
| VideoMMMU-adapt | 256 | 35.67 | 39.00 | +3.33 | 0.282 | 0.247 | tie |
| VideoMMMU-comp | 1024 | 55.00 | 59.33 | +4.33 | 0.182 | 0.160 | tie |
| VideoMMMU-comp | 512 | 55.00 | 61.33 | +6.33 | 0.053 | 0.043 | borderline |
| VideoMMMU-comp | 256 | 55.00 | 57.00 | +2.00 | 0.581 | 0.544 | tie |
| VideoMMMU-comp | 128 | 55.00 | 57.00 | +2.00 | 0.621 | 0.581 | tie |
| VideoMathQA | 1024 | 36.19 | 36.43 | +0.24 | 1.000 | 0.965 | tie |
* MMStar@512: Table-1 reports 71.52 → 71.85 (a claimed surpass); our faithful full-cache re-run scores 71.98, turning it into a tie (the +0.46 vs Table-1 is full-cache re-run variance).
Result. Across the 17 cells, one — MMMU-Pro@512 (+3.01, McNemar p=0.007, bootstrap p=0.003) — exceeds full cache with statistical significance; VideoMMMU-comp@512 (+6.33) is borderline (McNemar p=0.053, bootstrap p=0.043); the remaining cells are statistical ties. MMStar and VideoMME are simpler tasks so that LLMs can answer with short reasoning, we do not see differences among KV evictions on these tasks. DBTrimKV will be more helpful on more challenging tasks that require long-reasoning. We thank the reviewer for prompting this analysis and will report it in the revision.
On claims and framing. Our aim is to highlight the potential of KV eviction to mitigate attention dilution, and to argue for a change of perspective — eviction need not be viewed merely as an efficiency technique that always degrades performance. We hope these encouraging results motivate further work in this direction, where performance and efficiency can improve together rather than always trade off. That said, we agree that some wording and claims should be tightened to avoid over-interpreting our results, and we will revise the paper thoroughly.
- Rating
- 4/6
- Confidence
- 3/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper presents DBTrimKV, a method that does per-layer per-head compression on the KV cache during long-context generation. The key finding of this paper is that removing some of the context can actually make the model reason better and improve the output quality because it can pay more attention to important tokens. Based on this insight, the authors use retention gates to score each token's future usefulness and drop the values in the KV cache based on the retention gates. The evaluation shows that this not only outperforms other KV cache compression/eviction baselines, but can also achieve higher output quality than original LLM inference.
Strengths and weaknesses
Strengths
- The mathematical part of this paper is solid.
- The evaluation is thorough and convincing. It covers multiple use cases and a comprehensive list of baselines.
- Good problem scope: this paper extends retention-based eviction to VLMs and treats vision and text tokens under one unified budget, while most of the related works are text only.
Weaknesses
- Implementation and serving integration are underspecified. The paged-attention layout for variable-length per-head caches is described only at a high level in the appendix. It's important to have a clear integration plan with the modern LLM inference engines.
- Training cost is not discussed. The authors report hardware (4× H100, 5,000 steps) and hyperparameters but give no total GPU-hours, wall-clock training time, or cost accounting.
Questions
- How does DBTrimKV integrate with production serving engines like vLLM or SGLang? Does the variable-length, per-head paged layout require custom kernels? How much overhead will the head-level page table incur?
- At each eviction step, you globally rank all cached tokens across layers and heads. What is the latency and memory overhead of this ranking, and how does it scale with the number of layers, heads, and total cache size?
- How generalizable is this method? The paper only reports results on small models, where the larger model (100+B parameters) is the one that better fits the KV cache compression optimizations.
Limitations
Please see the "Weaknesses" section above.
Final justification
Thanks for your detailed response. Would like to see the updated version with all the details. I would like to keep the current scores.
Formatting concerns
N/A
1 comment
Rebuttal
We thank the reviewer for the constructive feedback and suggestions. We address each concern below.
W1 + Q1. Serving integration to existing vLLM and SGLang
DBTrimKV uses a paged-attention layout in which each layer-head pair owns a logical variable-length KV sequence backed by fixed-size physical blocks and a block table. This is close to the abstractions used by vLLM and SGLang, except that DBTrimKV indexes the block table at layer-head granularity rather than only at request or sequence granularity. The attention computation itself does not require a custom attention kernel in our implementation. We use the existing flash_attn_with_kvcache operation from the FlashAttention library. We flatten the head dimension into the sequence dimension so that each variable-length head is represented as an independent sequence for the attention call.
The additional implementation-specific components are:
- maintaining a sequence length and block-table entries for each layer-head pair;
- flattening or rearranging the per-head metadata for the attention operation
- scattering surviving KV entries into active physical blocks after eviction.
The head-level metadata is small relative to the KV cache itself. Our runtime profile indicates that the principal additional cost is not block-table lookup but variable-length attention, block-scatter updates, and launch/dispatch overhead. We will expand Appendix B with a step-by-step integration path for modern serving engines, including the per-head block-table representation, metadata overhead, and cache-update procedure.
W2. Details on training and implementation
We agree that the paper should report total training time and implementation details more explicitly. For the Qwen3-VL-8B-Thinking experiment in Table 1, training takes approximately 12 hours on four H100 GPUs with a maximum sequence length of 32K. This corresponds to approximately 48 H100 GPU-hours.
For paged attention, we use a physical block size of 256 tokens. We also implement dynamic block allocation, analogous to the capacity expansion of a dynamic array in C++. When the context exceeds the currently allocated capacity, the system allocates additional blocks dynamically. Consequently, users do not need to pre-specify a maximum number of blocks for serving. We will add the wall-clock time, total GPU-hours, block size, and dynamic-allocation procedure to the experimental and implementation details.
Q2. Global ranking overhead
Global ranking is negligible in our implementation.
At each eviction step, DBTrimKV gathers retention scores through the block table and selects the surviving entries using a single torch.topk operation over , where (T) is the total number of cached entries across layer-head pairs. Because (T) is bounded by the configured global cache budget, it does not grow with the complete generated sequence after the cache reaches capacity.
Our profiling results are:
| total cached tokens T | 74K | 295K | 590K | 1.18M | 2.36M |
|---|---|---|---|---|---|
| top-k latency (ms) | 0.08 | 0.08 | 0.16 | 0.21 | 0.23 |
| scores memory (MB) | 0.3 | 1.2 | 2.4 | 4.7 | 9.4 |
Even with 2.36M cached entries, ranking requires at most 0.23 ms and 9.4 MB of FP32 score storage. The operation is approximately (O(T)) in practice and is executed only once every buffer_size decoding step. Its amortized overhead is approximately 0.002 ms/token.
Therefore, the observed slowdown relative to TrimKV is not caused by global ranking. It primarily comes from variable-length attention and cache-update operations. Some DBTrimKV heads retain longer sequences than others, whereas TrimKV uses a fixed per-head cache length, allowing a more regular attention workload.
Q3. Generalizability to much larger models
We agree that end-to-end evaluation on substantially larger models would be valuable. The 4B–8B models are the largest models we could train and evaluate with our available resources, and we will state this scope limitation clearly.
We do not claim that the current results establish quality improvements on 100B+ models. Nevertheless, the principal DBTrimKV-specific operations scale with the number of cached entries rather than directly with model parameter count. The ranking experiment above covers up to 2.36 million cached entries and shows modest latency and memory overhead at that scale.
The remaining concern is end-to-end interaction with the much larger model’s attention, communication, batching, and parallel-serving configuration. Evaluating these effects on 100B+ models is an important direction for future work.
We thank the reviewer again for the detailed feedback. Please let us know if we addressed your question adequately or not. We are happy to answer any follow-up questions/concerns you may have.
- Rating
- 5/6
- Confidence
- 3/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 2/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper proposes DBTrimKV, a dynamic KV cache budget allocation with learnable future utility of every token to optimize KV cache for LLM inference. The method proposes a lightweight trainable utility predictor that is trained on representative datasets, with per-layer-head projections as well as global weight/bias common across all heads and layers to keep the metric globally interpretable, which helps in allocation of the overall KV cache budget. The authors also argue that full-cache attention might be noisy especially in long context scenarios, and proper eviction could yield better accuracy, as supported by their evaluations.
Strengths and weaknesses
Strengths
- The paper is generally well structured and easy to read.
- The paper presents mathematically sound argument on why full-cache eviction might underperform eviction based methods, and under what circumstances, which supports the argument for eviction-based schemes outperforming full-cache.
Weaknesses
-
Novelty: The paper has marginal novelty. Training based eviction is presented in prior works like TrimKV. Similarly, dynamic budget allocation has also been done in prior works like CAKE [1] (allocation across layers) and HeadKV (allocation across heads) [2], so the proposed method seems more like a combination of these techniques rather than a novel KV cache eviction scheme.
-
Model size for evaluation: The paper uses 4B-8B sized models for evaluation, which limits the scope of DBTrimKV's practical significance on larger models.
-
Sensitivity to calibration dataset: The paper mentions calibrating on MMDU-45K dataset for multi-turn dialogue, while also evaluating on MMDU, which raises concerns on (a) is it a fair evaluation? (b) how sensitive DBTrimKV is to the calibration set? If the model is given an out-of-distribution task, how does the technique perform under those settings?
[1] CAKE: https://arxiv.org/abs/2503.12491 [2] HeadKV: https://arxiv.org/abs/2410.19258
Questions
-
Can you also add CAKE and HeadKV to your evaluation to compare how the layer+head allocation compares against layer-only and head-only allocation?
-
Can you provide a more detailed breakdown of runtime for TrimKV and DBTrimKV? Particularly, what is it that makes DBTrimKV slower compared to TrimKV?
-
Can you provide some evaluations on out-of-distribution robustness of DBTrimKV, where the utility predictor has not been trained on the task, to see how well the technique holds in such cases?
Limitations
yes
Final justification
The authors have adequately addressed my concerns regarding the paper, and I recommend acceptance. I suggest the authors to kindly include the additional results to the revised paper.
Formatting concerns
none
3 comments
Rebuttal
We thank the reviewer for the constructive feedback and suggestions. We address each concern below.
W1. Novelty: the proposed method seems more like a combination of these techniques rather than a novel KV cache eviction scheme.
We respectfully disagree that DBTrimKV is merely a combination of existing techniques.
Budget allocation in KV eviction, across layers, heads, and modalities, has so far been studied in fragmented pieces. Each prior method proposes its own policy, but these policies are almost always post-hoc heuristics that target a single dimension (CAKE across layers, HeadKV across heads) and are hard to compose into one coherent rule.
DBTrimKV is the first method to unify all three allocation questions under a single learnable retention score that is globally ranked across layers, heads, and modalities at once, eliminating every hand-crafted allocation heuristic. TrimKV's learned retention score is a natural starting point, but adopting it directly does not work: its scores are not comparable across layers/heads (poor cross-module calibration). Our key insight is a simple, effective fix, tying the final gate projection, which makes scores globally comparable and turns per-dimension allocation into one global top-k. The ablation in Table 3 shows tying lifts DBTrimKV from 40.13 to 51.64 at budget 256.
The contribution therefore consists of more than applying dynamic allocation to TrimKV:
- Unified global allocation: one learned score determines allocation across layers, heads, and modalities.
- Cross-group score calibration: weight tying makes retention scores globally comparable.
- Strong empirical behavior at extreme budgets: DBTrimKV substantially improves over TrimKV and, in several settings, matches or exceeds full-cache performance.
- A theory-guided interpretation: the attention-dilution analysis explains conditions under which removing low-utility cached tokens can improve, rather than merely approximate, full-cache attention.
- Analysis of geometric decay: we provide both theoretical and empirical evidence for the effectiveness of the geometric-decay design, which was not analyzed in TrimKV.
We will revise the paper to distinguish these contributions more explicitly from prior layer-only and head-only allocation methods.
W2. Evaluation is limited to 4B–8B models
We agree that evaluation on substantially larger models would strengthen the paper. The 4B–8B models are the largest models that we could train and evaluate under our current computational budget, and we will state this limitation more explicitly. We do not intend to claim that the current experiments empirically establish effectiveness on 100B+ models. However, the main operations introduced by DBTrimKV depend primarily on the number of cached entries rather than directly on the number of model parameters. Our profiling of global ranking covers up to 2.36 million cached entries, where the ranking operation remains below 0.23 ms and uses at most 9.4 MB for FP32 scores. This provides evidence about systems-level scaling, although end-to-end quality and serving performance on 100B+ models remain important directions for future work.
W3 + Q3. Sensitivity ot calibration dataset
We thank the reviewer, and we address both the fairness and the sensitivity/OOD concerns.
(a) Fairness of the MMDU evaluation. MMDU-45K (training) and the MMDU benchmark (evaluation) are disjoint splits. No evaluation examples appear in training. This is the standard train/test protocol; we will state the split explicitly in the revision. More broadly, our VLM reasoning experiments train on a mixture that is distinct from the evaluated LMMs-Eval benchmarks.
(b) Sensitivity / out-of-distribution. To test OOD generalization directly, we train Qwen3-4B on general QA data (Synth-32K, BookSum, Buddhi — the general datasets from the TrimKV paper, with no math or reasoning-mode supervision) and then test on AIME24, a math reasoning benchmark the gate never saw:
| Method \ KV budget | 512 | 1024 | 2048 | 4096 |
|---|---|---|---|---|
| SnapKV | 1.2 | 15.7 | 41.1 | 62.4 |
| R-KV | 1.9 | 18.5 | 42.7 | 63.6 |
| SeerAttention-R (trained on OpenR1-math) | 47.0 | 66.6 | 71.4 | 71.0 |
| DBTrimKV (trained on OpenR1-math) | 67.9 | 73.8 | 72.9 | 74.2 |
| DBTrimKV (trained on general QAs) | 36.7 | 56. 2 | 63.3 | 68.8 |
Even trained on this general, off-task mixture, DBTrimKV outperforms all heuristic methods by a wide margin. At larger budgets, it also approaches SeerAttention-R, even though SeerAttention-R is trained specifically on mathematical reasoning data.
We emphasize that SeerAttention-R is a retrieval-based method rather than an eviction method and therefore additionally incurs CPU-to-GPU retrieval and transfer costs.
We will include the out-of-distribution experiment and clarify the calibration/evaluation split in the revised paper.
Q1. Comparison to CAKE and HeadKV
We added CAKE and HeadKV to the vision-reasoning evaluation. HeadKV performs head-wise dynamic allocation, similar in scope to AdaKV, while CAKE performs layer-wise dynamic allocation, similar in scope to Pyramid-KV. These comparisons help isolate the benefit of DBTrimKV’s joint allocation across both layers and heads.
Setup. MathVision_mini (304 problems), Qwen/Qwen3-VL-8B-Thinking,
KV budget M = 1024 (global M x L x H), max_new_tokens=32768, batch size 1.
| method | MathVision | vs Vanilla |
|---|---|---|
| Vanilla | 48.68 | 100% |
| SnapKV | 15.13 | 31% |
| R-KV | 24.67 | 51% |
| Ada-Pyramid-KV | 28.29 | 58% |
| AdaKV | 32.89 | 68% |
| CAKE | 20.07 | 41% |
| HeadKV | 35.20 | 72% |
| TrimKV* | 45.72 | 94% |
| DBTrimKV* | 52.63 | 108% |
DBTrimKV substantially outperforms both the layer-wise CAKE baseline and the head-wise HeadKV baseline. It also improves over TrimKV and exceeds the full-cache result in this setting.
This table also clarifies our practical contribution: DBTrimKV is not another hand-tuned heuristic that improves baselines incrementally. It unifies the two streams of KV eviction, the scoring problem and the budget-allocation problem, under one learned, globally calibrated view that lifts eviction performance to match or, in several cases, surpass full attention. The gain over TrimKV is likewise not incremental at the extreme end: DBTrimKV improves on TrimKV by ~30% at budgets 64 and 128.
We will add these baselines across more benchmarks in the revision.
Q2. Breakdown runtime
We agree that Figure 6 should include a more detailed breakdown. We profiled Qwen3-4B on one H200 GPU with batch size 1, a 16K-token context, and (M=256). DBTrimKV decodes at 28.4 tokens/s, compared with 32.8 tokens/s for TrimKV. This corresponds to a 1.15× slowdown, or an additional 4.7 ms/token.
| component (ms/token) | TrimKV | DBTrimKV | Δ |
|---|---|---|---|
| Model forward: projections, MLP, LM head, and normalization | 6.54 | 7.23 | +0.69 (approximately run variance) |
attention (dense flash -> paged varlen flash_fwd_splitkv) |
0.27 | 0.60 | +0.33 |
| KV-cache update + host-sync (concat → per-step block-scatter) | 0.12 | 0.56 | +0.44 |
| eviction ranking (global top-k) | 0.01 | 0.00 | ~0 |
| launch/dispatch + idle (batch-1 bubble) | 23.6 | 26.8 | +3.2 |
| total decode latency | 30.5 | 35.2 | +4.7 (1.15×) |
The overhead does not come from the global ranking operation, which is negligible. It primarily comes from: paged variable-length attention over per-head caches; scattering surviving KV entries into active blocks; and additional launch and dispatch overhead under batch-1 execution. The first two costs are shared by dynamic-budget methods that maintain different cache lengths across heads, such as AdaKV and HeadKV. We will add this breakdown and discuss the settings under which these costs become significant.
We thank the reviewer again for the detailed feedback. Please let us know if we addressed your question adequately or not. We are happy to answer any follow-up questions/concerns you may have.
Thank you for the response, I've updated my score. Regarding the runtime breakdown, majority of the delta seems to come from the batch-1 bubble. I'd highly recommend diving deeper and understanding it further. One potential direction could be to try using CUDA graphs (for both TrimKV and DBTrimKV) and see if it reduces the overhead.
Thank you!
We thank the reviewer for updating the score, and for this suggestion. We followed it and implemented the fix, and re-measured the breakdown.
Diagnosis. We agree the dominant term in the 4.7 ms/token gap is the batch-1 launch/dispatch
bubble, which is an eager-mode, single-sequence artifact, not algorithmic cost. The reason CUDA
graphs were not already in place is that our decode cache grows the KV tensors with
torch.cat (a dynamic allocation) and the ragged path issues a per-step host sync, both of which
make the decode step uncapturable.
Fix. We replaced the cache with a preallocated, in-place variant (no torch.cat, no host
sync) and used the eager retention-gated attention kernel, which at the TrimKV/DBTrimKV budget
(M=256, i.e. attention over 256 keys) is as cheap as flash yet is CUDA-graph-capturable. This lets us
capture the actual TrimKV and DBTrimKV decode step (with eager attention) and replay it as a single graph.
Re-measured decode latency (Qwen3-4B, 1×H200, bf16, batch 1, M=256):
| eager (before) | + CUDA graph (after) | speed-up | |
|---|---|---|---|
| TrimKV | 30.0 ms/tok (33.3 tok/s) | 8.8 ms/tok (113.5 tok/s) | 3.4× |
| DBTrimKV | 30.7 ms/tok (32.6 tok/s) | 9.0 ms/tok (110.8 tok/s) | 3.4× |
The graphed latency is the GPU-compute floor (a single fused replay), so the ~21 ms/token removed was pure launch/dispatch bubble. As a sanity check, our eager TrimKV number (30.0) reproduces the 30.5 ms/token in the breakdown table above, confirming the two harnesses agree.
Two findings:
- CUDA graphs give ~3.4× on both methods and eliminate the bubble exactly as the reviewer anticipated.
- The TrimKV <-> DBTrimKV gap collapses from 4.7 ms (1.15×) to 0.21 ms (1.02×) once graphed. This confirms that gap was launch/dispatch + host-sync overhead, not compute: the extra GPU work DBTrimKV does is negligible (8.8 vs 9.0 ms/token). So under CUDA graphs DBTrimKV decodes at essentially TrimKV's speed.
Scope. The prototype above uses a preallocated cache to make the step capturable; the one remaining engineering item to ship this on the production paged DBTrimKV path is to move the paged cache's block management device-side (which removes the same host sync and enables capture). We will fold the device-side paged cache + CUDA graphs into the revised version; the measurements here establish that the batch-1 bubble is real and fully removable for both TrimKV and DBTrimKV, and that doing so closes the DBTrimKV overhead almost entirely.
We thank the reviewer again for the detailed and constructive feedback.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Rebuttal
We thank the reviewer for the careful analysis. Our objective is to stress-test KV-cache eviction in challenging settings involving long-form reasoning, multi-turn dialogue, and multimodal inputs, which are not covered by many existing baselines.
We clarify that the trained retention gate is inert unless eviction actually occurs. We freeze all LLM weights throughout training and inference. The retention gate is used only to rank KV entries for eviction and is never involved in computing attention outputs or hidden states.
Thus, when the budget equals the full sequence length during inference, DBTrimKV reduces exactly to full-cache inference on the frozen base model, which is reported as Vanilla in all tables and figures. This equivalence holds regardless of what the gate has learned, since the eviction is never executed in this regime.
We also note that the dataset used in Table 1 is a standard instruction datasets widely used in prior work and overlaps with data used in Qwen2.5-VL instruction training. It is therefore unlikely to introduce any novel distribution shift specific to Qwen3-VL-Thinking.
On the proposed controls
The performance of DBTrimKV by setting M to be inf (equivalently no capacity loss) degrades significantly, showing the importance of the capacity loss.
Clarification of the “eviction beats full cache” claim: We would like to clarify that we do not claim that eviction universally outperforms full-cache attention. Rather, our goal is to show that it can beat full cache in non-trivial settings, which challenges the common assumption that KV eviction is strictly lossy. Our claim is more specific:
We apologize for the confusion over notation. As stated in the caption, bold marks the best eviction method and red marks cells that surpass Vanilla; we do not claim 71.50 as a win over Vanilla's 71.52. That cell is neither. We agree such near-ties must not be read as improvements: we will make the caption and text unambiguous and count a "surpass" only when the margin is meaningful.
On error bars: following the protocol in R-KV and SeerAttention-R, all baselines use greedy decoding and report a single accuracy per cell, so the cross-method comparison is deterministic and matched. Full multi-seed retraining of every model is beyond our compute budget, but we will add a repeated run with a different training subset and gate initialization on a subset of benchmarks and report the resulting spread.
We will revise the theory to avoid overstatement, and we clarify the two points here.
The oracle is a measurement device, not an assumption. The oracle sparse attention is not claimed to be implementable or a priori superior; it defines the target notion of useful-token mass and makes the dilution effect measurable as a distance to that target. The definition is grounded in a well-documented empirical regularity: models answer well from short, focused contexts but degrade as distracting tokens are added (e.g., needle-in-a-haystack).
The condition ρD≤ρU in Section 3.2 is a sufficient condition under which eviction reduces the defined dilution quantity. We do not claim that DBTrimKV always satisfies this condition. Instead, the result explains why an eviction policy can outperform full cache when its retained distribution is closer to the useful-token target than the unfiltered attention distribution.
We will clarify the theory-to-practice connection as follows:
This revised framing separates the explanatory role of the theory from the specific engineering choices in DBTrimKV.
We agree that eviction is irreversible in principle. If the query-agnostic retention gate removes a token that becomes important in a later turn, the information cannot be recovered from the KV cache. Therefore, we should predict future utility for eviction purpose instead of using attention heuristics.
Figures 2 provides evidence that many cached tokens receive little future utility, supporting the opportunity for eviction. However, they do not constitute a worst-case guarantee. The aggregate consequence of incorrect eviction is visible at aggressive budgets: for example, Table 1 shows a performance decline at budget 64, where the policy is forced to discard substantially more information. In practice, the budget (M) should therefore be calibrated for the target application and expected conversation length. Applications that require exact recall of arbitrary earlier details may require a larger budget, a retrieval mechanism, or a hybrid design that permits recovery of evicted information.
We have added the irreversibility risk, its worst-case nature, and this M trade-off to the Limitations section.
We apologize that these results were not referenced clearly. The GSM8K and MATH-500 results are provided in Figure 10. GSM8K and MATH-500 generally require shorter generated solutions than the longer-reasoning benchmarks emphasized in the main evaluation. Consequently, they provide fewer opportunities for DBTrimKV to benefit from removing cached tokens accumulated during long generation. We therefore do not observe advantages over full cache on these datasets.
Nevertheless, DBTrimKV continues to outperform TrimKV by a substantial margin at the smallest cache budgets. We will revise the discussion so that the claim is limited to this compression advantage and does not imply consistent improvement over vanilla on GSM8K or MATH-500.
Comparisons with SeerAttention-R are reported in Figures 5 and 10 on the mathematical-reasoning benchmarks for which official checkpoints are available. DBTrimKV outperforms SeerAttention-R across the reported matched-budget settings.
Importantly, for both SeerAttention-R and LocRet we evaluate on their own optimized settings, their released checkpoints and their configuration, i.e., we bring our method onto their home turf rather than porting their method into ours. This avoids penalizing them for re-implementation artifacts or mis-calibration on our harness, so each comparison is conservative and tilted in the baseline's favor.
That DBTrimKV still wins under these baseline-favorable conditions underscores its generality across settings.
The observed gains in Creativity and Richness are not inconsistent with the proposed mechanism. Our hypothesis is that removing low-utility cached entries can reduce distracting attention mass and, in some cases, improve generation rather than merely preserve it. The MMDU results illustrate that this behavior may also occur for open-ended generation.
Judge blindness. The Gemini judge sees only the dialogue and the candidate responses, with no method identity in the prompt and no method-dependent ordering; it never knows which KV method produced an output.
That said, Creativity and Richness are subjective, judge-based dimensions. We therefore do not use these metrics as evidence that DBTrimKV improves response quality. The headline MMDU metrics in the paper are Answer Accuracy and Overall, and we will revise the discussion to avoid over-interpreting the two subjective submetrics.