論文解説
Coarse Semantic Blocks for Efficient Training-Free Sparse Attention
学習なしでクエリごとにブロックを選び長文脈のプリフィルを速くする
- 課題 学習なしのスパースアテンションでは、クエリごとに参照するブロックを選ぶと、選択の計算がプリフィルで重くなります。さらに不規則な選択はGPUで速く動きにくいです。
- 手法 本研究は、プロンプトのキーを類似度で意味ブロックにまとめ、重心の点数で各クエリにブロックを選ばせます。同じブロックを選んだクエリはまとめて計算します。
- 結果 Qwen3.5-4Bと35B-A3Bの1Mプリフィルは、密なアテンションより2.9から3.0倍速くなりました。35B-A3BはRULER-5で1Mまで密なアテンションに近い精度を保ちました。

Figure 2 : Keys are clustered separately for each layer and KV head. The query heads that share a KV head score the centroids separately ( rh), and the sum of their scores ( s) selects the clusters. Each head attends to the original KV of the selected clusters, together with recent tokens Dt, under a causal mask. Only positions at or before the query contribute to the attention sum.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの3ページ目から図の部分を抽出しています。学習なしスパースアテンションが止まる場所
長い文脈では、アテンションがプリフィルとデコードの両方で高くつきます。スパースアテンションは各クエリが参照するトークンを絞りますが、選択とキーや値の準備にかかる費用が、節約できる計算より小さいときにだけ速くなります。学習済みのインデクサーを使うDSA、MSA、QSAは、インデクサーとモデルを一緒に学習することで少ないトークン予算で済むようにしています。一方、学習なしの手法では、クエリごとに重要度を見積もるとプリフィルの費用がかさみます。さらに、不規則な選択はGPU上で効率よく実行しにくいという問題があります。Nawrotらは、学習なしの手法をプリフィルのFLOPsやデコードのメモリトラフィックで比較しており、細かいクエリごとの選択は重要度の見積もりが高価で、利用できるカーネルも不規則なスパース性に苦労すると指摘しています。
既存手法は、連続したブロックを選んだり、近傍のクエリ同士で選択を共有したりして費用を抑えてきました。ただし連続ブロックに含まれるトークンは互いに無関係なことが多く、共有選択では個々のクエリが必要とするブロックを逃すことがあります。共有選択では、グループ内のクエリのスコアをまとめて一組のブロックを選ぶため、この取りこぼしが起きやすくなります。また、キーをクラスタリングする手法もありますが、ClusterKVやTacticは密なプリフィルの際に索引を作り、そのあとのデコードにだけ使います。つまり、プリフィル自体は索引を使わずに進むため、そこが速くなりにくい部分になります。
著者らは、学習なしでもクエリごとに自分のブロックを選ぶスパースなプリフィルが、密なアテンションより大きく速くなりうると示そうとしています。そのため、この研究の問いは、クエリごとに自分のブロックを選びながら、プリフィルも速く動かせるかどうかになります。著者らの方法は、プロンプトのキーを意味ブロックにまとめ、重心をスコアリングして選ぶことで、この問いに答えようとしています。その際、同じブロックを選んだクエリをまとめて処理するため、GPUがオンチップメモリ上のKVデータを再利用でき、各クエリのブロック選択は保たれます。
キーを意味ブロックにまとめ、重心で選ぶ
本手法では、プロンプトのキーを位置ではなく類似度で束ね、一緒に必要になりやすいトークンを同じブロックに入れます。各層とKVヘッドごとに、正規化したキーのサンプルへspherical k-meansを行い、単位ノルムの重心µ1からµCを求めます。各キーは最も近い重心のブロックに割り当てられ、そのブロックの位置集合がBcになります。目標の平均ブロックサイズuからクラスタ数はおおよそC=L/uで決まり、同じブロックのトークンは元の位置に関係なく散らばるため、著者らはブロックのキーと値を連続して格納します。この格納方法により、ブロック単位の読み出しが効率よくできるようになります。
選択では、同じGQAグループのクエリヘッドごとに、重心へのソフトマックスのスコアrh(c)を計算し、そのグループ内で合計します。合計した点数は、残りのブロック内トークン数|B′c,t|に応じて割り引かれ、大きなクラスタの点数が抑えられます。温度τは0.1、サイズペナルティの指数βは0.25です。点数の高いクラスタから順に、トークン数の合計が予算Kに達するまで全トークンを選び、その集合にアテンションを計算します。この選択はクエリ位置ごとに行われ、同じGQAグループのヘッドで共有されます。アテンションは元のクエリ、キー、値で計算され、Stを全体にすると密なアテンションに一致します。
プリフィルでは、索引をプロンプト全体のキーから各層ごとに作り、プロンプトのクエリを連続したチャンクに分けて処理します。近い位置のクエリでも選ぶブロックが異なるため、FlashAttention-3のように隣接クエリでKVタイルを再利用すると、選ばれていないクエリにもブロックの計算が及んでしまいます。そこで著者らは、各KVブロックを選んだクエリをまとめて計算するKV-outer方式を採用し、各クエリの出力はsoftmaxの正規化項で結合します。Qwen3.5-4Bの512Kでは、この方式は隣接クエリの選択ブロックの和を処理する方式より2.6×速くなりました。プロンプトの先頭付近では選択の手間が見合わないため密なアテンションを使い、デコードでは同じ索引を使って、生成トークンは選択せずに含めます。
つまり、同じ索引をプリフィルとデコードの両方に使えるため、索引の構築費用を一度で済ませられます。
速度向上と精度の保たれ方
Qwen3.5-4BとQwen3.5-35B-A3Bでは、512Kのモデル全体のプリフィルが2.3–2.4倍、デコードが1.7–2.0倍速くなりました。長い文脈ほど差が広がり、1Mではプリフィルが2.9–3.0倍、デコードが2.3–2.9倍になりました。ただし、アテンション層だけを見ると4Bのプリフィルは3.9–4.3倍速く、残りの層は変えていないためモデル全体の伸びは小さくなります。4Bの1Mでは、プリフィルが密なアテンションの144.1秒から提案手法の49.3秒になりました。Figure 4の内訳では、索引の構築から選択、ギャザー、マージまでで約1.8秒かかり、アテンションで約25秒が節約されています。
精度については、35B-A3BがRULER-5では1Mまで、LongBench-v2全体とMRCRでは256Kまで密なアテンションに近い結果でした。4Bは多重キー検索で落ちやすく、1MのRULER-5は密な63.2に対し提案手法が55.2です。4Bの精度低下は主に多重キー検索に出ていて、多値検索やHotpotQAは長さによらず密なアテンションに近いままでした。4Bは、512Kでの遅延がほぼ同じQwen3.5-2Bより、RULER-5、MRCR-8、LongBench-v2のいずれでも精度が高くなりました。
位置ベースブロックとの比較では、ブロックを大きくして共有選択にすると速くなる一方で精度が落ちました。共有選択の中で最も精度が高い設定でも、意味ブロックより精度が低く、プリフィルは1.8–2.7倍の時間がかかりました。MK-2では、すべての位置ベース設定が意味ブロックより25点以上低く、多重キー検索で差が特に大きくなっています。
クラスタを2,048トークンから512トークンに細かくすると、4Bの512Kプリフィルで、GPU時間が41%増えました。増えた分の多くは選択ブロックへのアテンション、ギャザー、マージで、2,048トークンでは選択ブロックのアテンションが密なFlashAttention-3のFLOPレートの約70%に達しています。初期ブロック1,024を加えると、MK-3の精度が同じ予算の位置ベースブロックの最高設定と並び、プリフィルは1.3倍速くなりました。

