WorksComputer Science
Random Remasking Scales Masked Diffusion Inference
Abstract
Masked diffusion models (MDMs) generate sequences by progressively unmasking tokens, but errors introduced during decoding are typically irreversible. Recent work has shown that iterative correction can improve sample quality, yet existing theory fails to explain this given a learned, imperfect denoiser model. We re-formulate MDM inference as a Markov chain on the clean sequence space, defined by a remask-denoise kernel that randomly re-introduces masks and then denoises. This helps us analyze the actual denoising trajectory towards the data distribution. The analysis motivates Random Remask-Denoise (RD) inference, a purely test-time, finetuning-free, reward-free procedure. To further improve performance, we propose Trajectory Correction Training (TCT), a denoiser-training procedure that exposes the model to its own errors along the generation trajectory. On logical tasks, our approach exhibits a striking near-log-linear test-time scaling, achieving over 97% accuracy on hard Sudoku puzzles and over 99% accuracy on 3-SAT. Our approach also applies to pretrained models on actual language tasks, beating iterative correction baselines and the official Q-mode accuracy of LLaDA2.1-mini on HumanEval+.
Introduction
Masked diffusion models (MDMs) have emerged as a strong alternative to autoregressive models (ARMs) for sequence generation [16, 12, 13, 19]. By denoising under bidirectional attention rather than committing to a left-to-right factorization, MDMs can in principle leverage context from both sides when filling in tokens, an advantage that has shown promise on reasoning-heavy tasks.
A central limitation of standard MDM decoding is that revealed tokens are frozen for the rest of the trajectory: Errors introduced by parallel decoding cannot be undone. Iterative correction methods have been proposed to resolve this, either by remasking committed tokens for re-generation [24], or by training a model with self-correction ability [17]. These methods not only serve as a remedy for parallel-decoding errors, but also unlock test-time scaling for MDMs: The number of model evaluations is no longer bounded by the response length. Each correction step can be viewed as an additional unit of compute spent refining the answer, in spirit analogous to chain-of-thought reasoning for autoregressive models, with iterative error correction itself acting as a form of reasoning.
Despite the empirical success, iterative-correction methods fail to explain why they improve generation quality from the theoretical perspective. Existing explanations, e.g., the ReMDM [24] and the predictor–corrector framework [2] only provide convergence analysis of the intermediate sequence marginal distribution under a perfect denoising model. They fail to analyze the actual trajectory generated by an imperfect denoiser, which is the question that really matters.
The prevailing formulation treats MDM inference as an iterative denoising process from a fully masked sequence into a clean sequence. This is hard for a generation trajectory analysis, as intermediate sequences correspond to different masking ratios and hence lie in different subspaces. Observing that each inference step can be further decomposed into a denoise step and a remask step, we re-formulate the entire MDM inference process in this work as an iteration over the *clean
sequence space: At each step, some of the tokens in the clean sequence are remasked, and then denoised back into a clean sequence. We identify the remask–denoise kernel as the single object underlying both standard decoding and correction, and we derive a single-step update bound of the KL divergence that identifies how the chain more likely moves toward the data distribution at each step.
The bound exposes three factors: Inference timestep schedule, task structure and model quality. The bound suggests a non-increasing timestep schedule, reducing gradually from 1 (fully masked sequence) to 0 (clean sequence). The challenge is how to decide the number of iterations at each step. We propose a natural solution: Keep iterating at the given step until the clean sequence prediction stabilizes, which leads to our Random Remask-Denoise () inference. Random remasking is more favorable for tasks with local constraints, so that the model better reconstructs masks with revealed information, leading to lower denoising error. The model should be trained under the actual inference trajectory, and thus we propose Trajectory Correction Training (TCT), a self-correction training method that is paired with inference.
On logical tasks like Sudoku-Hard and 3-SAT, with standard training shows significant scaling effect (Figure 1), boosting accuracy from 19.7% and 86% to 93.5% and 98.5%. TCT training further increases accuracy to 97.5% and 99.3%, respectively. also works well on language tasks. On the coding benchmark HumanEval+, with off-the-shelf LLaDA2.1-mini surpasses iterative correction baselines and the official Q-mode inference.

