[論文レビュー] RelayCaching: Accelerating LLM Collaboration via Decoding KV Cache Reuse
RelayCaching は、上流エージェントのデコーディング段階KVキャッシュを下流のプレフィル段階で再利用する訓練不要の推論手法で、中間層トークンの選択的 rectification により KV キャッシュ再利用を80%超、TTFT を最大4.7×削減しつつ精度を維持します。
The increasing complexity of AI tasks has shifted the paradigm from monolithic models toward multi-agent large language model (LLM) systems. However, these collaborative architectures introduce a critical bottleneck: redundant prefill computation for shared content generated by previous agents, which significantly increases KV cache memory usage and time-to-first-token (TTFT). While various KV cache methods have been proposed to mitigate prefill redundancy, they either fail to maintain accuracy on agent-generated outputs or exhibit low reuse rates due to rigid constraints. We present RelayCaching, a training-free inference method that directly reuses decoding phase KV caches from previous agents in subsequent prefill phases. Our key insight is that KV caches for identical content are highly consistent across phases, while prefix-induced deviations are sparse and localized within a limited range of layers and token positions. By selectively recomputing KV caches at these positions, RelayCaching preserves model accuracy with minimal overhead, yielding a superior accuracy-efficiency trade-off over existing methods. Experiments on diverse collaborative LLM tasks spanning mathematical reasoning, general knowledge, and code generation demonstrate that RelayCaching achieves over 80% KV cache reuse, reduces TTFT by up to $4.7 imes$ compared to the standard pipeline, all with negligible accuracy degradation.
研究の動機と目的
- マルチエージェント LLM パイプラインにおいて、階層的共通内容の蓄積再計算による冗長なプレフィル計算の削減を動機づける。
- デコード時の KV キャッシュと完全プレフィルキャッシュが再利用時にどのように一致するかを特徴づける。
- 訓練不要な方法を開発し、精度を維持するために KV キャッシュを選択的に rectify する。
- 推論、コーディング、知識ベンチマーク全体で RelayCaching の効率向上と精度保持を実証する。
提案手法
- デコードと完全プレフィルキャッシュの階層およびトークン間で、マクロ〜ミクロレベルの KV キャッシュの整合性を分析する。
- U字型の層別類似度パターンと、スパースな層間相関トークン逸脱を特定する。
- 臨時的な層範囲プロファイラを設計し、重要な中間層レンジを特定する検知レイヤを設け、トークン rectification を行う。
- 逸脱に基づく基準と影響度に基づく基準を組み合わせたトークンセレクターを導入し、rectify するスパースなトークン集合を決定する。
- RelayCaching を二部構成のシステムとして実装する:層範囲プロファイラとトークンセレクター。プレフィル中の全再計算を行わず、選択的再計算を可能にする。
実験結果
リサーチクエスチョン
- RQ1RQ1: RelayCaching は full prefilling と同等の生成品質を維持しつつ、デコード KV キャッシュを再利用できるか。
- RQ2RQ2: マルチエージェント環境で、KV キャッシュ再利用率と TTFT スピードアップというどの程度の効率向上を達成できるか。
- RQ3RQ3: 層範囲プロファイラとトークンセレクターは、精度と効率のトレードオフにどう寄与するか。
- RQ4RQ4: RelayCaching は主要なハイパーパラメータやタスク文脈に対してどれほど敏感か。
主な発見
- デコード KV キャッシュは、プレフィルキャッシュの prefix 変化にも高い整合性を保ち、値のコサイン類似度が主な逸脱信号である。
- 中間層は U字型の類似性プロファイルで最大の逸脱を示し、下流の生成品質を支配する。
- トークン単位の逸脱はスパースで層間相関が強く、選択的 rectification を可能にする。
- RelayCaching は複数のタスクで 80% 超の KV キャッシュ再利用と最大 4.7× の TTFT 削減を達成し、精度は full prefilling に近い水準を維持する。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。