# Block Sparse Attention with Log-Linear Complexity

- **ID:** 1086
- **Kind:** paper
- **URL:** https://arxiv.org/abs/2609.31093
- **Authors:** Bohao Tang, Zhen Qin, Yuqi Pan, Zheng Li, Pengfei Liu
- **Venue:** arXiv / cs.LG
- **Publisher:** arXiv / cs.LG
- **Published:** 2026
- **Source:** arxiv
- **Language:** en
- **Access:** https://arxiv.org/abs/2609.31093
- **License:** arXiv non-exclusive / check PDF
- **License family:** Other (auto-classified)
- **Tags:** block-sparse-attention, long-context, log-linear, 2609.31093
- **Topics:** block sparse attention; long context; log-linear complexity
- **Added:** 2026-09-29
- **Verified:** 2026-10-06
- **Research status:** researched
- **Needs deep evaluation:** no
- **Page:** https://papers.projxon.ai/entries/1086

## 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…

## Attributes

- **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)

## From the source (fetched 2026-10-03)

- **Published:** Sep 25, 2026 (arXiv)
- **arXiv categories:** cs.LG (arXiv)
- **Citations:** 0 (Semantic Scholar)
- **References:** 41 (Semantic Scholar)

## Abstract

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.

## 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.

## Cites, within this collection

- [LongCat Sparse Attention: Taming the Lightning via Streaming-aware Hierarchical Cross-Layer Indexing](https://papers.projxon.ai/entries/452) (paper 2026, #452)
- [MoBA: Mixture of Block Attention for Long-Context LLMs](https://papers.projxon.ai/entries/707) (paper 2025, #707)

## Related entries

- Discussed in: [Long context: three bets and a weak spot in evaluation (overview)](https://papers.projxon.ai/entries/1208) (note, #1208)

## Similar entries

- [Triadic Linear Attention: Three-Dimensional Recurrent States for Long-Context Sequence Modeling](https://papers.projxon.ai/entries/1244) (paper, #1244)
- [Dynamic Linear Attention](https://papers.projxon.ai/entries/489) (paper, #489)
- [Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attention](https://papers.projxon.ai/entries/564) (paper, #564)
- [HySparse2: Hybrid Sparse Attention with Two-Level KV Sharing](https://papers.projxon.ai/entries/1031) (paper, #1031)
- [Let's (not) just put things in Context: Test-Time Training for Long-Context LLMs](https://papers.projxon.ai/entries/533) (paper, #533)
- [Context Language Models](https://papers.projxon.ai/entries/793) (paper, #793)