Figure 1. Inference scaling on Sudoku-Hard and 3-SAT. and ReMDM are run on standard training checkpoints, both using the standard variant; ProSeCo has its own training method. scales near-log-linearly on both tasks and stays above ReMDM at every budget, whereas ProSeCo plateaus after a handful of correction steps.
Our main contributions are:
A unified Markov-chain framework for MDM inference, in which standard decoding and self-correction are instances of a single remask–denoise kernel acting on the complete sequence space.
Random Remask-Denoise (), a reward-free, finetuning-free inference algorithm with an adaptive timestep schedule motivated by the single-step update bound.
Trajectory Correction Training (TCT), a denoiser-training procedure that supplies trajectory-aware supervision at every position and pairs naturally with .
Across domains like logical tasks and coding, we demonstrate achieves test-time scaling, and the scaling effect is dependent on the token coupling nature of the task. TCT training further boosts with self-correction ability.
Related work
Iterative-correction inference. A growing body of work equips MDMs with the ability to revise tokens that have already been revealed, falling into two groups. Training-free methods [24, 18] modify only the inference procedure of a pretrained denoiser. For instance, ReMDM [24] derives a principled remasking sampler from a custom backward process and remasks already-decoded tokens either uniformly at random or by model confidence before re-predicting them. Trained approaches instead fine-tune or augment the denoiser to recognize and revise its own mistakes. ProSeCo [17] learns a corrector that consumes the denoiser’s own outputs and alternates unmasking with correction at inference. PRISM [7], RemeDi [6], BackPlay [11], and Corrective DLM [25] differ in the training recipe but share the same goal of producing per-token quality signals that drive selective remasking. All of these approaches frame correction defensively, as a way to repair errors introduced by parallel decoding; We instead treat iterative remasking and correction as a reasoning mechanism in its own right and as a primary axis for test-time scaling.
Test-time scaling for reward guidance. Most test-time scaling work for MDMs lies in the reward-guidance regime, in which an external reward function or verifier steers sampling toward higher-quality outputs. These methods scale through three mechanisms: particle-based sampling [20, 4, 14], iterative noise–denoise refinement [9, 22, 15], and direct guidance [21, 3]. The closest to our framing is Phunyaphibarn & Sung [15], which also samples from a Markov chain on the complete sequence space but offers limited theoretical analysis of the sampler’s convergence. All three families rely on an external quality signal to guide intermediate generation, whereas the inference algorithms we study are reward-free.
Preliminaries
We briefly review the absorbing masked diffusion model (MDM) setup that our method builds on.
Setup. Let be a clean discrete sequence of length , where is a finite vocabulary. We augment the vocabulary with a special mask token and write for the corrupted sequence at diffusion time . Let be a monotonically decreasing noise schedule with and . Clean sequences are drawn from a data distribution over .
Diffusion training objective. An MDM learns a network whose token-wise output predicts the clean token given the current intermediate sequence . Standard MDMs adopt carry-over unmasking, i.e., if , while self-correction models relax this constraint. The training objective simplifies to a weighted cross-entropy loss over masked tokens [13, 16, 19]:
Standard MDM training thus teaches the model to recover each clean token independently at every currently masked position. Because the per-position outputs are conditionally independent given , the network induces a joint distribution
which we use in Section 4 as the model’s posterior over clean sequences.
Standard diffusion inference. At inference time, generation starts from the fully masked sequence and proceeds along a decreasing time grid . At each step, the model predicts token distributions at all masked positions, and an unmasking policy selects a subset of size to reveal — either uniformly at random or by model confidence. For each , a token is drawn from (by sampling or arg-max) and written into the sequence to produce . Standard inference never revises an already revealed token: Once a position is unmasked, it stays fixed for the remainder of the trajectory. Our work departs from this convention by allowing iterative correction of previously revealed tokens.
Method
The standard view of MDM inference is an iteration over the intermediate sequence space: Starting at , the noise level decreases monotonically until a clean sequence is produced. This view is faithful to the underlying diffusion theory but has two limitations. First, correction is treated as an engineering add-on for fixing model errors rather than an inherent part of inference. Second, the framework makes it difficult to reason about iterative correction under an imperfect denoiser: Because the iteration variable changes type at every step, intermediate sequences live in different spaces, and there is no unified metric for tracking how close the current state is to the data distribution.
Observe that each inference step can be further decomposed into a denoise step and a remask step. In the denoise step, the model predicts the clean sequence from any intermediate sequence , and in the remask step, some of the tokens in are turned back into masks, resulting in another intermediate sequence at another noise level . In other words, the MDM inference process, either standard denoising or iterative correction, can be unified into the following transition:
Therefore, we can view the inference process as an iteration over the clean sequence space . Under a Markovian remask step, the transition is given by a remask–denoise kernel:
which approximates the Bayes-optimal counterpart
We refer to as the model kernel and to as the true kernel.
Proposition 1 (Stationarity of the true kernel, proof in Section A.1.). For every , the kernel admits as a stationary distribution: .
Proposition 1 implies that the model kernel must be close to the true kernel for the chain to converge near , which in turn requires the remasking step to be strictly Markovian. However, the remask step in standard diffusion inference violates this requirement, since it only remasks a previous mask, which is history information inaccessible in . In our formulation non-Markovian remasking is an unnecessary source of error, and thus we recommend remasking every token in the clean sequence uniformly at random, ensuring the Markov property.
This convergence guarantee, however, is hardly possible to achieve with a learned denoiser. So we would like to know how to make the actual generation close to the data distribution, by doing the best in every single step. To analyze it, we fix any over on the chain’s state space and write for its image after one kernel step, where . We use as the discrepancy metric between the ground truth distribution and current distribution .
Proposition 2 (Single-step update bound of KL divergence). For any distribution over and kernel step , let be the marginal obtained by remasking , and define the contraction ratio of the masking channel
Algorithm 1 Random Remask-Denoise (RD) Inference (standard & correction variants).
Require: Trained MDM , decoding steps , per-level correction budget , stability threshold
▷ initialize fully masked,
for do
▷ consecutive-repetition counter
for do ▷ repeat denoise-remask at noise level
if standard variant then ▷ skipped by the correction variant
for with ▷ freeze revealed tokens
end if
if else
▷ # positions to reveal at noise level
sample uniformly with
for ; for ▷ remask
if then ▷ converged: identical predictions in a row
break
end if
end for
end for
return
which satisfies by the data-processing inequality. Then
where
The proof, which derives the stronger equality form, is in Section A.2. The two terms in Proposition 2 have distinct interpretations:
, the contraction ratio, is monotonically decreasing in : A larger destroys more information about , making the two marginals more similar (data-processing inequality), so the term shrinks smoothly from 1 to 0 as ranges from 0 to 1.
is the denoising error: The expected KL divergence between the Bayes-optimal posterior and the model’s . At large the input is mostly masked and prediction is harder, so typically increases with .
We want to achieve a small at each step, and three factors affect the update bound: Timestep schedule, task structure, and model quality. We analyze each in turn in the following subsections.
Schedule: Random Remask-Denoise (R2D) Inference
The next question is how to choose the timestep at each step of the chain. A non-increasing schedule is intuitively right: Early on is large and a larger can reduce the factor even at the cost of higher denoising error , whereas late in the chain is small and only a smaller keeps from dominating. ProSeCo (Schiff et al. [17]) skips remasking entirely during correction (i.e. ), which is suboptimal under Proposition 2 since and does not enjoy contraction. Standard inference and ReMDM (Wang et al. [24]) follow this intuition, but the latter uses a fixed uniform schedule by default, which is suboptimal: Early large- steps are wasted while still dominates, and late small- steps are bottlenecked by and yield little further progress. Heuristically, we want to move on to a smaller timestep once performance saturates.
We therefore propose Random Remask-Denoise (RD) inference, given in Algorithm 1, which uses an adaptive timestep schedule. The noise variable is discretized into equally spaced grid points , with as a natural default (one outer step per token). Starting from the largest , we hold the noise level fixed and iterate the model kernel , treating the inner loop as a search for a fixed point of at that level.
The main challenge lies in performance saturation detection. KL divergence is our theoretical metric, but it is intractable to compute as it involves the actual distribution of the intermediate sequence. We turn to a heuristic alternative: Under argmax sampling, convergence can be detected once has remained unchanged across consecutive denoise steps (Line 15). We set a per-level budget so that inference ends with at most forward passes, but our experiments show that actual inference uses far fewer forward passes.
We instantiate RD in two variants depending on whether the denoiser has been trained for correction, differing only in Line 7 of Algorithm 1. The standard variant executes that line, carrying over the revealed positions of and filling in only the masked entries, which matches the behavior assumed by an off-the-shelf MDM denoiser. The correction variant skips it, overwriting every position with the model’s prediction so that previously revealed tokens are revised whenever the denoiser disagrees with them. In either case, RD is a purely test-time procedure that requires no retraining and applies to any pretrained MDM denoiser, with or without explicit correction capability. Note that the standard variant also has error correction ability through random remasking.
Task Structure: When Is the Denoising Error Small?
At a fixed noise level, iterating Proposition 2 drives the KL divergence toward a floor determined by the denoising error. The error depends on how well the model learns the posterior . Training is important, but task structure also plays a role here. Tasks with sparse, local constraints are easier for the model to fit the posterior. As long as model understands the constraints during training, reconstruction becomes easy with only a subset of the tokens revealed.
Sudoku and 3-SAT are two examples that fall into this regime. Every Sudoku constraint spans only 9 cells, so a cell is determined once the other 8 cells of its row, column, or box are revealed; Every 3-SAT clause has only 3 literals, so the third is forced once the other two are revealed false. A small at moderate in turn lets RD operate at larger noise levels, where is smaller, before the denoising error dominates.
Model Quality: Trajectory Correction Training (TCT)
Having fixed the schedule, we now turn to the denoiser. Bounding directly leads to a trajectory-aware ELBO over the denoiser parameters .
Proposition 3 (Trajectory-aware training bound). For any distribution over and timestep , let and . Then
where is the (Shannon) entropy of the data distribution.
Since is independent of , minimizing the bound reduces to a cross-entropy objective on inputs drawn from — the marginal of the chain’s own state remasked to level . The proof is in Section A.3.
Faithfully emulating the inference trajectory of Algorithm 1 during training would spend many gradient steps on a single example before the chain advances. Inspired by progressive-unmasking training (PUMA) [8], we make three simplifications:
Omit the correction inner loop, keeping only the outer decoding steps;
Reduce the decoding trajectory to a fixed stage budget ;
Use a low-confidence reveal policy to maintain generation quality under that limited budget.
The resulting procedure is Trajectory Correction Training, whose pseudo-code is given in Algorithm 2 (Section B). It maintains independent decoding chains in parallel, with chain at stage of an unmasking trajectory targeting the paired clean sample . Unlike PUMA, which trains on the standard MDM loss, our objective is the correction loss: Token-level cross-entropy of against the clean target evaluated at every position, masked or already revealed,
Including the revealed positions is what makes this a correction objective rather than the usual MDM denoising one: Tokens that the model previously filled in incorrectly contribute a non-trivial loss, training to override its own past mistakes instead of merely copying its own outputs.
Experiments
Our experiments are designed to answer three questions:
How do and TCT compare against iterative correction baselines? (Sections 5.1 and 5.2)
Does random remasking enable test-time scaling? (Section 5.3)
How efficient is inference compared with other iterative correction approaches? (Section 5.4)
Inference approaches. We evaluate in both its standard and correction variants, referred to as “ (standard)” and “ (correction)”, respectively, alongside two baselines: ReMDM ([24]) and ProSeCo ([17]). Both baselines admit an arbitrarily large compute budget and have been reported to exhibit test-time scaling. ProSeCo inference requires its own training method, while ReMDM works with any existing model. In addition, we report the accuracy of other correction training (RemeDi ([6]), PRISM ([7]), BackPlay ([11])) and non-correction training (Standard, PUMA ([8])) variants.
Implementation variants of ReMDM. When evaluating ReMDM with models trained with TCT, we use argmax sampling instead of the official stochastic sampling to keep the best performance. In analogy to , we use “ReMDM (correction)” to refer to the argmax sampling variant, and “ReMDM (standard)” for the original stochastic categorical sampling implementation that is used for standard-trained models. We include a detailed comparison between different ReMDM configurations in Section C.4.
Logical Tasks
We first evaluate on two logical reasoning tasks. One is Sudoku-Hard, constructed from the training split of Sudoku-Extreme ([23]), retaining only puzzles with rating , which yields 2.3M instances. The last 1,000 form the test set and the rest form the training set. Sudoku difficulty is measured by rating, i.e., the number of backtracks needed by the tdoku solver ([5]). These puzzles are challenging even for experienced human solvers and dedicated solver programs, requiring substantial trial-and-error search. The model in both tasks is a 6.8M Qwen2-style decoder-only transformer with hidden size 256 and 8 layers and is trained from scratch.
Table 1 compares the accuracy against prior work on Sudoku-Hard and 3-SAT. The per-level correction budget is set to 256 for Sudoku-Hard and 32 for 3-SAT. We use a smaller budget for 3-SAT because performance almost saturates at . ReMDM and ProSeCo use the same compute budget for a fair comparison. with standard training already surpasses other baselines on both tasks. TCT training further pushes the limit to 97.5% on Sudoku-Hard and 99.3% on 3-SAT. On the same TCT checkpoint and at the same budget, outperforms ReMDM (correction) by 5.2 and 2.8 points, so the gain comes from the remask–denoise kernel and not from the training alone. Furthermore, 3-SAT has higher peak performance than Sudoku-Hard, which aligns with our task structure analysis in Section 4.2.
| Training method | Inference method | Sudoku-Hard | 3-SAT |
| Standard | Standard | 48.7 | 90.6 |
| ReMDM (standard) | 54.7 | 93.5 | |
| RD (standard, ) | 19.7 | 86.0 | |
| RD (standard) | 93.5 | 98.5 | |
| PUMA | Standard | 50.8 | 79.6 |
| RemeDi | RemeDi | 50.2 | 84.3 |
| PRISM | PRISM | 52.2 | 86.0 |
| BackPlay | BackPlay | 51.9 | 87.9 |
| ProSeCo | ProSeCo | 55.7 | 82.2 |
| TCT (ours) | Standard | 51.2 | 79.7 |
| ReMDM (correction) | 92.3 | 96.5 | |
| RD (correction, ) | 43.7 | 90.0 | |
| RD (correction) | 97.5 | 99.3 |
Table 1. Accuracy (in %) on Sudoku-Hard and 3-SAT, organized by training method and inference method. ReMDM, RD and ProSeCo use the same compute budget (256 steps per token for Sudoku-Hard, 32 steps per token for 3-SAT). RD is the primary driver for inference-time scaling, and TCT cooperates well with RD to further raise performance.
Coding Benchmark
To examine how RD behaves on practical language tasks with off-the-shelf models, we further evaluate on the coding benchmark HumanEval+ ([10]) with LLaDA2.1-mini ([1]), a 16B diffusion language model already trained with self-correction ability. Figure 2 reports the results. Besides the three iterative correction methods we run ourselves, we also quote the model’s own published Q-mode and S-mode decoding results. RD reaches 85.4%, the top accuracy even beyond the model’s published Q-mode accuracy (82.9%), and it surpasses ProSeCo and ReMDM, two iterative correction baselines.

