Learning to Couple:
Context-Adaptive Joint Denoising
for Diffusion Language Models

Zilei Shao1,*Ian Li2,*Heng Zhao3Kewei Lian4Guy Van den Broeck1Zhe Zeng3Anji Liu4,†
1University of California, Los Angeles2University of California, San Diego3University of Virginia4National University of Singapore
* Equal contribution   ·   † Corresponding author   ·   arXiv:2610.25723
TL;DR

Codpula learns token predictions and context-dependent coupling under a conditional denoising objective. A Transformer modulates a tractable probabilistic circuit, yielding a joint distribution over parallel predictions. Exact conditional queries support dependence-adaptive token commitment without extra Transformer evaluations within a step.

Figure 1. Factorized versus context-dependent joint prediction. The correct pairing changes with the comment. Right: matched-accuracy speedups on AIME24 / LLaDA-2.0 and MBPP / Dream.
Explore Figure 1

See why the tokens need to agree.

Choose a task, complete the function, and compare the probabilities of all four token pairs.

What should the function return?

Change the comment to change the task.

Complete the function

Two tokens decide the sorting order and which element is returned.

def select(xs):
# Return the smallest element
return sorted(xs, reverse=True)[-1]
Sorting flag reverse

True sorts largest to smallest.

Element index

-1 selects the last element.

Try it onxs = [3, 1, 4, 2]
Sorted
Returns1
✓ Matches the comment1 is the smallest element.

Compare the four possible pairs

Each bar is the probability of a complete token pair. Choose a bar to try that completion.

CodpulaFactorized · 25% each

sorting flag index

Why these tokens work together

Descending order puts the smallest element last. The flag True and index -1 agree with the comment.

The factorized illustration gives every pair 25%. Codpula’s joint probabilities change with the requested task.

Illustrative probabilities from Figure 1; code runs on the example list above.

How Codpula learns

The context shapes the coupling.

The Transformer supplies token potentials and compact gates that modulate the probabilistic circuit’s input distributions and mixture weights. Training through the conditional joint distribution adapts the backbone to joint prediction.

A dual-flow multiplicative update preserves valid circuit parameters. During decoding, exact conditional queries measure a proposal’s sensitivity to the other proposed tokens, allowing sensitive proposals to be deferred.

Method and training details ↗
Figure 2. Block-diffusion NLL on Dream. Both variants reduce NLL when most of the block is masked.
Read the full abstract

Diffusion language models accelerate generation by predicting multiple tokens in parallel, but factorized denoisers treat simultaneous predictions as conditionally independent. Decoding heuristics reduce the resulting errors by controlling which tokens are committed, but leave the underlying distribution factorized. Joint modeling addresses the source of the problem, yet existing methods attach separately learned layers to frozen denoisers, leaving the backbone unadapted to the joint objective and the coupling parameters fixed across contexts. We propose Codpula, a context-parameterized denoiser combining a Transformer with a tractable probabilistic inference layer. Given a partially masked input, the Transformer produces token potentials that shape per-position predictions and compact gates that modulate the layer’s coupling parameters, yielding a context-dependent joint distribution while retaining exact conditional inference. We jointly optimize both components under a conditional denoising objective using a dual-flow multiplicative update that preserves valid probabilistic parameters. At inference, Codpula supports standard heuristics and uses conditional queries to adapt commitments to dependencies among proposed tokens without extra Transformer evaluations within a step. Codpula sets new state-of-the-art results across a broad suite of reasoning benchmarks while advancing the accuracy–latency Pareto frontier in mathematical reasoning and code generation.

Results from the paper

Accuracy at a fixed decoding budget.

Compare models at the same number of tokens committed per step. This snapshot uses eight tokens per step across four diffusion backbones.

Across backbones, math and code

Four diffusion language models at eight tokens per step

Accuracy at eight tokens per step across four diffusion language models, from Tables 1–3. All rows use the input-modulation variant of Codpula.

Compare a fixed decoding budget

Choose a benchmark and the number of tokens committed per step. Values below are from Table 1 (LLaDA-2.0).

LLaDA-2.0

ACCURACY (%) ↑

Tokens per diffusion step
+21.2 pp

GSM8K, 8 tokens at a time.

Codpula reaches 57.9% accuracy, compared with 36.7% for the base model at the same tokens-per-step budget.

See the full evaluation
View complete Table 1 from the paper
Table 1 · original paper, page 8 ↗
Accuracy–latency trade-off

The Pareto frontier.

Across decoding settings, compare accuracy with wall-clock generation time, including the cost of circuit inference.

Figure 3. Accuracy–latency trade-offs on LLaDA-1.0 and Dream across mathematical reasoning and code generation.
Figure 4. Accuracy–latency trade-offs on LLaDA-2.0 and SDAR, with uniform and adaptive decoding.

Faster on long reasoning

LLaDA-2.0-mini on AIME, stopping at end-of-sequence

AIME24 uses four tokens per step and EOS stopping (Table 11). The 3.84× AIME25 speedup is at matched 10% accuracy (Figure 8); the +2.9% circuit overhead is a separate uniform-decoding measurement on LLaDA-1.0 / MATH500 (Table 12).

Cite this work.

@misc{shao2026learningcouple,
  title={Learning to Couple: Context-Adaptive Joint Denoising
         for Diffusion Language Models},
  author={Zilei Shao and Ian Li and Heng Zhao and Kewei Lian
          and Guy Van den Broeck and Zhe Zeng and Anji Liu},
  year={2026},
  eprint={2610.25723},
  archivePrefix={arXiv},
  primaryClass={cs.LG},
  url={https://arxiv.org/abs/2610.25723}
}
Paper figure
Image