UnMaskFork: Test-Time Scaling for Masked Diffusion via Deterministic Action Branching
Kou Misaki, Takuya Akiba
TL;DR
UnMaskFork (UMF) addresses the inefficiency of applying stochastic test-time scaling to Masked Diffusion Language Models by reframing unmasking as a deterministic, tree-based search. Using Monte Carlo Tree Search over discrete actions that select among multiple MDLMs and inference configurations, UMF achieves diverse, high-quality unmasking trajectories while aggressively caching deterministic rollouts to maximize compute efficiency under a fixed NFE budget. Empirically, UMF consistently surpasses Best-of-N and diffusion-tree baselines on coding benchmarks and also scales to mathematical reasoning tasks, illustrating the method's generality beyond code generation. The work highlights the value of deterministic, multi-model exploration and caching for non-autoregressive diffusion models, with implications for safety, energy use, and practical deployment where inference-time compute is a critical resource.
Abstract
Test-time scaling strategies have effectively leveraged inference-time compute to enhance the reasoning abilities of Autoregressive Large Language Models. In this work, we demonstrate that Masked Diffusion Language Models (MDLMs) are inherently amenable to advanced search strategies, owing to their iterative and non-autoregressive generation process. To leverage this, we propose UnMaskFork (UMF), a framework that formulates the unmasking trajectory as a search tree and employs Monte Carlo Tree Search to optimize the generation path. In contrast to standard scaling methods relying on stochastic sampling, UMF explores the search space through deterministic partial unmasking actions performed by multiple MDLMs. Our empirical evaluation demonstrates that UMF consistently outperforms existing test-time scaling baselines on complex coding benchmarks, while also exhibiting strong scalability on mathematical reasoning tasks.
