NeurIPS 2026QuestionsPapersAreasAboutMarkdown

PatchKV: Weight Space Compensation of KV Cache

Chanryeol Lee, Chanhyuk Lee, Yeonwoo Choi, Donggyun Kim, Seunghoon Hong

NeurIPS page · OpenReview · alphaXiv · Open on the map

Category: Efficient LLM Inference & Training › KV Cache Optimization · Type: new method · Keywords: KV cache compression, weight space compensation, ridge regression, long-context inference, LLM efficiency

Areas: Memory › Model Memory Optimization › KV Cache Optimization; Long Context › Long-context mechanisms › KV cache eviction

Summary

PatchKV is a training-free framework that compensates compressed KV caches by adding a context-specific weight patch derived via ridge regression, improving long-context LLM inference performance.

Explained to a 5-year-old

Big computer brains that read long stories need to remember everything, which uses a lot of memory. To save memory, they sometimes forget some parts, but then their answers become less accurate. The researchers added a small extra helper that stores important parts of the story in the brain’s weights. This helper is calculated once when the story is loaded and then used for all later questions. Because of this helper, the brain can keep its answers accurate while using less memory.

Explained to a 5-year-old, longer

When a computer brain reads a very long story, it has to remember every word, which takes up a lot of space. To avoid using too much space, the brain can forget some words, but then it might not answer questions correctly. The researchers noticed that even when the brain forgets words, it still keeps some information in its internal weights. They created a way to add a special small memory that captures the most important parts of the story. This special memory is calculated once when the story is first loaded, like a quick calculation. After that, the brain can use this memory for any questions about the story without needing to redo the calculation. The extra memory does not change how the brain works during normal use, so it does not slow down the answers. It works like a shortcut that helps the brain remember key ideas while keeping the rest of the story trimmed. This method can be used with any existing way of compressing the brain’s memory, making it more flexible. By adding this shortcut, the brain can answer questions about long stories more accurately even when it uses less overall memory. The researchers tested it on many different tasks, like reading comprehension and math problems, and it helped each time. Overall, this approach lets people run big computer brains on long texts without needing huge amounts of memory.

For a technical reader

PatchKV pairs a standard compressed KV cache with a context-specific weight patch computed via ridge regression, aligning block-wise activations between full and compressed caches. The patch is merged into the model once, leaving the forward graph and per-query cost unchanged, making it transparent to downstream inference. It can be applied to any existing compression scheme, providing a plug-and-play improvement for long-context LLM inference. The authors evaluated it on QA and math benchmarks across three model families, showing consistent gains over uncompressed or aggressively compressed caches.

Problem

Long-context inference with LLMs requires storing a key-value cache that grows linearly with context length, causing high memory usage. Existing compression methods degrade performance sharply when aggressively reducing cache size.

Method

The approach pairs a standard compressed KV cache with a context-specific weight patch computed via ridge regression, aligning block-wise activations between full and compressed caches. The patch is merged into the model once, leaving the forward graph and per-query cost unchanged. This compensation is applied at context-loading time and reused for downstream queries.

Results

The approach consistently improves performance across the evaluated benchmarks, achieving better results than uncompressed or aggressively compressed caches.

Contributions

A training-free weight-patch compensation technique that can be paired with any compressed KV cache, derived via ridge regression, and that preserves inference cost while enhancing accuracy on long contexts.

Practical relevance

Enables memory-efficient long-context LLM inference on existing hardware without sacrificing accuracy.

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