KVpop -- Key-Value Cache Compression with Predictive Online Pruning

Lukas Hauzenberger, Niklas Schmidinger, Anamaria-Roberta Hartl, David Stap, Thomas Schmied, Sebastian Böck, Günter Klambauer, Sepp Hochreiter

arXiv:2607.05061 · 2026-07-07 공개 · arXiv · PDF

kv-cache qwen3 memory-optimization compression aime autoregressive-decoding hmmt predictive-pruning

Abstract

Key-value (KV) cache growth is a major bottleneck in autoregressive decoding, as memory and bandwidth scale linearly with context length. Existing KV eviction methods often rely on static heuristics or proxy scores, which poorly track future token utility and cause brittle eviction as relevance shifts. To address this, we introduce KVpop, which learns a fixed-budget KV eviction policy by directly supervising the keep-or-drop decision. The scorer is trained against a novel future-attention target, computed efficiently without materializing dense attention maps. We further introduce a delayed memory-based scorer that, uniquely among learned eviction methods, defers scoring for a fixed number of steps to exploit near-future context. On AIME and HMMT mathematical reasoning, KVpop retains 98% of full-attention performance on Qwen3-4B at 75% KV cache compression and 97% at 88% compression, consistently outperforming established eviction baselines. Qwen3-8B shows even stronger results, reaching near-full teacher performance. These results show that supervising eviction with future-attention signals cuts memory costs while maintaining quality.

한국어 요약

한 줄 요약

KVpop은 미래 주의도를 기반으로 키-밸류 캐시를 학습적으로 압축하여, Qwen3-4B 및 Qwen3-8B에서 75~88% 압축률에서도 94~99%의 성능을 유지한다.

핵심 기여도

핵심 아이디어

기존 KV 캐시 제거 방법은 대부분 **정적 휴리스틱**(예: 슬라이딩 윈도우)이나 **현재 주의도**(attention score) 기반의 **온라인 스코어링**을 사용하지만, 이는 미래 토큰 유용성**(future token utility)**을 정확히 예측하지 못해 **불안정한 제거**(brittle eviction)를 초래한다. KVpop은 이 문제를 해결하기 위해, **미래 주의도를 기반으로 토큰 유지 여부를 감독 학습**하는 새로운 접근법을 제안한다.

구체적으로, KVpop은 각 토큰이 보호 윈도우**(protected window)**를 벗어난 후 받는 주의도를 기반으로 **스코어링 모듈**(scoring module)을 학습시킨다. 이는 **트랜스포즈 주의도**(transposed-attention)를 통해 계산되며, **밀집 주의도 매트릭스**(dense attention map)를 생성하지 않아 추론 성능에 영향을 주지 않는다. 또한, **지연 스코어링**(delayed scoring)을 도입하여, 토큰이 보호 윈도우 내에 있을 동안의 **근미래 문맥**(near-future context)을 수집해 제거 결정을 연기함으로써, 토큰의 **실질적 유용성**(real utility)을 더 정확히 파악한다.

기술적 접근법

주요 결과

의의 및 한계

KVpop은 **감독 학습을 통한 토큰 제거 정책**(supervised eviction policy)을 도입함으로써, 기존 휴리스틱 및 학습 기반 방법보다 **더 정확하고 안정적인 캐시 압축**을 가능하게 한다. 특히, **트랜스포즈 주의도 기반 학습**은 추론 시 오버헤드 없이 미래 토큰 유용성을 예측할 수 있어, **장문 토큰 생성**(long-generation decoding) 시 메모리 효율을 크게 개선한다. 또한, **지연 스코어링**(delayed scoring)은 토큰의 **실질적 유용성**(real utility)을 더 정확히 파악할 수 있도록 도와준다.

하지만, KVpop은 기존 Transformer 아키텍처에 사후 학습(post-training retrofit) 방식으로 적용되며, 전체 캐시 아키텍처를 처음부터 학