Test-Time Scaling with Diffusion Language Models via Reward-Guided Stitching

Roy Miles, Aysim Toker, Andreea-Maria Oncescu, Jiankang Deng, Ismail Elezi

TL;DR

When Large Language Models (LLMs) try to solve tough math or coding problems, one minor slip-up halfway through a chain of thought usually ruins the final answer—wasting all the brilliant work that came before it. This paper introduces a training-free pipeline that uses fast, parallel diffusion models to brainstorm messy reasoning paths, plucks out the best individual steps across all attempts, and stitches them together for a lightweight solver to finish the job. The result? Up to 23.8% higher accuracy and nearly half the wait time.

What Problem Does This Paper Address?

Getting LLMs to reason reliably at test time usually means throwing compute at the problem: generate ten different chains-of-thought (CoTs) and take a majority vote on the final answer, or let a verifier pick the single best trace. The catch is that standard autoregressive (AR) models—which generate text strictly left-to-right, one token at a time—are slow. Worse, evaluating reasoning at the trajectory level treats every attempt as an all-or-nothing gamble. If a model nails the first four steps of a calculus proof and fumbles the fifth, that entire run is thrown in the trash.

Meanwhile, masked diffusion language models (dLLMs) have emerged as speedy alternatives. Instead of writing left-to-right, they start with a block of masked tokens and iteratively "denoise" (unmask) them in parallel. They are fantastic at cheap, broad exploration, though often noisier and less accurate than AR models on strict logic. Recent hybrid architectures try to fuse diffusion and AR into one monolithic model, but this couples exploration and final generation too tightly, sacrificing reasoning accuracy. How can we get the parallel speed of diffusion and the logical precision of AR models without throwing away partially correct work?

Methods

The authors propose Stitching Noisy Diffusion Thoughts, a modular, training-free pipeline that separates brainstorming, evaluating, and synthesizing into three specialist stages:

Figure 1: Diffusion Stitching pipeline. We first use a diffusion model to efficiently explore diverse reasoning paths, then score each intermediate step with a PRM, and finally stitch the highest-quality steps into a single rationale that conditions a generative solver to recompute the final answer.
  1. Explore (Diffusion Brainstorming): Given a prompt, a masked dLLM (like LLaDA) generates $N$ independent reasoning traces in parallel across GPUs. Crucially, the authors run the diffusion sampler at a low confidence threshold—meaning it unmasks tokens aggressively in fewer steps, trading polished prose for speed and diversity. Each trace is split into discrete steps (sentences for math; individual lines of code or natural-language plans for coding).
  2. Evaluate (Single-Pass Step Scoring): An off-the-shelf Process Reward Model (PRM) evaluates every intermediate step. Standard PRM scoring can be slow, so the authors insert a special marker token after every step boundary and read out the confidence probabilities for all steps in a trace using just one forward pass.
  3. Stitch + Recompute (Evidence Synthesis): Instead of picking one winning trajectory, the system filters for all steps across all $N$ runs that beat a confidence threshold, while also keeping the single best overall trace (measured by geometric mean) as a structural "anchor." These surviving steps are ordered chronologically and tagged with their confidence scores (e.g., [c=0.98] ...). Finally, a lightweight AR solver reads the original problem plus this stitched "cheat sheet"—which might have minor gaps or redundancies—reconciles any conflicts, and outputs only the final answer.

Datasets

Because the framework is completely training-free, datasets are used strictly for zero-shot evaluation (no new benchmarks are introduced):

  • Mathematical Reasoning: GSM8K-CoT, Minerva Math, MATH500 (a 500-problem subset of MATH), and Countdown (target-number arithmetic).
  • Code Generation: HumanEval, HumanEval+, MBPP, and MBPP+.

Key Insights and Ideas

  • Embrace the noise: Because the PRM filters out bad steps downstream, you can deliberately run the diffusion model "sloppily" (lowering sampling confidence from 0.8 to 0.6). This slashes diffusion step counts by ~22–24% with almost zero drop in final accuracy.
  • Asymmetry of talent: When the authors tried using the diffusion model itself as the final solver instead of an AR model, performance lagged. Diffusion models naturally excel at broad, parallel exploration, whereas left-to-right AR models excel at strict logical consolidation. Decoupling them plays to both strengths.
  • Solvers forgive imperfect stitching: Even when the PRM accidentally let a wrong step slip into the stitched evidence, the downstream AR solver still recovered the right answer 30.8% of the time by leaning on the [c=...] confidence tags. In fact, failure analysis showed that 80% of remaining errors came from the diffusion model failing to explore deep enough, rather than PRM mistakes.

Key Results

Across six math and coding benchmarks (using $N=4$ parallel rollouts), Diffusion Stitching dramatically shifts the accuracy-versus-latency Pareto frontier:

Figure 2: Accuracy vs. wall-clock latency on MATH500 comparing autoregressive baselines ( ) using early stopping, diffusion baselines (◦), and our stitching pipeline (■, •) using 4 reasoning traces. All models are 7B in size, except for LLaDA 2.0. All diffusion models are run without KV caching, so enabling caching [33] would likely provide additional practical speedups.
  • Big accuracy jumps: With an 8B LLaDA backbone, stitching achieves a 72.38% average score—beating high-confidence vanilla LLaDA (48.51%) by +23.87 points (with massive +30.1 and +32.7 point leaps on HumanEval and MBPP).
  • Beating hybrids and AR baselines: It outperforms the unified hybrid model TiDAR by +7.1 points and even edges out the strong autoregressive Qwen3-8B baseline by +4.3 points on average (+9.7 on GSM8K).
  • Speedups: At matched accuracy, the pipeline requires up to 9.85$\times$ fewer sequential forward passes (3.21$\times$ fewer on coding) and delivers up to a 1.8$\times$ reduction in wall-clock latency compared to traditional diffusion and hybrid models.
  • Backbone-agnostic: Plugging stitching onto Dream, LLaDA-1.5, and LLaDA 2.0 yielded consistent boosts (e.g., lifting LLaDA 2.0 on MATH500 from 44.6% to 61.4%).

Limitations and Future Work

There is no free lunch in systems engineering: trading latency for parallel exploration balloons VRAM consumption. Keeping the diffusion backbone, PRM, and AR solver in memory across parallel rollouts takes ~42.8 GB of peak memory, compared to ~14.4 GB for a single AR model (though swapping in a smaller 1.5B PRM trims this to ~32.2 GB for a ~2% accuracy dip). Additionally, ceiling performance remains bounded by whether the underlying diffusion model can stumble upon the right sub-ideas in the first place. Note: While not framed as formal future work, the authors point out that their diffusion runs did not use approximate KV-caching—meaning enabling caching is an immediate, practical avenue for even faster inference.

Summary updated

BibTeX
@inproceedings{miles2026test,
  author = {Roy Miles and Aysim Toker and Andreea-Maria Oncescu and Jiankang Deng and Ismail Elezi},
  title = {{Test-Time Scaling with Diffusion Language Models via Reward-Guided Stitching}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=54JyknakHB},
}
Figure