Skip to main content
QUICK REVIEW

[論文レビュー] Fast KV Compaction via Attention Matching

Zweiger, Adam, Xinghong Fu|arXiv (Cornell University)|Feb 18, 2026
Natural Language Processing TechniquesComputer Science被引用数 0
ひとこと要約

論文はAttention Matchingを提示する。高速なワンショットKV-cache圧縮法で、コンパクトなキー、バイアス、値を構築して注意出力と質量を再現し、最大で50倍の圧縮を実現しつつ品質低下を最小限に抑える。

ABSTRACT

Scaling language models to long contexts is often bottlenecked by the size of the key-value (KV) cache. In deployed settings, long contexts are typically managed through compaction in token space via summarization. However, summarization can be highly lossy, substantially harming downstream performance. Recent work on Cartridges has shown that it is possible to train highly compact KV caches in latent space that closely match full-context performance, but at the cost of slow and expensive end-to-end optimization. This work describes an approach for fast context compaction in latent space through Attention Matching, which constructs compact keys and values to reproduce attention outputs and preserve attention mass at a per-KV-head level. We show that this formulation naturally decomposes into simple subproblems, some of which admit efficient closed-form solutions. Within this framework, we develop a family of methods that significantly push the Pareto frontier of compaction time versus quality, achieving up to 50x compaction in seconds on some datasets with little quality loss.

研究の動機と目的

  • 長いコンテキストを持つトランスフォーマのKVキャッシュサイズを、性能の大幅な低下なしに削減する。
  • コンテキスト圧縮のための勾配ベースの潜在キャッシュ訓練の迅速な代替手段を提供する。
  • 圧縮済みプレフィックスを新規トークンまたは固定トークンと連結する際の互換性を保つ。

提案手法

  • 圧縮キャッシュ(C_k, C_v)とトークンごとのバイアス(β)を用いて、KVキャッシュの圧縮を注意出力と注意マスの一致として定式化する。
  • 問題を分解して部分問題に対する閉形式解を得られるようにし、圧縮時のエンドツーエンド勾配最適化を回避する。
  • 反復事前埋め込み、コンテキスト事前埋め込み、自己学習、またはオンポリシー・クエリから参照クエリQ_refを構築して圧縮をガイドする。
  • C_kを固定した状態で非負最小二乗法(NNLS)と通常最小二乗法でβとC_vを解く。
  • C_kを元のキーのサブセットとして選択し、このサブセットを選ぶ方法として最も高い注意キー法または正交マッチング Pursuitを対比して使用する。
  • 非一様ヘッド予算とチャンク化(チャンクごとの圧縮)をサポートして長いコンテキストへスケールする。
Figure 1 : Accuracy vs. Compaction Time Trade-off (Qwen3-4B; QuALITY). We compare downstream QA accuracy ( $n=894$ ) after compaction, plotted against the average wall-clock time required to compact a context (seconds, log-scale) using a single H100 GPU at a fixed 50 $\times$ compaction ratio. Our a
Figure 1 : Accuracy vs. Compaction Time Trade-off (Qwen3-4B; QuALITY). We compare downstream QA accuracy ( $n=894$ ) after compaction, plotted against the average wall-clock time required to compact a context (seconds, log-scale) using a single H100 GPU at a fixed 50 $\times$ compaction ratio. Our a

実験結果

リサーチクエスチョン

  • RQ1Attention Matchingは小さな潜在キャッシュを用いて、全KVキャッシュの注意出力と注意マスを再現できるか。
  • RQ2参照クエリサンプリング、キー選択戦略、バイアスといった設計選択はKV圧縮の速度と精度のトレードオフにどう影響するか。
  • RQ3非一様なヘッド圧縮は有利か、モデルごとに事前計算できるか。
  • RQ4チャンク圧縮は長いコンテキストタスクやハイブリッド注意モデルで性能にどう影響するか。

主な発見

  • Attention Matchingの手法は速度と品質のパレート境界を描き、トークン選択に基づくベースラインを上回り、Cartridgesと比較して多くの領域で優れた性能を示し、かつ桁違いに高速である。
  • AM-OMPおよびAM-HighestAttnKeysの変種は、長いコンテキストのQAベンチマークで小さな品質低下で最大50倍の圧縮を達成する。
  • ヘッド予算を非一様に設定する(ヘッド感度曲線を通じて学習)と性能が大幅に向上し、モデルごとに事前計算可能。
  • 自己学習、反復前埋め込み、オンポリシークエリを使用すると、圧縮をモデル挙動に合わせて整列させ、下流の精度を改善できる。
  • AM法はスライディングウィンドウモデルでも有効であり、グローバル注意層を圧縮する場合にはやや保守的な圧縮比が必要になる場面がある。
Figure 2 : Head sensitivity curves in Qwen3-4B. We fix all KV heads to a baseline compaction ratio of $0.05\times$ and vary the compaction ratio of a single head. We report the change in loss relative to the baseline (lower is better) as a function of the varied head’s compaction ratio. Curves are a
Figure 2 : Head sensitivity curves in Qwen3-4B. We fix all KV heads to a baseline compaction ratio of $0.05\times$ and vary the compaction ratio of a single head. We report the change in loss relative to the baseline (lower is better) as a function of the varied head’s compaction ratio. Curves are a

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。