NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Task-Aware KV Cache Compression for LLM Agents via Utility-Driven Step Pruning

Yusen Wu, Yefan Wang, Jia Yee Tan, Guangyuan Dong, Shuang Chen, Jing Yang, Rongfeng Guo, Por L Yee, Yongtai Liu

NeurIPS page · Open on the map

Category: Efficient LLM Inference & Training › KV Cache Optimization · Type: new method · Keywords: KV cache compression, LLM agents, step-level retention, utility-driven pruning, AgentBench, AlfWorld

Areas: LLM Reasoning › Efficient Reasoning › KV Cache Compression; AI Agents › Agent Optimization and Evaluation › KV Cache Optimization

Summary

TaskKV introduces a streaming step-level KV cache compression policy that uses signed directional utility labels and a residual scorer to retain decisive steps, achieving near-full success with only 20% of the cache budget.

Explained to a 5-year-old

Big computer programs that help with tasks remember information in a place called a cache. When they do many steps, the cache gets too big, so we need to make it smaller. The new idea looks at each step and decides if it was helpful or not, using a simple label. It also uses a tiny correction to keep the important parts and a rule that says "if we’re not sure, keep everything." This way the programs still work well even when the cache is only a little bit of its original size.

Explained to a 5-year-old, longer

Big computer programs that help with tasks are called LLM agents. They keep a copy of what they have seen in a place called a cache. When they do many steps, the cache can become very large and take up a lot of memory. To save memory, we need to make the cache smaller without losing the important information. The new idea looks at each step the agent takes and decides whether that step was useful or not. It gives a little label that says if the step helped the agent or just confused it. Then it uses a simple correction to keep only the useful parts and remove the noisy ones. There is also a rule that checks how confident the system is about which steps are useful. If the system is not confident, it falls back to keeping all the steps, just to be safe. This way the agent still works well even when the cache is only a small fraction of its original size. The method was tested on two sets of tasks that simulate real-world planning problems. It kept almost as much success as using the full cache while using only 20% of the memory.

For a technical reader

TaskKV is a streaming step-level KV cache compression policy for long-horizon LLM agents that decides which cached entries to retain based on a signed directional utility label derived from the first-order change in action likelihood. It also employs a structured residual scorer that treats attention mass and intent alignment as fixed priors and learns only a denoising correction, converging within 500 trajectories. An entropy-based regime classifier monitors confidence and falls back to contiguous retention when the scorer cannot reliably rank steps. Evaluated on AgentBench and AlfWorld with a 20% KV budget, TaskKV preserves roughly 87-89% of full-cache success, improving over SnapKV by 5.0-7.9 SR points and over a strong heuristic by 2.9-7.3 points. On dense tasks, the gains come from detecting when utility pruning should be disabled.

Problem

Compressing KV caches for long-horizon LLM agents often discards important instructions while retaining repetitive errors, limiting performance under memory constraints. Existing attention-based compression methods cannot reliably distinguish helpful steps from confusing distractors.

Method

The approach derives a signed directional utility label from the first-order change in action likelihood to differentiate helpful steps from distractors. It also employs a structured residual scorer that treats attention mass and intent alignment as priors and learns only a denoising correction, converging with 500 trajectories, and an entropy-based regime classifier that falls back to contiguous retention when confidence is low.

Results

With a 20% KV budget, the approach retains about 87-89% of full-cache success, improving over SnapKV by 5.0-7.9 SR points and over a strong heuristic by 2.9-7.3 points; on dense tasks, gains arise from detecting when utility pruning should be disabled.

Contributions

The paper contributes a signed directional utility labeling scheme, a structured residual scorer that learns only a denoising correction, and an entropy-based regime classifier for adaptive retention. Together they enable step-level KV cache compression that preserves decisive instructions while discarding repetitive errors.

Research questions this paper is counted under

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction