Diffusion Language Models › Likelihood Evaluation
Language AI HandbookAll chapters The posterior over model paths given a completed sequence is . When the sequence log likelihood and the ELBO are both finite, subtracting the log-ratio expression for the ELBO from the log likelihood yields
Since KL divergence is nonnegative, . For a fixed dataset, divide the sum of either quantity by its total number of scored tokens and exponentiate to obtain exact perplexity or an upper bound, respectively. A Monte Carlo estimate of the bound can fall below its true value due to sampling error. Quote the score form, mask schedule, time sampling method and uncertainty when reporting it.
Per-token scores need common tokenization, preprocessing, document boundaries and scored positions. A common byte denominator can help compare scores across tokenizers if the models assign probability to the same underlying text under compatible sequence and boundary conventions. In every case report whether the value is an exact NLL or a bound. An upper bound above a comparison model's exact NLL leaves their ordering unresolved. An established upper bound below a comparison model's larger exact NLL establishes which has the smaller NLL for that evaluation.
The any-order equivalence
For continuous absorbing-mask diffusion with full terminal masking and a time-independent prediction rule, the training objective equals the average negative log likelihood across uniform one-position-at-a-time reveal orders. Ou et al. give this equivalence in their analysis of reparameterized absorbing diffusion.
We can check it by fixing a visible set , with , and specifying the next position . Under independent mask probability , the mask pattern has probability . Multiplying by the loss weight and integrating over gives . Among the possible reveal permutations, this is the fraction with exactly the positions in first and next. Because the prediction for fixed and its visible tokens has no explicit time dependence, it can be taken outside that integral.
For each fixed order, multiplying the conditional token probabilities gives a normalized sequence model. Averaging a log loss over orderings and taking the log of the probability under their mixture are different operations. Jensen's inequality places the mixture's NLL below or at the average per-order NLL. The finite-step sampler earlier also permits simultaneous reveals, so this single-position derivation does not describe its likelihood.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!