Stopping Computation for Converged Tokens in Masked Diffusion-LM Decoding

Daisuke Oba, Danushka Bollegala, Masahiro Kaneko, Naoaki Okazaki

SureLock is a novel decoding strategy for Masked Diffusion Language Models (MDLMs) that identifies and "locks" token positions once their probability distributions stabilize. By caching the Key/Value (KV) vectors of these converged tokens and skipping their future query projections and feed-forward computations, SureLock reduces algorithmic FLOPs by 30–50% with negligible impact on generation quality.

The Inefficiency of MDLM Decoding

While standard autoregressive (AR) models generate text one token at a time, Masked Diffusion Language Models (MDLMs) generate sequences by iteratively unmasking and refining tokens across the entire sequence length $N$.

The primary drawback of standard MDLM samplers is redundant computation. The model recomputes the self-attention and feed-forward network (FFN) layers for all $N$ positions at every single step $T$. This occurs even if a token was unmasked early and its predicted distribution has already stopped changing. Consequently, the per-iteration computational cost is $O(N^2d)$, making diffusion-based decoding significantly more expensive than AR counterparts as sequence length grows.

Introducing SureLock

To address this, the authors introduce SureLock, a method to permanently and monotonically deactivate token positions as sampling unfolds.

SureLock Decoding Process

The approach relies on two main components:

  1. The "Sure" Condition (Local Stability): At each step, the model calculates the local KL divergence between the current posterior distribution and the previous step's distribution for each unmasked token. If this divergence falls below a threshold $\epsilon$, the token is considered "converged."
  2. The "Lock" Action: Once a token is locked, the model:
  3. Caches its Key (K) and Value (V) vectors so other active tokens can still attend to it.
  4. Bypasses its Query (Q) projection and FFN sublayers in all subsequent steps.
  5. Freezes its prediction, ensuring the token remains stable.

This shifts the per-block computational complexity from $O(N^2d)$ to $O(MNd)$, where $M$ is the number of remaining "unlocked" tokens. As generation progresses, $M$ decreases, leading to accelerating computational savings.

Key Results and Insights

The researchers evaluated SureLock using the LLaDA-8B (Base and Instruct) models across benchmarks including WikiText-103, MT-Bench, and HumanEval.

FLOP Reduction over Time
  • Efficiency and Throughput: On LLaDA-8B, SureLock achieved a 30–50% reduction in algorithmic FLOPs. In compute-bound scenarios (large batches and long sequences), this translated to up to a 1.39x gain in end-to-end tokens per second (TPS). Unlike caching methods with bursty compute requirements, SureLock’s active token set only ever shrinks, ensuring monotonically decreasing compute loads.
  • Quality Preservation: Generation quality remained highly competitive. On MT-Bench, the Instruct model's score remained essentially unchanged. On HumanEval, the Pass@1 score saw slight improvements in some configurations (e.g., 18.6% to 20.3%), suggesting that locking might act as a regularizer against late-stage drifting.
  • Theoretical Guarantee: The authors provide a proof showing that monitoring only the local KL divergence at the moment of locking is sufficient to bound the error in the final token probabilities, justifying the per-step thresholding.

Limitations and Future Work

While algorithmic FLOP savings are high, actual wall-clock speedups are currently more modest (around 20-30%). Standard deep learning frameworks are optimized for dense, uniform tensors; the irregular, sparse computation on "thin" slices of a sequence introduces overhead. Fully realizing SureLock's potential will likely require custom fused kernels optimized for irregular cache access. Additionally, extending this approach to continuous diffusion models (like those in image generation) remains an open challenge requiring a different theoretical treatment of uncertainty.

Summary updated

BibTeX
@inproceedings{oba2026stopping,
  author = {Daisuke Oba and Danushka Bollegala and Masahiro Kaneko and Naoaki Okazaki},
  title = {{Stopping Computation for Converged Tokens in Masked Diffusion-LM Decoding}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=PzhNnMepgl},
}
Figure