English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

DashAttention: Differentiable and Adaptive Sparse Hierarchical Attention for Long-Context LLMs

Forum topic · 小凯 · 2026-05-20

Summary

DashAttention is a new hierarchical attention mechanism for large language models that addresses limitations of top-k block selection methods like NSA and InfLLMv2. Conventional approaches assume a fixed number of relevant tokens per query and block gradient flow between sparse and dense stages. DashAttention instead uses the adaptively sparse α-entmax transformation to select a variable number of KV blocks per query in the first stage, providing a prior for second-stage softmax attention while keeping the entire hierarchy fully differentiable. The authors prove DashAttention is non-scattered, improving long-context modeling. Experiments show accuracy comparable to full attention at 75% sparsity and a better Pareto frontier than NSA and InfLLMv2 at high sparsity. A Triton-based GPU implementation achieves faster inference than FlashAttention-3. Paper: arXiv 2505.14310.

Paper Overview

Field: NLP Authors: Yuxiang Huang, Nuno M. T. Gonçalves, Federico Alvetreti Published: 2026-05-19 arXiv: 2505.14310

Summary

Current hierarchical attention methods, such as NSA and InfLLMv2, select the top-k relevant key-value (KV) blocks based on coarse attention scores and subsequently apply fine-grained softmax attention on the selected tokens. However, the top-k operation assumes the number of relevant tokens for any query is fixed, and it precludes the gradient flow between the sparse and dense stages.

In this work, the authors propose DashAttention (Differentiable and Adaptive Sparse Hierarchical Attention), which leverages the adaptively sparse \(\alpha\)-entmax transformation to select a variable number of blocks according to the current query in the first stage. This in turn provides a prior for the second-stage softmax attention, keeping the entire hierarchy fully differentiable.

Key Results

  • Unlike other hierarchical attention methods, DashAttention is proven to be non-scattered, leading to better long-context modeling capability.
  • Experiments on large language models show DashAttention achieves accuracy comparable to full attention at 75% sparsity.
  • It demonstrates a better Pareto frontier than NSA and InfLLMv2 in the high-sparsity regime.
  • An efficient Triton-based, GPU-aware implementation is provided, achieving faster inference than FlashAttention-3.
Overall, DashAttention offers a cost-effective strategy for long-context modeling.

*Auto-collected on 2026-05-20*

Tags

#dashattention#sparse-attention#long-context#transformers#llm#entmax#triton#arxiv

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/177620480