arXiv:2610.39372cs.CLOct 2026

Manuscript Offprint

arXiv:2610.39372

Cord: Confidence-Anchored Order Residual Decoding for Masked Diffusion Language Models

Chengwei Zhou, Zhaoyan Jia, Massoud Pedram, Gourav Datta

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

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.53M trainable parameters, requires no additional backbone forward passes, and incurs only 5.39% inference latency overhead.

1 INTRODUCTION

Masked diffusion language models (dLLMs) can reveal masked response positions in different orders, unlike autoregressive models that generate strictly from left to right. Each revealed token becomes part of the context for subsequent predictions, so the reveal order can materially affect the final generation. For example, Kim et al. (2025) report that replacing random unmasking with a top-two probability-margin rule increases Sudoku accuracy from below 7% to roughly 90%, while yielding much smaller gains on natural-language reasoning. This disparity suggests that reveal order should be treated as part of the decoding strategy, and that the appropriate strategy can depend on the task. A common approach is to rank masked positions using a confidence statistic computed from the current predictive distribution. Such scores are inexpensive, since they are already available from the dLLM forward pass, and identify positions whose current token prediction is most decisive. However, confidence describes how predictable a position is now; it does not measure how useful revealing that position will be for later predictions. This distinction depends on the geometry of the partially revealed response. Sequential reasoning may benefit from extending an existing reasoning chain, whereas structured generation may benefit from first revealing distant structural anchors and then filling the gaps between them.

We verify this effect with frozen-backbone oracle experiments that control the amount of revealed information. We reveal selected ground-truth tokens before generation and compare them against the same number of randomly positioned ground-truth tokens, after which the remaining response is completed using standard confidence decoding. On GSM8K, revealing a correct causal prefix increases accuracy from 37.2% to as high as 67.4%, while token-matched random anchors remain below 20%. On MBPP, revealing structural program tokens outperforms matched random anchors by up to 14.4 points. These results show that, even at the same reveal budget, where information is revealed can substantially affect completion quality.

One way to exploit this structure is to learn the next reveal position directly. Prior work uses reinforcement learning with sequence-level rewards (Huang et al., 2025; Zhao et al., 2025; Jazbec et al., 2025; Chen et al., 2025) or auxiliary planning networks (Peng et al., 2025; Liu et al., 2025). These position-level formulations optimize a sequence of dependent discrete actions from final-response feedback, resulting in a large action space and temporal credit-assignment problem. Auxiliary planners can also add computation at every decoding step, while jointly updating a multi-billion-parameter backbone substantially increases training cost.

To adapt reveal order with substantially lower optimization and inference overhead, we propose CORD. Instead of replacing confidence decoding with a token-level planner, CORD keeps confidence as the base ranking and learns bounded geometric corrections to it. CORD adjusts three complementary properties of the reveal order: generation direction, proximity to already revealed context, and preference for positions with revealed context on both sides. A lightweight prompt-conditioned network predicts a coefficient matrix, while features of the evolving partial response determine how these corrections change during decoding. CORD can therefore favor local continuation, non-local seeding, or two-sided infilling at different stages of generation. When the residual coefficients are zero, CORD reduces exactly to confidence-based (Top-2 margin) decoding, and the dLLM backbone remains frozen.

CORD is trained by exploring in the low-dimensional coefficient space rather than sampling a new reveal action at every step. For each prompt, the policy samples one coefficient matrix that deterministically induces the complete state-dependent reveal trajectory and receives a sequence-level reward. This converts reveal-order learning into a contextual-bandit problem and avoids step-level credit assignment. Across three masked diffusion models and five benchmarks spanning mathematical reasoning, code generation, and constraint satisfaction, CORD improves average task success from 30.6% under confidence-based decoding to 50.5% and also outperforms the best per-domain fixed geometric residual. Ablations show that prompt conditioning, within-rollout adaptation, and all three geometric residuals contribute to the gain. A behavioral analysis further shows task-dependent changes in reveal locality and two-sided infilling. CORD requires no additional backbone forward passes, adds only 0.53M trainable parameters, and incurs 5.39% inference latency overhead.

References (62)