InfoKV:信息感知的KV缓存压缩用于长推理
阅读原文· arxiv.org大语言模型推理能力提升导致KV缓存快速增长,现有压缩方法仅依赖注意力权重,忽略了预测不确定性等信息论信号。本文提出Forward Influence度量,从前瞻视角衡量压缩token对未来上下文的影响。分析发现,高注意力得分token主要影响邻近上下文,而高预测不确定性token对远距离未来上下文影响更强。基于此提出InfoKV框架,融合token级预测不确定性与层表示演化,在推理时将熵分数与注意力分数结合。在Llama-3.1、Llama-3.2和DeepSeek-R1上的长上下文推理基准测试中,InfoKV在长预填充和解码场景下均优于现有基于注意力的KV压缩方法。
Reasoning capability has advanced rapidly in large language models (LLMs), leading to an increasing size of key-value (KV) cache in both prefilling and decoding stages. Existing KV cache compression methods mainly rely on attention weights to estimate token importance. While attention effectively captures contextual relevance, it overlooks complementary information-theoretic signals related to predictive uncertainty and token informativeness. In this paper, we revisit token importance from a forward-looking perspective and introduce Forward Influence, a metric that measures how compressed tokens affect future contexts. Our analysis reveals that tokens selected by attention scores mainly influence nearby contexts, whereas tokens associated with high predictive uncertainty exhibit substantially stronger influence on distant future contexts. Based on the observation, we propose InfoKV, an entropy-aware KV cache compression framework that incorporates information-theoretic signals. It combines token-level predictive uncertainty with layer-wise representation evolution and integrates the resulting entropy scores with attention scores during reasoning. Experiments on long-context reasoning benchmarks with Llama-3.1, Llama-3.2, and DeepSeek-R1 demonstrate that InfoKV consistently outperforms existing attention-based KV compression methods in both long prefilling and decoding scenarios.