Survival-Guided Length Control for Efficient Diffusion Language Models

Ivan Kobyzev, Abbas Ghaddar, Yufei CuiarXiv 2026

TL;DR

This paper introduces a training-free, plug-in method to dynamically control generation length in Masked Diffusion Language Models (DLMs) by framing it as a discrete-time survival analysis problem. By running just a single forward pass on a long masked canvas, the model accurately predicts the ideal sequence length, delivering up to a 7× inference speedup across reasoning and coding benchmarks with zero loss in task accuracy.

What Problem Does This Paper Address?

Autoregressive language models generate text token-by-token from left to right. In contrast, Masked Diffusion Language Models (DLMs) generate text by starting with an entirely masked canvas and iteratively denoising it in parallel. While this allows for flexible, non-linear decoding, it introduces a major efficiency bottleneck: knowing when to stop.

Standard DLM decoding typically relies on a conservative, fixed maximum length ($L_{\text{max}}$) for every single prompt. If a prompt only requires a short answer, the model wastes massive amounts of compute refining redundant "tail" positions beyond the actual end of the sequence. Current solutions either require expensive retraining or iterative length-searching loops that add overhead. This paper tackles the challenge of predicting an instance-specific generation length efficiently and without extra training.

Methods

The authors reframe length selection through the lens of survival analysis—a branch of statistics traditionally used to model the time until an event occurs (like a machine failure or medical event). Here, the "event" is the appearance of the end-of-sequence ([EOS]) token.

The proposed method works as follows:

  1. Single Forward Pass: The DLM runs exactly once on a generously long, fully masked canvas to get the initial token probabilities (logits).
  2. Hazard Estimation: The per-position [EOS] probabilities from this single pass are interpreted as a discrete-time hazard function—the probability that the sequence ends at position $k$, given that it hasn't ended before.
  3. Closed-Form Expected Length: Using standard survival analysis identities and assuming conditional independence of [EOS] events given the prompt, the authors compute a closed-form estimate of the expected sequence length ($\mathbb{E}[L]$).
  4. Dynamic Horizon: This predicted length is rounded and used as the dynamic maximum token budget for the actual iterative denoising process.

Crucially, this method is entirely plug-in and training-free. It requires no modifications to the model's parameters or its underlying denoising schedule.

Datasets

The method was evaluated using two state-of-the-art DLMs—LLaDA-8B-Base and Dream-v0-Base-7B—across five standard reasoning and code-generation benchmarks:

  • BBH (Big-Bench Hard)
  • GSM8K (Grade School Math)
  • MATH
  • HumanEval (Python coding)
  • MBPP (Mostly Basic Python Problems)

Key Insights and Ideas

  • The First Pass is Enough: Even though the text quality after a single diffusion step is extremely low, the initial [EOS] logits are highly informative and stable enough to act as a reliable length-survival signal.
  • High Intra-Dataset Variance: Generation lengths vary wildly even within the same dataset. For instance, on the BBH dataset, the predicted length for LLaDA was $537 \pm 204$ tokens.
  • Static Budgets Fail: Simply replacing a large global $L_{\text{max}}$ with a shorter, fixed dataset-wide mean length ($\bar{L}$) degrades task performance. This proves that per-sample adaptation is critical; models are highly sensitive to being cut off by rigid, non-adaptive horizons.

Key Results

The survival-guided approach yields massive efficiency gains without sacrificing output quality:

  • Substantial Speedups: The method consistently accelerates inference by 3.2× to 6.6× (and up to 7× in instruction-tuned variants) compared to the baseline fixed-length decoding.
Decoding speed comparison showing significant speedups across all tasks.
  • Preserved Accuracy: Across all benchmarks, the task accuracy remains completely intact, with differences falling well within standard deviations.
Task performance comparison demonstrating that accuracy is preserved.
  • Superiority Over Fixed Baselines: As shown in the ablation studies, using the per-sample survival guide significantly outperforms using a fixed dataset-wide mean length ($\bar{L}$), which suffers from accuracy drops ($\Delta$).
Ablation study comparing per-sample prediction against a fixed mean length.

Limitations and Future Work

While highly effective, the authors note a few limitations:

  • Scope of Evaluation: The method was validated on standard reasoning and coding tasks, but its efficiency in extremely long-context generation or multi-turn dialogues remains unverified.
  • Purely Efficiency-Focused: The approach targets computational speedup at inference time; it does not attempt to optimize or alter other model properties like calibration, robustness, or safety biases.

Future Directions: The authors suggest that this survival analysis framework could be extended beyond sequence length to guide token-level decisions, such as dynamically deciding exactly which tokens to commit or refine at each step of the diffusion process.

Summary updated

BibTeX
@misc{kobyzev2026survival,
  author = {Ivan Kobyzev and Abbas Ghaddar and Yufei Cui},
  title = {{Survival-Guided Length Control for Efficient Diffusion Language Models}},
  year = {2026},
  eprint = {2608.26374},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.26374},
}
Figure