Manuscript Offprint

arXiv:2610.41420

SparseGDN: Chunk Sparse in Linear Attention

Jiedong Zhuang, Peng Zhao, Jialin Tang, Haoji Hu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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.94× GDN-core prefill speedups over native FLA kernels, including online selection overhead.

Date: November 2, 2026

Correspondence: haoji_hu@zju.edu.cn

Qwen3.5-4B: GDN-Core Prefill Latency

Figure

Qwen3.5-9B: GDN-Core Prefill Latency

Figure 1 GDN-core prefill latency across context lengths for Qwen3.5-9B and Qwen3.5-4B. Compared with FLA GDN, SPARSEGDN additionally includes the online selector overhead. Latency is aggregated over all 24 GDN layers. SPARSEGDN reduces latency at every context length, reaching 1.93× and 1.94× speedup at 128K for the 9B and 4B models, respectively. Lower is better.

Figure

(a) Inter-chunk recurrent-state changes across value heads.

(b) Dense intra-chunk coefficients and block-adjacent support.

Figure 2 Two empirical structures observed in layer 16 of native-dense Qwen3.5-4B on an 8K RULER input (niah_multikey_3, row 0). (a) Adjacent chunk-boundary states are frequently nearly stationary, while the magnitudes of their changes vary substantially across value heads. (b) The left panel shows ∣M−1−I∣|\mathbf{M}^{-1} - \mathbf{I}|, averaged over 123 complete 64-token chunks and all 32 value heads. Here M\mathbf{M} is the native Delta-solve matrix defined in Section 2.3; subtracting I\mathbf{I} removes the unit diagonal, and absolute values are taken elementwise before averaging. The coefficients concentrate near the causal diagonal and weaken across more distant token blocks. This observed locality motivates the block-adjacent approximation, whose computation support is shown in the right panel.

1 Introduction

The quadratic cost of self-attention remains a major obstacle to efficient long-context prefill in Transformer-based language models [12, 22, 53, 62]. Recurrent and state-space architectures offer an alternative by summarizing historical information in a fixed-size state and processing sequences with linear complexity [11, 18, 20, 23]. Gated Delta Networks (GDNs) combine input-dependent state updates with expressive associative-memory dynamics [40, 58, 59]. Nevertheless, linear asymptotic complexity alone does not guarantee efficient execution. During long-context prefill, dense GDN implementations perform local Delta solves within every chunk, materialize update matrices, propagate recurrent states across chunks and heads, and reconstruct token outputs from dense state snapshots. These operations incur substantial arithmetic and memory-traffic costs at context lengths of tens or hundreds of thousands of tokens.

Figure 2 illustrates two empirical structures that motivate sparsification in GDN prefill. At the inter-chunk‾\underline{\text{inter-chunk}} level, we examine the recurrent state Sc,hS_{c,h} of value head h at chunk boundary c and measure its symmetric relative change:

tc,h=∥Sc,h−Sc−1,h∥Fmax⁡(∥Sc,h∥F,∥Sc−1,h∥F).t_{c,h}=\frac{\|S_{c,h}-S_{c-1,h}\|_{F}}{\max(\|S_{c,h}\|_{F},\|S_{c-1,h}\|_{F})}.

For the layer and input shown in Figure 2a, the median state change is 6.56%, 63.8% of head-chunk transitions change by less than 10%, and the median cosine similarity between adjacent states is 0.9979. These state dynamics vary substantially across heads: 21 of 32 value heads have a median change below 10%, whereas a smaller subset exhibits large and persistent changes. Related head heterogeneity has also motivated distinct cache policies for retrieval and streaming attention heads [56]. Small state changes alone do not establish that an update can be removed safely, but the observed variation motivates testing retention policies that adapt to different inputs, layers, and heads.

At the intra-chunk‾\underline{\text{intra-chunk}} level, Figure 2b summarizes the mean absolute off-diagonal coefficients of the native 64-token Delta solve across chunks and value heads. The coefficients are strongest near the causal diagonal and become weaker across more distant 16-token blocks. This locality motivates restricting the support of the local inverse to diagonal and immediately adjacent blocks.

Building on these observations, we introduce SPARSEGDN, a two-level sparsification framework for GDN prefill. A block-adjacent solver reduces intra-chunk Delta-solve computation, while a dynamic selector allocates retention budgets across head pairs and selects recurrent events. Selection uses tail activation statistics, recurrent lifetime estimates, and output-gate information available before recurrent propagation, avoiding the need to execute candidate updates before deciding which to retain.

Figure

Figure 3 End-to-end SparseGDN execution pipeline. The block-adjacent intra-chunk kernel computes transformed values U, compact update coefficients, and selector scores. The dynamic selector converts these scores into a structured event mask. Only selected events trigger deferred W materialization and recurrent-state updates, producing compact event states. During output reconstruction, the mapped output kernel retrieves the appropriate preceding event state from HBM and applies the accumulated gap decay, while computing group-local interactions and producing outputs for every token.

To realize GPU speedups from this sparsity [17, 61, 64], SPARSEGDN materializes update matrices only for selected events and packs them into a compressed sparse row (CSR) layout. The recurrent kernel scans retained events, aggregates decay across skipped chunks, and stores compact state snapshots. A mapped output kernel combines these snapshots with group-local causal interactions to produce outputs for every token.

We evaluate SPARSEGDN on Qwen3.5-4B and Qwen3.5-9B using the RULER long-context benchmark [21]. Our evaluation covers 13 tasks and six context lengths from 4K to 128K. Across these settings, SPARSEGDN retains approximately 29% of recurrent pair-chunk events on average. It achieves 1.50×–1.94× GDN-core prefill speedups for Qwen3.5-4B and 1.50×–1.93× for Qwen3.5-9B. These measurements include online selection overhead and aggregate latency over all 24 GDN layers in each model. The gains increase with context length.

Our main contributions are:

  • We identify complementary intra-chunk coefficient locality and inter-chunk state heterogeneity, and develop a two-level sparsification strategy that combines a block-adjacent Delta solve with input-dependent recurrent-event selection.

  • We design a GPU execution pipeline with deferred update materialization, CSR-based event scanning, compact state storage, and mapped output reconstruction to reduce computation and memory traffic while producing outputs for every token.

  • We demonstrate consistent GDN-core prefill acceleration on Qwen3.5-4B and Qwen3.5-9B over context lengths from 4K to 128K, while maintaining comparable aggregate performance across RULER tasks.

References (64)