Block-sparse attention groups tokens into contiguous blocks and selects which blocks should interact. Computation is performed only for the selected block pairs, avoiding a large number of individual token comparisons. Block-level operations also map efficiently to matrix hardware, which can make the theoretical reduction useful in real deployments.
Different implementations use fixed local blocks, global blocks, learned relevance scores, or a hybrid pattern. The method is well suited to long sequences, but its usefulness depends on selecting blocks that contain the necessary context. Coarse blocks may include irrelevant tokens, while aggressive pruning may exclude an important passage.
ELI5
Block-sparse attention helps an AI model handle long text by dividing it into chunks and comparing only the chunks likely to matter. It avoids doing every possible comparison across the whole sequence.
For example, when answering a question about one chapter of a long manual, the model can focus on nearby and specially selected blocks instead of comparing every word with every other word. This saves work, but an important passage can be missed if the selection is too aggressive.
How does block-sparse attention select context?
It first groups tokens into blocks, then applies a fixed or learned rule to choose which blocks participate in attention for a given query.
Why use blocks instead of selecting individual tokens?
Block operations are easier to execute efficiently on modern accelerators and reduce indexing overhead, although they provide a coarser selection boundary.

