When to Commit? Towards Variable-Size Self-Contained Blocks for Discrete Diffusion Language Models

Danny Wang, Ruihong Qiu, Zi HuangarXiv 2026

TL;DR

Discrete diffusion language models (dLLMs) typically generate text in fixed-size blocks, but committing tokens without knowing the upcoming context often leads to premature, irreversible errors. This paper introduces Variable-size Self-contained Blocks (VSB), a principled framework that dynamically determines block boundaries by evaluating whether a block's predictions will remain stable once future context is revealed. By aligning training with this variable-size decoding strategy, VSB significantly boosts performance on complex reasoning and coding tasks.

What Problem Does This Paper Address?

Unlike standard autoregressive models that generate text token-by-token from left to right, discrete diffusion language models (dLLMs) are trained using bidirectional attention, allowing them to look both forward and backward across the entire sequence. However, during inference, generating the whole sequence at once is impractical. Instead, dLLMs use blockwise semi-autoregressive decoding, where they generate a block of tokens in parallel and then permanently "commit" them before moving to the next block.

This creates a severe training-inference mismatch. During training, the model has full-sequence context, but during inference, it must commit a block without knowing what comes next. If a decoding strategy uses rigid, fixed block sizes or simple heuristics (like stopping at punctuation), it risks cutting off a semantic unit mid-thought. For example, committing the word "bank" without knowing if the next words are "depositing cash" or "mooring a boat" leads to unstable, future-dependent commitments that propagate errors downstream.

Figure 1. Future-dependent vs. self-contained commitments in dLLMs. Fixed or heuristic boundaries can commit tokens whose meaning rely on future context, while self-contained commitment preserves semantic coherence and reduces future dependence.

Methods

The authors propose self-containedness as the core metric for block commitment: a block is safe to commit if its token predictions do not drastically change when future context is revealed.

To operationalize this, VSB introduces a length-aware boundary selection mechanism that compares two predictive distributions within a lookahead window (or block budget) of length $W$:

  1. Future-Aware (FA) conditional: The model's prediction of tokens when given access to the entire budgeted window.
  2. No-Future (NF) conditional: The model's prediction when context is truncated exactly at a candidate boundary $b$.

By calculating the Kullback-Leibler (KL) divergence between the NF and FA distributions, VSB measures how sensitive a candidate block is to the ungenerated future. To prevent the model from choosing trivially short blocks, the authors design a length-aware objective function ($S_{L-A}$) that balances the desire for longer blocks against the penalty of high future-dependence.

Figure 3. Overview of VSB. During training, candidate boundaries in the budgeted block are scored by self-containedness using No-Future and Future-Aware conditionals to encourage long, self-contained blocks. At inference, diffusion decoding commits the block that best balances length and self-containedness, yielding adaptive, semantically aligned blocks.

Additionally, VSB includes:

  • No-Future Training Alignment: The model is explicitly trained under the same No-Future truncation semantics experienced during inference, eliminating the training-inference mismatch.
  • Coarse-to-Fine Search: To avoid the computational overhead of evaluating every single token boundary in a large window, VSB uses a two-pass search strategy (sparse coarse scan followed by a localized fine scan) to accelerate inference.

Datasets

The framework was evaluated across several diverse benchmarks using LLaDA-8B-Instruct and LLaDA-1.5 as backbones:

  • Mathematical & Scientific Reasoning: GSM8K, MATH500, and GPQA-Diamond.
  • Code Generation: HumanEval and MBPP.
  • General Knowledge: MMLU Generative and HellaSwag.

Key Insights and Ideas

  • Fixed Block Sizes are Structurally Flawed: The amount of future context a token requires varies dramatically across a sentence. Rigid block boundaries inevitably fragment tightly coupled semantic units (like mathematical equations or code blocks).
  • Semantic Alignment Emerges Naturally: VSB does not rely on hardcoded grammar rules or punctuation heuristics. Instead, semantic boundaries naturally emerge purely from the model's own predictive uncertainty and sensitivity to future context.
  • Post-Hoc Efficacy: Remarkably, VSB can be applied as a plug-and-play decoding strategy on top of pre-trained dLLMs without any additional training, still yielding consistent accuracy improvements.

Key Results

VSB consistently outperformed fixed-size and heuristic blockwise decoding baselines across the board:

  • Reasoning & Coding Gains: On HumanEval (code generation), VSB achieved a massive +10.36% absolute accuracy gain over the LLaDA-1.5 baseline and a +6.09% gain over LLaDA-8B. It also achieved state-of-the-art or tied-best results on GSM8K and MATH500.
  • Decoding-Only Improvements: When used purely as a post-hoc decoding strategy (without VSB training), it improved accuracy on Math500 and MBPP by 1.4% to 4.4% over fixed-size decoding.
  • Inference Efficiency: The coarse-to-fine boundary search successfully recovered high-quality commitments while providing up to a 1.6× speedup compared to an exhaustive full-window scan.

Limitations and Future Work

While VSB marks a significant step forward for dLLMs, the authors highlight a few limitations:

  • Architecture Constraints: VSB is designed for native global bidirectional attention models. Extending it to hybrid architectures that mix autoregressive backbones with diffusion refinement (e.g., LLaDA 2.0 or Dream) remains an open challenge.
  • KV Caching Friction: Standard Key-Value (KV) prefix caching is difficult to implement efficiently in VSB because the model frequently evaluates varying context truncations. Although the authors implemented an activation caching workaround, fully integrating standard KV caching for future-aware tests is left for future engineering work.

Summary updated

Abstract

Discrete diffusion language models (dLLMs) enable parallel token updates with bidirectional attention, yet practical generation typically adopts blockwise semi-autoregressive decoding. This switch creates a training-inference mismatch: training denoises with full-sequence context, while inference commits tokens within a bounded block without future context. Therefore, decoding with fixed-size or heuristic-based blocks can lead to premature token commitments, as decisions are made without full access to future context that could alter those choices. Motivated by this, we propose self-containedness as a principled criterion for block commitment. A block is self-contained if its predictions remain consistent with Future-Aware (FA) or without No-Future (NF) access to future context, reframing block boundary selection as a test of self-containedness rather than a heuristic choice. Based on this principle, we introduce Variable-size Self-contained Blocks (VSB) for dLLMs. VSB scores and selects block boundaries using the divergence between token-level predictive distributions under NF and FA conditioning, which quantifies how predictions would change if future context were revealed. We provide theoretical justification linking self-containedness to predictive consistency, and extensive experiments validate VSB's efficacy over fixed-size and heuristic blockwise decoding.
BibTeX
@misc{wang2026when,
  author = {Danny Wang and Ruihong Qiu and Zi Huang},
  title = {{When to Commit? Towards Variable-Size Self-Contained Blocks for Discrete Diffusion Language Models}},
  year = {2026},
  eprint = {2604.23994},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.23994},
}

Loading related content...

Figure