Figure 7 : GPU time of one 512K prefill on Qwen3.5-4B by cluster size u and token budget K.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの8ページ目から図の部分を抽出しています。限界と未検証の範囲
本手法の実験は、バッチサイズ1、単一のH200、BF16という条件で行われました。そのため、連続バッチングや他のGPUアーキテクチャでの性能は、まだ評価されていません。また、本手法はプロンプトの完全なKVキャッシュを保持するため、メモリ容量が文脈長とバッチサイズを制限します。Fitting centroidsをプロンプト全体で行うとピークメモリがdense chunked prefillより増えますが、最初の64Kトークンで行えばchunked prefillを similar accuracyで使えます。評価対象は、Qwen3.5-4B、Qwen3.5-35B-A3B、そしてNemotron 3.5 Lightningに限られています。
Nemotron 3.5 Lightningは、独自のクラスタリング設定では多重キー検索の精度がL/16でさらに下がったため、K=L/8で評価されました。このNemotron 3.5 Lightningでは、K=L/8のとき512Kのプリフィルが1.5–2.0倍速くなるとされています。
学習で選択を合わせる試みとして、著者らは短い蒸留実験を行いました。しかしその実験では、検索精度を一貫して改善することはできませんでした。長文脈のタスクデータでより長く学習すれば、小さい予算でも精度を保てるかもしれませんが、これは本論文では検証されていません。一方、Qwen3.5-4Bの1Mでは、RULER-5が密なアテンションの63.2から提案手法の55.2に下がっており、多重キー検索の損失が残ります。
長い生成では、デコードの各ステップが生成されたすべてのトークンを選択なしで参照するため、出力が伸びるにつれてデコードが遅くなります。著者らは、古い生成トークンを既存の重心に割り当てて索引に加える方法を用意しました。この方法では、索引を1,024生成トークンごとに更新し、新しい512トークンだけを索引の外に残します。その結果、1Mトークンのプロンプトの後で64Kの生成トークンまでデコード遅延がほぼ一定に保たれると報告されています。ただし、これは本文の主設定とは別の拡張であり、LongBench-v2の精度は両Qwenモデルでわずかしか変わらないと述べられています。
DSA、MSA、QSAのような学習済みインデクサは、2,048のトークン予算で良い性能を示すため、学習を伴う手法との比較は本論文の対象外です。このため、学習を伴う手法と比べた際の精度の差は、本論文からは判断できません。
論文情報
- 著者
- Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui
- 学会・ジャーナル
- arXiv · プレプリント
- 公開日
- 2026年11月3日
- 登録日
- 2026年11月5日
- 更新日
- 2026年11月3日
- バージョン
- v1
- arXiv
- 2611.04313
- カテゴリ
- cs.LG · cs.AI · cs.CL
- ライセンス
- CC BY 4.0
- 掲載内容
- 論文情報・解説・論文の図
この解説は、Refivuの韓国語解説をAIで翻訳したものです。不正確な翻訳や誤りが含まれる可能性があります。論文と図の利用条件は各出典に従います。
アブストラクト
We introduce a training-free sparse attention method that builds a prompt-specific key index to accelerate both prefill and decoding. The method clusters the keys into large semantic blocks that group tokens from noncontiguous positions. Each query position selects blocks by scoring their centroids and attends to the original keys and values within them. Queries that select the same block are processed together, so prefill stays fast even though each query chooses its own blocks. Large blocks make centroid scoring and this grouped processing cheap, so each query can attend to more tokens in the same time. Larger blocks with a larger token budget can thus be both faster and more accurate on long-context tasks than smaller blocks with a smaller budget. We evaluate two hybrid LLMs, Qwen3.5-4B and 35B-A3B, on one NVIDIA H200. Including the cost of building and using the index, whole-model wall-clock speedups over dense attention are 2.3-2.4x for prefill and 1.7-2.0x for decoding at 512K tokens, and 2.9-3.0x for prefill at 1M. The 35B-A3B model stays close to dense attention on five RULER tasks through 1M, on LongBench-v2 overall, and on MRCR through 256K. The 4B model loses accuracy mainly on multi-key retrieval, yet outperforms dense Qwen3.5-2B, whose latency is similar at 512K, on all three benchmarks.
論文の図

