Multi-Token Residual Prediction

Yufeng Xu, Zishuo Bao, Qian Wang, Zeshen Zhang, Haoqi Zhang, Bowen Peng, Ang Li, Rahul Chalamala, Yucheng Lu

TL;DR

Diffusion Language Models (DLMs) promise fast, parallel text generation by filling in masked blanks simultaneously, but unmasking too many tokens at once destroys generation quality because tokens lose track of what their neighbors are doing. Multi-Token Residual Prediction (MRP) fixes this by attaching a tiny, 3-layer module to a frozen DLM that predicts how the model's probabilities change from one denoising step to the next, rather than re-running the massive backbone from scratch. The result is a single module that delivers up to $1.40\times$ lossless speedups when you care about perfection, or recovers over 20 points of lost accuracy when you push parallel decoding to the limit.

What Problem Does This Paper Address?

If you've waited for a standard autoregressive LLM (like GPT) to type out an essay one token at a time, you've witnessed the cost of sequential dependency: great quality, zero parallelism. Diffusion Language Models (DLMs) flip this script. Starting from a sequence of [MASK] tokens, they predict every blank at once, lock in the highest-confidence words, and repeat.

Here’s the catch: if you unmask just one token per step, you're right back to slow, sequential generation. If you lower your confidence bar to unmask many tokens in a single step, throughput skyrockets, but quality falls off a cliff. Why? Because tokens unmasked in the same step are chosen independently—they have no idea what words were just picked right next to them, leading to incoherent clashes. The authors ask a fundamental question: Can we unmask multiple tokens per backbone pass while preserving the sequential, inter-token dependencies that keep text smart and coherent?

Methods

The authors' core observation is disarmingly simple: when you only unmask a couple of tokens between step $t$ and step $t-1$, the giant Transformer's output logits (unnormalized log-probabilities) barely budge. Running a multi-billion-parameter model again just to compute a tiny nudge is massive overkill.

MRP Architecture and Pipeline

Instead of predicting the full probability distribution over the vocabulary from scratch (like standard multi-token drafters such as EAGLE), MRP predicts the inter-step residual ($\boldsymbol{\delta}_t = \boldsymbol{\ell}_{t-1} - \boldsymbol{\ell}_t$).

  • Architecture & Training: MRP is a lightweight 3-layer Transformer head bolted onto a frozen DLM (specifically, block-diffusion SDAR models), reusing the frozen embedding and language-modeling heads. During training, it takes the backbone's hidden states and newly revealed tokens, and uses Knowledge Distillation (KL divergence) to match the teacher backbone's next-step shift.
  • Three Serving Modes (Zero Retraining Required):
  • Direct Decoding (Static Regime): After the backbone reveals $r$ tokens, MRP runs $K$ cheap micro-steps, accumulating hidden-state and logit residuals to unmask extra tokens sequentially without waking the backbone.
  • Speculative Decoding (Static Regime): MRP's $K$ drafted tokens are verified in parallel during the backbone's next standard forward pass. Matches are kept; mismatches are remasked. Because accepted tokens match the backbone's exact greedy choices, this speedup is completely lossless.
  • Remasking Decoding (Dynamic Regime): When using an aggressive low confidence threshold ($\tau$) to unmask lots of tokens at once, MRP runs one pass afterward to "double-check" them. Any newly revealed token whose updated confidence drops back below $\tau$ gets revoked (remasked), catching premature mistakes on the fly.

Datasets

No new benchmarks were introduced; the authors rely on established public corpora:

  • Training: SFTDatasetV3, a 12.4M-conversation supervised fine-tuning mixture combining OpenHermes-2.5, GenQA, and Infinity-Instruct across reasoning, math, code, and dialogue.
  • Evaluation: Zero-shot reasoning/math on GSM8K and MATH500 (Chain-of-Thought), plus zero-shot code generation on HumanEval and MBPP.

Key Insights and Ideas

  • The "Zero Function" Advantage: Empirically, when unmasking 1 token, the root-mean-square (RMS) magnitude of the logit residual is only ~20% of the full logits. Predicting a small correction around zero has a much smaller dynamic range than reconstructing an entire vocabulary distribution.
