CoDR: Training-Free Confidence-Drift Remasking to Fix Early Errors in Diffusion Language Models

CoDR uses confidence drift signals to selectively remask diffusion LM tokens, improving generation quality without any retraining.
Masked Diffusion Language Models (MDLMs) can rarely revoke committed tokens during decoding, allowing errors made under sparse early context to propagate through the generation chain. CoDR (Confidence Drift Remasking) turns this flaw into an actionable signal: k-partition probing estimates confidence drift across all committed positions in just k forward passes, and tokens the model "regrets" are selectively remasked and regenerated. The method requires no retraining and is sampler-agnostic. Experiments across two backbone models, four reasoning and code tasks, and three samplers show consistent accuracy gains at far lower computational cost than prior remasking approaches. Code is open-sourced for easy integration into existing MDLM systems.
Diffusion Language Models have emerged as a compelling alternative to autoregressive generation, yet they carry a long-overlooked flaw: once a token is committed to a masked position, it can rarely be corrected. A recent paper on arXiv introduces CoDR (Confidence Drift Remasking), a lightweight, training-free, sampler-agnostic method designed specifically to patch this vulnerability.
The Fatal Weakness of Masked Diffusion Models: Early Errors Propagate Forward
The decoding process in Masked Diffusion Language Models (MDLMs) works by iteratively "committing" tokens to masked positions. The problem is that these commitments are typically irreversible — a token selected and locked in during an early stage with sparse, incomplete context will remain in place even when richer subsequent context no longer supports that choice.
The paper precisely identifies this phenomenon as confidence drift: when a token is committed, the model relies on the sparse local context available at that moment; as decoding progresses and context grows denser, the model's confidence in that already-committed token drops. In other words, the model effectively "regrets" the decision — but gets no chance to take it back.
Most existing samplers focus on "when to commit a token" while rarely looking back to ask "should an already-committed token still be kept." This one-way decision mechanism allows small early errors to amplify along the generation chain, ultimately degrading overall output quality — especially in tasks like reasoning and code generation that are highly sensitive to local correctness.

