Manuscript Offprint

arXiv:2611.01320

Step-dLLM: Adaptive Step-aware Sparse Attention for Efficient Diffusion LLM Inference

Zhichen Zeng, Xichong Zhang, Junpan Wu, Yifei Zuo, Chi-Chih Chang, Jiayi Wang, Maohua Nie, Ji Liu, Ang Li, Banghua Zhu

Abstract

Diffusion large language models (dLLMs) generate tokens in parallel via iterative denoising, but their bidirectional attention prevents the KV caching used by autoregressive models and recomputes the full attention map at every step, incurring quadratic per-step cost. Existing sparse attention methods for dLLMs construct a sparse mask after an initial full-attention warm-up and reuse it for the remaining steps, while allocating the sparsity budget uniformly across heads. We argue both choices ignore key structural properties of attention in dLLMs: empirically, attention patterns are only locally consistent across steps and shift abruptly at certain transitions, and different heads concentrate their attention mass to very different extents. To this end, we design Step-dLLM, which periodically refreshes a block-sparse mask at anchor steps along the denoising trajectory and reuses it within each locally consistent interval, while employing a head-adaptive global budget that more aggressively compresses heads with concentrated attention. Backed by a fused IO-aware Triton kernel for block-sparse attention, Step-dLLM applies to pre-trained LLaDA-1.5 and Dream-7B-Instruct without retraining, achieving a 2.78× end-to-end speedup over dense FlashAttention on LLaDA-1.5 at 8K context with 256 denoising steps and 90% sparsity, while improving the accuracy–latency trade-off over prior sparse-attention methods.

1 Introduction

Recently, diffusion large language models (dLLMs) have achieved significant progress in the area of natural language processing [17, 38, 4, 1, 30, 21]. Traditional autoregressive language models (ARs), such as DeepSeek [9] and Qwen [18], rely on causal attention mechanisms, which restrict each token to attending only to its preceding context. In contrast, dLLMs leverage bidirectional context understanding and generate the entire sequence in parallel. By exploiting this capability, dLLMs achieve strong performance in language generation and represent a promising alternative to ARs.

Despite the advantages of parallel decoding, dLLMs still suffer from high generation latency. In AR models, KV caching [36, 13] allows each decoding step to reuse previously computed key–value pairs, reducing the per-step attention cost to linear in the sequence length. In contrast, dLLMs [17, 4, 30] rely on bidirectional attention, where all tokens, including those under denoising, attend to one another. Since token representations are updated at every denoising step, exact reuse of the standard autoregressive KV cache is unavailable without additional assumptions, and vanilla dLLMs recompute full-sequence attention repeatedly. As a result, dLLMs incur quadratic per-step cost across multiple denoising iterations, which limits their practical efficiency on long contexts [26, 24, 16].

To improve dLLM efficiency, recent work has explored two complementary directions. The first is semi-autoregressive generation, exemplified by block diffusion [26], which partitions the output

*Equal Contribution.

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

into blocks, applies diffusion within each block, and decodes blocks autoregressively. This shortens each diffusion pass and enables KV caching for previous blocks. The second direction is sparse attention, which is orthogonal to block diffusion and reduces cost by attending only to salient token interactions within each step. This paper focuses on sparse attention. Although sparse attention has been widely studied in AR models [11, 27], those methods rely on structured causal patterns and do not directly transfer to dLLMs, where bidirectional attention evolves as tokens are progressively denoised. SparseD [25] takes a first step toward sparse attention for dLLMs that runs an initial fraction of denoising steps with full attention, constructs a sparse mask from these attention maps, and reuses it for the remaining steps. This exploits substantial cross-step similarity, but our measurements show that high similarity within a local interval does not guarantee that all salient connections persist across distant steps.

To verify the non-stationarity of attention patterns across denoising steps, we examine how the attention distribution of a query evolves along its denoising trajectory. Figure 1a visualizes the cosine similarity of attention patterns between every pair of denoising steps for four query positions {20, 64, 144, 208} over 64 steps. The heatmaps reveal a consistent block-wise structure across different query locations: similarity remains high within contiguous step intervals but drops sharply at some specific steps. This indicates that attention patterns are locally stationary but globally non-stationary. Figure 1b further quantifies this behavior by plotting, for a representative query, the KL divergence between attention patterns at consecutive steps over 32 steps. The curve stays small for most steps but exhibits a dominant spike (KL≈3.9) at the step where the query token transitions from masked to unmasked, marking an abrupt shift in its attention pattern. These observations challenge the implicit assumption behind static mask reuse, namely that the top-KK important connections identified at early steps remain valid throughout all subsequent denoising steps. They instead motivate a strategy that reuses a sparse mask within each locally stationary interval for improved computational efficiency while refreshing it at the selected steps along the denoising trajectory.

Figure

(a) Cross-step cosine sim.

Figure

(b) KL across steps.

Figure 1: Attention pattern dynamics across denoising steps.

Motivated by these dynamics, we propose Step-dLLM, a sparse attention framework for dLLMs that refreshes the mask at selected anchor steps and reuses it only within locally consistent regions, avoiding per-step reconstruction. We further observe pronounced head-wise heterogeneity: heads differ substantially in how concentrated their attention mass is, so a uniform per-head budget is suboptimal. Step-dLLM therefore combines anchor-step mask refresh with head-adaptive global budget allocation, realized through fused Triton kernels. In summary, our contributions are as follows:

  • We empirically identify two key properties of sparse attention in dLLMs: attention patterns are only locally consistent across denoising steps, and different heads exhibit substantially different concentration behaviors.
  • Building on these observations, we propose Step-dLLM, which periodically refreshes sparse masks, reuses them across nearby denoising steps, allocates sparsity budgets adaptively across heads, and realizes the mask-refresh and mask-reuse stages with fused Triton kernels.
  • We evaluate Step-dLLM on LLaDA-1.5 and Dream-7B-Instruct, achieving a 2.78×2.78\times end-to-end speedup over dense FlashAttention on LLaDA-1.5 at 8K context with 256 denoising steps and 90% sparsity, alongside improved accuracy–latency trade-offs over prior sparse-attention methods.

References (35)