- Rating
- 5
- Clarity
- 3
- Confidence
- 4
- Originality
- 2
- Quality
- 3
- Significance
- 3
Read review
Summary
This paper proposes CompactAttention, an efficient attention mechanism desinged for long-context chunked prefill. The paper argues that prior block-sparse methods, while effective in one-shot prefill, become inefficient under chunked prefill because sparse kernels have limited query-side parallelism and cannot sufficiently amortize irregular access overheads. It further observes that block-sparse masks cannot be naively executed with paged attention. In standard block-sparse attention, different query blocks may attend to different KV block lists, whereas paged attention requires a shared KV block table for query blocks executed together. CompactAttention addresses this mismatch by treating block-sparse masks as KV-selection signals rather than direct execution plans. Specifically, it unions selected KV blocks across query blocks and GQA/execution groups, producing KV block tables that can be used by a paged-attention backend. This enables cached KV blocks to be accessed in place without explicit KV compaction, while avoiding the inefficiencies of direct block-sparse execution under chunked prefill. The experiments show that CompactAttention achieves favorable accuracy–efficiency tradeoffs across long-context benchmarks, providing consistent speedups and superior accuracy compared to block-sparse baselines at matched sparsity levels.
Strengths and weaknesses
Strengths
- The paper identifies an important limitation of prior block-sparse attention methods under chunked prefill, where the query length is much smaller than the accumulated KV cache.
- Chunked prefill is widely used in major LLM serving systems, so improving attention efficiency in this regime is a meaningful contribution.
- The proposed approach is conceptually straightforward and enables block-sparse selection to be executed through zero-copy paged attention.
- The experiments are comprehensive, and show favorable accuracy–efficiency tradeoffs.
Weaknesses
- The novelty of the proposed method is somewhat incremental. The main contribution of the paper is proposing an engineering optimization, where subselected KV blocks should be combined instead of executed independently, to make block sparse attention compatible with paged attention. While useful, the main source of effectiveness appears to come from leveraging existing sparse KV block selection and paged-attention execution, with CompactAttention primarily serving as a bridge between the two.
- The method cannot provide precise control over the degree of sparsity due to the union operation. The union operation may drastically decrease the sparsity in some rare cases when different query blocks select largely non-overlapping KV blocks. This may limit the method’s applicability in latency-constrained settings where one may want predictable request latency.
Overall, I find the paper well written and practically motivated. While the novelty is somewhat incremental, the proposed method is simple, effective, and likely to be useful in practical LLM inference systems.
Questions
- Could the authors show the variance of the sparsity as well as the worst case sparsity when block union is applied? I’m curious whether the change in the degree of sparsity before & after union is in general consistent, or whether the sparsity may drop significantly under some unfortunate scenarios.
- Did the authors also try to enforce a hard limit on the number of selected KV blocks by, say, selecting the Top-K important blocks, after union? Could the authors share the results if available?
Limitations
Yes, the authors have adequately addressed the limitations and implications of their work.
Paper formatting concerns
I have no paper formatting concerns.
Final justification
During the rebuttal, the authors resolved my concern regarding the variability of post-union sparsity by providing additional analyses on keep-ratio distributions and cross-task stability of sparsity after block union. These results increased my confidence in the effectiveness of the approach. Overall, I believe the method is an effective and practical solution for efficient long-context chunked prefill, and I recommend acceptance with a final score of 5.
Thank you for the constructive feedback. We have carefully considered the raised weaknesses and questions and provide our responses below. We will incorporate the newly added sparsity analyses, robustness results, and latency measurements into the revised manuscript.
Response to W1. Novelty and Scope
We appreciate the reviewer’s perspective. CompactAttention is motivated by an important shift in long-context serving: under chunked prefill, the conventional block-sparse prefill paradigm becomes less effective because
Q << KVsubstantially reduces the efficiency of block-sparse execution. Our contribution is to redesign the execution path for this regime without discarding the value of prior sparse-attention methods. CompactAttention adopts their scoring and selection logic, but converts the resulting block masks into per-execution-group KV block tables that can be executed efficiently by dense paged-attention kernels. We further introduce a KV-head-major KV-cache layout that allows each KV head’s selected blocks to be accessed directly without materializing or copying the selected K/V data. Thus, CompactAttention is an execution architecture that adapts the dominant sparse-prefill approach to chunked serving and translates existing selection methods into practical end-to-end speedups.Response to W2/Q2. Predictability of post-union sparsity
The union operation does not impose a hard sparsity budget, and some layer–execution-group profiles can become nearly dense when different query blocks select largely non-overlapping KV blocks. To quantify this behavior, we report compute-weighted statistics across query heads and execution groups over multiple context lengths and chunk sizes in Table oQzU-1. For each profile, we first sum the numbers of kept and total KV blocks across chunk iterations and then compute their ratio. This definition reflects the actual amount of executed attention work, and we will use it consistently throughout the revised manuscript. Union increases the mean keep ratio, but the near-dense tail does not grow dramatically as the chunk size increases up to 2048. At 128K context, increasing the chunk size from 512 to 2048 raises the compute-weighted final mean keep ratio from 0.260 to 0.354, while the fraction of layer–execution-group profiles retaining at least 90% of KV blocks increases from 3.5% to 6.4%. Thus, although larger chunks increase union-induced keep ratios, we do not observe a catastrophic shift toward dense execution within the evaluated range. CompactAttention still achieves 2.48–2.90× speedup over dense attention and 1.15–1.25× over FlashPrefill across these settings. Existing block-sparse methods likewise require profiling the realized keep ratio under a chosen selector hyperparameter before deployment. The practical question is therefore whether the profiled sparsity behavior transfers across workloads. As shown in Table oQzU-2, three structurally different RULER tasks exhibit similar post-group-union keep ratios at each context length, suggesting that the sparsity profile is reasonably stable across the evaluated task distributions rather than requiring task-specific retuning. CompactAttention intentionally preserves a KV block if it is selected by any query block or head within an execution group, so that a strong selection signal is not discarded during lowering. Therefore, the sparsity–latency–accuracy trade-off is more appropriately controlled through the selector hyperparameters, such as α for CA-FP and the selection threshold for CA-SA, rather than by applying an additional arbitrary Top-K after union. A post-union Top-K would require introducing a new ranking and score-aggregation rule over the retained binary mask, together with separate accuracy calibration. For unusually large scheduling chunks, bounding the union scope by processing them as smaller execution subchunks could instead be used to keep the post-union keep ratio within a practical range.
Table oQzU-1. Compute-weighted post-union keep ratios and attention speedup across context lengths and chunk sizes (LLaMA-3.1-8B-Instruct, CompactAttention-FP).
Note. For this new profiling analysis, keep ratios are computed by summing the numbers of kept and total KV blocks across chunk iterations before taking the ratio. This is done for each layer–query-head profile at the pre-union and Q-union stages, and for each layer–execution-group profile at the group-union stage. Mandatory recent blocks, including the current chunk, are included in the kept-block count and in the total-block count. The
Group-union ≥90% Fractionreports the fraction of layer–execution-group profiles whose final keep ratio is at least 90%. We will use this compute-weighted definition consistently throughout the revised manuscript.Table oQzU-2. Compute-weighted post-group-union keep ratios across distinct task distributions (LLaMA-3.1-8B-Instruct, CompactAttention-FP).
Response to Q1. Variance and worst-case sparsity after block union
We profiled post-union sparsity across all layers and execution groups of LLaMA-3.1-8B-Instruct. For each layer–execution-group profile, we summed the numbers of kept and total KV blocks across chunk iterations before computing the mean, median, P90, maximum, and near-dense frequency reported in Table oQzU-3. Some compute-weighted profiles reach a keep ratio of 1.0. However, these localized near-dense profiles do not eliminate the overall system benefit: CompactAttention consistently outperforms dense attention and FlashPrefill across all tested context lengths and chunk sizes in Table oQzU-1, while the main paper reports broader comparisons against additional sparse-attention baselines. As further shown in Table oQzU-2, the sparsity profile remains similar across three different RULER tasks, indicating robustness to the evaluated input distributions. We additionally profiled the compute-weighted mean post-group-union keep ratio for every layer and execution group of Qwen3-30B-A3B-Instruct-2507. Table oQzU-4 presents the three layers with the highest and lowest layer-average keep ratios among all 48 layers. The results show substantial heterogeneity across both layers and execution groups: some layer–execution-group pairs have high keep ratios, while others remain highly sparse. Across the selected extreme layers, the layer-average keep ratio ranges from 0.094 to 0.510, indicating that high keep ratios are localized rather than uniform across the model. The model-level Qwen3 results in the main paper show that the remaining aggregate sparsity is sufficient to provide long-context latency gains, while Table oQzU-1 confirms the same overall behavior across chunk sizes on LLaMA-3.1-8B-Instruct.
Table oQzU-3. Distribution and tail frequency of the compute-weighted final post-group-union keep ratio (LLaMA-3.1-8B-Instruct, CompactAttention-FP).
Note. Keep ratios are computed by summing the numbers of kept and total KV blocks across chunk iterations for each layer–execution-group profile before taking the ratio. Mandatory recent blocks, including the current chunk, are included in the kept-block count and in the total-block count. The maximum keep ratio is 1.0 in every evaluated setting; the
Fraction ≥90%column reports the fraction of profiles whose final keep ratio is at least 90%.Table oQzU-4. Layers with the highest and lowest average post-group-union keep ratios using subgroup size 4 on Qwen3-30B-A3B-Instruct-2507, CompactAttention-FP.
Measured at 128K context length and chunk size 1024. Layers are ranked by the average keep ratio across their eight execution groups.