Autoregressive language models handle variable-length sequences naturally. They generate text token-by-token, conditioning each step on the preceding context, and stop immediately upon predicting an End-of-Sequence (<EOS>) token. The final sequence length is an emergent property of the generation process itself.
In contrast, non-autoregressive architectures—such as parallel decoding transformers, discrete flow-matching frameworks, and diffusion language models (DLMs)—operate on a "fixed-size canvas." Because these models generate or refine all tokens simultaneously across multiple denoising or iterative steps, the underlying tensor shapes must be established before generation begins. This architectural constraint forces a difficult trade-off between computational efficiency and output completeness.
The Fixed-Canvas Bottleneck
When a model must define its generation length prior to sampling, it faces a fundamental prediction problem. As analyzed by Wang et al., inaccuracies in pre-determining the target sequence length lead to distinct failure modes:
- Under-sizing the canvas forces the model to truncate its output, causing critical information loss or incomplete reasoning chains.
- Over-sizing the canvas forces the model to fill the remaining space, leading to inefficient padding, computational waste, or hallucinated repetitions.
This rigidity is particularly problematic for complex reasoning and open-ended generation. For instance, Zhao et al. note that fixed generation lengths limit diffusion models on multi-step math or planning tasks, where proofs vary widely in complexity. Similarly, Gulrajani et al. point out that while stochastic truncation during training can mitigate length rigidity in diffusion models, it does not grant them the inherent flexibility to dynamically terminate during inference.
Early parallel decoding strategies, such as Mask-Predict (Levy et al.), relied on separate, explicit length-prediction heuristics before generation. However, because the model must guess the output size without the context of the tokens it has yet to produce, these initial predictions act as a strict performance bottleneck.
Dynamic Canvas Adjustment via Internal Signals
To break this constraint without sacrificing parallel generation speeds, recent techniques leverage the model's own internal confidence signals during the denoising or refinement process to resize the canvas on the fly.
Sequence Contraction: SMARTCROP
Diffusion language models traditionally process the entire token canvas across every single denoising step, even if large portions of the canvas settle into padding tokens early on. To eliminate this computational waste, Rossi et al. introduced SMARTCROP, a zero-shot method based on the insight that diffusion models are natively length-aware.
By monitoring internal length predictions during early denoising steps, the framework dynamically crops the active token window. If the model determines that the trailing tokens are redundant, it stops computing attention keys and values for those positions, drastically reducing FLOPs without degrading generation quality.
Sequence Expansion: DAEDAL
Conversely, if the initial canvas allocation is too conservative, the model needs a way to grow its generation space. Li et al. developed DAEDAL, a training-free inference strategy that dynamically expands the canvas based on entropy or confidence thresholds.
When the model exhibits high uncertainty near the boundaries of its current canvas—signaling that it has more to say but is running out of space—the framework appends unmasked or noisy positions to the tensor. This allows the sequence to grow organically until the model naturally reaches a confident conclusion.
Fixed Canvas: [ Token 1 ] [ Token 2 ] [ Token 3 ] [ Truncated / Padded ]
│
▼
Dynamic Expansion: [ Token 1 ] [ Token 2 ] [ Token 3 ] ──> [ New Canvas Slot ] ──> [ EOS ]
Structural Flexibility via Insertion and Deletion
An alternative to resizing the canvas tensor is changing how the model interacts with sequence positions. Instead of mapping tokens to a static grid, models can treat generation as a sequence of discrete edit operations.
Insertion-Based Architectures
The Insertion Transformer (Stern et al.) reimagined sequence generation by predicting a token and its relative structural position simultaneously. Because the model can insert tokens anywhere in an existing sequence rather than filling a pre-defined mask, the sequence length expands dynamically with every operation.
Building on this, Patel et al. demonstrated that insertion language models handle open-ended infilling tasks significantly better than masked diffusion models, precisely because they do not require prior knowledge of how many tokens are missing.
Special Control Tokens
Rather than changing the underlying attention mechanism, frameworks can also introduce specialized tokens into the vocabulary to manage the canvas size. Bi proposed DreamOn, a framework for code infilling that introduces [expand] and [delete] tokens.
During the iterative denoising process, if the model generates an [expand] token, the canvas size is structurally increased; if it generates a [delete] token, the corresponding position is collapsed. This allows the model to autonomously resize its output space using standard vocabulary predictions, matching the flexibility of autoregressive models while preserving the bidirectional context advantages of diffusion.