NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

RoCoKV: Accelerating LLM Inference Serving through Uncertainty and Redundancy Aware KV Cache Compression

Payman Behnam, Elaheh Sobhani, Saad Amin, Yahya Hassan, Daniyal Khan, Biswadeep Chakraborty, Tanish Patwa, Souvik Kundu, Alexey TumanovarXiv 2026

TL;DR

RoCoKV is a novel KV cache compression framework specifically designed for Large Reasoning Models (LRMs). By dynamically adjusting compression based on model uncertainty and penalizing redundant tokens, it achieves up to a 1.43× speedup and 45% higher throughput in vLLM while maintaining significantly higher reasoning accuracy than previous state-of-the-art methods.

What Problem Does This Paper Address?

Large Reasoning Models (LRMs), like the DeepSeek-R1 series, achieve impressive results by generating long "Chain of Thought" (CoT) traces. However, these traces come at a massive computational cost. The Key-Value (KV) cache—the memory used to store past tokens to avoid recomputation—grows linearly with the length of these reasoning steps.

Standard KV cache compression methods often fail here for two reasons:

  1. Reasoning is non-linear: A token that appears "unimportant" based on current attention scores might be crucial for a self-correction or a logical leap ten steps later.
  2. Redundancy: Reasoning traces are often filled with "overthinking," loops, and repetitive self-verifications. Standard attention-based selection might waste memory budget on near-duplicate tokens.

Furthermore, many algorithmic "savings" in research papers don't translate to real-world speedups because the overhead of managing the compressed cache (scoring, evicting, etc.) offsets the gains.

Methods

The authors propose RoCoKV, which tackles these issues through a combination of algorithmic innovation and system-level co-design.

1. Uncertainty-Guided Adaptive Pruning

The core idea is that the model needs more context when it is "confused." RoCoKV measures uncertainty using the normalized entropy of the next-token probability distribution.

  • High Uncertainty: The model keeps a larger "relaxed" budget of tokens to explore alternatives.
  • Low Uncertainty (Confidence): The model applies aggressive "hard" pruning, as it is likely on a stable reasoning path.

2. Redundancy-Aware Token Scoring

To prevent the cache from being clogged with repetitive reasoning, RoCoKV introduces a lightweight redundancy penalty. It maintains a "recent context centroid"—a compact summary of the most recently generated keys. If a cached token is semantically too similar to this recent context, its attention score is penalized, encouraging the model to retain more diverse and informative tokens.

3. System Co-Design with vLLM

Unlike many methods that remain theoretical, RoCoKV is implemented as a drop-in vLLM plugin. The authors developed a fused three-phase CUDA kernel pipeline:

  • Phase A: Streams the KV cache once to compute approximate attention scores and redundancy penalties.
  • Phase B: Performs a fast, on-chip top-k selection.
  • Phase C: Executes exact sparse attention only on the selected tokens.

This design preserves vLLM’s paged memory layout and CUDA graph capture, ensuring that algorithmic reductions actually result in lower end-to-end latency.

Datasets

The researchers evaluated RoCoKV using DeepSeek-R1-Distill-Llama-8B and DeepSeek-R1-Distill-Qwen-7B across three rigorous reasoning benchmarks:

  • GSM8K: Grade school math word problems.
  • MATH500: Challenging high school competition math.
  • AIME25: The most difficult evaluated benchmark, featuring American Invitational Mathematics Examination problems.
  • Long Synthetic Benchmark: Used specifically to test throughput and latency at extreme context lengths.

Key Insights and Ideas

  • Uncertainty as a Proxy for Sensitivity: The authors observed that approximation errors in attention are far more damaging when the model is uncertain. As shown in Figure 1, the "flip rate" (how often the top token changes due to approximation) skyrockets as uncertainty increases.
Figure 1: Observation 1 - Attention approximation errors are more harmful at uncertain decoding steps.
  • The "Wrong" Path is the Long Path: Analysis revealed that very long reasoning traces are statistically more likely to result in incorrect answers (Figure 2). This suggests that "overthinking" is often a sign of a model being stuck in a loop, justifying aggressive redundancy pruning.
Observation 2: Long generations often correlate with incorrect answers.
  • Local vs. Global Redundancy: While previous methods tried to compute global pairwise similarities (expensive!), RoCoKV found that comparing tokens to a simple moving average of the recent context is a highly effective and much cheaper signal for reasoning tasks.

Key Results

RoCoKV consistently outperformed state-of-the-art baselines like RocketKV, R-KV, and RaaS, especially under tight memory budgets.

  • Accuracy: On MATH500 with the R1-Llama-8B model, RoCoKV outperformed RocketKV by over 46% at a budget of 74 tokens. On the grueling AIME25 benchmark, it maintained significantly higher accuracy than all competitors under constrained budgets.
  • Efficiency: When integrated into vLLM, RoCoKV achieved a 1.27× speedup and 38% higher throughput on AIME25 compared to the Full-KV baseline. On longer synthetic sequences, the speedup reached 1.43× with a 45% throughput boost.
  • Robustness: Ablation studies showed that both uncertainty-aware pruning and redundancy penalties are necessary; removing either significantly degrades performance on complex tasks like AIME25.

Limitations and Future Work

  • Hyperparameter Tuning: While the authors found the thresholds to be relatively stable, RoCoKV still relies on a few hyperparameters (uncertainty thresholds, redundancy window) that might require adjustment for vastly different model architectures.
  • Hardware Specifics: The current implementation uses manual vectorized loads. The authors suggest that future versions could leverage Hopper-class hardware features like the Tensor Memory Accelerator (TMA) for even greater efficiency.
  • Framework Support: Currently optimized for vLLM; extending this to other high-performance engines like SGLang is a noted direction for future work.

Summary updated

BibTeX
@misc{behnam2026rocokv,
  author = {Payman Behnam and Elaheh Sobhani and Saad Amin and Yahya Hassan and Daniyal Khan and Biswadeep Chakraborty and Tanish Patwa and Souvik Kundu and Alexey Tumanov},
  title = {{RoCoKV: Accelerating LLM Inference Serving through Uncertainty and Redundancy Aware KV Cache Compression}},
  year = {2026},
  eprint = {2611.25433},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.25433},
}
Figure