Beyond Confidence: Adaptive and Coherent Decoding for Diffusion Language Models

Kecheng Chen, Ziru Liu, Xijia Tao, Hui Liu, Xinyu Fu, Suiyun Zhang, Dandan Tu, Lingpeng Kong, Rui Liu, Haoliang Li

TL;DR

Researchers have introduced Coherent Contextual Decoding (CCD), a new inference framework for Diffusion Language Models (DLMs) that replaces simple "single-step confidence" with "cross-step consistency." By leveraging historical decoding trajectories, CCD improves generation quality while simultaneously accelerating inference through an adaptive sampling budget, effectively bypassing the local optima that plague traditional decoding methods.

What Problem Does This Paper Address?

While Autoregressive (AR) models like GPT-4 generate text one token at a time from left to right, Diffusion Language Models (DLMs)—such as LLaDA and Dream—take a different path. They start with a sequence of mask tokens and iteratively "denoise" them into meaningful text, utilizing bidirectional context.

However, DLMs face a major hurdle during inference: they typically decide which tokens to unmask based on local, immediate-step metrics like entropy or maximum probability. The authors argue this is flawed for three reasons:

  1. Local Optima: Models can be "overconfident" in wrong predictions based on a single, potentially noisy context.
  2. Lack of Theory: There isn't a clear theoretical link between these confidence metrics and the actual sampling error rate.
  3. Parallelism Degradation: When trying to speed up DLMs by decoding many tokens at once (highly parallel decoding), performance usually collapses.

Methods

The authors propose Coherent Contextual Decoding (CCD), which shifts the focus from how "sure" a model is now to how "consistent" its predictions are over time.

  • Approximating Marginal Distribution: Instead of looking at the predictive distribution of a token at just the current step, CCD averages the predictions over a sequence of historical contexts. This "ensemble" over the decoding trajectory acts as a Monte Carlo estimation of the true target distribution.
  • Sliding-Window Historical Buffer: To avoid the massive memory overhead of storing every prediction for every step, the authors implement a sliding window ($d$) that only tracks the top-$V$ most confident tokens. This keeps the computation efficient.
  • Theoretical Grounding: The paper proves that this marginalization is equivalent to modeling the Conditional Mutual Information (MI) between contexts and token predictions. This provides a formal bridge to governing the sampling error bound.
  • CCD-DS (Adaptive Sampling): The authors extend CCD to allow for a dynamic decoding budget. If many tokens show high consistency across the historical buffer, the model decodes them all at once (accelerating the process). If the tokens are ambiguous or fluctuating, the model slows down to gather more context.

Datasets

The framework was evaluated using two state-of-the-art DLMs, LLaDA-8B and Dream-7B, across five standard benchmarks:

  • Mathematical Reasoning: GSM8K and MATH.
  • Code Generation: HumanEval and MBPP.
  • Planning: The Trip Planning benchmark (1,600 examples of varying difficulty).

Key Insights and Ideas

  • Consistency is King: A token might have low entropy (high confidence) in one step but fluctuate wildly as the surrounding context changes. CCD identifies these "unstable" tokens and defers their decoding until the context solidifies.
  • Implicit Difficulty Scheduling: The math reveals that CCD naturally prioritizes tokens with low Mutual Information (easier, context-insensitive tokens) early on, while strategically deferring high-MI tokens (difficult, context-sensitive ones) to later stages.
  • Solving the Parallelism Paradox: Traditionally, increasing the number of tokens decoded per step ($b_t$) hurts accuracy. CCD maintains much higher performance under parallel scenarios because its selection criteria are more robust than simple single-step confidence.

Key Results

  • Accuracy Gains: CCD consistently outperformed baselines across all tasks. For example, the Dream model saw a +4.05 point increase on HumanEval and a +1.83 increase on the Trip Plan benchmark.
  • Inference Speedup: The adaptive version (CCD-DS) achieved massive efficiency gains. On the Trip Planning task, it reached a 3.40x speedup for the Dream model compared to the standard uniform sampling baseline.
  • Robustness: In highly parallel decoding tests (decoding 3 tokens per step), CCD maintained an average score of 80.02% on GSM8K, whereas the default baseline dropped to 76.18%.

Limitations and Future Work

The authors acknowledge a few trade-offs:

  • Computational Overhead: Because CCD requires post-processing of the historical buffer at each step, there is a slight increase in the runtime of each forward pass, though this is usually offset by the reduction in total decoding steps.
  • Approximation Errors: The sliding window and top-$V$ filtering are practical approximations of the full trajectory average. The authors suggest that more theoretically grounded ways to handle these approximations could be a fruitful area for future research.
  • Hyperparameter Sensitivity: While the paper provides stable defaults ($V=4, d=3$), the optimal window size might vary depending on the specific model architecture or task complexity.

Summary updated

BibTeX
@inproceedings{chen2026beyond,
  author = {Kecheng Chen and Ziru Liu and Xijia Tao and Hui Liu and Xinyu Fu and Suiyun Zhang and Dandan Tu and Lingpeng Kong and Rui Liu and Haoliang Li},
  title = {{Beyond Confidence: Adaptive and Coherent Decoding for Diffusion Language Models}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=b0O96emqNj},
}
Figure