논문 해설
Coarse Semantic Blocks for Efficient Training-Free Sparse Attention
효율적인 학습 없는 희소 어텐션을 위한 거친 의미 블록
- 연구 문제 긴 문맥에서 학습 없이 희소 attention을 쓰려면 토큰 선택과 블록 실행 비용이 낮아야 하지만, 기존 방식은 연속 블록이나 쿼리 공유로 정확도를 희생하기 쉽습니다.
- 연구 방법 프롬프트 키를 의미 블록으로 군집화하고 각 쿼리가 중심 점수로 블록을 고른 뒤, 같은 블록을 고른 쿼리를 묶어 KV-outer 방식으로 계산합니다.
- 주요 결과 Qwen3.5-4B에서 512K 전체 모델 prefill은 2.3–2.4배, 35B-A3B는 RULER-5에서 1M까지 dense에 가깝게 유지됩니다. 같은 토큰 예산의 위치 기반 블록보다 다중 키 검색 정확도가 높습니다.
긴 문맥 attention의 비용과 기존 희소화의 한계
긴 문맥에서는 prefill과 decoding 모두에서 attention 비용이 커집니다. 희소 attention은 각 쿼리가 볼 토큰 수를 줄이지만, 토큰을 고르고 그 키와 값을 준비하는 비용이 절약되는 attention 계산보다 작아야 실제로 빨라집니다. 학습 기반 indexer는 모델과 함께 학습해야 하며, 학습 없이 쓰는 방법은 쿼리마다 중요도를 추정하면 prefill 비용이 커지고 불규칙한 선택은 GPU에서 효율적으로 실행하기 어렵습니다. 그래서 기존 방법들은 연속 블록을 고르거나 인접 쿼리끼리 선택을 공유하는 방식을 택해 왔습니다. 이 논문은 학습 없이 프롬프트마다 만든 의미 블록을 쿼리별로 고르면서도 prefill을 빠르게 유지하는 것을 다룹니다.
의미 블록의 구성과 쿼리별 선택
이 방법은 각 층과 KV 헤드마다 프롬프트의 키를 구면 k-means로 군집화해 의미 블록을 만듭니다. 키는 단위 노름으로 정규화된 뒤 가장 가까운 중심에 배정되며, 블록은 위치가 연속되지 않아도 키가 비슷한 토큰을 묶습니다. 목표 평균 블록 크기 u에 따라 클러스터 수는 대략 L/u로 정해집니다. 각 쿼리는 GQA 그룹 안 헤드별로 중심에 대한 softmax 점수를 구하고 이를 그룹 단위로 합산합니다. 이어서 블록에서 실제로 읽을 토큰 수에 따른 크기 페널티를 적용해 점수를 매기고, 큰 점수부터 토큰 예산 K에 도달할 때까지 클러스터를 선택합니다. 이 선택은 중심 점수만 계산하므로 키 전체를 개별 점수화하는 것보다 비용이 작습니다.
모델 가중치와 선택기는 학습하지 않습니다.

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쪽에서 그림 영역을 추출했습니다.
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 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 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쪽에서 그림 영역을 추출했습니다.
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쪽에서 그림 영역을 추출했습니다.KV-outer 실행과 블록 순서 캐시
쿼리마다 다른 블록을 고르면 인접 쿼리를 묶어 같은 KV 타일을 읽는 일반적인 dense 커널은 불필요한 블록 계산을 낳습니다. 그래서 이 방법은 각 KV 블록을 선택한 쿼리들을 모아 그 블록에 대한 attention을 함께 계산하는 KV-outer 실행을 씁니다. 현재 청크 안의 attention은 causal FlashAttention-3로 계산하고, 각 쿼리의 부분 출력은 softmax 정규화 값으로 합칩니다. 선택된 블록의 키와 값은 블록 안에서 원래 순서대로 연속 저장된 캐시에서 읽으며, 이 캐시는 prefill과 decoding에서 함께 씁니다. 저자들은 Q-outer 실행보다 KV-outer 실행이 Qwen3.5-4B의 512K prefill에서 2.6배 빠르다고 보고합니다.

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쪽에서 그림 영역을 추출했습니다.평가 모델과 비교 기준
평가는 Qwen3.5-4B와 Qwen3.5-35B-A3B에서 수행합니다. 4B 모델은 32개 층 중 8개, 35B-A3B 모델은 40개 층 중 10개의 full-attention 층을 희소 attention으로 바꾸며 가중치는 그대로 둡니다. 기준선은 같은 추론 스택에서 실행한 dense attention이며, 4B 모델과 비교할 dense Qwen3.5-2B 참조도 있습니다. 위치 기반 블록 실험에서는 의미 블록 대신 B개 연속 토큰을 평균 키로 대표하는 블록을 쓰고, 같은 토큰 예산과 같은 커널을 사용해 쿼리 공유 효과를 분리합니다. 평가 과제는 RULER의 다섯 과제를 묶은 RULER-5, MRCR-8, LongBench-v2입니다.
주 설정은 목표 평균 블록 크기 2,048과 K=L/16이며, 지연 시간은 단일 요청, 단일 H200, BF16 조건에서 측정합니다.
장문맥 정확도와 지연 시간의 결과
Qwen3.5-4B에서 512K 프롬프트의 전체 모델 prefill은 dense attention보다 2.3–2.4배 빠르고, 1M에서는 2.9–3.0배 빠릅니다. decoding은 512K에서 1.7–2.0배 빨라집니다. 이 수치는 인덱스 구성 비용을 포함한 wall-clock 측정이며, 같은 설정에서 full-attention 층만 보면 GPU 시간 기준 개선이 더 큽니다. 35B-A3B 모델은 RULER-5에서 1M까지 dense attention에 가깝게 유지되고, LongBench-v2 전체 정확도도 거의 변하지 않습니다. 4B 모델은 다중 키 검색에서 정확도 손실이 크지만, 512K에서 지연이 비슷한 dense Qwen3.5-2B보다 세 벤치마크 모두에서 높은 점수를 보고합니다.
이 결과는 K=L/16과 특정 두 모델, 특정 벤치마크 조건에서 얻은 것입니다.

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쪽에서 그림 영역을 추출했습니다.
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 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쪽에서 그림 영역을 추출했습니다.
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 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쪽에서 그림 영역을 추출했습니다.의미 블록과 위치 기반 블록의 대조
같은 토큰 예산에서 의미 블록과 위치 기반 블록을 비교하면, 512K 다중 키 검색에서 위치 기반 블록은 큰 블록일수록 빠르지만 검색 정확도가 낮습니다. 위치 기반 블록의 크기를 줄이면 정확도는 오르지만 쿼리별 선택의 prefill 비용이 커집니다. 쿼리를 공유하면 위치 기반 블록은 빨라지지만 가장 정확한 공유 설정도 의미 블록보다 낮고 prefill은 1.8–2.7배 깁니다. 저자들은 이 결과를 쿼리별 의미 블록 선택이 정확도와 지연의 더 나은 절충을 준다고 해석합니다. 다만 MK-3에서 위치 기반 설정 하나가 비슷한 정확도에 이르더라도 prefill은 1.8배 걸리며, 이 비교는 Qwen3.5-4B의 해당 설정에 한정됩니다.

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쪽에서 그림 영역을 추출했습니다.블록 크기와 토큰 예산의 관계
의미 블록의 목표 크기 u와 토큰 예산 K는 함께 조정해야 합니다. Qwen3.5-4B의 512K 설정에서는 작은 클러스터가 작은 예산에서 더 정확하지만, 예산이 커지면 큰 클러스터가 비슷한 정확도를 내면서 더 빠릅니다. 주 설정은 2,048토큰 클러스터와 K=L/16입니다. 클러스터를 2,048에서 512로 줄이면 같은 예산에서 prefill GPU 시간이 4B 모델 기준 41% 늘어나며, 증가분은 선택 블록에 대한 attention, 쿼리 수집, 출력 병합에서 주로 생깁니다. 이 최적 조합은 Nemotron에서는 다르며, 작은 클러스터의 정확도 이득이 더 크고 런타임 손실은 더 작습니다.

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쪽에서 그림 영역을 추출했습니다.
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 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쪽에서 그림 영역을 추출했습니다.적용 범위와 한계
저자들이 밝힌 바에 따르면 주 실험은 BF16, 배치 크기 1, 단일 H200에서 수행되었으며, 연속 배칭과 다른 GPU 구조에서의 처리량은 평가되지 않았습니다. 전체 프롬프트 KV 캐시를 유지하므로 메모리 용량이 문맥 길이와 배치 크기를 여전히 제한합니다. 중심을 전체 프롬프트에서 맞추면 peak 메모리가 dense chunked prefill보다 커지며, 첫 64K 토큰으로 맞추는 방식은 정확도를 비슷하게 유지하면서 이 문제를 줄입니다. 짧은 distillation 실험은 검색 정확도를 일관되게 개선하지 못했고, 긴 학습이 작은 예산에서의 정확도 보존에 도움이 될지는 남은 질문입니다.

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 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쪽에서 그림 영역을 추출했습니다.논문 정보
- 저자
- 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
- 제공 범위
- 논문 정보, 해설, 허용된 원문 그림
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.
원문 인용
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}
}