Figure 2. HumanEval+ accuracy with the off-the-shelf LLaDA2.1-mini (16B). The three colored bars are inference methods we run ourselves, and the two grey bars are the model’s own published Q-mode and S-mode results. RD achieves the top accuracy, surpassing the official Q-mode performance.
Test-time Scaling
The next question is how test-time performance scales with compute budget, so we compare the accuracy of RD, ReMDM and ProSeCo against the per-level correction budget on logical tasks. RD and ReMDM are evaluated with standard training checkpoints, while ProSeCo uses its own training method. As shown in Figure 1, RD scales near-log-linearly: From 19.7% at to 93.5% at on Sudoku-Hard, and from 86.0% to 98.5% at on 3-SAT. ReMDM also improves with the budget but stays below RD at every budget. ProSeCo plateaus early at low performance: Its correction steps do not remask (), where and Proposition 2 guarantees no contraction.
Compute Comparison
Iterative correction methods buy accuracy with more model forward passes, so a fair comparison should account for compute as well as accuracy. Figure 3 reports the averaged number of function evaluations (NFE) per sample that each method spends at the budget of Table 1. RD and ReMDM use the TCT-trained checkpoint. ReMDM and ProSeCo have no stopping rule and spend their entire budget. RD applies early exit (Line 15 of Algorithm 1) as soon as its prediction stabilizes, so it spends only about 1/4 and 1/2 of ReMDM’s compute and reaches higher accuracy.

