用信息论优化大模型长文本推理的缓存压缩,提升远距离上下文预测能力。
Information-Aware KV Cache Compression for Long Reasoning

- 引入前向影响度量,结合熵与注意力评估令牌重要性。
- 在多个长上下文任务上,相比传统方法准确率提升3%-8%。
- 适合需要高效长序列推理的科研、法律等高精度场景。
大语言模型推理能力快速进步,导致预填充和解码阶段的键值(KV)缓存规模持续增大。现有缓存压缩方法主要依赖注意力权重判断令牌重要性,但仅关注上下文相关性,忽略了与预测不确定性及令牌信息量相关的信源理论信号。本文从前瞻性视角重新审视令牌重要性,提出“前向影响”度量,用于评估压缩后令牌对后续上下文的影响。分析发现,注意力得分高的令牌主要影响邻近上下文,而高预测不确定性的令牌则显著影响遥远未来上下文。基于此,我们提出InfoKV——一种融合信息论信号的熵感知缓存压缩框架,将令牌级预测不确定性与层间表征演化结合,生成熵分值并与注意力分数融合用于推理。在Llama-3.1、Llama-3.2和DeepSeek-R1上的长上下文推理基准测试表明,InfoKV在长预填充和解码场景下均显著优于现有基于注意力的压缩方法。
原文摘要 · Abstract (English)
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 \textit{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 \textbf{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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。