# AdaSplash-2: Faster Differentiable Sparse Attention

AdaSplash-2: 더 빠른 미분 가능 희소 어텐션

Nuno Gonçalves, Hugo Pitorro, Vlad Niculae, Edoardo Ponti, Lei Li, Andre Martins 외 1명 · arXiv · 2026년 4월 16일

- **연구 문제** 긴 문맥에서 softmax의 밀집 어텐션 대신 쓸 수 있는 α-entmax가 정규화 계산 때문에 GPU 학습에서 느렸던 문제를 다룹니다.
- **연구 방법** 히스토그램으로 정규화 상수 τ를 초기화하고 0 블록을 건너뛰는 Triton 구현입니다.
- **주요 결과** 블록 희소도가 중간 이상일 때 FlashAttention-2와 비슷하거나 빠른 학습 시간을 보고하며, 장문맥 RULER에서 NAPE 조합의 α-entmax가 softmax 기준선보다 높은 평균을 보입니다.

## 긴 문맥에서 어텐션의 밀집성과 정규화 비용

표준 softmax 어텐션은 모든 키에 양의 확률 질량을 주기 때문에, 입력이 길어질수록 무관한 토큰에 가중치가 넓게 퍼질 수 있습니다. α-entmax는 입력에 따라 정확히 0인 가중치를 만드는 미분 가능한 희소 대안이지만, 출력을 확률 분포로 만드는 정규화 상수 τ⋆를 찾아야 합니다. softmax는 이 정규화를 한 행에 대해 온라인으로 한 번에 처리할 수 있는 반면, α-entmax는 근을 찾는 반복 계산이 필요하고 그 과정에서 키를 여러 번 훑습니다. 그래서 α-entmax는 학습 처리량에서 최적화된 softmax 커널을 따라잡기 어려웠습니다. ADASPLASH-2는 이 정규화 비용을 줄이는 방법으로 제시되며, 목표는 희소성의 이점을 유지하면서 학습 시간을 줄이는 것입니다.

## α-entmax의 정규화 상수 τ와 근 찾기

α-entmax는 점수 벡터 s에 대해 \\(\[(\\alpha-1)s-\\tau\\mathbf{1}\]\_+^{1/(\\alpha-1)}\\) 형태로 확률을 만듭니다. 여기서 τ는 출력의 합이 1이 되도록 정해지는 정규화 상수이며, 이 τ는 f(τ)=0을 만족하는 근으로 정의됩니다. 함수 f는 τ에 대해 연속이고 단조 감소하므로 근은 유일합니다. α=1.5와 α=2에서는 정렬 기반의 정확한 해법이 가능하지만, 일반 α에서는 bisection이나 Halley 같은 root-finding으로 τ⋆를 찾아야 합니다. 이 과정은 여러 번의 키 스캔을 요구하므로 ADASPLASH-2는 정규화 계산의 반복 횟수를 줄이는 방향으로 설계되었습니다.

## 히스토그램으로 τ를 초기화하는 방법과 하한 보장

ADASPLASH-2는 먼저 점수를 최댓값이 1이 되도록 변환한 뒤, 구간 \[0,1\]을 B개의 같은 너비 빈으로 나눕니다. 각 점수 zj는 자신이 속한 빈의 왼쪽 끝값 k/B로 대체되고, 빈별 개수 Hk를 이용해 목적함수 fh(τ)=−1+Σk Hk \[k/B−τ\]\_+^{1/(α−1)}을 구성합니다. 이 목적함수의 근을 τh라고 하면, 원문의 Proposition 1은 τ⋆−h\<τh≤τ⋆을 보입니다. 여기서 h=1/B입니다. 즉 히스토그램 근은 참 임계값을 넘지 않고, 절대 오차는 빈 너비보다 작습니다. 왼쪽 끝을 쓰는 binning은 τh가 만드는 활성 집합이 참 지지 집합을 포함하도록 하여 블록 마스크를 안전하게 쓰게 합니다.

이 결과는 α\>1 조건에서 제시된 명제이며, 실제 학습 실행의 정확도는 별도 실험에서 확인됩니다.