Magnitude of per-step residuals vs. full states
  • Direct Distillation Collapses; Residuals Extrapolate: When unrolling predictions across multiple steps ($K=4$), a module trained to predict full logits directly suffers catastrophic compounding errors—dropping to 1.9% accuracy on GSM8K (4B) and 6.7% (8B). Training on the residual keeps accuracy at 57.2% and 79.8%, respectively.
  • Noisy Confidence Needs a Second Opinion: In dynamic threshold decoding, a token might clear a low confidence bar ($\tau = 0.5$) by sheer luck before its neighbors are resolved. Requiring a token to stay above $\tau$ across both the backbone pass and one cheap MRP residual pass filters out spurious commits without adding any new hyperparameters.

Key Results

Tested on SDAR-Chat models (1.7B, 4B, and 8B) inside the SGLang engine on an H100 GPU:

Table 1: GSM8K (0-shot, CoT) accuracy (%) of MRP trained with the residual objective versus a direct distillation objective, evaluated at K={1, 2, 3, 4} MRP steps per backbone forward. Both variants share identical architecture and hyperparameters and are trained on the same data (sftdatasetv3 [Wang et al., 2024]); they are evaluated under static low-confidence decoding. The ∆row reports the improvement of residual over direct training, with green indicating residual is better and red indicating residual is worse.
  • Lossless Speculative Speedup: Speculative mode ($K=3$) preserves exact backbone quality while delivering $1.17\times$ to $1.40\times$ end-to-end throughput speedups, peaking at $1.40\times$ on SDAR-8B (GSM8K).
  • Superior Speed–Quality Tradeoff: Direct mode ($K=1, 2$) speeds up inference by $1.43\times$ to $1.91\times$ while retaining far higher accuracy than simply forcing the base model to unmask 2 tokens per step (e.g., on 8B HumanEval, Base $r=2$ drops from 73.8% to 42.1%, whereas MRP Direct $K=2$ holds 64.0% at $1.78\times$ speed).
  • Massive Recovery in Aggressive Dynamic Decoding: At an aggressive threshold ($\tau = 0.5$), MRP Remasking boosts accuracy across every scale and benchmark by at least 11 points—reaching +22.6 points on HumanEval (8B: 32.3% $\rightarrow$ 54.9%) and +17.7 points on GSM8K (4B: 63.4% $\rightarrow$ 81.1%).

Limitations and Future Work

  • Code Is Unforgiving: While math and reasoning improve uniformly under remasking, code generation shows minor regressions (up to $-1.8$ points) at conservative thresholds ($\tau \ge 0.8$). Code syntax causes sharper, less predictable probability jumps between steps, and tolerates single-token errors poorly.
  • Fixed Schedules: MRP currently uses a static number of steps ($K$) and existing threshold rules. Co-designing adaptive schedules—running more MRP steps when the backbone is stuck and skipping MRP when generation is cruising—could squeeze out more speed.
  • Scope & Theory: Experiments focus exclusively on block-size-16 SDAR models; extending MRP to full-sequence DLMs like LLaDA and Dream is left for future work, as is tightening their theoretical residual bounds beyond a standard Lipschitz assumption.

Summary updated

Abstract

Diffusion Language Models (DLMs) generate text by iteratively denoising masked token sequences, offering a tradeoff between parallelism and quality compared to autoregressive models. In current practice, the number of tokens decoded per step is controlled by a confidence threshold, and quality degrades monotonically as more tokens are denoised per step. We introduce **Multi-token Residual Prediction (MRP)**, a lightweight module that enables dependency-aware multi-token denoising within a single backbone forward pass. MRP exploits a key property of the denoising process: the logit distributions at adjacent denoising steps are remarkably similar. Rather than running the backbone a second time to obtain the next-step logits, MRP predicts the residual between steps from the backbone's hidden states, effectively denoising more tokens per backbone forward at a fraction of the cost. We deploy MRP in two inference modes: **direct decoding**, which uses the corrected logits without verification for a tunable quality--speed tradeoff; and **speculative decoding**, which verifies MRP's proposals against the backbone for lossless acceleration. Experiments on SDAR models at the 1.7B, 4B, and 8B scales across reasoning and code generation benchmarks demonstrate up to $1.42\times$ lossless speedup in SGLang.
BibTeX
@inproceedings{xu2026multi,
  author = {Yufeng Xu and Zishuo Bao and Qian Wang and Zeshen Zhang and Haoqi Zhang and Bowen Peng and Ang Li and Rahul Chalamala and Yucheng Lu},
  title = {{Multi-Token Residual Prediction}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=GneHMvQsU0},
}
Figure