Figure 3. Averaged number of function evaluations (NFE) per sample at the budget of Table 1 (lower is better), with accuracy in parentheses (TCT checkpoint for RD and ReMDM). RD exits early, whereas ReMDM and ProSeCo spend their full budget.
Ablation Study
RD design. We ablate our inference approach on three critical designs: Uniform remasking, early exit, and arg max decoding. For uniform remasking, we replace it with low-confidence remasking, a popular strategy used in standard inference. For early exit, we remove it as ablation. For arg max decoding (Line 6 of Algorithm 1), we replace it with stochastic sampling from the denoiser’s raw distribution. Table 6 (Section D.1) reports the accuracy on Sudoku-Hard for each configuration across different compute budgets. Low-confidence remasking almost removes the scaling effect: Accuracy moves only from 68.7% to 69.6% across a 16× increase in budget, where uniform remasking goes from 65.8% to 97.5% over the same sweep. Removing early exit preserves the scaling trend but pays heavily for it: At the NFE is nearly 4 times that of the default configuration. Moreover, its accuracy is still lower than that of the default configuration, because random remasking can move the sequence away from the stationary point after convergence. Stochastic sampling loses 10.4 points on accuracy because TCT trains the denoiser along an arg max trajectory. It also spends more NFE, as a stochastic prediction makes it harder to fulfill the early-exit test.
| Run | |||||
| Default | (1050) | (1477) | (2412) | (3552) | (5742) |
| Low confidence | (751) | (990) | (1356) | (2212) | (3271) |
| No early exit | (1377) | (2673) | (5265) | (10449) | (20817) |
| Stochastic | (1181) | (2034) | (3005) | (4146) | (6156) |
Table 6. RD (correction) inference design on Sudoku-Hard under TCT training. Each row changes one design element of Algorithm 1 relative to Default. Each cell reports accuracy (in %, mean standard deviation over three training seeds) with averaged NFE in parentheses. Low-confidence remasking almost removes the scaling effect; Removing early exit preserves scaling but at markedly higher NFE; Stochastic sampling in place of arg max costs accuracy at every budget while spending more NFE.
TCT design. We ablate TCT on its two designs in Algorithm 2: The top- unmasking position selection (Line 11), and the arg max sampling (Line 9). For position selection, we replace top- with a random choice among the masked positions; For the reveal operator, we replace arg max with temperature-1 sampling. We report the accuracy on Sudoku-Hard under RD inference, using compute budget , as shown in Table 7 (Section D.2). Position selection is the load-bearing choice: Revealing random positions costs 12.0 points, dropping accuracy from 97.5% to 85.5%, because top- keeps the training trajectory close to a valid partial solution rather than letting it degrade into a corrupted one. The reveal operator is a minor lever by comparison, costing 0.7 points, consistent with its role of matching the arg max decoding that RD uses at inference.
| Reveal rule | Sudoku-Hard acc. (%) |
| Top- confidence + argmax (published) | 97.5 |
| Random position + argmax (Line 11 ablation) | 85.5 |
| Top- confidence + stochastic (Line 9 ablation) | 96.8 |
Table 7. Reveal rule in TCT training (Algorithm 2) on Sudoku-Hard, replacing the argmax reveal of Line 9 and the top- confidence reveal of Line 11. Position selection is the load-bearing choice, while argmax reveal is a minor lever; Both approximations help rather than hurt.
Conclusion
We presented a unified Markov-chain view of masked diffusion inference in which standard decoding and self-correction arise from a single remask–denoise kernel acting on the clean sequence space. The contraction analysis motivates Remask-Denoise (RD) inference and Trajectory Correction Training (TCT), which together produce a nearly log-linear scaling effect on Sudoku-Hard and 3-SAT. Our inference approach also works with pretrained diffusion models on practical language tasks, surpassing published Q-mode accuracy on HumanEval+ with LLaDA2.1-mini. In addition, RD adopts an early-exit mechanism and is thus more compute-efficient. Applying RD and TCT to other domains, such as biological sequence design, is a promising future direction.
Acknowledgments
We acknowledge support by National Science Foundation under Grant CCF-2106778. This work used computational resources provided through ACCESS allocation CIS260480, which is supported by National Science Foundation grants #2138259, #2138286, #2138307, #2137603, and #2138296. Zhaoyi Zhou was additionally supported by the Wei Shen and Xuehong Zhang Presidential Fellowship and the Marija Ilić Endowed Fellowship at Carnegie Mellon University.
Proofs
Proof for proposition 1
Proof. By the definition of ,
where the last step applies Bayes’ rule and then sums over to 1. □
Proof for proposition 2
Proof. We first derive the stronger equality
where is the remainder defined below; The bound in Proposition 2 then follows by dropping . Define joint distributions over
The -marginal of is (by definition of ), and the -marginal of is (by Bayes’ rule, ).
Expanding via the factorization and gives
using (1). Expanding the same divergence via the alternative factorization yields
where
the non-negativity following because is itself a KL divergence. Equating the two expressions for gives (3); Dropping yields the bound stated in Proposition 2. □
Proof for proposition 3
Proof. Starting from the marginal of on ,
apply Jensen’s inequality directly:
Taking expectation over and subtracting yields the claim. □
Trajectory Correction Training Algorithm
Algorithm 2 gives the pseudo-code of a single TCT update step described in Section 4. The chains in a batch are advanced in a streaming fashion: After each gradient step, a chain that has reached the stage budget is refilled with a fresh sample and a fully masked sequence, while every other chain reveals the top- most confident masked positions with the model’s arg max predictions.
Algorithm 2 Trajectory Correction Training (Single Update Step)
Require: MDM , max stages , batch of partially masked sequences , paired clean samples , per-example stage counters
Compute logits
Compute correction loss ((2)) from logits and ; Update
for in parallel do ▷ Streaming update
if then
Sample
Initialize . ▷ refill: Restart chain on a new sequence
else
for masked positions ▷ unmasking policy from the model
Select reveal set from ▷ top- with thresholding
Unmask for all ; ▷ fill with model predictions
end if
end for
Additional Experiment Results
Error bars of R2D and ReMDM inference.
Figure 4 shows the error bars of R2D and ReMDM, under both TCT and standard training. We use 3 random seeds for training, and 3 random seeds for inference on each training checkpoint. The full figure below places those panels beside their TCT-training counterparts and draws the spread across training seeds.

