Diffusion Language Models › Likelihood Evaluation

Michael BrenndoerferNovember 17, 20262 min read
Language AI HandbookAll chapters
Part 19 of 67Alternative Sequence and Generative Architectures
Chapter 136Diffusion Language Models › Likelihood Evaluation
Reading section 9 of 13 · Likelihood Evaluation · 2 minSection 9 of 13 · 2 min

Section 9 of 13 · 2 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

The posterior over model paths given a completed sequence is pθ(x1:T∣x0)p_\theta(x_{1:T}\mid x_0). When the sequence log likelihood and the ELBO are both finite, subtracting the log-ratio expression for the ELBO from the log likelihood yields

log⁡pθ(x0)−ELBO⁡(x0)=KL⁡ ⁣(q(x1:T∣x0) ∥ pθ(x1:T∣x0)).\log p_\theta(x_0)-\operatorname{ELBO}(x_0) = \operatorname{KL}\!\left(q(x_{1:T}\mid x_0) \,\|\,p_\theta(x_{1:T}\mid x_0)\right).

Since KL divergence is nonnegative, −log⁡pθ(x0)≤LNELBO(x0)-\log p_\theta(x_0)\leq\mathcal L_{\mathrm{NELBO}}(x_0). 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 CC, with c=∣C∣c=|C|, and specifying the next position j∉Cj\notin C. Under independent mask probability tt, the mask pattern has probability (1−t)ctL−c(1-t)^c t^{L-c}. Multiplying by the loss weight 1/t1/t and integrating over tt gives c!(L−c−1)!/L!c!(L-c-1)!/L!. Among the L!L! possible reveal permutations, this is the fraction with exactly the positions in CC first and jj next. Because the prediction for fixed CC 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!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy