Predicting Future Utility: Global Combinatorial Optimization for Task-Agnostic KV Cache Eviction

Ziyao Tang, Pengkun Jiao, Xinhang Chen, Wei Liu, Shiyong Li, Jingjing Chen

TL;DR

Researchers have developed LU-KV, a novel framework that treats LLM memory allocation as a strategic investment problem. By shifting from "instantaneous" attention scores to a "long-horizon marginal utility" metric, LU-KV reduces KV cache size by 80% with almost no performance loss, significantly cutting GPU memory usage and latency for long-context tasks.

What Problem Does This Paper Address?

As Large Language Models (LLMs) handle increasingly long sequences, they run into a massive memory bottleneck: the Key-Value (KV) cache. This cache stores previous token representations to avoid redundant calculations, but its size grows linearly with sequence length. To save memory, we use "eviction" strategies to throw away less important tokens.

The current state-of-the-art methods (like H2O or SnapKV) rely on "instantaneous heuristics"—they assume that if a token has a high attention score now, it will be important later. However, the authors identify a fundamental flaw: different attention heads have different "predictive fidelities." Some heads focus on transient noise, while others capture enduring semantic anchors. Blindly giving more memory budget to heads just because they have high current scores leads to "loss bursts" and suboptimal performance.

Methods

The authors propose Long-horizon Utility KV (LU-KV), which moves away from absolute scores and toward marginal utility.

  1. Oracle Importance: They define a ground-truth metric that measures a token's maximum potential contribution over a future decoding window. This tells us which tokens actually matter for long-term generation.
  2. Global Combinatorial Optimization: They formulate budget allocation across all heads and layers as an optimization problem. Because this problem is naturally non-convex (and thus hard to solve), they use a convex-hull relaxation (via the Pool Adjacent Violators Algorithm) and a greedy solver to find near-optimal allocations.
  3. Offline Profiling: Since you can't see the future during real-time inference, they discovered a "structural property" of LLMs: individual heads have consistent utility profiles across different tasks. They pre-compute these profiles using a synthetic dataset (an AI-generated Chinese novel) to create a lookup table. At runtime, the system simply looks up the optimal budget for each head based on the desired compression ratio.

Datasets

The researchers evaluated LU-KV across several demanding benchmarks:

  • LongBench: A comprehensive suite of 16 datasets covering summarization, Q&A, and code completion.
  • RULER: A "stress test" benchmark designed to evaluate retrieval robustness in extreme contexts (up to 128k tokens).
  • Profiling Data: They used a synthetic 4,000-token Chinese novel and a set of English SAT reading excerpts to prove that their offline profiling is "task-agnostic" and transfers well across languages and domains.

Key Insights and Ideas

  • Memory as a Strategic Investment: The paper posits that adding memory to a head where the metric is "noisy" yields diminishing returns. Conversely, in heads where the metric is precise, a small "unit investment" in budget yields high generative quality.
  • The "Optimality Gap": The authors prove that the gap between heuristic scores and true "Oracle Importance" varies wildly between heads. LU-KV is the first method to explicitly quantify and optimize for this gap.
  • Structural Consistency: Perhaps the most surprising finding is that the "utility curve" of an attention head is remarkably stable. A head that is important for a Chinese novel is likely also important for a Python code repository, allowing for effective offline profiling.

Key Results

  • 80% Cache Reduction: LU-KV can evict 80% of the KV cache while maintaining performance levels close to the "Full-KV" (no eviction) baseline.
  • Superior Accuracy: On the RULER benchmark (Mistral-7B), LU-KV achieved 69.98% average accuracy at 80% compression, while standard "Uniform" allocation collapsed to 29.53%.
  • Efficiency Gains: By reducing the cache, LU-KV significantly lowers peak GPU memory usage and decreases the Time To First Token (TTFT) latency, making long-context LLMs much more practical to deploy on consumer-grade hardware.
  • Metric Agnostic: LU-KV isn't a new scoring metric itself; it's an allocation layer that makes existing metrics (like SnapKV or KeyDiff) perform better by distributing their budget more intelligently.

Limitations and Future Work

  • Profiling Sensitivity: While the authors show good transferability, the "Impact Statement" notes that aggressive compression could still discard rare but vital context if the deployment scenario differs too wildly from the profiling setup.
  • Fixed Sparsity: The current implementation uses a static lookup table based on a target global compression ratio. Future work could explore more dynamic, "on-the-fly" adjustments to the budget as the conversation evolves.
  • Safety and Reliability: The authors caution that KV cache eviction should not be used as a substitute for safety or privacy checks, as discarding context can occasionally lead to unpredictable model behavior.

Summary updated

BibTeX
@inproceedings{tang2026predicting,
  author = {Ziyao Tang and Pengkun Jiao and Xinhang Chen and Wei Liu and Shiyong Li and Jingjing Chen},
  title = {{Predicting Future Utility: Global Combinatorial Optimization for Task-Agnostic KV Cache Eviction}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=FQLxcBsKIb},
}
Figure