AdaSplash-2: Faster Differentiable Sparse Attention

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Gonçalves, Nuno, Pitorro, Hugo, Niculae, Vlad, Ponti, Edoardo, Li, Lei, Martins, Andre, Treviso, Marcos
Format: Preprint
Veröffentlicht: 2026
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866911598954676224
author Gonçalves, Nuno
Pitorro, Hugo
Niculae, Vlad
Ponti, Edoardo
Li, Lei
Martins, Andre
Treviso, Marcos
author_facet Gonçalves, Nuno
Pitorro, Hugo
Niculae, Vlad
Ponti, Edoardo
Li, Lei
Martins, Andre
Treviso, Marcos
contents Sparse attention has been proposed as a way to alleviate the quadratic cost of transformers, a central bottleneck in long-context training. A promising line of work is $α$-entmax attention, a differentiable sparse alternative to softmax that enables input-dependent sparsity yet has lagged behind softmax due to the computational overhead necessary to compute the normalizer $τ$. In this paper, we introduce AdaSplash-2, which addresses this limitation through a novel histogram-based initialization that reduces the number of iterations needed to compute $τ$ to typically 1--2. The key idea is to compute a coarse histogram of attention scores on the fly and store it in on-chip SRAM, yielding a more accurate initialization that enables fast forward and backward computation. Combined with a sparsity-aware GPU implementation that skips zero blocks with low overhead, AdaSplash-2 matches or improves per-step training time relative to FlashAttention-2 when block sparsity is moderate-to-high (e.g., $>$60\%), which often occurs at long-context lengths. On downstream tasks, models trained with our efficient $α$-entmax attention match softmax baselines at short-context lengths and achieve substantial gains in long-context settings.
format Preprint
id arxiv_https___arxiv_org_abs_2604_15180
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle AdaSplash-2: Faster Differentiable Sparse Attention
Gonçalves, Nuno
Pitorro, Hugo
Niculae, Vlad
Ponti, Edoardo
Li, Lei
Martins, Andre
Treviso, Marcos
Machine Learning
Computation and Language
Sparse attention has been proposed as a way to alleviate the quadratic cost of transformers, a central bottleneck in long-context training. A promising line of work is $α$-entmax attention, a differentiable sparse alternative to softmax that enables input-dependent sparsity yet has lagged behind softmax due to the computational overhead necessary to compute the normalizer $τ$. In this paper, we introduce AdaSplash-2, which addresses this limitation through a novel histogram-based initialization that reduces the number of iterations needed to compute $τ$ to typically 1--2. The key idea is to compute a coarse histogram of attention scores on the fly and store it in on-chip SRAM, yielding a more accurate initialization that enables fast forward and backward computation. Combined with a sparsity-aware GPU implementation that skips zero blocks with low overhead, AdaSplash-2 matches or improves per-step training time relative to FlashAttention-2 when block sparsity is moderate-to-high (e.g., $>$60\%), which often occurs at long-context lengths. On downstream tasks, models trained with our efficient $α$-entmax attention match softmax baselines at short-context lengths and achieve substantial gains in long-context settings.
title AdaSplash-2: Faster Differentiable Sparse Attention
topic Machine Learning
Computation and Language
url https://arxiv.org/abs/2604.15180