言語モデルは自身の注意を制御できる
Language Models Can Control Their Own Attention
September 2, 2026
著者: Namgyu Ho, Huzama Ahmad, Woosung Koh, Se-Young Yun, Tal Schuster, Cicero Nogueira dos Santos
cs.AI
要旨
言語モデルはそのアテンションの大部分をコンテキストのごく一部に費やすにもかかわらず、重要ないくつかのトークンを見つけるためにKVキャッシュ全体を読み取る。ユーザーが100万トークンからなる会話における過去の詳細について質問した場合、グローバルアテンション層は応答の各トークンを生成するたびにコンテキスト全体を走査しなければならない。有力なアプローチとして、軽量なプロキシスコアにより関連トークンを事前選択することでこのコストを軽減する手法があるが、このような外因的スコアリングは依然として各ステップでO(N)のコストを要する。我々は、モデルはコンテキストのどの部分が関連するかを既に知っているのではないか、という単純な問いに動機づけられた内因的アプローチをとる。この目的のため、我々は宣言的アテンション(DA)を導入する。これは、モデルが思考連鎖の中でどこにアテンションを向ける必要があるかを宣言させるプロトコルであり、生成を<global>(コンテキスト全体)、<focus>(特定の領域)、<local>(直近の出力のみ)の3つのモードに分割する。推論エンジンはこれらの宣言をツール呼び出しのように解析し、KVキャッシュ読み取りの大部分をスキップする。15の長文脈タスクにおけるゼロショット評価では、既製モデル(Gemma-4-31B、Qwen-3.6-27B)上のDAは、デコード中にアテンションされるトークン総数をそれぞれ52.0%、31.1%削減し、精度低下は1.27pp、2.75ppと小幅であり、モデル規模の増大に伴って縮小する。DAはスパースアテンションの新たな軸を切り開くものであり、将来の研究が探求できる学習ベース手法の下でのさらなる可能性を有する。
English
Language models spend most of their attention on a small fraction of context, yet they read the entire KV cache to find the few tokens that matter. If the user asks about a previous detail in a 1M-token conversation, global attention layers must scan the full context to generate each token of the reply. A prominent approach mitigates this cost by pre-selecting relevant tokens via lightweight proxy scores, but this extrinsic scoring still incurs O(N) per step. We take an intrinsic approach motivated by the simple question: wouldn't the model already know which parts of the context are relevant? To this end, we introduce Declarative Attention (DA), a protocol that elicits the model to declare where it needs to attend within its chain-of-thought, partitioning generation into three modes: <global> (full context), <focus> (a specific region), and <local> (recent output only). The inference engine parses these declarations like tool calls and skips most of the KV cache read. Under zero-shot evaluation across 15 long-context tasks, DA on off-the-shelf models (Gemma-4-31B, Qwen-3.6-27B) significantly reduces total attended tokens during decoding (52.0%, 31.1%) with modest accuracy drops (1.27pp, 2.75pp) that shrink with model scale. DA unlocks a new axis of sparse attention, with further potential under training-based methods that future work can explore.