SparseGDN: Chunk Sparse in Linear Attention

Jiedong Zhuang, Peng Zhao, Jialin Tang, Haoji HuarXiv 2026

TL;DR

SparseGDN is a hardware-aware framework that significantly accelerates the "prefill" stage of Gated Delta Networks (GDNs) by introducing two-level sparsification. By approximating local computations and dynamically skipping redundant recurrent state updates, it achieves up to a 1.94× speedup and a ~60% reduction in peak memory increment on context lengths up to 128K, all while maintaining the accuracy of models like Qwen3.5.

What Problem Does This Paper Address?

While Transformers dominate the AI landscape, their quadratic complexity makes long-context processing prohibitively expensive. Gated Delta Networks (GDNs) offer a promising linear-time alternative, but they face their own "prefill" bottleneck.

When a model first processes a long prompt (prefill), standard GDN implementations perform dense "Delta solves" within every chunk of tokens and update the recurrent state for every single head. As context lengths grow to 128K tokens and beyond, these dense operations lead to massive computational overhead and memory traffic. The authors observed that many of these updates are actually redundant—recurrent states often remain nearly stationary across chunks, and local token interactions are highly concentrated near the diagonal.

Methods

SparseGDN tackles these inefficiencies through a co-designed algorithmic and systemic approach:

  1. Block-Adjacent Solver (Intra-chunk Sparsity): Instead of a full dense matrix solve for every 64-token chunk, SparseGDN uses a block-adjacent approximation. It restricts the computation to diagonal and immediately adjacent blocks, capturing the most critical local interactions while slashing the operation count.
  2. Dynamic Event Selection (Inter-chunk Sparsity): The framework uses a "Selector" to decide which recurrent state updates are essential. It ranks chunks based on "tail statistics" (the magnitude of transformed values near chunk boundaries) and allocates update budgets to different head pairs using a tiered system (High, Medium, Low retention).
  3. Hardware-Aware GPU Pipeline: To translate these algorithmic gains into actual wall-clock speedups, the authors built a custom GPU pipeline. Key optimizations include:
  4. Deferred Materialization: Update matrices are only built for chunks that the Selector actually decides to update.
  5. CSR-based Scanning: Selected events are packed into a Compressed Sparse Row (CSR) layout to ensure efficient GPU execution.
  6. Mapped Output Reconstruction: The system reconstructs outputs for every token by combining compact state snapshots with group-local interactions, avoiding the need to store massive intermediate states.
The SparseGDN execution pipeline showing how the Selector filters events before materialization and recurrent updates.

Datasets

The authors evaluated SparseGDN using the RULER long-context benchmark, which consists of 13 diverse tasks including retrieval, multi-hop tracing, and aggregation. They tested context lengths ranging from 4K to 128K tokens on two models: Qwen3.5-4B and Qwen3.5-9B.

Key Insights and Ideas

  • State Stationarity: A key "aha moment" came from visualizing state changes. As shown in Figure 2a, many value heads show very little change between adjacent chunks, suggesting that skipping updates won't significantly hurt the model's "memory."
  • Head Heterogeneity: Not all heads are created equal. Some heads require frequent updates to track rapid state changes, while others can "coast" for many chunks. SparseGDN’s tiered budget allocation exploits this diversity.
  • Locality is King: The coefficients in the Delta-solve matrix naturally concentrate near the causal diagonal (Figure 2b). This empirical finding justifies the use of a block-adjacent solver without sacrificing much precision.
Empirical evidence of state stationarity (left) and coefficient locality (right) that motivates the SparseGDN approach.

Key Results

SparseGDN delivers impressive efficiency gains without the typical "sparsity tax" on accuracy:

  • Speedup: It achieves a 1.50× to 1.94× speedup in GDN-core prefill latency. The gains are most pronounced at longer context lengths (128K), where the overhead of the Selector is easily amortized.
  • Memory Efficiency: At 128K context, SparseGDN reduces the peak memory increment by 59.56% for the 4B model and 57.97% for the 9B model. This allows models to handle much longer sequences on the same hardware.
  • Accuracy Preservation: On the RULER benchmark, the aggregate score changed by only +0.017% for Qwen3.5-4B and -0.115% for Qwen3.5-9B, effectively maintaining baseline performance.
Prefill latency comparison showing SparseGDN consistently outperforming the native FLA GDN implementation across all context lengths.

Limitations and Future Work

The primary limitation is that the Selector relies on hand-designed heuristics (tail statistics, lifetime estimates) rather than being learned end-to-end. While efficient, this might require recalibration for different model architectures or data distributions.

Additionally, the current evaluation is limited to the RULER benchmark. The authors suggest that future work should validate SparseGDN on more open-ended generation tasks and real-world deployment traces to ensure that the skipped updates don't conceal regressions in more complex reasoning scenarios. There is also potential to explore even finer-grained selection policies beyond the current head-pair level.

Summary updated

Abstract

Gated Delta Networks (GDNs) offer linear-time sequence modeling, yet long-context prefill remains costly due to dense intra-chunk computation, recurrent-state updates, and intermediate state storage. We introduce SparseGDN, a hardware-aware framework that combines structured intra-chunk approximation with input-dependent recurrent-event selection while producing outputs for every token. A block-adjacent solver reduces local Delta-solve computation, while a dynamic selector allocates recurrent-update budgets across head pairs. The GPU implementation materializes updates only for selected events and reconstructs token outputs using compact state snapshots and group-local interactions, reducing computation and memory traffic. We evaluate SparseGDN on Qwen3.5-4B and Qwen3.5-9B across RULER tasks and context lengths from 4K to 128K. Retaining approximately 29% of recurrent events on average, SparseGDN achieves 1.50-1.94x GDN-core prefill speedups over native FLA kernels, including online selection overhead.
BibTeX
@misc{zhuang2026sparsegdn,
  author = {Jiedong Zhuang and Peng Zhao and Jialin Tang and Haoji Hu},
  title = {{SparseGDN: Chunk Sparse in Linear Attention}},
  year = {2026},
  eprint = {2610.41420},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.41420},
}

Loading related content...

Figure