ChatPaper.aiChatPaper

EpiCache: 長文会話型質問応答のためのエピソード的KVキャッシュ管理

EpiCache: Episodic KV Cache Management for Long Conversational Question Answering

September 22, 2025
著者: Minsoo Kim, Arnav Kundu, Han-Byul Kim, Richa Dixit, Minsik Cho
cs.AI

要旨

大規模言語モデル(LLM)の最近の進展により、コンテキスト長が拡張され、アシスタントが長い履歴を維持して一貫性のあるパーソナライズされた応答を生成できるようになりました。しかし、この能力はKey-Value(KV)キャッシュに依存しており、そのメモリ使用量は対話の長さに比例して線形に増加し、厳しいリソース制約下では急速に支配的になります。このオーバーヘッドを削減するための活発な研究分野がKVキャッシュ圧縮であり、キャッシュサイズを制限しながら精度を維持することを目指しています。しかし、既存の手法には2つの主要な制限があります:(i)フルコンテキストのプリフィル後にエントリを削除すると、無制限のピークメモリが発生し、(ii)クエリ依存の削除はキャッシュを単一のクエリに限定し、マルチターン会話での精度が低下します。本論文では、固定メモリ予算下での長い会話型質問応答(LongConvQA)のためのトレーニング不要のKVキャッシュ管理フレームワークであるEpiCacheを紹介します。EpiCacheは、ブロック単位のプリフィルを通じてキャッシュの成長を制限し、エピソード型KV圧縮によりトピック関連のコンテキストを保持します。これは、会話履歴を一貫性のあるエピソードにクラスタリングし、エピソード固有のKVキャッシュ削除を適用します。さらに、各レイヤーの削除に対する感度を測定し、メモリ予算をレイヤー間で適応的に配分する戦略を設計します。3つのLongConvQAベンチマークにおいて、EpiCacheは最近のベースラインと比較して最大40%の精度向上を達成し、4-6倍の圧縮下でほぼ完全なKV精度を維持し、レイテンシとメモリを最大2.4倍および3.5倍削減し、厳しいリソース制約下での効率的なマルチターンインタラクションを可能にします。
English
Recent advances in large language models (LLMs) have extended context lengths, enabling assistants to sustain long histories for coherent, personalized responses. This ability, however, hinges on Key-Value (KV) caching, whose memory grows linearly with dialogue length and quickly dominates under strict resource constraints. An active line of research for reducing this overhead is KV cache compression, which seeks to limit cache size while preserving accuracy. Yet existing methods face two major limitations: (i) evicting entries after full-context prefill causes unbounded peak memory, and (ii) query-dependent eviction narrows the cache to a single query, leading to degraded accuracy in multi-turn conversations. We introduce EpiCache, a training-free KV cache management framework for long conversational question answering (LongConvQA) under fixed memory budgets. EpiCache bounds cache growth through block-wise prefill and preserves topic-relevant context via episodic KV compression, which clusters conversation history into coherent episodes and applies episode-specific KV cache eviction. We further design an adaptive layer-wise budget allocation strategy that measures each layer's sensitivity to eviction and distributes the memory budget across layers accordingly. Across three LongConvQA benchmarks, EpiCache improves accuracy by up to 40% over recent baselines, sustains near-full KV accuracy under 4-6x compression, and reduces latency and memory by up to 2.4x and 3.5x, thereby enabling efficient multi-turn interaction under strict resource constraints.
PDF183September 23, 2025