Learning to Couple:
Context-Adaptive Joint Denoising
for Diffusion Language Models
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.
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.
reverseTrue sorts largest to smallest.
-1 selects the last element.
xs = [3, 1, 4, 2]Compare the four possible pairs
Each bar is the probability of a complete token pair. Choose a bar to try that completion.
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.
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 ↗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.
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
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).
ACCURACY (%) ↑
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 evaluationView complete Table 1 from the paper
The Pareto frontier.
Across decoding settings, compare accuracy with wall-clock generation time, including the cost of circuit inference.
Faster on long reasoning
LLaDA-2.0-mini on AIME, stopping at end-of-sequence
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}
}