The Sparse Frontier: Sparse Attention Trade-offs in Transformer LLMs

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Nawrot, Piotr, Li, Robert, Huang, Renjie, Ruder, Sebastian, Marchisio, Kelly, Ponti, Edoardo M.
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912852973977600
author Nawrot, Piotr
Li, Robert
Huang, Renjie
Ruder, Sebastian
Marchisio, Kelly
Ponti, Edoardo M.
author_facet Nawrot, Piotr
Li, Robert
Huang, Renjie
Ruder, Sebastian
Marchisio, Kelly
Ponti, Edoardo M.
contents Sparse attention offers a promising strategy to extend long-context capabilities in Transformer LLMs, yet its efficiency-accuracy trade-offs remain unclear due to the lack of comprehensive evaluation. We address this gap with the largest-scale empirical analysis to date of training-free sparse attention, evaluating six methods across multiple model families and sizes, sequences up to 128K tokens, and sparsity levels up to 0.95 (i.e., $1/20$ attention budget) on nine diverse tasks. We first organise the rapidly evolving landscape of sparse attention methods into a taxonomy along four design axes. Our analysis then yields actionable insights: 1) sparse attention is effective -- larger sparse models outperform smaller dense ones at equivalent cost, improving the Pareto frontier; 2) due to computational constraints, token-to-page importance estimation is unfeasible during prefilling, where the choice of an alternative solution (global-to-token or block-to-block) depends on the task, but is possible during decoding, enabling better generalisation and tolerance to higher sparsity; 3) longer sequences tolerate higher sparsity, suggesting that fixed-budget methods in production are suboptimal. Together, these findings provide practical guidance for deploying sparse attention and methodological recommendations for future evaluations. Our code is available at https://github.com/PiotrNawrot/sparse-frontier.
format Preprint
id arxiv_https___arxiv_org_abs_2504_17768
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle The Sparse Frontier: Sparse Attention Trade-offs in Transformer LLMs
Nawrot, Piotr
Li, Robert
Huang, Renjie
Ruder, Sebastian
Marchisio, Kelly
Ponti, Edoardo M.
Computation and Language
Machine Learning
Sparse attention offers a promising strategy to extend long-context capabilities in Transformer LLMs, yet its efficiency-accuracy trade-offs remain unclear due to the lack of comprehensive evaluation. We address this gap with the largest-scale empirical analysis to date of training-free sparse attention, evaluating six methods across multiple model families and sizes, sequences up to 128K tokens, and sparsity levels up to 0.95 (i.e., $1/20$ attention budget) on nine diverse tasks. We first organise the rapidly evolving landscape of sparse attention methods into a taxonomy along four design axes. Our analysis then yields actionable insights: 1) sparse attention is effective -- larger sparse models outperform smaller dense ones at equivalent cost, improving the Pareto frontier; 2) due to computational constraints, token-to-page importance estimation is unfeasible during prefilling, where the choice of an alternative solution (global-to-token or block-to-block) depends on the task, but is possible during decoding, enabling better generalisation and tolerance to higher sparsity; 3) longer sequences tolerate higher sparsity, suggesting that fixed-budget methods in production are suboptimal. Together, these findings provide practical guidance for deploying sparse attention and methodological recommendations for future evaluations. Our code is available at https://github.com/PiotrNawrot/sparse-frontier.
title The Sparse Frontier: Sparse Attention Trade-offs in Transformer LLMs
topic Computation and Language
Machine Learning
url https://arxiv.org/abs/2504.17768