Paper commentary
Online Class Posteriors for Interpretable and Controllable Discrete Diffusion
Online class posteriors enable logical control of discrete diffusion
- Problem Discrete guidance has lagged behind continuous diffusion, because it pushes at a fixed strength for every sample and no tool tracks the class posterior online. Continuous tools could not simply be carried over to discrete models.
- Method The posterior is updated after each token transition using conditional and unconditional predictions.
- Results On Cognac, the NOT gate cut the violated fraction from 0.23 to 0.08 compared with the unconditional model.
Why guidance in discrete diffusion stays blunt
Here the score function is replaced by a rate function R_t(x, y), the instantaneous probability of token y transitioning to token x. Integrating this rate over diffusion time defines a continuous time Markov chain that carries the state from noise to data. It does so regardless of whether the considered sample needs it, which makes the push blunt for each trajectory.
Discrete guidance tools have lagged behind, even though the literature on continuous diffusion has extensively explored guidance.
Continuous work has made guidance adaptive, so it is only used when a trajectory truly requires it. Guidance can also compose several conditional generative processes, for instance to satisfy either or both of two conditions. The bottleneck for the logical operators is this class-conditional posterior, which can be trained separately or approximated from existing models.
Discrete diffusion lacked both ingredients, the online posterior and the logical operators built on it. So the continuous tools could not simply be carried over to the discrete setting. The paper therefore tracks the posterior from conditional and unconditional predictions, for both uniform and masking noise. The authors close by noting that this posterior can be tracked at no cost beyond the predictions already needed for guidance.
Tracking the class posterior token by token
The class posterior is updated during denoising from quantities the model already produces for guidance. Because the state changes one token at a time, each transition either supports a class or works against it. That denoiser is then converted into an instantaneous rate function, and the conversion is not unique. Discrete Flow Matching is one such conversion, and the Markovian ancestral sampler is another valid one.
Each update adds the log transition likelihood under the class and subtracts the log transition likelihood under the unconditional model. The tracking uses the log-posterior update, so the posterior at step t builds on the posterior at step t minus one. Across classes, the tracked values are normalized with a softmax, so the result is a proper distribution over classes.
The main paper's experiments on this estimator use the kinetic optimal discrete flow matching sampler and the stochastic ancestral sampler.
The choice of sampler for the transition likelihoods matters, because the tracked quantity can differ from the posterior given only the current state. A memoryless stochastic sampler makes the tracked posterior equal to the posterior given the current state. For uniform noise, the equality holds only when the denoising kernel is the reverse of the corruption kernel, which is an ancestral sampler.
Using ancestral transition likelihoods gives the ground-truth posterior even when samples come from a DFM sampler. Using DFM transition likelihoods on the same samples gives a tracked quantity that no longer equals the exact posterior, though it stays correlated.
For masking, the posterior tracked from transition likelihoods equals the posterior given the current state, since revealed tokens stay unmasked. The authors measure the quality of this tracking with one-vs-rest AUC and classification accuracy over denoising time.
Composing conditions with AND, OR and NOT
The posterior turns into logical operators by weighting conditional rate functions with the class posterior. The AND gate needs one extra correction, because the forward kernel has to enter the predictor once and not once per condition.
For masking, that correction drops out of the softmax, since the extra term does not depend on the clean token. For uniform noise, the forward kernel favors the observed token, so the term depends on the clean token and must stay. The forward kernel alone gives this term, so the authors don't need the base distribution or the model to compute it.
The OR and NOT gates are weighted averages of the conditional denoisers, so they need no such correction.
On the synthetic example, the derived AND, OR and NOT gates each sample from their analytic target distribution. The authors measure the KL divergence over the token counts (n1, n2) between generated samples and the target. That KL divergence goes to zero as denoising progresses, for both masking and uniform noise.
For images, the NOT gate uses a dynamic strength set by an initial guidance scale s0 and an inverse temperature τ. The authors fix τ = 0.01 in all further experiments after a grid search over both hyperparameters. Compared with static negative prompting, the dynamic approach gives a better trade-off between FID and violation rate. The dynamic approach costs one extra hyperparameter compared with the static baseline.
How far the experiments support the posterior and the NOT gate
The synthetic setting uses two tokens, with each class holding an 80% majority of one token. With the ancestral sampler, the tracked posterior matches the exact one for both noise types. With the flow matching sampler, the tracked curve has the wrong scale, but it stays strongly correlated with the exact curve. On trained models, however, the flow matching sampler gave more stable and accurate estimates.
The authors attribute this to smoother trajectories, and they leave a precise explanation to future work.
On MNIST, the posterior rises at the same time as the digit emerges in the sample. Across the experiments, the posterior concentrates on the final class more quickly under masking than under uniform noise. Masking can't modify tokens once they are unmasked, which explains the faster accumulation of class information. The authors check the posterior with one-vs-rest AUC and accuracy against labels from a pretrained ViT classifier.

