Uncertainty-Gated Selection Boosts Block-Sparse Attention

Thomas Rossi· July 10, 2026 View original

Summary

A new value-of-information router improves block-sparse attention in long-context language models by dynamically expanding the kept set of key blocks for queries where the top-k selection is uncertain. This method significantly increases recall and accuracy while maintaining efficiency.

Block-sparse attention is a technique used to scale long-context language models by reducing the quadratic complexity of softmax to a per-query top-k selection over key blocks. However, this approach can be myopic; if the k-th and (k+1)-th blocks have very similar scores, the system commits to the top-k without further consideration, potentially dropping crucial information. Researchers have introduced a novel value-of-information router to address this limitation. This router measures the decisiveness of the top-k cut for each query. For queries where the gap between the k-th and (k+1)-th block scores is smallest (indicating high uncertainty in the selection), the router dynamically doubles the kept set of blocks. This mechanism is backbone-agnostic and can be stacked with existing block-scoring methods, such as Quest. Evaluations on LongBench-v2 medium demonstrated that the router-on-Quest approach achieved a paired recall of 0.75, a significant improvement of +28 percentage points over the SSA-style baseline's 0.47. It also performed within 2 percentage points of dense attention on RULER NIAH multikey at the same context. The performance lift was consistent across four models from three different architectures (Qwen2.5, Mistral-Nemo, Qwen3.6). At 128K context, the router preserved 0.81 and 0.89 of dense accuracy on Qwen2.5-7B-1M and Qwen3.6 respectively (compared to 0.09 for SSA-style top-k), while the fused selection-plus-kernel pipeline maintained efficiency, running at 0.62x and 0.80x dense wall time.

Why it matters

For professionals deploying large language models, especially in long-context applications, this innovation offers a way to significantly improve the accuracy and recall of sparse attention mechanisms without sacrificing efficiency. This leads to more reliable and capable LLMs for complex tasks.

How to implement this in your domain

  1. 1Investigate integrating the uncertainty-gated selection router into your block-sparse attention mechanisms for LLMs.
  2. 2Experiment with dynamically expanding the kept set of key blocks based on selection uncertainty for long-context tasks.
  3. 3Benchmark the performance gains in recall and accuracy on your specific long-context datasets.
  4. 4Evaluate the computational overhead of the fused selection-plus-kernel pipeline in your inference environment.
  5. 5Consider applying this method to improve the reliability of RAG systems or complex document analysis.

Who benefits

AI/ML PlatformsSoftware DevelopmentLegalTechResearch & DevelopmentContent Creation

Key takeaways

  • A new uncertainty-gated router improves block-sparse attention in LLMs.
  • It dynamically expands the selected key blocks for queries with uncertain top-k cuts.
  • The method significantly boosts recall and accuracy in long-context tasks.
  • It maintains efficiency with minimal overhead and generalizes across various architectures.

Original post by Thomas Rossi

"arXiv:2607.07724v1 Announce Type: new Abstract: Block-sparse attention scales long-context language models by replacing the O(N^2) softmax with a per-query top-k selection over key blocks. This cutoff is myopic: when the k-th and (k+1)-th blocks are nearly tied in score, the sele…"

View on X

Originally posted by Thomas Rossi on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses