Source-linked AI summary

Survival-Guided Length Control for Efficient Diffusion Language Models

Ivan Kobyzev, Abbas Ghaddar, Yufei Cui

arXiv:2608.26374v1cs.CL

TL;DR

Masked diffusion language models often waste computation because standard decoding uses conservative length budgets, motivating instance-specific length selection. The paper recasts length as a discrete-time survival variable and derives a training-free plug-in predictor from [EOS] probabilities. Across reasoning and code-generation benchmarks, it reports up to 7× faster inference without loss in task performance, while showing that predicted lengths vary substantially across samples.

  • Problem

    Standard masked DLM decoding often uses a fixed large maximum length, causing unnecessary refinement when prompts require shorter outputs.

  • Method

    The method estimates expected generation length from per-position [EOS] probabilities in a single forward pass, using a survival model with conditional independence across positions.

  • Results

    Up to 7× inference speedups were achieved across reasoning and code-generation benchmarks with no loss in task performance.

  • Takeaways & Limitations

    Predicted lengths vary significantly even among samples from the same distribution, making performance sensitive to the selected length.

  • Takeaways & Limitations

    The evaluation covers two large-scale masked DLMs and standard reasoning and code-generation benchmarks, not extremely long-context generation or multi-turn dialogue.

Abstract

from arXiv · show

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 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 DLM decoding must choose both when to stop denoising and which tokens to commit, but fixed global length budgets waste computation on positions beyond an instance’s needed output. The paper reframes length selection as survival analysis and introduces a plug-in predictor to reduce this overhead while preserving task performance.

  • Problem: Standard AOAR decoding uses a large task-agnostic maximum length and a fixed denoising schedule, even when prompts need fewer tokens.It may continue refining positions corresponding to an unnecessarily long canvas.
  • Problem: The central inefficiency is the mismatch between a conservative global length budget and the instance-specific length needed for each prompt.The paper therefore asks how many new tokens should be generated for a given prompt.
  • Approach: The method treats generation length as a discrete-time survival variable over the end-of-sequence token and derives a training-free, model-agnostic predictor from per-position [EOS] probabilities.The predictor can be added to existing masked DLMs without changing model parameters or the denoising schedule.
  • Results: Up to 7× inference speedups were observed across reasoning and code-generation benchmarks with no loss in task performance.Experiments used the large-scale DLMs LLaDA and Dream.
  • Results: Predicted generation lengths vary significantly across samples from the same distribution.This makes performance sensitive to the chosen length.

2 Method

The method models the unknown output length as a discrete event time and estimates it from [EOS] probabilities produced on an initially long masked canvas. A conditional-independence approximation yields a survival curve and expected length, which is passed to the DLM as its maximum number of new tokens without additional training.

  • Survival formulation: Survival analysis models random event times through the probability that an event occurs at time t.Here, termination of generation is treated as the event.
  • Survival formulation: The unknown sequence length becomes a discrete event time over generation positions, with each position asking whether the sequence ends there given that it has not ended earlier.This supplies the survival interpretation for [EOS] probabilities.
  • Problem setup: A large task-agnostic upper bound Lmax causes wasted compute because many prompts terminate before the decoder finishes refining all T masked slots.The method targets this fixed-budget mismatch rather than changing the denoising rule.
  • Length prediction: One forward pass on the initial canvas produces logits whose per-position [EOS] probabilities serve as a length-survival signal, despite low one-step text quality.The resulting logits are used for length prediction rather than text decoding.
  • Length prediction: The method assumes [EOS] events across positions are conditionally independent given the prompt, enabling computation of survival and termination probabilities.This is explicitly described as a mean-field-style approximation.
  • Length prediction: The expected length is obtained from standard survival identities, including the identity that expectation equals the sum of survivals.The estimate is truncated to the available generation span.
  • Inference procedure: At test time, the plug-in estimate L̂(x) = E[L] becomes the maximum number of new tokens, requiring no extra training or parameters.The predictor is derived entirely from the base model’s [EOS] logits.

3 Experiments

Experiments evaluate survival-guided length prediction with two masked diffusion language models across reasoning and code-generation benchmarks. The method substantially accelerates decoding while preserving task performance, and per-sample length variation makes fixed mean-length decoding generally inferior.

  • 3.1 Experimental Setting: Experiments use LLaDA and Dream on BBH, GSM8K, MATH, HumanEval, and MBPP under benchmark-specific evaluation settings.The models are evaluated using standard few-shot accuracy, strict match, or pass@1 metrics as appropriate.
  • 3.2 Main Results: 3.2× to 6.6× speedups are observed across all listed benchmarks when predicted lengths replace fixed maximum-length AOAR decoding.The comparison measures seconds per example for baseline decoding versus decoding equipped with the survival-guided predictor.
  • 3.2 Main Results: Task-performance differences between decoding with and without the predictor remain within reported standard deviations across all benchmarks.The reported results indicate no statistically meaningful change in task performance.
  • 3.2 Main Results: The predictor trims redundant tail denoising steps through one forward pass, soft [EOS] probabilities, and a closed-form expected length without training or model modification.This procedure is described as model-agnostic and compatible with the underlying denoising schedule.
  • 3.3 Fixed Mean-Length Ablation: Fixed horizons set to each dataset’s mean predicted length generally underperform per-sample prediction, with some exceptions such as LLaDA on MBPP.The ablation attributes this pattern to substantial variation in required decoding length among samples within each dataset.

4 Related Work

Related work addresses diffusion-language-model efficiency through alternative length-control procedures, early answer convergence, and adaptive unmasking schedules. These approaches differ in whether they select sequence length, stop refinement on a fixed canvas, or alter token-update schedules.

  • Diffusion language models: Diffusion language models replace strictly left-to-right factorization with parallel refinement and flexible token orders on a fixed canvas.LLaDA and Dream are presented as examples of this model family.
  • Length control for diffusion LMs: DAEDAL searches over expanded canvas lengths iteratively, using trailing-window [EOS] confidence and a hand-tuned stopping threshold.Its procedure requires several additional forward passes beyond the main decoding process.
  • Length control for diffusion LMs: Prophet stops refinement on a fixed-length canvas by using top-2 content-token confidence gaps to commit remaining tokens.This targets when to stop refinement rather than how long the generated sequence should be.
  • Sampling strategies and unmasking schedules: Adaptive schedulers vary which tokens to refine using signals such as entropy, convergence, or span structure, while operating on fixed-length canvases.These methods are described as orthogonal to sequence-length prediction and potentially combinable with it.

5 Conclusion and Future Work

The paper introduces a training-free survival-guided predictor that estimates diffusion-language-model output length from one forward pass. Across LLaDA and Dream, it provides substantial speedups without statistically meaningful accuracy changes, while motivating token-level survival models as future work.

  • The proposed predictor estimates expected output length from a single forward pass and plugs into diffusion language models without training.
  • 3–7× decoding speedups were achieved across reasoning and code benchmarks without statistically meaningful changes in accuracy.
  • Future Work: The survival perspective suggests future token-level survival models for commitment and refinement decisions.

Limitations

The evaluation covers two masked diffusion language models and standard reasoning and code-generation benchmarks, leaving broader generation settings unverified. The method targets inference efficiency under fixed models and decoding rules rather than broader output properties.

  • Evaluation uses LLaDA-8B-Base and Dream-7B-Base on BBH, GSM8K, MATH, HumanEval, and MBPP.
  • Efficiency in extremely long-context generation and multi-turn dialogue remains to be verified.
  • The objective is inference-time computational efficiency under a fixed model and decoding rule, not calibration, robustness, or bias.

A Expectation as a sum of survivals

The appendix derives expected generation length as a sum of survival probabilities and operationalizes that identity in a survival-guided length-prediction algorithm. The procedure forms a masked canvas, estimates EOS hazards from one forward pass, computes a truncated expectation, and rounds the result.

  • Expectation as a sum of survivals: For an integer-valued length L, the survival function is S(k) = P(L > k).
  • Expectation as a sum of survivals: The expected length is obtained by summing survival probabilities over the possible horizon.
  • Prediction Algorithm: The algorithm forms a canvas containing the prompt followed by T masked positions and runs the diffusion model once at the initial time.
  • Prediction Algorithm: Per-position EOS probabilities are converted into plug-in hazards, followed by survival-curve construction, truncated expectation, and integer clipping and rounding.

C.1 Comparison with DAEDAL

Compared with DAEDAL, the proposed method preserves task performance while achieving larger end-to-end speedups. The difference follows from DAEDAL’s iterative candidate-length search and thresholded stopping rule versus the proposed single-pass expected-length estimate.

  • Both methods preserve task performance relative to their corresponding baseline decoders.
  • The proposed method achieves larger end-to-end speedups than DAEDAL.Table 4 reports decoding time, while Table 5 reports task accuracy.
  • DAEDAL searches iteratively over candidate lengths, whereas the proposed estimator uses one forward pass and a closed-form expected length.

C.2 Predictor Step Ablation

The predictor’s expected length is recomputed at later denoising steps and compared with the initial estimate. Early decoding shows little drift in the implied termination signal, supporting a single-pass estimator for practical length selection.

  • Step ablation: The ablation recomputes expected length at denoising steps s ∈{2, 5, 7, 10} and compares each estimate with the initial forward-pass prediction.The experiment uses the LLaDa-Base model.
  • Step ablation: Table 6 measures the absolute change in predicted length relative to the initial estimate across later denoising steps.
  • Finding: The implied termination signal does not drift substantially during early decoding, indicating that initial [EOS] probabilities contain most information needed for practical length selection.This supports using a single-pass estimator rather than recomputing the prediction throughout decoding.
Loading 2608.26374v1…