![Table 4: Histogram capacity analysis for different integer types and bin configurations with Bc = 64. Capacity indicates maximum keys per query tile; resolutio…](https://refivu.com/papers/c0088d29-0ad2-4489-9b71-b3ce2a62b4a6/figures/figure-4955f29e5e2a55d1a927dceb8de27cde.png?thumb=512)

**Table 4** . Histogram capacity analysis for different integer types and bin configurations with Bc = 64. Capacity indicates maximum keys per query tile; resolutionh= 1/Bis the bin width affecting threshold accuracy (Proposition 1).

[원문](https://arxiv.org/abs/2604.15180v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Nuno Gonçalves, Hugo Pitorro, Vlad Niculae, Edoardo Ponti, Lei Li, Andre Martins, Marcos Treviso · AdaSplash-2: Faster Differentiable Sparse Attention · 원문 그림 인용 · 원본 PDF 19쪽에서 그림 영역을 추출했습니다.

## SRAM 안의 히스토그램과 블록 마스크를 쓰는 GPU 커널

구현은 query 블록마다 key 블록을 스트리밍하는 네 단계로 이루어집니다. 첫 단계에서 행별 최댓값을 구하고, 두 번째 단계에서 SRAM 안에 히스토그램을 만들어 초기 τh를 얻습니다. 세 번째 단계에서는 고정된 횟수의 하이브리드 갱신으로 τ를 정제하며, 동시에 0이 아닌 블록을 표시하는 블록 마스크를 비트 패킹으로 저장합니다. 마지막 단계에서는 이 마스크가 가리키는 블록만 순회하여 출력을 계산합니다. 히스토그램의 각 빈은 정수 한 워드를 B개의 비트 필드로 나눈 값이므로, 빈의 최대 개수에는 상한이 있습니다. 그래서 긴 문맥에서는 주기적으로 빈 값을 플러시해야 합니다. 역전파는 같은 블록 마스크를 재사용하여 0이 아닌 블록에서만 기울기를 계산합니다.

## 히스토그램 초기화의 수렴 효과

정규화 해 찾기 실험은 길이 4096의 가우시안 점수 벡터와 α=1.5에서 수행되었습니다. 정확한 기준 τ⋆와 비교하여 10회 실행의 평균 절대 오차를 측정했으며, 비교 대상은 bisection, 히스토그램 없이 초기화한 하이브리드 솔버, 그리고 B=4, 8, 16 히스토그램으로 초기화한 하이브리드 솔버입니다. 저자들은 첫 번째 반복 후 히스토그램 초기화가 솔버를 참 근에 훨씬 가깝게 놓아, 이후 정제가 사실상 한 번의 보정으로 끝난다고 해석합니다. 빈 개수가 많을수록 초기 추정이 더 정확하다는 점도 관찰되었습니다. 이 결과는 하나의 무작위 점수 분포와 α=1.5 조건에서 얻은 것입니다.

## 희소도와 문맥 길이에 따른 실행 시간

실행 시간 벤치마크는 무작위 가우시안 Q, K, V를 사용하고, 머리 차원 64와 bf16 정밀도에서 쿼리 분산을 바꿔 64×64 블록 희소도를 조절했습니다. 측정은 단일 A6000 GPU에서 수행되었습니다. 저자들은 중간에서 높은 블록 희소도 구간에서 ADASPLASH-2가 Triton과 CUDA 구현의 FlashAttention-2보다 빠르며, 극단적인 희소도에서는 두 변형에 대해 2배 이상의 속도를 보인다고 보고합니다. 문맥 길이 실험은 1B 모델이 학습한 블록 희소도 비율을 사용하며, 4K부터 128K까지 측정합니다. 순전파에서는 α-entmax의 추가 정규화 단계 때문에 격차가 남지만 문맥이 길어질수록 자연스러운 희소도로 격차가 줄어듭니다.

역전파는 짧은 문맥에서도 기존 희소도 덕분에 빨라지며, 그 이점은 문맥이 길어질수록 커집니다. FlashAttention-3는 Hopper 전용 최적화이므로 이 비교에서는 사용하지 않았습니다.

![Figure 1: Runtime (forward + backward) as a function of input sparsity for causal attention. ADASPLASH-2, implemented in Triton, improves the sparsity-efficien…](https://refivu.com/papers/c0088d29-0ad2-4489-9b71-b3ce2a62b4a6/figures/figure-2137eccbcc7127110cbe4e3356f3423e.png?thumb=512)

**Figure 1** . Runtime (forward + backward) as a function of input sparsity for causal attention. ADASPLASH-2, implemented in Triton, improves the sparsity-efficiency tradeoff, outperforming a highly-optimized CUDA version of FlashAttention-2 in moderate sparsity regimes and yielding larger gains at high block sparsity.

[원문](https://arxiv.org/abs/2604.15180v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Nuno Gonçalves, Hugo Pitorro, Vlad Niculae, Edoardo Ponti, Lei Li, Andre Martins, Marcos Treviso · AdaSplash-2: Faster Differentiable Sparse Attention · 원문 그림 인용 · 원본 PDF 1쪽에서 그림 영역을 추출했습니다.

![Figure 4: Runtime efficiency of causal self-attention implementations across context lengths of 4K-128K tokens with varying 64x64 block sparsity. Bar heights a…](https://refivu.com/papers/c0088d29-0ad2-4489-9b71-b3ce2a62b4a6/figures/figure-3bd466f2d4af9364ac61bb6289f9f4ae.png?thumb=512)

**Figure 4** . Runtime efficiency of causal self-attention implementations across context lengths of 4K-128K tokens with varying 64x64 block sparsity. Bar heights are normalized to FlashAttention-2 (Triton), with the opaque part denoting forward and the lighter part denoting backward. Numeric labels report the total forward + backward step time. Lower bars represent faster runtimes.

[원문](https://arxiv.org/abs/2604.15180v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Nuno Gonçalves, Hugo Pitorro, Vlad Niculae, Edoardo Ponti, Lei Li, Andre Martins, Marcos Treviso · AdaSplash-2: Faster Differentiable Sparse Attention · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.

![Figure 7: Average 64×64 attention block sparsity ratio for the Entmax (NAPE) model with 32K context length. Panels correspond to evaluated context lengths (4K…](https://refivu.com/papers/c0088d29-0ad2-4489-9b71-b3ce2a62b4a6/figures/figure-fab535841b7e9b08167e3d9c1870808e.png?thumb=512)

**Figure 7** . Average 64×64 attention block sparsity ratio for the Entmax (NAPE) model with 32K context length. Panels correspond to evaluated context lengths (4K / 8K / 16K / 32K / 64K / 128K). We report the overall average sparsity across all layers and heads in the title on each plot.

[원문](https://arxiv.org/abs/2604.15180v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Nuno Gonçalves, Hugo Pitorro, Vlad Niculae, Edoardo Ponti, Lei Li, Andre Martins, Marcos Treviso · AdaSplash-2: Faster Differentiable Sparse Attention · 원문 그림 인용 · 원본 PDF 22쪽에서 그림 영역을 추출했습니다.

## 언어 모델의 장문맥과 짧은 문맥 결과

언어 모델은 LLaMA-3 구조의 350M과 1B 모델을 DCLM-Edu 50B 토큰에서 학습했고, α-entmax에는 α=1.5를 사용했습니다. RULER 장문맥 평가에서 NAPE를 사용한 α-entmax는 평가된 모든 문맥 길이에서 가장 높은 평균을 보였으며, 두 softmax 기준선보다 앞섰습니다. 차이는 변수 추적(VT)과 흔한 단어 및 빈도 단어 추출(CWE, FWE)에서 특히 크게 나타났습니다. HELMET의 ICL 부분집합에서도 NAPE 조합의 α-entmax가 8K, 16K, 32K 모두에서 가장 높은 평균을 기록했습니다. 짧은 문맥의 OLMES 평가에서는 350M과 1B 모두 α-entmax 모델의 정확도 과제 점수가 대등하거나 높았습니다.

퍼플렉서티는 NAPE 조합에서 낮았지만, 1B RoPE 설정에서는 α-entmax가 더 높아 이 결과를 모든 설정으로 일반화할 수 없습니다.

![Table 3: Short-context benchmark results for 350M and 1B models with 4K context length. Scores are computed with the OLMES framework using thecore 9mcqasuite.…](https://refivu.com/papers/c0088d29-0ad2-4489-9b71-b3ce2a62b4a6/figures/figure-cb8a1ea3b53a9631bd8d7e8d02526144.png?thumb=512)

**Table 3** . Short-context benchmark results for 350M and 1B models with 4K context length. Scores are computed with the OLMES framework using thecore 9mcqasuite. Best perplexity and average results are inbold.

[원문](https://arxiv.org/abs/2604.15180v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Nuno Gonçalves, Hugo Pitorro, Vlad Niculae, Edoardo Ponti, Lei Li, Andre Martins, Marcos Treviso · AdaSplash-2: Faster Differentiable Sparse Attention · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

![Table 5: Downstream evaluations on short-context benchmarks. Models are trained with 50B tokens from DCLM-Edu and have 4K context length. Those marked with(32K…](https://refivu.com/papers/c0088d29-0ad2-4489-9b71-b3ce2a62b4a6/figures/figure-4169a74205fb57244c67a6c8bc8e7b7e.png?thumb=512)

**Table 5** . Downstream evaluations on short-context benchmarks. Models are trained with 50B tokens from DCLM-Edu and have 4K context length. Those marked with(32K)undergo context-length extension with 10B tokens of Prolong data. Best results are inbold.

[원문](https://arxiv.org/abs/2604.15180v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Nuno Gonçalves, Hugo Pitorro, Vlad Niculae, Edoardo Ponti, Lei Li, Andre Martins, Marcos Treviso · AdaSplash-2: Faster Differentiable Sparse Attention · 원문 그림 인용 · 원본 PDF 20쪽에서 그림 영역을 추출했습니다.

## softmax 체크포인트의 α-entmax 변환

부록의 변환 실험은 softmax와 NAPE로 4K 문맥에서 학습한 1B 체크포인트를 출발점으로 삼았습니다. softmax를 α-entmax로 교체한 직후에는 추가 학습 없이도 성능이 떨어지지만 붕괴하지는 않았습니다. 이후 Nemotron-CC-V2에서 10B 토큰의 연속 pre-training을 수행하면 변환 모델의 평균이 회복되며, 논문은 약 2B 토큰 뒤 평균이 softmax 기준선 수준에 도달했다고 보고합니다. 이 실험은 1B NAPE 변형 하나에서 수행된 예비 연구입니다.

![Table 6: Downstream evaluations on short-context benchmarks Models are trained with 50B tokens from DCLM-Edu and have 4K context length.Entmax (converted)impli…](https://refivu.com/papers/c0088d29-0ad2-4489-9b71-b3ce2a62b4a6/figures/figure-6495b40a50f599c72800b667bbd06cec.png?thumb=512)

**Table 6** . Downstream evaluations on short-context benchmarks Models are trained with 50B tokens from DCLM-Edu and have 4K context length.Entmax (converted)implies the softmax-based model was evaluated with ADASPLASH-2 without further training, whileEntmax (CPT)is the converted model subjected to Continuous Pre-Training (CPT).

[원문](https://arxiv.org/abs/2604.15180v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Nuno Gonçalves, Hugo Pitorro, Vlad Niculae, Edoardo Ponti, Lei Li, Andre Martins, Marcos Treviso · AdaSplash-2: Faster Differentiable Sparse Attention · 원문 그림 인용 · 원본 PDF 21쪽에서 그림 영역을 추출했습니다.

## 적용 범위와 남은 과제

추론용 커널은 최적화되지 않았습니다. 저자들은 순전파가 여러 키 스캔을 요구하므로 완전한 추론 커널은 향후 과제로 남긴다고 설명합니다. 실행 시간 측정은 단일 A6000 GPU에서 이루어졌고, FlashAttention-3의 Hopper 최적화는 비교에 포함되지 않았습니다. 언어 모델 결과는 350M과 1B 규모, 4K부터 32K까지의 문맥 설정에서 얻어졌습니다. 장문맥 결과는 NAPE 위치 인코딩과 함께 해석해야 하며, RoPE 설정의 결과와 섞어 일반화할 수 없습니다.

## 논문 정보

- **저자**: Nuno Gonçalves, Hugo Pitorro, Vlad Niculae, Edoardo Ponti, Lei Li, Andre Martins, Marcos Treviso
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2026년 4월 16일
- **등록일**: 2026년 10월 29일
- **수정일**: 2026년 4월 16일
- **버전**: v1
- **arXiv**: 2604.15180
- **분류**: cs.LG · cs.CL
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2604.15180v1) · [원문 PDF ↗](https://arxiv.org/pdf/2604.15180v1)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

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.

## 원문 인용

Nuno Gonçalves, Hugo Pitorro, Vlad Niculae, Edoardo Ponti, Lei Li, Andre Martins, Marcos Treviso (2026). AdaSplash-2: Faster Differentiable Sparse Attention. arXiv:2604.15180v1. https://arxiv.org/abs/2604.15180v1

**BibTeX**

```
@misc{gonalves2026adasplash,
  title = {{AdaSplash-2: Faster Differentiable Sparse Attention}},
  author = {Nuno Gonçalves and Hugo Pitorro and Vlad Niculae and Edoardo Ponti and Lei Li and Andre Martins and Marcos Treviso},
  year = {2026},
  eprint = {2604.15180},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.15180v1}
}
```

## 다른 논문 해설

- [Benign Overfitting in Adversarial Training for Vision Transformers](https://refivu.com/papers/a90339d2-e025-49a0-97df-3e6493ad2bd1-benign-overfitting-in-adversarial-training-for-vision.md)
- [Towards Certified Unlearning for Deep Neural Networks](https://refivu.com/papers/850d7d8a-affd-45b9-b183-28ff19d787ac-towards-certified-unlearning-for-deep-neural-networks.md)
- [Focus and Dilution: The Multi-stage Learning Process of Attention](https://refivu.com/papers/e6b90367-c1c2-4867-8bbc-18e92193520d-focus-and-dilution-the-multi-stage-learning-process.md)
- [HEXST: Hexagonal Shifted-Window Transformer for Spatial Transcriptomics Gene Expression Prediction](https://refivu.com/papers/7c3bd06d-0848-44d9-94e6-1fc1eab7d611-hexst-hexagonal-shifted-window-transformer-for-spatial.md)
- [Multi-Scale Wavelet Transformers for Operator Learning of Dynamical Systems](https://refivu.com/papers/99516f77-526a-48c6-b49a-c6b19b348ddc-multi-scale-wavelet-transformers-for-operator-learning-of.md)
- [Caracal: Causal Architecture via Spectral Mixing](https://refivu.com/papers/58a28d0a-323e-43a7-adf0-1661f45ffcac-caracal-causal-architecture-via-spectral-mixing.md)
- [LongCoT: Benchmarking Long-Horizon Chain-of-Thought Reasoning](https://refivu.com/papers/26536948-d880-462a-86ea-a2fc74cd37cb-longcot-benchmarking-long-horizon-chain-of-thought-reasoning.md)
- [Intentional Updates for Streaming Reinforcement Learning](https://refivu.com/papers/19377172-88c8-4bfd-a5a6-121b40f60999-intentional-updates-for-streaming-reinforcement-learning.md)
- [Verification of Machine Unlearning is Fragile](https://refivu.com/papers/600c543e-20b2-4c40-82ed-7750fbbf4f46-verification-of-machine-unlearning-is-fragile.md)
- [Relative Entropy Estimation in Function Space: Theory and Applications to Trajectory Inference](https://refivu.com/papers/a9ff6320-ef26-4ee4-911f-4a8c39b902d5-relative-entropy-estimation-in-function-space-theory-and.md)
- [Tokenised Flow Matching for Hierarchical Simulation Based Inference](https://refivu.com/papers/800f60c6-69fb-48c9-b47d-699047fcdf96-tokenised-flow-matching-for-hierarchical-simulation-based.md)
- [Differentiable Conformal Training for LLM Reasoning Factuality](https://refivu.com/papers/f680eced-051e-4f77-b330-404301215d25-differentiable-conformal-training-for-llm-reasoning.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/c0088d29-0ad2-4489-9b71-b3ce2a62b4a6-adasplash-2-faster-differentiable-sparse-attention)
