[KongchangAI]
· 1 min read· 832 words

Cord: Teaching Masked Diffusion Models to Learn Dynamic Decoding Order

Cord: Teaching Masked Diffusion Models to Learn Dynamic Decoding Order

Cord anchors on confidence decoding and learns dynamic reveal order via low-dimensional geometric residuals, significantly improving dLLM generation quality.

Masked diffusion language models (dLLMs) are highly sensitive to decoding order, yet common decoders use a single fixed reveal rule throughout generation. While confidence decoding is a strong default, it only measures how decisively the current position can be predicted now, not how much revealing it helps subsequent decoding. Cord (Confidence-Anchored Order Residual Decoding) keeps confidence decoding as a stable reference and learns via geometric residuals when and how to deviate, covering generation direction, proximity to revealed context, and two-sided filling. Trained directly from sequence-level rewards as a contextual bandit, it improves average task success from 32.0% to 48.2% across three dLLMs and five benchmarks with only 0.53M extra parameters and 5.39% inference overhead.

Masked diffusion language models (dLLMs) are highly sensitive to decoding order, yet common decoders typically use a single fixed reveal rule throughout generation. Confidence decoding is a strong default, but it measures how decisively the current position can be predicted right now, rather than how much revealing that position helps subsequent decoding. This article introduces Cord (Confidence-Anchored Order Residual Decoding), a lightweight, prompt-conditioned policy: it keeps confidence decoding as a stable reference and learns via geometric residuals when and how to deviate from that reference, with residuals covering three dimensions—generation direction, proximity to already-revealed context, and two-sided filling.

Cord paper source screenshot

Why Decoding Order Matters

In masked diffusion language models, generation starts from a fully masked sequence and progressively reveals tokens. Which position is chosen for reveal at each step directly determines the context available to the model afterward. Confidence decoding—always revealing the position with the highest current prediction confidence—is a reasonable heuristic, but it only focuses on "how certain can we be right now" and ignores "how much information gain will revealing this bring." For example, some positions may have low current prediction confidence, but once revealed, they provide critical constraints for neighboring positions, thereby improving overall generation quality.

Cord's starting point is precisely to identify this blind spot: confidence is a good anchor, but it should not be the sole basis for decision-making.

Masked Diffusion Language Model (dLLM) is a class of non-autoregressive text generation models inspired by diffusion models. Unlike autoregressive models such as GPT that generate token by token from left to right, dLLMs randomly mask portions of a sequence during training, teaching the model to recover the original text from masked context; at inference, they start from a sequence fully covered by [MASK] and progressively "reveal" portions of positions through multiple iterations until the entire sequence is filled. Because each step can predict multiple positions simultaneously and the reveal order is not fixed, dLLMs naturally possess the potential for parallel decoding and arbitrary-order generation—but this also introduces a new problem that autoregressive models do not face: which positions should be prioritized for reveal at each step. This ordering decision changes the context available at each subsequent step, thereby affecting overall generation quality, and is a core topic in dLLM decoding strategy research.

Cord's Core Mechanism: Anchoring and Residuals

Cord's design can be summarized as "anchoring + learning deviations." It uses confidence decoding as a reference trajectory, then learns a low-dimensional coefficient matrix that modulates the reference trajectory through geometric residuals. The residuals involve three dimensions:

  • Generation direction: adjusting the direction in which the reveal order advances along the sequence;
  • Proximity to already-revealed context: deciding whether to prioritize revealing positions near existing context or explore farther positions;
  • Two-sided filling: controlling the tendency to fill from both ends of the sequence toward the middle.

These three residual dimensions work together to enable the decoding trajectory to adapt based on the prompt and the evolving partial response.

Contextual bandit is a class of sequential decision-making frameworks in reinforcement learning: at each round, the agent observes a context feature, selects an action, and receives only the immediate reward for that action, without concern for long-term state transitions between actions. Unlike full reinforcement learning, it does not involve step-by-step credit assignment problems, nor does it require temporal backtracking estimation of value functions. Cord models the problem of "given a prompt and current partial response, selecting a residual coefficient to modulate reveal order" as a contextual bandit problem, where the action space consists of low-dimensional residual coefficients rather than specific tokens, and the reward is taken directly from sequence-level metrics (such as task success rate) after the entire sequence is generated. This way, the training signal is sparse but the objective is clear, avoiding the difficulty of designing separate rewards for each reveal step and eliminating the need to backpropagate to update dLLM backbone parameters, keeping the learned policy lightweight and decoupled from the frozen base model.

One-line Summary

Cord anchors on confidence decoding and learns dynamic reveal order via low-dimensional geometric residuals, significantly improving dLLM generation quality.

Paragraph Summary

Masked diffusion language models (dLLMs) are highly sensitive to decoding order, yet common decoders use a single fixed reveal rule throughout generation. Although confidence decoding is a strong default, it only measures how decisively the current position can be predicted right now, rather than how much revealing that position helps subsequent decoding. This article introduces Cord (Confidence-Anchored Order Residual Decoding), a lightweight, prompt-conditioned policy: it keeps confidence decoding as a stable reference and learns via geometric residuals when and how to deviate from that reference, with residuals covering generation direction, proximity to already-revealed context, and two-sided filling. Cord is trained directly from sequence-level rewards in a contextual bandit formulation, requiring no step-by-step credit assignment or backbone network updates. Across three dLLMs and five benchmarks, average task success rate improves from 32.0% to 48.2%, with only 0.53M additional trainable parameters and a 5.39% inference latency overhead.

#masked diffusion language model#dLLM decoding order#confidence decoding#contextual bandit#geometric residual#Cord
Share:

Related articles