Paper commentary
Coarse Semantic Blocks for Efficient Training-Free Sparse Attention
Semantic blocks let training-free sparse attention run faster on long prompts
- Problem Sparse attention where each query picks its own blocks is costly and hard to run on GPUs. Sharing one selection across neighboring queries is cheaper but misses blocks some queries need.
- Method The authors cluster each prompt's keys into large semantic blocks, not position-based ones. Each query scores block centroids and attends to the original keys within the chosen blocks.
- Results With the 35B-A3B model at 512K, RULER-5 scores 84.2 against 84.4 for dense attention, while prefill is 2.3 to 2.4× faster than dense attention.

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.
Original paper · CC BY 4.0 · Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui · Coarse Semantic Blocks for Efficient Training-Free Sparse Attention · Original paper figure · Extracted the figure area from page 3 of the original PDF.Why per-query selection stays costly in training-free sparse attention
Learned indexers such as DSA, MSA and QSA can meet that bar, but they need the indexer and the model trained so that a small token budget suffices. Irregular selections are also difficult to execute efficiently on GPUs, as Nawrot et al. (2026) note.
Other methods share one selection across neighboring queries, which cuts the cost but can miss blocks that individual queries need. Sharing a selection also makes positional blocks faster, yet the most accurate shared settings stay less accurate than the authors' method. On MK-2, every positional setting sits at least 25 points below the authors' method, and per-query selection at B=32 is more than 4× slower to prefill.
That leaves a gap for a prefill in which each query still chooses its own blocks at low cost. The authors target this gap by clustering keys into large semantic blocks, so that each query scores only centroids. Queries that select the same block are then processed together, which keeps the per-query selection from becoming a per-query cost.
Grouping keys into semantic blocks
The core idea is to group each prompt's keys by similarity instead of by position, so a block holds tokens a query is likely to need together. Each layer and KV head gets its own partition, built by running spherical k-means on a sample of the normalized keys. Every prompt key goes to its nearest centroid, and the block is the set of positions assigned to that centroid.
A target mean block size u sets the cluster count at about C = L/u, and the main setting uses u = 2,048. Because the members of a block are scattered across the prompt, the method stores each block's keys and values contiguously.
Figure 2 lays out the three steps of clustering, selecting and attending. Scoring gives each query head a softmax over the centroids with temperature τ = 0.1. The per-head scores are summed across the query heads that share one KV head, so the query heads in a GQA group share one selection. The summed score is discounted by the block's remaining size, using the exponent β = 0.25.
Blocks are then taken in decreasing order of s(c) until their tokens reach the budget K, so a last partial block can push the total past K.
Attention is then computed over the selected positions, together with the recent positions D_t that are included without selection. The queries, keys and values are the model's originals, and the softmax runs only over those positions. Selecting every earlier position gives back dense attention, which is the reference the method is measured against.
For models with RoPE, selection uses queries and keys from before the rotation, and rotated ones give similar accuracy.
Running prefill and decoding on one index
Each query attends to the selected blocks from earlier chunks and to every causally visible token in its own chunk. Near the start of the prompt the history is short, so the method uses dense attention there to avoid selection overhead.
Neighbouring queries can pick different blocks, so the usual FlashAttention-3 pattern of processing them together would spend work on blocks some of them did not pick. So the method gathers the queries that selected each KV block and computes their attention to that block together. This KV-outer execution combines each query's partial outputs using their softmax normalizers.
On Qwen3.5-4B at 512K, this is 2.6× faster than processing neighbouring queries over the union of their selected blocks.
The tokens of one block are scattered across the prompt, so their keys and values are stored contiguously in their original order. During decoding the same index selects prompt blocks, and in the main setting all generated tokens are included without selection.
Whole-model speed at long contexts
Whole-model speedups at 512K come from Qwen3.5-4B and 35B-A3B on one H200, with index construction included. Prefill is 2.3–2.4× faster and decoding is 1.7–2.0× faster than dense attention at 512K. Figure 1 reports these latencies, with dense attention run on the same inference stack.

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).
Original paper · CC BY 4.0The full-attention layers alone prefill 3.9–4.3× faster at these lengths, so the whole-model gain is smaller. The gap exists because the other layers are unchanged, and they take about half of the sparse prefill time. Figure 4 breaks down a 512K prefill on Qwen3.5-4B, where our attention kernels run about 5× faster than dense attention. Fitting the centroids is only a small part of that 1.8 s overhead.
Accuracy against dense attention
The 35B-A3B model keeps its RULER-5 average close to dense attention at every length under K=L/16. Its RULER-5 score is 84.5 at 256K, compared to 85.7 for dense attention, and 84.2 at 512K, compared to 84.4. At 1M it scores 73.9, compared to 73.2 for dense attention, so the gap disappears at the longest length. Its LongBench-v2 overall score is 63.3, compared to 64.7 for dense attention, so it changes little.
The paper reports these tests as a check that the method stays near dense quality, not as a claim of gains.
The 4B model loses more accuracy, and most of the loss comes from multi-key retrieval. At 512K its RULER-5 average is 81.8, compared to 82.8 for dense attention. MK-2 falls to 95.0 from 99.0 at the same length, while multi-value retrieval and HotpotQA stay close to dense attention. MRCR-8 at 512K also falls below dense attention, and that drop is larger on the 35B-A3B model.
The sparse 4B model also beats the dense Qwen3.5-2B on RULER-5 at every tested length. At 512K it scores 81.8, compared to 66.5 for Qwen3.5-2B, while the two have similar prefill latency. At 256K the scores are 82.7 for the sparse 4B model and 77.7 for Qwen3.5-2B. This pits a sparse 4B model against a smaller dense model, so it tests a trade-off rather than sparsity alone.
The 2B reference's multi-key scores fall far more steeply with length than the sparse 4B model's, as the italic rows in the appendix show.
Semantic versus positional blocks
The authors compare the method with positional blocks while keeping the token budget, the recent positions and the attention kernels the same. Positional blocks each use the mean key of B consecutive tokens, and neighbouring queries can share one block selection. For shared selection, the authors combine scores from all queries in a group to choose one set of blocks, following FlashPrefill V2.
On multi-key retrieval at 512K, the most accurate shared positional settings were less accurate than the semantic-block method and took 1.8–2.7 times as long to prefill. On MK-2 every positional setting was at least 25 points below the method. Sharing one selection cuts cost, but it can miss blocks that individual queries need, which is why shared settings lose accuracy.
On Qwen3.5-35B-A3B, only one tested positional setting matches the MK-3 accuracy of the method.
Per-query positional selection at B=32 was still less accurate than the method, and it was more than 4 times slower to prefill.
Larger clusters with a larger budget can improve accuracy and latency together, which lets the budget grow. Going from 2,048-token to 512-token clusters raised prefill GPU time by 41% on the 4B model.
Decoding growth and lost attention mass
Decoding normally slows as the output grows, because every generated token attends to all earlier generated tokens without selection. The index is updated every 1,024 generated tokens, and the newest 512 tokens stay outside it. With this change, decode latency stays nearly constant, even over 64K generated tokens after a 1M-token prompt. LongBench-v2 accuracy changes little on either Qwen model with this change.
The main experiments don't use this extension, so their decode latency grows with the output length.
The coverage analysis measures how much dense attention mass the selected tokens retain. Coverage is the percentage of dense attention to the prompt that the selected tokens keep. The authors call the dense-ranked clusters and dense-ranked tokens references, since both need dense attention at inference time.
At K=L/8, the centroid scores give higher coverage than dense-ranked clusters at K=L/16 on all three tasks.
Using dense-attention scores recovers dense accuracy on MK-2 but changes MK-3 little.
Limitations and the questions left open
The experiments run BF16 inference at batch size one on a single H200, so throughput under continuous batching wasn't measured. Other GPU architectures also remain to be evaluated, since the paper only reports results on the H200. Fitting them on the first 64K tokens instead allows chunked prefill with similar accuracy, which addresses that memory cost.
The authors didn't test these combinations in this paper. Training the model for sparse attention, as DSA and QSA do, may bring further gains. The short distillation experiments on learned routing maps didn't consistently improve retrieval.
The RULER-5 and MRCR-8 results in Table 1 use a single H200 and one budget setting, L/16, for the main comparison. Ours on the starred RULER tasks is the mean over three clustering seeds, so the spread across seeds is only partly covered.
Paper info
- Authors
- Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui
- Venue
- arXiv · Preprint
- First published
- 2026-11-3
- Added
- 2026-11-5
- Updated
- 2026-11-3
- Version
- v1
- arXiv
- 2611.04313
- Category
- cs.LG · cs.AI · cs.CL
- Original paper terms
- CC BY 4.0
- What we show
- Paper info, commentary and permitted figures from the original paper
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Abstract
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.
Quote from the paper
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}
}