Figure 1 : Illustration of the online posterior evaluation. In (a), evaluated on an analytically tractable setting in which data points consist of two tokens represented by blue and red with each class having an 80% majority of one of the two tokens, trajectories are shown above the posteriors. In (b), the posterior is evaluated on MNIST digit generation. On top for uniform, below for masked diffusion. The increase in the posterior occurs simultaneously with the emergence of the digit.
Original paper · CC0 1.0 · Felix Koulischer, Gianni Van De Velde, François Remy, Chris Develder, Thomas Demeester · Online Class Posteriors for Interpretable and Controllable Discrete Diffusion · Original paper figure · Extracted the figure area from page 3 of the original PDF.On Cognac, prompt ID 76 reached 99.0% posterior accuracy at the end of generation. Among the three prompt pairs, negative versus positive gave the best classifier, with an ROC of 0.94. The unconditional model already avoided the class 0.70 of the time on the same benchmark. The violated fraction fell from 0.23 to 0.08 with the NOT gate in probability space.
Negative CFG reached 0.06 violated, and the authors would recommend it in practice. They recommend it because it has one hyperparameter instead of three.
On antibody sequences, the V-gene classes are well separated, so the posterior gets perfect accuracy and AUC early in generation. The NOT gate on antibodies uses the IgLM log-likelihood, the FPD and a violation rate as metrics. Samples are first generated unconditionally as a worst-case baseline.
Limitations of the posterior and the open questions
The authors don't claim the tracked posterior is a perfect classifier in their setting. As denoising progresses, the conditional marginals separate, so a model conditioned on one class gives less meaningful evaluations for states of another class.
The flow matching sampler gives a tracked quantity that differs from the exact posterior when it computes the transition likelihoods. The tracked and exact curves stay strongly correlated, but the tracked curve has the wrong scale. On real trained models, the flow matching sampler gives more stable and accurate posterior estimation than the ancestral sampler.
The authors hypothesize that the smoother, less stochastic deterministic ODE trajectories make the posterior easier to discern for the trained model. A precise understanding of this phenomenon is left as future work. Hyperparameters were set to standard values from Shi et al. and not tuned per noise type. The uniform model may therefore suit the hyperparameters better, so the uniform-versus-masking comparison should be taken with care.
The text comparison with a prompted model serves as a proof of concept, because prompting is possible there. In the other modalities, simple prompting is not available, so the text results complement them.
Paper info
- Authors
- Felix Koulischer, Gianni Van De Velde, François Remy, Chris Develder, Thomas Demeester
- Venue
- arXiv · Preprint
- First published
- 2026-11-2
- Added
- 2026-11-4
- Updated
- 2026-11-2
- Version
- v1
- arXiv
- 2611.03454
- Category
- cs.LG
- Original paper terms
- CC0 1.0
- What we show
- Paper info, commentary and permitted figures from the original paper
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Abstract
Discrete diffusion models remain far less understood than their continuous counterparts, despite recent breakthroughs across modalities, most notably in text. Leveraging tools from continuous diffusion, we formulate a theoretical framework to track the class-conditional posterior in an online manner by combining conditional and unconditional model predictions. In masked language modeling, this posterior offers highly interpretable dynamics: tokens aligned with a class boost the posterior, while contradictory ones suppress it. We also show that the posterior can be used for logical guidance operations (AND, OR, NOT) in discrete diffusion. These operations enable precise control over generation, such as avoiding specific classes. In addition, we discuss a mismatch in the formulation of classifier-free guidance between discrete and continuous settings: discrete models mix the data distributions, while continuous models mix the marginals. We validate our methods and discuss their potential applications on synthetic data, with all quantities analytically tractable, as well as on MNIST, text, and antibody sequences.
Quote from the paper
Felix Koulischer, Gianni Van De Velde, François Remy, Chris Develder, Thomas Demeester (2026). Online Class Posteriors for Interpretable and Controllable Discrete Diffusion. arXiv:2611.03454v1. https://arxiv.org/abs/2611.03454v1
BibTeX
@misc{koulischer2026online,
title = {{Online Class Posteriors for Interpretable and Controllable Discrete Diffusion}},
author = {Felix Koulischer and Gianni Van De Velde and François Remy and Chris Develder and Thomas Demeester},
year = {2026},
eprint = {2611.03454},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2611.03454v1}
}