The fundamental working mechanism of MDLMs is borrowed from image-domain denoising diffusion models, but replaces continuous noise with discrete "masking" operations. During training, the model learns to recover original tokens from sequences masked at varying ratios; during inference, it starts from a fully masked sequence and progressively fills in tokens according to a scheduling strategy until the sequence is complete. Unlike autoregressive models that strictly generate left-to-right, MDLMs theoretically allow parallel filling of arbitrary positions, granting greater generation flexibility and potential inference speedup. However, mainstream samplers (such as MDLM, SEDD, etc.) typically rely on greedy decisions based on confidence scores at the current timestep when choosing "which position to fix when" — once a position is "decoded," it no longer participates in subsequent noise-denoising cycles. This stands in sharp contrast to image diffusion, where pixels can be iteratively refined.
CoDR's Core Idea: Turning Confidence Drift into a Targeted Correction Signal
CoDR's elegance lies in transforming "confidence drift" from a passive problem into an actionable signal. It operates as a refinement pass appended to the generation pipeline — no model retraining required, no binding to any specific sampler, making it highly generalizable.
The approach unfolds in three steps:
k-Partition Probing: Estimating Drift with k Forward Passes
CoDR estimates confidence drift across all committed positions using only k forward passes via a "k-partition probing" mechanism. Compared to re-evaluating each position individually, this partitioned probing dramatically reduces computation and is the key to the method's low overhead.
The core idea of k-partition probing is to randomly partition all committed token positions into k non-overlapping subsets. In each pass, one subset is re-masked and a single forward inference is run, observing the model's re-prediction confidence for each token in that subset. Over k passes, all committed positions are covered exactly once — each position gets one opportunity to be "re-evaluated while masked." Compared to naïve per-position evaluation (which requires a number of forward passes equal to sequence length), k-partition probing reduces overhead from O(n) to O(k), where k is much smaller than sequence length n. This design decouples CoDR's additional compute from sequence length, offering a particularly strong advantage on long-sequence tasks like code generation. The "confidence drift" for each position can be defined as the difference between the original commitment confidence score and the re-evaluated confidence score — the larger the gap, the more likely the position harbors an early error.
Targeted Remasking and Regeneration
Armed with drift estimates, CoDR does not discard the entire output and start over. Instead, it only remasks the tokens the model no longer endorses, then regenerates those positions. This targeted correction avoids wasteful global recomputation, directing compute only toward positions that are genuinely likely to be wrong.
This design philosophy aligns closely with "fix the most probable errors at minimal cost" — preserving everything the model already got right while giving the wrong parts a chance at correction.
Experimental Results: Comprehensive Gains at Controlled Cost
The paper validates CoDR under a rigorous experimental setup spanning two backbone models, four reasoning and code tasks, and three base samplers. Results show:
- CoDR improves average accuracy across all evaluated model-sampler combinations;
- It achieves improvements in most individual task settings as well;
- These gains are realized at modest additional overhead.
Even more compelling are two conclusions from controlled experiments: first, the performance gains stem from targeted confidence-drift remasking, not merely from expending extra compute — ruling out the trivial explanation that "more computation naturally yields better results"; second, the number of forward passes CoDR requires is far fewer than prior remasking methods. This means it achieves a more favorable trade-off between correction capability and computational cost.
Why This Work Deserves Attention
Diffusion language models are regarded as one of the promising paths to challenging the autoregressive paradigm, but "irreversible commitment" has always been a hidden ceiling on their generation quality. CoDR's value lies not only in metric improvements, but in using a clear physical intuition — confidence drift — to transform a vague "generation quality" problem into a measurable, actionable engineering signal.
Coupled with its three key properties — training-free, sampler-decoupled, and computationally controlled — existing MDLM systems can plug into this refinement mechanism at virtually zero cost. The authors have open-sourced the code at GitHub (github.com/YueWu0301/CoDR), facilitating reproduction and future extension.
For researchers focused on diffusion-based text generation, reasoning enhancement, and inference-time optimization, CoDR offers a lightweight yet effective new tool — and opens up imaginative possibilities for the direction of "teaching diffusion models to reconsider."
Inference-time optimization is one of the hottest research directions in large model development. Its core thesis: with model parameters fixed, smarter decoding strategies can be exchanged for higher output quality, raising the performance ceiling without increasing training costs. In the autoregressive domain, similar ideas have produced Best-of-N sampling, Chain-of-Thought reasoning, and process-reward-model-guided search. CoDR brings this philosophy to diffusion language models, but with a more precise entry point — it relies neither on external reward models nor large-scale resampling, but instead uses the model's own internal signals (confidence changes) to identify and correct high-risk positions. This paradigm of "model self-diagnosis and targeted correction" closely mirrors the concept of precision intervention in medicine, and represents a direction in which inference-time optimization is evolving from coarse-grained search toward fine-grained correction.
Related articles

Random Pruning of the DPO Computation Graph: 1.4x Training Speedup and Lower Peak Memory
DPO training too slow and memory-hungry? This paper proposes a random pruning framework for the DPO computation graph, sampling independently across position, sequence, and branch dimensions; branch pruning achieves a 1.426x step-time speedup and cuts training time by about 30%, with in-depth attribution of memory and time gains.

Why Does JEPA Underperform MLM in Longitudinal EHR Representation Learning?
New study compares JEPA and MLM for longitudinal EHR representation learning on MIMIC-IV: three JEPA variants train stably without collapse but underperform MLM; target size, not heterogeneity, drives prediction error.

Transfer Learning + Visible Light Communication: A New Approach to Energy-Efficient Indoor Positioning
A study proposes a transfer learning-based visible light communication indoor positioning method, achieving 47% accuracy improvement on the BOSCH factory dataset, 67.5% model efficiency under high noise, and introducing the ME composite metric for energy-efficient positioning in energy-constrained industrial IoT scenarios.