Figure 1 : Prefill and decode latency on one H200 with a token budget of L/16 for a prompt of L tokens. Whole-model latency is measured by wall clock, and full-attention layers (shaded) by GPU time. The rows are Qwen3.5-4B (top) and 35B-A3B (bottom). Dense (2B) is Qwen3.5-2B. Speedups are over dense attention (Tables 13 and 31).
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの2ページ目から図の部分を抽出しています。
Figure 3 : Examples of two clusters, with members of high and low cosine similar- ity to the centroid.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの4ページ目から図の部分を抽出しています。
Table 1 : Long-context performance at K=L/16 , with L the upper bound of the length bin for MRCR-8 and of the length band for LongBench-v2, and whole-model prefill latency at 1M. MRCR-8 reports a match ratio, and the other quality scores are percentages. At 1M, the multi-value prompts of RULER-5 are about 647K tokens long (Appendix C.3). Appendix F.3 gives other budgets.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの6ページ目から図の部分を抽出しています。
Figure 4 : GPU-time breakdown for a 512K prefill on Qwen3.5-4B. The upper panel shows whole- model GPU time, and the lower panel breaks down our attention-kernel time (Table 14). Times are profiler totals, not wall-clock latency.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの7ページ目から図の部分を抽出しています。
Table 3 : Clustering per KV head atu= 2,048, at the four prompt lengths we report.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの15ページ目から図の部分を抽出しています。
Table 5 : Qwen3.5-4B memory on one H200, in GiB. Dense totals are derived request-sized estimates that exclude excess preallocated cache capacity, while sparse peaks are measured allocated memory, so dense and sparse rows are accounted differently.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの17ページ目から図の部分を抽出しています。
Table 7 : RULER results of our method in the main table, Qwen3.5-4B at K=L/16 and u= 2,048 , 100 items per task and length. Each entry is the mean (sample s.d.) over three clustering seeds. RULER-5 is the mean over the five tasks, and its s.d. is computed over the three seeds’ five-task means.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの18ページ目から図の部分を抽出しています。
Table 8 : Every RULER task on Qwen3.5-4B at a nominal 512K, in percent, 100 items per task, K=L/16 except the last row, which halves it. Ours on the starred tasks and SQuAD is the mean over three clustering seeds, on the others one seed. The second row is the median length of each task’s prompts in thousands of tokens (Appendix C.3). S1–S3 are the single-needle tasks, MK-1 to MK-3 multi-key, MQ multi-query, MV multi-value, VT variable tracking, CWE and FWE common- and frequent-word extraction, SQuAD the QA task with its paragraphs repeated, and Hotpot HotpotQA. The starred tasks form RULER-5.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの19ページ目から図の部分を抽出しています。
Figure 9 : Qwen3.5-4B latency on one H200 at K=L/16 . The columns show whole-model wall- clock latency (left) and GPU time over the eight full-attention layers (right). The rows show prefill (top) and decoding (bottom).
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの22ページ目から図の部分を抽出しています。
Table 13 : Qwen3.5-4B latency on one H200. Whole-model columns are wall-clock measurements, the attention-layer columns profiler totals over the eight full-attention layers. The last rows are the dense reference model, Qwen3.5-2B.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの22ページ目から図の部分を抽出しています。
Table 14 : GPU time in seconds for a 512K prefill on Qwen3.5-4B. The attention rows contain only FlashAttention-3 kernels, with scoring, selection, gathering, and merging reported separately. Totals come from profiling rather than the wall-clock medians in Table 13.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの23ページ目から図の部分を抽出しています。
Table 16 : Ablation of the kernel design on Qwen3.5-4B at 512K and K= 32,768 , with the prefill and decode times of each execution.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの24ページ目から図の部分を抽出しています。
Figure 10 : Decode latency of Qwen3.5-4B after a 512K prompt, index updates included.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの24ページ目から図の部分を抽出しています。
Table 19 : The routing key on Qwen3.5-4B, with RULER multi-key and multi-value accuracy in percent at 512K, K=L/16 , u= 2,048 , 100 items per entry. Our row, the post-RoPE row, and the multi-key entries of the non-rotary row are means over three clustering seeds, and all other entries use seed 0. A dash marks an entry that was not measured.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの26ページ目から図の部分を抽出しています。
Figure 11 : Cluster size and token budget on MK-3 and MK-2 at 512K for Qwen3.5-4B, Qwen3.5- 35B-A3B, and Nemotron 3.5 Lightning.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの27ページ目から図の部分を抽出しています。
Table 22 : Qwen3.5-4B, MK-3 accuracy in percent (n= 100 ) and prefill speedup at each length and budget. The K=L/16 column is the three-seed mean of the main table, and the other entries are single runs.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの29ページ目から図の部分を抽出しています。
Figure 13 : Quality against prefill time over token budgets from L/64 to L/8 on Qwen3.5-4B and Qwen3.5-35B-A3B.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの29ページ目から図の部分を抽出しています。
Table 23 : Positional and semantic retrieval on Qwen3.5-4B at 512K, K=L/16 , MK-3 and MK-2 accuracy in percent with n= 100 , without and with the fixed initial block of Appendix D.3. B is positional block size and g query sharing span. Min/max rows describe each positional block by its minimum and maximum keys, and their shared rows use the averaged query. Our per-token row is the mean over three clustering seeds. A dash denotes an unmeasured entry.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの30ページ目から図の部分を抽出しています。
Table 28 : Cluster scoring on Qwen3.5-4B at 512K, u= 2,048 , K=L/16 . Accuracy (%) on 50 examples per task.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの34ページ目から図の部分を抽出しています。
Table 30 : Adapting Qwen3.5-4B to sparse attention with LoRA trained on 64K documents. RULER multi-key scores are accuracy (%), and MRCR-8 reports a mean match ratio. All configurations use the same sparse runtime and token budget.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの35ページ目から図の部分を抽出しています。
Table 33 : Qwen3.5-35B-A3B on MRCR-8 (mean match ratio) and LongBench-v2 (accuracy over the same 470 items), thinking on, at K=L/16 and at half of it. Flushing uses F= 1,024 and W= 512 (Appendix E.5).
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの37ページ目から図の部分を抽出しています。
Table 34 : Nemotron 3.5 Lightning, the 64K pilot behind the clustering settings, with MK-3 accuracy in percent on 20 items, K=L/16 . Centering subtracts the mean key before routing, whitening scales the centered keys by their covariance, and iterations and samples are thek-means fit.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの38ページ目から図の部分を抽出しています。
Figure 18 : GPU time of one 512K prefill on Nemotron 3.5 Lightning at K=L/16 by cluster size u, drawn as Figure 7.
出典 · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · 論文の図を引用 · 元のPDFの39ページ目から図の部分を抽出しています。この論文を引用
Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui (2026). Coarse Semantic Blocks for Efficient Training-Free Sparse Attention. arXiv:2611.04313v1. https://arxiv.org/abs/2611.04313v1
BibTeX
@misc{kobayashi2026coarse,
title = {{Coarse Semantic Blocks for Efficient Training-Free Sparse Attention}},
author = {Sosuke Kobayashi and Shoichiro Yamaguchi and Seiya Tokui},
year = {2026},
eprint = {2611.04313},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2611.04313v1}
}