PageWeaver: KV-Guided Query Unions for Sparse Attention
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.
Tom: I'm Tom, and with me are Jane, Lu, senior AI researcher at Tsinghua, Meng, lead engineer at a mysterious AI startup and Lalam, the in-house Large Language Model.
Jane: Today's paper: "PageWeaver: KV-Guided Query Unions for Sparse Attention".
Tom: The gist The authors present PAGEWEAVER, an execution design that uses selected-page affinity to assemble query groups while preserving each query’s original support and complete output ownership.
Jane: First, who's behind it and why it matters.
Paper summary: Tom: So we’ve seen they are trying to improve how queries are grouped based on page affinity while keeping the original support and output ownership intact. The thesis is that this design uses selected-page affinity to assemble query groups, and it does this while preserving each query’s original support and complete output ownership.
Jane: What that means in plain terms is they are finding a way to organize the computation around how queries use data pages, so they don't have to waste time reordering things or losing information when grouping them up.
Lu: The mechanism involves a bounded GPU search to produce query IDs, and then an ID-aware two-CTA kernel that consumes these IDs without materializing reordered Q tensors or cross-page partial outputs. That avoids the problem of having to materialize those intermediate steps, which is a big win for memory usage and speed.
Meng: So if we think about the practical impact on a system, this seems like it’s about making the hardware utilization much tighter when dealing with sparse attention patterns where queries are not all accessing the same data.
Tom: Exactly. They also contrast this with a direct KV-page union implementation to see what happens when you just rely on disjoint page pairs and full membership to form common or exclusive query lists, which shows a complementary design study of nonlocal reuse and reduction cost.
Jane: And they show that shared structure alone doesn't guarantee a profitable traversal, suggesting that the organization has to be smarter about how it uses the page relation.
Lalam: The paper also highlights that adjacent query groups mix two page communities, while distant queries might share them, revealing a page-side relation that shows nonadjacent queries sharing support. That’s a key insight into query affinity.
Tom: It seems like PageWeaver is focused on using that affinity to change the members of a query-owned group within a bounded window, greedily collecting queries whose selected sets add few new pages.
Jane: It sounds like they are optimizing that greedy collection process to achieve better grouping without introducing any reduction in crosspage output, which is a critical part.
Meng: From an engineering standpoint, the claim that this trades an online grouping cost for a smaller union without introducing crosspage output reduction is important because it means we aren't sacrificing correctness for speed.
Lu: They also mention the fixed execution size is set at g equals eight, independently of the search window W, which makes the execution size predictable regardless of how much searching they do.
Tom: So what we’re seeing here is a design that connects query group size, page-set affinity, and output ownership in one common model. It’s building an ID-aware FP8 sparse-attention path on Hopper for this work.
Jane: And the result is that with FP8 KV throughout, the H200 Union8 implementation achieves a one point seven times geometric-mean complete-call speedup over the FlashInfer path on six captures, which is a solid number to look at <ref:2610.11201#pg1,with FP8 KV throughout, the H200 Union8 implementation achieves a 1>.
Conclusion: Tom: So to wrap up on PageWeaver: it uses the relation between selected queries and KV pages to improve execution groups while retaining each query’s full attention output. The central design principle they are focusing on is optimizing the cost of executing a fixed sparse relation, including the cost of constructing its execution groups.
Jane: It seems like the authors are showing that you can get performance gains by paying for the cost of constructing those execution groups in a smarter way, rather than just doing it naively. The direct KV-page execution and the B300 comparison show why you need to evaluate reuse alongside both preparation and output costs.
Lu: This paper connects query group size, page-set affinity, and output ownership in a common execution model with direct KV-page union as a measured design alternative that is really useful for understanding these interactions.
Meng: For me, the implication is that when designing sparse attention systems, we need to look at how the data pages interact with the queries because simply having many queries accessing data isn't enough; it’s how they access it.
Tom: Yeah, so this PaperWeaver design is about finding a way to optimize that fixed sparse relation cost by using those page relations intelligently. It’s a concrete execution strategy for handling complex sparse attention patterns.
Jane: The authors also emphasize that operator evidence emphasizes selected inputs, and they say independent natural-text validation should precede a general scheduling rule before you deploy this.
Lu: It's about connecting the dots between query group size, page-set affinity, and output ownership in a common execution model for sparse attention.
Meng: I think the practical impact is that this gives engineers a specific mechanism to try when they're trying to squeeze out more performance from existing hardware architectures for these kinds of workloads.
Tom: That’s right, it’s about optimizing the cost of executing a fixed sparse relation by constructing those execution groups efficiently. That’s what PageWeaver is all about.
Zhiyuan Li, Zihan Li, Zefang Yuan, Lei Wang, Hao Wang
cs.DC, cs.LG
Submitted: 2026-10-08
Updated: 2026-10-08
Comments: 11 pages, 9 figures, 2 tables. Zhiyuan Li and Zihan Li contributed equally
Code: https://github.com/Heisenberg-Yin/LiteTopK
License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
Importance score: 81/100
The gist: The gist The authors present PAGEWEAVER, an execution design that uses selected-page affinity to assemble query groups while preserving each query’s original support and complete output ownership.
Key concepts
- Selected-Page Affinity
- This is a property where certain queries tend to select or operate on the same set of memory pages. PAGEWEAVER exploits this affinity to intelligently group queries together during execution. By grouping queries that share page loads, it reduces the cost associated with fetching data from memory.
- Query Grouping
- The design attempts to assemble sets of related queries into groups for processing. The goal is to leverage shared resources like page loads across these groups. PAGEWEAVER uses a bounded GPU search to greedily collect queries whose selected sets add few new pages, optimizing the size and cost of these execution groups.
- Support Preservation
- This means that even when queries are grouped together for efficiency, the design ensures that each individual query receives its full, correct output. It avoids reducing or combining the outputs of different queries into a single result, maintaining complete ownership for every original query's results.
Terminology
Summary
The gist The authors present PAGEWEAVER, an execution design that uses selected-page affinity to assemble query groups while preserving each query’s original support and complete output ownership.
How it works
PAGEWEAVER is an execution design that uses selected-page affinity to assemble query groups while preserving each query’s original support and complete output ownership Query unions share page loads and populate Tensor Core tiles; their cost depends on which queries are grouped together The design uses a bounded GPU search to produce query IDs, and an ID-aware two-CTA kernel consumes them without materializing reordered Q tensors or cross-page partial outputs The selector is unchanged; membership and causal masks follow original query IDs Within a bounded window, a GPU kernel greedily collects queries whose selected sets add few new pages The method rebuilds IDs from current Top-K sets on every call; it does not reuse page-pair decisions or previous requests’ routes This design trades an online grouping cost for a smaller union without introducing crosspage output reduction The execution size is fixed at g = 8, independently of the search window W Each CTA applies its own four-query membership and causal masks, and retains FP32 running softmax statistics through the complete traversal The H200 path accepts BF16 Q and FP8 E4M3 KV Each CTA finishes its queries locally and stores directly to their original rows, eliminating a separate reorder-output pass and page-partial combine The design is useful when Snet > 0
Key Findings
The H200 Union8 implementation achieves a 1.70× geometric-mean complete-call speedup over the measured FlashInfer path on six captures Online regrouping further lowers latency by 3.26–7.66% on five selected 64K-context captures Whole-model prefill throughput is 7.88–14.36% above the tested native path The incremental regrouping benefit is smaller, with observed median gains of 0.47–0.73% at 32K/64K and regressions at 8K These results separate execution-group reuse from the complete cost of exploiting it online
Design Alternatives and Comparisons
The paper compares PAGEWEAVER against a direct KV-page union implementation, which provides a complementary design study of nonlocal reuse and reduction cost The direct KV-page implementation inverts incidence, proposes disjoint page pairs, and forms common/exclusive query lists using full membership This organization partitions a query’s output across page groups The B300 port maps the same IDs into a CuTe Union8 path with direct FP8 Q and physical page size 64 The auxiliary B300 experiment shows that neither online window beats the faster existing backend on any of the eight tested inputs
Limitations and Scope
The main evidence is an H200 MiniMax-M3 case study; selected operator captures and limited service repetitions constrain the generality of its conclusions The fixed 64K bitmap limits active regrouping on longer contexts The present greedy objective minimizes the eight-query union, not the subgroup compute proxy in Equation 4 A future selector could consider both, but no such cost-aware layer policy is evaluated here The operator evidence emphasizes selected inputs; independent natural-text validation should precede a general scheduling rule The paired task-quality evaluation of the final policy remains necessary before a quality-qualified deployment claim
Conclusion
PAGEWEAVER uses the relation between selected queries and KV pages to improve execution groups while retaining each query’s full attention output The central design principle is to optimize the cost of executing a fixed sparse relation, including the cost of constructing its execution groups PAGEWEAVER uses the relation between selected queries and KV pages to improve execution groups while retaining each query’s full attention output The direct KV-page execution and the B300 comparison identify why reuse must be evaluated together with preparation and output costs PAGEWEAVER uses the relation between selected queries and KV pages to improve execution groups while retaining each query’s full attention output The central design principle is to optimize the cost of executing a fixed sparse relation, including the cost of constructing its execution groups The central design principle is to optimize the cost of executing a fixed sparse relation, including the cost of constructing its execution groups
How it works
The authors connect query-group size, page-set affinity, and output ownership in a common execution model, with direct KV-page union as a measured design alternative The authors implement bounded GPU regrouping and an ID-aware FP8 sparse-attention path on Hopper, retaining a complete query output within one CTA The execution slot r reads qπ(r), uses membership Mπ(r,p) and causal position cπ(r), and writes oπ(r) This is a supportpreservation argument in exact arithmetic
Key Findings
The authors show that controlled interleaved supports make the page-side opportunity explicit: adjacent queries select different page communities, while distant queries share them Direct KV-page union lowers complete-call time relative to FlashInfer by 15.6% at 32K context (1.340 versus 1.588 ms) and 10.1% at 64K (2.852 versus 3.172 ms) Online W128 lowers complete-call latency by 3.26–7.66% relative to original Union8 The net saving is 58.41 µs
Design Alternatives and Comparisons
The authors compare the base backends against the same Triton reference, and Union8’s differences are close to FlashInfer’s on this set, while native differs more The B300 port preserves support and has at most 1.55 × 10−5 full-output NRMS relative to its parent Native algorithms, input sets, Q entry formats, page sizes, and descriptor costs differ between the two platforms
Conclusion
The operator evidence emphasizes selected inputs; independent natural-text validation should precede a general scheduling rule The paired task-quality evaluation of the final policy remains necessary before a quality-qualified deployment claim The central design principle is to optimize the cost of executing a fixed sparse relation, including the cost of constructing its execution groups The central design principle is to optimize the cost of executing a fixed sparse relation, including the cost of constructing its execution groups The central design principle is to optimize the cost of executing a fixed sparse relation, including the cost of constructing its execution groups<ref:2610.
Improvements for AI systems
-
Bold query grouping to share page loads and populate Tensor Core tiles, as
Query unions share page loads and populate Tensor Core tiles; their cost depends on which queries are grouped together.
This allows for efficient execution of sparse attention by grouping queries whose selected pages overlap, amortizing KV loads. -
Implement an ID-aware two-CTA kernel that consumes IDs
without materializing reordered Q tensors or cross-page partial outputs,
as this designtrades an online grouping cost for a smaller union without introducing crosspage output reduction.
This preserves the original query ownership while exploiting page reuse. -
Utilize bounded online regrouping to lower latency by 3.26–7.66% on five selected 64K-context captures, as
Online regrouping further lowers latency by 3.26–7.66% on five selected 64K-context captures.
This provides a practical speedup for dynamic workloads where query sets can be grouped based on page affinity. -
Develop a direct KV-page union implementation that
retains each query’s original support and complete output ownership,
as this designtrades an online grouping cost for a smaller union without introducing crosspage output reduction.
This enables the system to exploit nonlocal reuse while ensuring every query receives its full, correct output.
Sources
- MiniMax Sparse Attention
- FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precision
- LServe: Efficient Long-sequence LLM Serving with Unified Sparse Attention
- FlashInfer: Efficient and Customizable Attention Engine for LLM Inference Serving
- LiteTopK: Exploiting the Curse of Dimensionality for a Fused Indexer-TopK Kernel in Long-Context Sparse Attention
- BLASST: Dynamic BLocked Attention Sparsity via Softmax Thresholding
Related papers
- iScheduler: Reinforcement Learning-Driven Continual Optimization for Large-Scale Resource Investment Problems
- SAMM: Sharded Automated Market Maker
- InferScale: GPU-Native KV Injection for Personalized LLM Serving
- Vigil: Accountable Liveness against Selective Silence
- Steelhead: Interleaving Partially Synchronous and Asynchronous Commit Rules on a Shared DAG
- Democratizing MoE inference on commodity GPUs with CoMoE