Figure 4. Inference scaling on Sudoku-Hard (top) and 3-SAT (bottom), under standard training (left) and TCT training (right). The y-axis reports task accuracy and the x-axis the per-token correction budget on a logarithmic scale; error bars are one standard deviation across three training seeds. The horizontal dashed line marks each panel’s own no-correction baseline. scales near-log-linearly in all four panels and stays above ReMDM at every budget. Protocol details are in Section E.
Compute and Latency
We report the averaged NFE and averaged wall time of ReMDM, R2D and ProSeCo. Table 2 is the compute-normalized view of Table 1, discussed in § 5.4. We also report standard deviation of the accuracy for ReMDM and R2D, under 3 random seeds. Wall time is measured at batch size 1 on a single NVIDIA GH200. The cost of correction relative to standard decoding is nonetheless real. At the largest budget, R2D’s per-sample latency is about that of standard decoding on the same checkpoint for Sudoku-Hard (49.4 s against 0.64 s) and about on 3-SAT (4.76 s against 0.18 s). What makes this practical is that the budget is a free knob rather than a fixed cost: At the same sampler costs 1.31 s and 0.36 s respectively, within roughly twice the standard baseline, and every point in between is available along the curves of Figure 1.
Table 2: Compute-normalized comparison on Sudoku-Hard and 3-SAT. Each inference method is reported with its accuracy (in %), averaged NFE, and per-sample wall time at batch size 1 on a single NVIDIA GH200 GPU. D is the only method that exits early: on Sudoku-Hard it reaches 97.5 in 49.4 s/sample where ReMDM reaches 92.3 in 187.9 s/sample — 5.2 points better at 3.8× less wall time. Measurement protocol in Section E.
| Training method | Inference method | Sudoku-Hard Acc. | Sudoku-Hard NFE | Sudoku-Hard s/sample | 3-SAT Acc. | 3-SAT NFE | 3-SAT s/sample |
| Standard | Standard | 48.7±1.0 | 81 | 0.74 | 90.6±2.3 | 20 | 0.16 |
| Standard | ReMDM (standard) | 54.7±9.7 | 20737 | 177.2 | 93.5±0.7 | 641 | 5.30 |
| Standard | D (standard, ) | 19.7±4.7 | 162 | 1.41 | 86.0±1.1 | 40 | 0.42 |
| Standard | D (standard, ) | 93.5±2.8 | 4607 | 36.9 | 98.5±0.2 | 336 | 2.70 |
| ProSeCo | ProSeCo () | 55.7 | 20817 | 168.5 | 82.2 | 660 | 5.02 |
| TCT (ours) | Standard | 51.2±1.5 | 81 | 0.64 | 79.7±2.1 | 20 | 0.18 |
| TCT (ours) | ReMDM (correction) | 92.3±2.9 | 20737 | 187.9 | 96.5±0.8 | 641 | 4.95 |
| TCT (ours) | D (correction, ) | 43.7±2.4 | 162 | 1.31 | 90.0±3.2 | 40 | 0.36 |
| TCT (ours) | D (correction, ) | 97.5±0.8 | 5742 | 49.4 | 99.3±0.5 | 343 | 4.76 |
Table 2.
Compute and Latency on HumanEval+
Table 3 pairs the accuracy of Figure 2 with the cost of the three correction methods. R2D reaches top accuracy with roughly half of ReMDM’s compute, resulting from the early-exit mechanism.
Table 3: HumanEval+ accuracy, averaged NFE and averaged wall time (in minute per sample) for the three iterative correction methods of Figure 2, all evaluated with the off-the-shelf LLaDA2.1-mini. D reaches the top accuracy while spending roughly half of ReMDM’s compute.
| Method | Accuracy | Avg NFE | Avg wall time |
| D (correction) | 85.4 | 757 | 6.6 |
| ProSeCo | 81.7 | 692 | 6.0 |
| ReMDM | 71.6 | 1632 | 14.3 |
Table 3.
ReMDM Implementation Choice under TCT Training
We stick to the official implementation from https://github.com/kuleshov-group/remdm when running ReMDM with standard training. When the model is trained with TCT, we make one adaptation to ReMDM inference: We use argmax sampling instead of the categorical stochastic sampling in the official implementation.
We actually consider two critical implementation choices for ReMDM: Carry-over unmasking vs. no carry-over, and argmax sampling against stochastic sampling. Table 4 compares the 4 configurations on both Sudoku-Hard and 3-SAT. Each entry is evaluated on 9 repeated runs: three TCT training checkpoints with different seeds, and three inference seeds for each checkpoint. Stochastic sampling is significantly weaker on both tasks. This is because TCT models are trained on argmax sampling trajectories, and thus stochastically revealed tokens are out-of-distribution for these models. Under argmax sampling, Sudoku-Hard is indifferent to the unmasking choice, but 3-SAT favors carry-over unmasking. Therefore, we report the accuracy of ReMDM under carry-over unmasking + argmax sampling in Table 1 to ensure a fair comparison with , and refer to this configuration as ReMDM (correction). The official configuration, i.e., carry-over unmasking + stochastic sampling, is referred to as ReMDM (standard) and is still used for standard-trained models.
| Carry-over | Sampling | Sudoku-Hard | 3-SAT |
| Yes | Stochastic | ||
| No | Stochastic | ||
| Yes | Argmax | ||
| No | Argmax |
Table 4. ReMDM implementation variants on the TCT checkpoint, comparing carry-over denoising against the sampling operator, at on Sudoku-Hard and on 3-SAT. Accuracy is in %, mean standard deviation over three training seeds three inference seeds. The sampling operator dominates: arg max is the operator TCT trains under. Carry-over is close to free on Sudoku-Hard but decisive on 3-SAT. The standard checkpoint is not ablated; there we run the official carry-over + stochastic configuration.
We further investigate why the two unmasking choices (carry-over vs. no carry-over) have different impacts on the two tasks. We find that the TCT-trained model on Sudoku holds a correct grid exactly in place, whereas on 3-SAT it keeps rewriting a small fraction of an already-correct assignment. To test this, we feed the TCT-trained model the ground-truth answer, randomly mask a fraction of the answer tokens, run a single forward pass without carry-over, and measure the fraction of revealed tokens the model reproduces unchanged. As shown in Table 5, on Sudoku-Hard the model preserves every correct revealed cell at every masking ratio. On 3-SAT, however, preservation is exact at high mask ratios but decreases at smaller ones. In other words, the model tends to modify the correct tokens at a small probability when most of the tokens are revealed in the sequence. Therefore, a correct solution can be modified by mistake near the end of generation, and this explains the high variance on 3-SAT without carry-over.
| Mask ratio | Sudoku-Hard | 3-SAT |
| 0.00 | 1.000 | 0.951 |
| 0.10 | 1.000 | 0.988 |
| 0.30 | 1.000 | 0.997 |
| 0.50 | 1.000 | 0.998 |
| 0.70 | 1.000 | 1.000 |
| 0.90 | 1.000 | 1.000 |
| 0.95 | 1.000 | 1.000 |
Table 5. Token preservation of the TCT-trained denoiser: The fraction of correct revealed tokens that survive a single forward pass without carry-over, averaged over three training seeds. On Sudoku-Hard the correct grid is an exact fixed point of the denoiser at every masking ratio; On 3-SAT it is not, and preservation is weakest precisely when the sequence is nearly complete, which is why carry-over is essential there and not on Sudoku-Hard.
Ablation Study
R2D Inference Design
This section ablates the three elements in D design. Starting from the default configuration, each row changes one design element of Algorithm 1 in isolation: Uniform remasking is replaced by low-confidence remasking, early exit is disabled, and the arg max decoding of Line 6 is replaced by sampling from the denoiser. Table 6 gives the accuracy result along with averaged NFE on Sudoku-Hard with TCT training, under different compute budgets. We use three model checkpoints trained with three different random seeds. Each table entry is measured on 9 repeated evaluations, three runs for each checkpoint.
Low-confidence remasking almost removes the scaling effect: Accuracy moves only from 68.7% to 69.6% across a 16× increase in budget, where uniform remasking goes from 65.8% to 97.5% over the same sweep. Removing early exit preserves the scaling trend but pays heavily for it: At the NFE is nearly 4 times that of the default configuration. Moreover, its accuracy is still lower than that of the default configuration, because random remasking can move the sequence away from the stationary point after convergence. Stochastic sampling loses 10.4 points on accuracy because TCT trains the denoiser along an arg max trajectory. It also spends more NFE, as a stochastic prediction makes it harder to fulfill the early-exit test.
TCT Training Design
The arg max reveal of Line 9 and the top- confidence reveal of Line 11 in Algorithm 2 are deliberate design choices rather than arbitrary deviations from the theory. Following Kim et al. [8], TCT trains the denoiser on its own inference-time trajectory; since D decodes with arg max, revealing with arg max during training keeps the training and inference operators consistent, and revealing the highest-confidence positions keeps the training trajectory close to correct rather than letting it degrade into noise.
Table 7 ablates each choice independently on Sudoku-Hard, replacing the arg max reveal with temperature-1 sampling and, separately, the top- reveal with a random choice among the masked positions. Position selection is the load-bearing choice: Random reveal costs 12.0 points. The reason is that top- keeps the revealed prefix mostly correct, so the model spends its capacity learning to predict the remaining masks from a valid partial solution — that is, learning the task structure — rather than learning to complete corrupted grids. The reveal operator is a minor lever by comparison: Stochastic reveal costs only 0.7 points, consistent with its role as the operator that inference matches. Both approximations therefore help rather than hurt.
Additional Experiment Details
Sudoku-Hard
Data link. https://huggingface.co/datasets/sapientinc/sudoku-extreme.
Model architecture. The denoiser is a small Qwen2-style decoder-only transformer trained from scratch. The full architecture is summarized in Table 8 (column “Sudoku-Hard”); The resulting parameter count is approximately 6.8M, of which the embedding and language-model head contribute only K parameters due to the tiny vocabulary (digits 1–9, the mask token, and a padding token).
| Hyperparameter | Sudoku-Hard | 3-SAT |
| Vocabulary size | 11 | 42 |
| Hidden size | 256 | 256 |
| FFN intermediate size (SwiGLU) | 768 | 768 |
| Number of layers | 8 | 8 |
| Number of attention heads | 8 | 8 |
| Number of key/value heads | 8 | 8 |
| Maximum position | 162 | 657 |
| Dropout | 0.0 | 0.0 |
| Total parameters | 6.8M | 6.8M |
Table 8. Denoiser architecture for Sudoku-Hard and 3-SAT. The two share a Qwen2-style backbone and differ only in vocabulary size and maximum position, which are dictated by the input encoding.
Training. The denoiser is trained with TCT (Algorithm 2) on the Sudoku-Hard training split. We use a per-GPU batch size of 256. The checkpoint reported in the main paper is taken at step 460,000. A single training run takes around 3 hours on a single Nvidia L40 GPU.
Inference. We set correction frequency to 1 and early-exit patience to consecutive unchanged , run the inner loop at every grid point (no skipped large- steps), and disable early commitment of revealed tokens so that the kernel may freely revise any position throughout the trajectory.
3-SAT
Data link. https://www.cs.ubc.ca/~hoos/SATLIB/benchm.html
Model architecture. The 3-SAT denoiser shares the same Qwen2-style backbone as the Sudoku-Hard model and differs only in vocabulary size and maximum context length, both of which are dictated by the SATLIB encoding (20 variables, 91 clauses). See Table 8 (column “3-SAT”); The parameter count is again approximately 6.8M.
Training. The denoiser is trained from scratch with TCT (Algorithm 2) on a 1M-instance synthetic 3-SAT training set, using correction phases per outer trajectory. The checkpoint reported in the main paper is taken at step 100,000. A single training run takes around 4 hours on a single Nvidia GH200 GPU.
Inference. As on Sudoku-Hard, we set correction frequency to 1 and early-exit patience to consecutive unchanged , run the inner loop at every grid point (no skipped large- steps), and disable early commitment of revealed tokens so that the kernel may freely revise any position throughout the trajectory.
HumanEval+
Benchmark link can be found at https://github.com/evalplus/evalplus.
Unlike Sudoku-Hard and 3-SAT, this experiment is inference-only: We evaluate the off-the-shelf LLaDA2.1-mini (16B MoE) (Bei et al., 2026) as released, with no TCT and no finetuning of any kind, so what varies across methods is the inference algorithm alone. All 164 HumanEval+ problems [10] are scored with EvalPlus; generations are produced on the base HumanEval prompts and re-scored against the plus test suite.
LLaDA2.1-mini decodes a response in blocks rather than over the whole sequence at once: The response is split into consecutive blocks of 32 tokens, up to 512 generated tokens (16 blocks), and the model attends to the prompt and all previously decoded blocks while denoising only the current one. Within a block we decode greedily (temperature 0) with confidence-thresholded parallel unmasking: Every masked position whose top-token probability exceeds 0.9 is revealed at that step, with at least one position revealed per step so that decoding always advances. Given the block-diffusion nature of the model, R{sup}2D, ProSeCo and ReMDM all adopt a block-wise correction: Correction only happens on the current block, and prior blocks and future masks are left untouched. R{sup}2D uses correction frequency 1 (the kernel is applied at every block) and the early-exit patience is . Remasking is uniform at random, as in Algorithm 1. R{sup}2D is reported as the mean $\pm$ standard deviation over three inference seeds. R{sup}2D and ReMDM both use 32 correction steps per token. ProSeCo uses 32 correction steps per block.
References
- [1]Tiwei Bie, Maosong Cao, Xiang Cao, Bingsen Chen, Fuyuan Chen, Kun Chen, Lun Du, Daozhuo Feng, Haibo Feng, Mingliang Gong, Zhuocheng Gong, Yanmei Gu, Jian Guan, Kaiyuan Guan, Hongliang He, Zenan Huang, Juyong Jiang, Zhonghui Jiang, Zhenzhong Lan, Chengxi Li, Jianguo Li, Zehuan Li, Huabin Liu, Lin Liu, Guoshan Lu, Yuan Lu, Yuxin Ma, Xingyu Mou, Zhenxuan Pan, Kaida Qiu, Yuji Ren, Jianfeng Tan, Yiding Tian, Zian Wang, Lanning Wei, Tao Wu, Yipeng Xing, Wentao Ye, Liangyu Zha, Tianze Zhang, Xiaolu Zhang, Junbo Zhao, Dezheng, Hao Zhong, Wanli Zhong, Jun Zhou, Junlin Zhou, Liwang Zhu, Muzhi Zhu, and Yihong Zhuang. LLaDA2.1: Speeding Up Text Diffusion via Token Editing, February 2026. URL http://arxiv.org/abs/2602.08676. arXiv:2602.08676 [cs].
- [2]Andrew Campbell, Joe Benton, Valentin De Bortoli, Thomas Rainforth, George Deligiannidis, and Arnaud Doucet. A Continuous Time Framework for Discrete Denoising Models. Advances in Neural Information Processing Systems, 35:28266–28279, December 2022. URL https://proceedings.neurips.cc/paper_files/paper/2022/hash/b5b528767aa35f5b1a60fe0aeca0563-Abstract-Conference.html.
- [3]Tianlang Chen, Minkai Xu, Jure Leskovec, and Stefano Ermon. RFG: Test-Time Scaling for Diffusion Large Language Model Reasoning with Reward-Free Guidance, September 2025. URL http://arxiv.org/abs/2509.25604. arXiv:2509.25604 [cs].
- [4]Meihua Dang, Jiaqi Han, Minkai Xu, Kai Xu, Akash Srivastava, and Stefano Ermon. Inference-Time Scaling of Diffusion Language Models via Trajectory Refinement, April 2026. URL http://arxiv.org/abs/2507.08390. arXiv:2507.08390 [cs] version: 3.
- [5]Tom Dillion. Tdoku: A fast sudoku solver and generator. https://t-dillon.github.io/tdoku/, 2025.
- [6]Zemin Huang, Yuhang Wang, Zhiyang Chen, and Guo-Jun Qi. Don’t Settle Too Early: Self-Reflective Remasking for Diffusion Language Models, September 2025. URL http://arxiv.org/abs/2509.23653. arXiv:2509.23653 [cs].
- [7]Jaeyeon Kim, Seunggeun Kim, Taekyun Lee, David Z. Pan, Hyeji Kim, Sham Kakade, and Sitan Chen. Fine-Tuning Masked Diffusion for Provable Self-Correction, December 2025. URL http://arxiv.org/abs/2510.01384. arXiv:2510.01384 [cs].
- [8]Jaeyeon Kim, Jonathan Geuter, David Alvarez-Melis, Sham Kakade, and Sitan Chen. Stop Training for the Worst: Progressive Unmasking Accelerates Masked Diffusion Training, February 2026. URL http://arxiv.org/abs/2602.10314. arXiv:2602.10314 [cs].
- [9]Sanghyun Lee, Sunwoo Kim, Seungryong Kim, Jongho Park, and Dongmin Park. Effective Test-Time Scaling of Discrete Diffusion through Iterative Refinement, November 2025. URL http://arxiv.org/abs/2511.05562. arXiv:2511.05562 [cs] version: 1.
- [10]Jiawei Liu, Chunqiu Steven Xia, Yuyao Wang, and Lingming Zhang. Is your code generated by ChatGPT really correct? rigorous evaluation of large language models for code generation. In Advances in Neural Information Processing Systems, 2023.
- [11]Liming Liu, Binxian Huang, Zixuan Zhang, Xin Liu, Bing Yin, and Tuo Zhao. BackPlay: Plug-in Look-Back Self-Correction for Diffusion Language Models, February 2026. URL http://arxiv.org/abs/2601.06428. arXiv:2601.06428 [cs].
- [12]Aaron Lou, Chenlin Meng, and Stefano Ermon. Discrete diffusion modeling by estimating the ratios of the data distribution. In International Conference on Machine Learning, pp. 32819–32848. PMLR, 2024.arxiv.org/abs/2310.16834
- [13]Jingyang Ou, Shen Nie, Kaiwen Xue, Fengqi Zhu, Jiacheng Sun, Zhenguo Li, and Chongxuan Li. Your absorbing discrete diffusion secretly models the conditional distributions of clean data. arXiv preprint arXiv:2406.03736, 2024.arxiv.org/abs/2406.03736
- [14]Zijing Ou, Chinmay Pani, and Yingzhen Li. Inference-Time Scaling of Discrete Diffusion Models via Importance Weighting and Optimal Proposal Design, March 2026. URL http://arxiv.org/abs/2505.22524. arXiv:2505.22524 [cs].
- [15]Prin Phunyaphibarn and Minhyuk Sung. Reward-Guided Discrete Diffusion via Clean-Sample Markov Chain for Molecule and Biological Sequence Design, February 2026. URL http://arxiv.org/abs/2602.09424. arXiv:2602.09424 [cs].
- [16]Subham S. Sahoo, Marianne Arriola, Yair Schiff, Aaron Gokaslan, Edgar Marroquin, Justin T. Chiu, Alexander Rush, and Volodymyr Kuleshov. Simple and Effective Masked Diffusion Language Models. Advances in Neural Information Processing Systems, 37:130136–130184, December 2024. doi: 10.52202/079017-4135. URL https://proceedings.neurips.cc/paper_files/paper/2024/hash/eb0b13cc515724ab8015bc978fdde0ad-Abstract-Conference.html.
- [17]Yair Schiff, Omer Belhasin, Roy Uziel, Guanghan Wang, Marianne Arriola, Gilad Turok, Michael Elad, and Volodymyr Kuleshov. Learn from Your Mistakes: Self-Correcting Masked Diffusion Models, March 2026. URL http://arxiv.org/abs/2602.11590. arXiv:2602.11590 [cs].
- [18]Yash Shah, Abhijit Chakraborty, Naresh Kumar Devulapally, Vishnu Lokhande, and Vivek Gupta. OSCAR: Orchestrated Self-verification and Cross-path Refinement, April 2026. URL http://arxiv.org/abs/2604.01624. arXiv:2604.01624 [cs].
- [19]Jiaxin Shi, Kehang Han, Zhe Wang, Arnaud Doucet, and Michalis Titsias. Simplified and generalized masked diffusion for discrete data. Advances in neural information processing systems, 37:103131–103167, 2024.arxiv.org/abs/2406.04329
- [20]Raghav Singhal, Zachary Horvitz, Ryan Teehan, Mengye Ren, Zhou Yu, Kathleen McKeown, and Rajesh Ranganath. A General Framework for Inference-time Scaling and Steering of Diffusion Models, July 2025. URL http://arxiv.org/abs/2501.06848. arXiv:2501.06848 [cs].
- [21]Atula Tejaswi, Litu Rout, Constantine Caramanis, Sanjay Shakkottai, and Sujay Sanghavi. EntRGi: Entropy Aware Reward Guidance for Diffusion Language Models, February 2026. URL http://arxiv.org/abs/2602.05000. arXiv:2602.05000 [cs].
- [22]Masatoshi Uehara, Xingyu Su, Yulai Zhao, Xiner Li, Aviv Regev, Shuiwang Ji, Sergey Levine, and Tommaso Biancalani. Reward-Guided Iterative Refinement in Diffusion Models at Test-Time with Applications to Protein and DNA Design, February 2025. URL http://arxiv.org/abs/2502.14944. arXiv:2502.14944 [cs].
- [23]Guan Wang, Jin Li, Yuhao Sun, Xing Chen, Changling Liu, Yue Wu, Meng Lu, Sen Song, and Yasin Abbasi Yadkori. Hierarchical reasoning model, 2025. URL https://arxiv.org/abs/2506.21734.
- [24]Guanghan Wang, Yair Schiff, Subham Sekhar Sahoo, and Volodymyr Kuleshov. Remasking Discrete Diffusion Models with Inference-Time Scaling, February 2026. URL http://arxiv.org/abs/2503.00307. arXiv:2503.00307 [cs].
- [25]Shuibai Zhang, Fred Zhangzhi Peng, Yiheng Zhang, Jin Pan, and Grigorios G. Chrysos. Corrective Diffusion Language Models, January 2026. URL http://arxiv.org/abs/2512.15596. arXiv:2512.15596 [cs].