Abstract
Masked diffusion language models (LMs) offer a fast alternative to standard autoregressive models by unmasking multiple tokens at once, but this speed usually comes at the cost of text quality. This paper introduces ADJUST, a lightweight, single-layer "sampler" that allows diffusion models to unmask multiple tokens while maintaining the "joint" probability of the sequence. It achieves near-oracle quality with only a minor hit to speed, significantly outperforming naive parallel sampling on reasoning and coding tasks.
Introduction
Most modern LLMs are autoregressive, generating text one token at a time to ensure every new token is conditioned on all previous ones. While this effectively samples from the "true" joint distribution of the language, it is computationally expensive. Masked Diffusion LMs provide a faster alternative by iteratively filling in mask tokens. To maximize throughput, these models often unmask multiple tokens simultaneously in a single forward pass, known as parallel sampling.
However, parallel sampling often leads to a "sharp decrease" in performance. When tokens are unmasked in parallel, the model treats them as independent events, sampling from marginal distributions rather than a coherent joint distribution. For example, the Dream-7B model's accuracy on reasoning tasks drops from 85% to 77% when generating just two tokens at a time instead of one.
Methodology: The ADJUST Sampler
The authors propose ADJUST (Approximate Joint Sampling) to regain the quality of sequential sampling while retaining the speed of parallel generation.
Architecture and Workflow
ADJUST consists of a single, trainable transformer decoder layer (approximately 200M parameters) positioned on top of a large, frozen 7B-parameter diffusion model. The generation process follows a specific workflow:
- Initial Embedding: A single forward pass of the full, expensive base model generates initial embeddings for the masked sequence.
- Iterative Refinement: Instead of further expensive passes, ADJUST performs $K-1$ very fast passes of its own single layer.
- Cross-Token Conditioning: Each fast pass "unmasks" one token and feeds that information back into the subsequent pass. This mimics the chain rule of probability, ensuring that later tokens are conditioned on earlier ones within the same block.
Unlike speculative decoding, ADJUST does not require a verification step from a larger model; it simply produces a better estimate of the joint distribution in a single sequence of operations.
Training
The sampler is trained to minimize the KL divergence between its output and the "true" joint distribution—the output the full model would have produced if run step-by-step.
Experimental Setup
The researchers evaluated ADJUST across several 7B-parameter masked diffusion models, including Dream-7B (Base, Instruct, and Coder) and Llada-7B-Base. Performance was measured using standard benchmarks:
- Reasoning: GSM8k and MATH.
- Coding: MBPP and HumanEval (HEval).
- Text Quality: MAUVE and ParallelBench.
Key Results
ADJUST demonstrates a superior balance between generation speed and text quality compared to naive parallel sampling.
As shown in the results, naive parallel sampling suffers from significant degradation as the number of tokens per step increases. At 8 tokens per step, ADJUST achieved a MAUVE score of 0.84, while the naive parallel baseline plummeted to 0.19. Similarly, on the GSM8k math benchmark, ADJUST increased accuracy by 16 percentage points over naive parallel sampling when generating 4 tokens at a time.
In terms of efficiency, ADJUST is only 20-25% slower than naive parallel decoding but offers substantially higher accuracy. It remains significantly faster than "true" joint sampling (one token at a time), which is $K$ times slower.
Discussion and Insights
A key insight from this work is that a single transformer layer is sufficient to "correct" the outputs of a much larger 7B-parameter model. This suggests that the base model already performs the heavy lifting of understanding context, while the ADJUST layer only needs to handle local dependencies between the tokens being unmasked. Furthermore, the model generalizes well; a sampler trained on 4-token roll-outs remains robust when unmasking 8 tokens at a time.
Conclusion and Future Work
ADJUST effectively bridges the gap between the speed of parallel diffusion and the quality of autoregressive sampling. While training requires generating a dataset of denoising trajectories (approx. 100K samples), the resulting performance gains are substantial. Future research may explore integrating joint-sampling logic directly into the pre-training phase of diffusion backbones or using ADJUST to accelerate the pre-training process itself.
Summary updated