VoidPadding: Let [VOID] Handle Padding in Masked Diffusion Language Models so that [EOS] Can Focus on Semantic Termination

Chunyu Liu, Zhengyang Fan, Kaisen Yang, Alex Lamb

TL;DR

Masked Diffusion Language Models (MDLMs) frequently suffer from "[EOS] overflow"—a failure mode where the model prematurely cuts off text generation and fills the remaining canvas with endless [EOS] tokens. This paper introduces VoidPadding, a simple training-inference co-design that replaces [EOS] padding tokens with a dedicated [VOID] token. By freeing [EOS] to act purely as a semantic terminator, VoidPadding dramatically improves generation quality while cutting decoding computation by over 55%.

What Problem Does This Paper Address?

Unlike traditional Autoregressive Language Models (ARLMs) that generate text token-by-token from left to right, Masked Diffusion Language Models (MDLMs) denoise an entire preallocated canvas in parallel using bidirectional attention.

However, during instruction tuning, training data must be processed in batches. To make sequences the same length, shorter responses are padded out to the maximum batch length. MDLMs historically inherited the ARLM convention of using repeated [EOS] tokens for this padding.

In ARLMs, causal masking prevents the model from looking ahead at padding tokens. But in MDLMs, bidirectional attention exposes these padding [EOS] tokens during training. As a result, [EOS] takes on a confusing dual role: it is both a semantic terminator (the end of a sentence) and a structural padding token (a signal indicating canvas length). During inference, this dual role causes a catastrophic feedback loop known as [EOS] overflow: as soon as the model generates a few tail [EOS] tokens, bidirectional attention causes them to spread leftward, overwriting valid text and resulting in truncated, repetitive answers.

Figure 1: Overview of VoidPadding. VoidPadding decouples termination from padding by using [EOS] only for stopping and [VOID] only for padding. During inference, [VOID] token generation is banned, decoding stops at the leftmost visible [EOS], and the canvas may be expanded based on tail [VOID] signals.

Methods

The authors propose VoidPadding, which cleanly decouples semantic termination from structural padding through a few key mechanisms:

  1. VoidPadding Formulation: During instruction tuning, sequences are formatted as [prompt] [response] [EOS] [VOID]*. A single [EOS] token marks the actual end of the text, while all subsequent padding positions use a new, dedicated [VOID] token.
  2. Inference-Time Banning: During generation, the model is forbidden from actually outputting the [VOID] token (its logit is set to $-\infty$).
  3. [EOS]Termination: Instead of waiting to fill the entire preallocated canvas, decoding stops early as soon as all positions before the leftmost visible [EOS] token are unmasked. The remaining tail of the canvas is simply discarded.
  4. VoidExpansion: If the initial canvas is too short, the model's learned confidence about where [VOID] tokens should be acts as a length signal. The authors introduce an algorithm to dynamically append masked blocks to the canvas before generation if the tail window shows a strong preference for non-[VOID] tokens.

Datasets

The authors compiled a 0.5M-example instruction-tuning dataset by sampling from a data pool combining Tulu3 and SmolLM2.

To evaluate performance, they tested the models across four standard mathematical reasoning and code generation benchmarks:

  • GSM8K and MATH500 (Reasoning)
  • HumanEval and MBPP (Code Generation)

Key Insights and Ideas

  • The Capacity Myth: The authors discovered that [EOS] overflow is not caused by a lack of model capacity. When they artificially banned [EOS] tokens during decoding on the baseline LLaDA model, its GSM8K accuracy shot up from 28.43% to 70.66%. The model knew the answers; it was just getting trapped by its own padding signals.
  • The Leftward Spread: Through attention intervention experiments, the authors proved that [EOS] overflow is a two-stage process. Once a few tail [EOS] tokens are committed, bidirectional attention artificially inflates the probability of [EOS] tokens in adjacent leftward positions, creating a self-reinforcing collapse. Masking attention to already-committed [EOS] tokens completely mitigates the issue.
Figure 3: Attention intervention on the B = L = 512 [EOS] overflow trajectory. Both cases use the same prompt. Masking attention to committed [EOS] tokens avoids [EOS] overflow and recovers the correct answer.

Key Results

The authors evaluated VoidPadding on two state-of-the-art MDLMs: LLaDA-8B and Dream-7B.

  • Substantial Quality Gains: On Dream-7B-Instruct, VoidPadding improved the block-size-averaged four-task macro mean score by +17.84 points over the original model and +6.95 points over the previous state-of-the-art mitigation method, RainbowPadding.
  • Massive Efficiency Boosts: By enabling early stopping via [EOS]Termination, VoidPadding reduced the Number of Forward Passes (NFE) by 55.7% on average for the Dream model, achieving up to an 84.6% reduction on the MBPP coding benchmark.
  • Robustness to Large Blocks: While baseline models completely collapse when the decoding block size matches the canvas length ($B=L=512$), VoidPadding remained perfectly stable, maintaining high accuracy across all tested block sizes.

Limitations and Future Work

Not discussed in the paper.

Summary updated

BibTeX
@inproceedings{liu2026voidpadding,
  author = {Chunyu Liu and Zhengyang Fan and Kaisen Yang and Alex Lamb},
  title = {{VoidPadding: Let [VOID] Handle Padding in Masked Diffusion Language Models so that [EOS] Can Focus on Semantic Termination}},
  booktitle = {Efficient Reasoning @ COLM},
  year = {2026},
  url = {https://openreview.net/forum?id=ZkOCRiUwvF},
}
Figure