Source-linked AI summary
Cord: Confidence-Anchored Order Residual Decoding for Masked Diffusion Language Models
Chengwei Zhou, Zhaoyan Jia, Massoud Pedram, Gourav Datta
TL;DR
Reveal order matters in masked diffusion language models, but confidence reflects how predictable a position is now rather than how useful revealing it will be later. CORD retains confidence as a reference and learns prompt- and state-dependent geometric residuals through a single coefficient program per rollout. Across three masked diffusion models and five benchmarks, average task success rises from 32.0% under confidence decoding to 48.2%, while also exceeding per-domain fixed residuals.
Problem
Confidence-based reveal scores measure current token predictability, not how useful revealing a position will be for subsequent predictions, even though reveal order can affect generation quality.
Source: §1 · p. 1Method
CORD keeps confidence decoding as a reference and learns prompt- and state-dependent residuals over generation direction, proximity to revealed context, and two-sided infilling.
Source: §1 · p. 2Results
Average task success rises from 32.0% under confidence decoding to 48.2% across three masked diffusion models and five reasoning, code-generation, and constraint-satisfaction benchmarks, with gains over per-domain fixed residuals.
Source: §5 · p. 9Takeaways & Limitations
Behavioral analysis finds task-dependent changes in reveal locality and two-sided infilling, while CORD adds 0.53M trainable parameters and incurs 5.39% inference latency overhead.
Source: §1 · p. 2CORD changes reveal order without altering underlying model parameters or adding model capabilities, so it retains the underlying models’ risks of incorrect, biased, or unsafe generations.
Source: ETHICS STATEMENT · p. 10
Abstract
from arXiv · showhide
The decoding order of masked diffusion language models (dLLMs) can substantially affect generation quality, yet common decoders typically apply the same reveal rule throughout generation. Confidence provides a strong default, but it measures how decisively a position can be predicted now, not how useful revealing that position will be for subsequent decoding. We propose Cord, a lightweight prompt-conditioned policy that retains confidence decoding as a stable reference and learns when and how to depart from it through geometric residuals over generation direction, proximity to revealed context, and two-sided infilling. The residuals adapt to both the prompt and the evolving partial response. Rather than sampling a new policy action at every decoding step, Cord samples a single low-dimensional coefficient matrix per rollout, which induces an entire state-dependent reveal trajectory. This yields a contextual-bandit formulation trained directly from sequence-level rewards, without step-level credit assignment or backbone updates. Across three dLLMs and five reasoning, code, and constraint-satisfaction benchmarks, Cord improves average task success from 32.0% under confidence decoding to 48.2%, and further improves over the best per-domain fixed residual. Behavioral audits show that the learned residuals induce substantial, task-dependent changes in reveal locality and two-sided infilling. Cord adds only $0.53$M trainable parameters, requires no additional backbone forward passes, and incurs only 5.39% inference latency overhead.
1 INTRODUCTION
CORD treats reveal order as part of decoding because confidence measures current predictability, not the usefulness of a reveal for later predictions. It retains confidence as a reference while learning prompt- and state-dependent geometric corrections, and reports gains over confidence decoding and fixed residuals.
Why reveal order matters
- Because each revealed token becomes context for later predictions, confidence alone cannot measure how useful a reveal will be; the preferred geometry can differ between sequential reasoning and structured generation.The introduction contrasts extending a reasoning chain with revealing distant structural anchors before filling gaps.Source: §1 · p. 1
- On GSM8K, revealing a correct causal prefix raises accuracy from 37.2% to as high as 67.4%, while token-matched random anchors remain below 20%; on MBPP, structural anchors beat matched random anchors by up to 14.4 points.These frozen-backbone oracle experiments control the number of revealed tokens.Source: §1 · pp. 1–2
CORD contributions
- Prior learned reveal-order methods use position-level actions or auxiliary planners, which bring large action spaces, temporal credit assignment, or additional decoding computation.Jointly updating a multi-billion-parameter backbone also increases training cost.Source: §1 · p. 2
- CORD retains confidence ranking and learns bounded, prompt- and state-dependent corrections for direction, proximity to revealed context, and two-sided infilling.Zero residual coefficients recover Top-2 margin decoding, and the dLLM remains frozen.Source: §1 · p. 2
- Average task success rises from 30.6% under confidence decoding to 50.5%, and CORD improves over the best per-domain fixed residuals from 50.0% to 50.5%.The evaluation spans three masked diffusion models and five benchmarks across reasoning, code generation, and constraint satisfaction.Source: §1 · p. 2
2 RELATED WORK
Related work establishes that masked diffusion models permit multiple reveal orders and that their effects can vary across tasks. Existing strategies range from fixed confidence-based rules to learned planners; CORD instead adds a low-dimensional geometric residual to a fixed confidence reference.
Masked diffusion models
- Masked diffusion models admit multiple valid reveal orders, and a margin-based rule has been reported to raise Sudoku accuracy from below 7% to roughly 90% while yielding much smaller gains on natural-language reasoning (Kim et al., 2025).This contrast motivates treating reveal order as a task- and state-dependent inductive bias.Source: §2 · p. 2
Reveal-order strategies for MDMs
- Existing reveal strategies include confidence, entropy, and margin rules, block-wise schedules, and learned planners or reward-optimized decisions; position- or step-level learning can entail large action spaces and long-horizon credit assignment.Some learned methods also modify or jointly train the backbone.Source: §2 · pp. 2–3
CORD's approach
- The method overview depicts the prompt-conditioned residuals, per-step highest-score reveal, and rollout-level coefficient sampling trained from sequence rewards.The figure frames coefficient sampling as contextual-bandit training.Source: Figure 1 · p. 3
- CORD keeps the pretrained confidence-based decoder as a fixed reference and learns a prompt-conditioned residual over direction, proximity, and two-sided infilling, with one 24-dimensional coefficient program controlling state-dependent changes across a rollout.The dLLM backbone remains frozen.Source: §2 · p. 3
3 METHOD
The method motivates dynamic reveal geometry with task-specific oracle diagnostics, then modifies confidence scores using bounded residuals controlled by a prompt-conditioned coefficient program. Training explores that program using sequence-level rewards and group-relative policy updates, rather than selecting a new stochastic reveal action at every step.
3.1 FROM TASK-SPECIFIC ORDERING BIASES TO DYNAMIC DECODING
- On GSM8K, a causal prefix raises accuracy from 37.2% to as high as 67.4%, while matched random anchors remain below 20%; on MBPP, structural anchors outperform matched random anchors by up to 14.4 points.The diagnostics use a frozen backbone and token-budget-matched random controls; the figure distinguishes conservative from extended structural-token sets.Source: §3.1 · pp. 3–4, Figure 2 · p. 3
3.2 CONFIDENCE-ANCHORED REVEAL GEOMETRY
- CORD leaves token prediction unchanged and ranks masked positions using confidence as an anchor plus geometric signals for direction, proximity to revealed response tokens, and revealed context on both sides.Prompt tokens are excluded from the revealed-response set to avoid an artificial positional bias.Source: §3.1 · p. 3, §3.2 · p. 4
3.3 DYNAMIC GEOMETRIC RESIDUALS
- A single coefficient matrix combines state-basis features with direction, proximity, and bridge residuals, modifying the ranking without excluding any masked position.The coefficients evolve with decoding state; zero-initialization begins at confidence decoding.Source: §3.3 · pp. 4–5
3.4 PROMPT-CONDITIONED COEFFICIENT POLICY
- A lightweight prompt-conditioned MLP predicts the coefficient program from mean-pooled prompt hidden states already available in the first backbone pass.Its 24 coefficients cover three residual channels and eight state-basis functions; zero initialization recovers confidence decoding.Source: §3.4 · p. 5
3.5 TRAINING CORD IN COEFFICIENT SPACE
- Training samples one perturbed coefficient program per rollout and holds it fixed, so the resulting state-dependent reveal trajectory is learned as a 24-dimensional contextual-bandit action.This avoids step-level credit assignment and keeps the frozen dLLM outside policy-gradient computation; inference uses the predicted mean program.Source: §3.5 · p. 6
3.6 SEQUENCE-LEVEL REWARD
- Sequence-level rewards prioritize final-response correctness, add a small formatting reward, and can optionally include reference-answer log probability at the cost of one additional backbone forward pass.Task-specific verifiers check mathematical equivalence, code tests, or Sudoku constraints; training and evaluation use the same verifier implementation.Source: §3.6 · p. 6
3.7 GROUP-RELATIVE POLICY GRADIENT IN COEFFICIENT SPACE
- Group-relative updates compare sibling rollouts from the same prompt, use leave-one-out advantages without within-group standard-deviation normalization, and share other randomness to reduce variance in comparisons.Equal-reward sibling groups provide no policy-gradient signal, and the update requires neither a learned critic nor importance-ratio correction.Source: §3.7 · p. 7
4 EXPERIMENTS
CORD is evaluated across three frozen masked diffusion models and five benchmarks spanning reasoning, code generation, and constraint satisfaction. It improves over confidence decoding and fixed residuals, while ablations and behavioral audits show that its adaptive geometric corrections change reveal trajectories at modest inference cost.
4.1 EXPERIMENTAL SETUP
- The evaluation uses separate CORD policies for three frozen models and covers mathematical reasoning, code generation, and constraint satisfaction.The benchmarks are GSM8K and MATH, HumanEval and MBPP, and Sudoku.Source: §4.1 · p. 7
4.2 MAIN RESULTS: CORD GENERALIZES ACROSS MDMS
- CORD raises average task success from 30.6% under confidence decoding to 50.5%, and from 50.0% with the best per-domain fixed residual to 50.5%.The comparison spans three masked diffusion models; Table 1 reports task success, with pass@1 for HumanEval and MBPP and accuracy for the other tasks.Source: §4.2 · p. 7, Table 1 · p. 8
4.3 ABLATION
- Across all benchmarks, full CORD averages 50.5%, improving over the fixed residual by 4.4% and prompt-only variant by 4.5%; time-only (46.9%) and state-only (42.2%) perform worse.Time-only retains the decoding-progress basis without state features; state-only retains state features without the temporal basis.Source: §4.3 · pp. 7–8, Table 2 · p. 8
- Removing direction, proximity, or bridge lowers average performance by 9.0%, 5.5%, and 10.9%, respectively, across GSM8K, MBPP, and Sudoku.Direction matters especially on GSM8K, bridge on Sudoku, and proximity contributes consistently across all three tasks.Source: Table 3 · p. 8, §4.3 · p. 8
4.4 WHAT REVEAL GEOMETRY DOES CORD LEARN?
- CORD overrides same-state confidence on 45.5%, 64.6%, and 58.4% of GSM8K, MBPP, and Sudoku decoding steps, respectively, with task-dependent locality shifts and positive bridge enrichment throughout.GSM8K becomes slightly more local (∆J = −0.023), while MBPP and Sudoku become more non-local (+0.035 and +0.055); bridge enrichment is +0.246, +0.220, and +0.321, respectively.Source: §4.4 · pp. 8–9, Figure 3 · p. 9
4.5 EFFICIENCY
- CORD adds no backbone forward passes and raises latency from 6.31 s for confidence decoding to 6.65 s, a 5.39% overhead.The prompt-conditioned coefficient matrix is predicted once per response; geometric scores are computed from the reveal mask at each step.Source: §4.5 · p. 9
5 CONCLUSION
The conclusion presents CORD as an adaptive reveal-order framework and reports benchmark gains with modest inference overhead. The accompanying statements address AI-assisted editing, ethical scope, and reproducibility.
5 CONCLUSION
- CORD improves average task success from 32.0% under confidence decoding to 48.2% across three models and five benchmarks, while also outperforming per-domain fixed residuals.The conclusion also reports that ablations support prompt conditioning, state adaptation, and all three residual channels.Source: §5 · p. 9
AI USE STATEMENT
- The authors state that generative AI tools assisted only with language editing, and that authors reviewed the edits and take responsibility for the manuscript.Source: AI USE STATEMENT · p. 10
ETHICS STATEMENT
- CORD changes masked-position reveal order without changing model parameters or introducing new capabilities; outputs may still be incorrect, biased, or unsafe.The evaluation uses established benchmarks and publicly available pretrained models under their research-use terms.Source: ETHICS STATEMENT · p. 10
REPRODUCIBILITY STATEMENT
- The reproducibility materials cover residuals, policy training, rewards, inference, evaluation settings, and analysis; the authors report submitting the implementation and supplementary code.The comparisons use frozen pretrained backbones and the described decoding and evaluation protocols.Source: REPRODUCIBILITY STATEMENT · p. 10
A.1 BACKBONES
The appendix evaluates CORD on three masked diffusion language models, training a separate policy for each while keeping the backbone frozen.
A.1 BACKBONES
- CORD is evaluated on LLaDA-8B-Instruct, LLaDA-1.5, and Dream-7B, with a separate policy trained for each frozen backbone.Source: §A.1 · p. 14
A.2 BENCHMARKS AND DATA SPLITS
The training mixture combines domains with different response-dependency structures, while sampling and evaluation rules address domain balance and shared input conditions.
A.2 BENCHMARKS AND DATA SPLITS
- The mixture covers sequential mathematical reasoning, code with structural and local dependencies, and Sudoku's dense constraint interactions.Source: §A.2 · p. 14
- Stratified sampling prevents the smaller code collection from becoming negligible in mixed-domain updates; repeated prompt visits use fresh coefficient-space perturbations.Source: §A.2 · p. 14
- Prompts exceeding the context budget are removed before evaluation rather than truncated, so reveal-order policies receive the same inputs.Source: §A.2 · p. 14
A.3 TRAINING CONFIGURATION
CORD trains a prompt-conditioned coefficient policy with fixed-per-rollout actions and evaluates it using top-1 decoding and task-specific verifiers. The appendix also records training settings and benchmark-comparison scope.
A.3 TRAINING CONFIGURATION
- CORD samples one coefficient matrix per prompt and keeps it fixed throughout each rollout, yielding a deterministic reveal trajectory conditioned on that sample.The policy layer starts at zero residuals, recovering confidence-based Top2-margin decoding; exploration is added in coefficient space with σ annealed from 0.6 to 0.15.Source: §A.3 · p. 14
- The policy uses 3 residual channels and 8 state basis functions, for a 24-dimensional coefficient-space action.Separate runs use 20, 30, or 40 epochs; a 40-epoch LLaDA-8B-Instruct run takes approximately 8 hours on 8 NVIDIA H200 GPUs.Source: §A.3 · p. 14, Table 6 · p. 15
A.4 DECODING CONFIGURATION
- Main-paper experiments reveal exactly one masked response position per decoding step, and task-specific deterministic verifiers assess sequence-level correctness.Verifiers check normalized numerical answers for GSM8K, exact or symbolic answers for MATH, test execution for HumanEval and MBPP, and Sudoku constraints; parse, timeout, and verifier failures are tracked separately.Source: §A.4 · p. 15, §A.5 · p. 15
A.5 VERIFIERS
- Table 8 reports remasking-method performance on overlapping reasoning and code benchmarks, but its results are not directly comparable because checkpoints, prompting, and decoding budgets differ.The table caption identifies CORD as strictly monotonic: revealed tokens are not remasked or revised.Source: Table 8 · p. 16
A.6 COMPARISON WITH REMASKING-BASED DECODERS
CORD changes which still-masked position is revealed next while keeping decoding monotonic and the pretrained backbone frozen. It outperforms several reported remasking baselines, though not the strongest revision-trained model, and the comparisons have setup differences.
A.6 COMPARISON WITH REMASKING-BASED DECODERS
- CORD exceeds CORE and SCOPE+D3IM on GSM8K, MATH, HumanEval, and MBPP, despite never revising revealed tokens or updating the pretrained backbone.The reported gains over CORE are 25.5%, 17.8%, 25.6%, and 24.1%, respectively; the comparisons are based on results reported by prior work.Source: §A.6 · p. 16
- CORD does not match RemeDi’s Remask-SFT model with learned remasking, which reports 86.3%, 52.2%, 71.3%, and 57.8% on GSM8K, MATH, HumanEval, and MBPP.RemeDi uses remasking post-training and a learned remask policy, unlike CORD’s frozen-backbone monotonic decoding.Source: §A.6 · p. 16
- CORD adjusts the commitment to the next revealed position, whereas remasking methods repair earlier commitments through revision computation or remask-aware post-training.The authors state that CORD’s advantage over CORE and SCOPE+D3IM suggests reveal-order control alone can recover a substantial amount of performance otherwise requiring explicit revision.Source: §A.6 · p. 16
B PROPERTIES OF COEFFICIENT-SPACE TRAINING
The appendix formalizes training CORD from sequence-level rewards over coefficient samples rather than differentiating through discrete reveal decisions. It establishes the score-function estimator and leave-one-out baseline properties, then explains why equal-reward groups and locally constant reward regions matter for learning.
B PROPERTIES OF COEFFICIENT-SPACE TRAINING
- The coefficient policy predicts a prompt-conditioned mean and samples an action; its rollout reward is bounded, and the mean is differentiable with respect to policy parameters.The reward is for the complete deterministic reveal trajectory induced by the sampled coefficient action, with other rollout randomness assumed independent.Source: B PROPERTIES OF COEFFICIENT-SPACE… · p. 16
B.1 SCORE-FUNCTION GRADIENT
- CORD’s score-function gradient weights the gradient of the coefficient-sample log-density by the sequence-level reward, without differentiating through the discrete reveal trajectory.The bounded-reward assumption supports exchanging differentiation and integration for the Gaussian-smoothed objective.Source: §B.1 · p. 17
B.2 LEAVE-ONE-OUT GROUP BASELINE
- A leave-one-out group baseline remains unbiased when sibling rollouts share non-coefficient randomness, because coefficient samples are conditionally independent given that randomness.The baseline for each rollout depends only on the other coefficient samples.Source: §B.2 · p. 17
B.3 EQUAL-REWARD GROUPS
- When every rollout in a group receives the same reward, the group contributes exactly zero gradient, removing pure score noise in that case.The unbaselined estimator can retain score noise when rewards are constant with respect to the coefficient action.Source: §B.3 · p. 18
B.4 WHY WE DO NOT STANDARDIZE THE GROUP ADVANTAGE
- The authors leave group advantages unstandardized because action-dependent scaling can invalidate the conditional-independence argument and is not guaranteed to preserve an unbiased estimator.At unanimity, the standardized leave-one-out scale is zero.Source: §B.4 · p. 18
B.5 PIECEWISE-CONSTANT REWARD LANDSCAPE
- With distinct top two reveal scores at every step, nearby coefficient vectors induce the same reveal trajectory and reward, making the pathwise gradient zero inside that decoding region.The score-function estimator is needed because expected reward can change when probability mass moves between decoding regions, even though reward is locally constant within a region.Source: §B.5 · pp. 18–19
B.6 EXPLORATION AND VANISHING LEARNING SIGNAL
These sections explain why current confidence alone cannot determine the downstream effect of a reveal and how CORD changes the conditioning path with geometric residuals while leaving the token predictor frozen. They also cover exploration and shared randomness during training, an offline reveal-impact diagnostic, qualitative rollouts, and inference.
B.6 EXPLORATION AND VANISHING LEARNING SIGNAL
- When the policy mean lies in a locally constant decoding region, σ→0 recovers its reward but removes the group signal; continued learning therefore needs exploration to retain transitions between regions.The vanishing-signal result also covers the second moment of the coefficient-mean estimator.Source: §B.6 · p. 19
B.7 COMMON RANDOM NUMBERS
- Sharing token-sampling randomness across coefficient actions removes an additional 2 Var_u[m(u)] variance component; with greedy token generation, shared and independent schemes coincide.The shared-randomness variance is 2E_u[v(u)], whereas independent randomness adds the variance of the difference in conditional means.Source: §B.7 · p. 20
C WHY CONFIDENCE ALONE DOES NOT DETERMINE REVEAL VALUE
- Current marginal confidence can match despite different downstream reveal effects, and CORD treats this influence as conceptual rather than estimating the unknown joint distribution.A confidence statistic describes decisiveness at a position but not how revealing it changes predictions elsewhere.Source: C WHY CONFIDENCE ALONE DOES NOT… · pp. 20–21
C.1 WHAT CORD CHANGES
- CORD keeps frozen dLLM confidence as its base ranking, adding direction, proximity, and bridge residuals to alter the conditioning path without changing the token predictor.The bridge signal favors positions surrounded by revealed context; direction and proximity encode sequential and local-versus-nonlocal preferences.Source: §C.1 · p. 21
C.2 REVEAL-IMPACT DIAGNOSTIC
- For offline analysis, per-reveal distribution discrepancies across still-masked positions are averaged over a trajectory; this sensitivity diagnostic is neither a training objective nor a joint-dependence estimate.A large per-step value means that revealing the selected position substantially changes predictions at remaining masked positions.Source: §C.2 · p. 21
D VISUALIZATIONS
- Held-out GSM8K and MBPP rollouts pair unmasking timelines with coefficient and state-feature trajectories, showing mostly sequential paths with task-specific non-local or two-sided departures.The GSM8K example has a persistent left-to-right bias and rising proximity, while the MBPP example is more strongly direction-dominated.Source: Figure 4 · p. 22, Figure 5 · p. 22, D VISUALIZATIONS · p. 23
E ALGORITHMIC DESCRIPTION
- Training samples a fixed coefficient matrix per rollout and updates only CORD from sequence-level rewards; at inference, one predicted matrix yields state-adaptive residuals while the backbone stays frozen.The matrix is predicted once per response, while updated state features adapt the reveal geometry during decoding without additional backbone evaluations.Source: E ALGORITHMIC DESCRIPTION · pp. 23–24