Manuscript Offprint

arXiv:2608.26374

Survival-Guided Length Control for Efficient Diffusion Language Models

Ivan Kobyzev, Abbas Ghaddar, Yufei Cui

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

Abstract

Diffusion language models (DLMs) generate text by iteratively denoising masked sequences, but standard decoding either fixes the sequence length or relies on ad hoc stopping rules, often leading to unnecessary denoising steps. We recast length selection as a discrete-time survival problem over the end-of-sequence token and propose a plug-in, training-free length predictor that can be added to any existing DLM. Across reasoning and code-generation benchmarks, survival-guided length decoding speeds up inference by up to 7×7\times while preserving task accuracy. We further find that predicted lengths vary widely even within the same dataset, making model performance sensitive to the chosen length.

1 Introduction

Masked Diffusion Language Models (DLMs) (Austin et al., 2021a; Shi et al., 2024) generate text by iteratively denoising a masked canvas. At each diffusion step, masked positions are updated using the model's predictive distribution, gradually transforming an all-[MASK] suffix into the text. This iterative refinement enables flexible any-order decoding and parallelism, but it also raises a core question for decoding cost: when to stop denoising and which tokens to commit at each step?

Standard decoding for masked DLMs often follows an any-order autoregressive (AOAR) pattern (Ou et al., 2024): choose a large task-agnostic maximum length LmaxL_{max}, run a fixed denoising schedule, and stop only when all masks are removed or an iteration budget is reached. While simple, this approach is frequently wasteful: many prompts require far fewer tokens than LmaxL_{max}, yet the decoder still spends computation refining positions that correspond to an unnecessarily long canvas.

As a result, a major source of overhead in masked DLM inference is not the denoising rule itself, but the mismatch between a conservative global length budget and the instance-specific length needed. In this work, we focus on length selection: for a given prompt, how many new tokens should we generate? We show that length selection admits a natural interpretation in terms of survival analysis (Andersen et al., 1993).

Concretely, we treat generation length as a discrete-time survival variable over the end-of-sequence token [EOS]. Using the DLM's per-position [EOS] probabilities from a single forward pass on a long masked canvas, we obtain a plug-in estimate of the discrete-time hazard and recover a closed-form estimate of the expected length via standard survival identities. This yields a training-free, model-agnostic length predictor that can be plugged into existing masked DLMs without modifying model parameters or changing the underlying denoising schedule. Empirically, survival-guided length prediction reduces unnecessary refinement of positions beyond the true end of the sequence and speeds up inference without sacrificing performance relative to baselines that decode with a sufficiently large LmaxL_{max}.

Extensive experiments with two large-scale DLMs, LLaDA (Nie et al., 2025) and Dream (Ye et al., 2025), consistently demonstrate inference speedups of up to 7×7\times across reasoning and code-generation benchmarks, with no loss in task performance. Additionally, our analysis suggests that length prediction is indeed sample-dependent, with lengths varying significantly across samples of the same distribution.

References (5)

  • Program Synthesis with Large Language Models
  • Form the initial canvas
  • ><tr><td>Task</td><td>w/o</td><td>DAEDAL</td><td>Ours</td></tr><tr><td colspan=
  • Parentheses report speedup relative to the baseline decoder without (w/o) length prediction
  • Second, our method achieves larger end-to-end speedups