Block Sparse Attention with Log-Linear Complexity
Summary
Scaling language models to long contexts is limited by the quadratic cost of self-attention. Block sparse attention offers an efficient alternative, but selecting the retained blocks remains a bottleneck. Conventional block selection requires scoring all query-block pairs and therefore remains quadratic in sequence length. To address this issue, we propose PISA, a block-sparse attention mechanism that employs a pyramid Top-$K$ selection strategy. The main idea is to gradually narrow down the candidates across diffe…
- Venue
- arXiv / cs.LG
- Publisher
- arXiv / cs.LG
- Source
- arxiv
- Access
- https://arxiv.org/abs/2609.31093
- License
- arXiv non-exclusive / check PDF
- License family
- Other
- Language
- en
- Purpose
- Block sparse attention with log-linear complexity for long-context Transformers
- Scale
- See PDF/abstract
- Domain
- block sparse attention; long context; log-linear complexity
- Used for
- Long-context efficiency; block-sparse attention kernels
- Time period
- arXiv published 2026-09-25; cataloged 2026-09-29
- Author type
- academic (check PDF)
- Added
- Sep 29, 2026
- Verified
- Oct 6, 2026
- Research status
- researched
- Found via
- #random-papers
From the source
- Published
- Sep 25, 2026
- arXiv categories
- cs.LG
- Citations
- 0
- References
- 41
Abstract (from arXiv)
Scaling language models to long contexts is limited by the quadratic cost of self-attention. Block sparse attention offers an efficient alternative, but selecting the retained blocks remains a bottleneck. Conventional block selection requires scoring all query-block pairs and therefore remains quadratic in sequence length. To address this issue, we propose PISA, a block-sparse attention mechanism that employs a pyramid Top-$K$ selection strategy. The main idea is to gradually narrow down the candidates across different levels, making it more efficient to find the most relevant keys. Specifically, we construct a coarse-to-fine hierarchy of keys and perform selection from the coarsest level. At each level, LogSumExp scoring is applied to a bounded candidate set to select candidates for the next finer level, continuing until the finest level is reached. Through pooling, we construct $O(\log N)$ levels of keys, yielding an overall complexity of $O(N\log N)$, where $N$ denotes the sequence length. We develop hardware-aware Triton kernels for both training and inference, fusing hierarchical routing and LogSumExp scoring without materializing the query-key score matrix. We further evaluate our method on language modeling tasks. Compared with the baseline, our method achieves comparable performance on benchmarks such as commonsense reasoning while delivering better results on retrieval tasks.
Tags
Topics
block sparse attention; long context; log-linear complexity
Research notes
- Discord #random-papers pass-20260929-1627. arXiv Atom. Cats: cs.LG.
- Enriched 2026-10-06: @gurtej__gill_ (Gill, AI researcher) review thread 2026-10-05 3:19 PM ET (https://x.com/gurtej__gill_/status/2107188954449740241), 599 views — frames the contribution as fixing the block-selection bottleneck: most block-sparse papers 'wave their hands' at linear scaling while the top-K block selection quietly stays O(N^2); PISA's coarse-to-fine pooled-key pyramid pulls selection+compute to genuine O(N log N); custom fused Triton kernels avoid materializing query-key matrices; holds parity with dense on standard benchmarks and shines on retrieval. Open question from replier @jurlycat: how routing overhead changes with block size and sequence length.
Notes about this
- Note
Long context: three bets and a weak spot in evaluation (overview)
An overview of the 33 entries on long-context modelling: cheaper attention, memory beside attention, and managing context from outside, plus what the benchmarks do and do not show. Written by Claude Opus 5.5.
Cites, within this collection
Similar entries
- Paper Triadic Linear Attention: Three-Dimensional Recurrent States for Long-Context Sequence Modeling
- Paper Dynamic Linear Attention
- Paper Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attention
- Paper HySparse2: Hybrid Sparse Attention with Two-Level KV Sharing
- Paper Let's (not) just put things in Context: Test-Time Training for Long-Context LLMs
- Paper Context Language Models