Part 4 · The Maths II: Masked Discrete Diffusion
The objective: BERT, integrated
With SUBS in place, the discrete-time ELBO telescopes, and taking the number of corruption levels to infinity gives MDLM’s continuous-time objective:
xθ the model's predicted distribution for a masked position · ℓ indexes the masked positions · the integral runs over the continuous time variable t, weighting each noise level
Unpack it: sample a corruption level t, mask the sentence accordingly, and charge the model cross-entropy for every masked position — that inner sum is exactly BERT’s masked-language-modeling loss. The integral averages it over all masking ratios, weighted by w(t) = −α′t/(1−αt). For the linear schedule αt = 1−t this weight is 1/t: lightly-masked sentences carry large per-token weight but contain few masked tokens, and the two effects balance. The punchline deserves its own sentence: the venerable fill-in-the-blank objective, integrated over all masking ratios, is a variational bound on log-likelihood. That is what lets dLLMs report honest perplexities comparable against AR models — and MDLM used it to close most of the historical gap.
Invariance theorem. MDLM proves the continuous-time NELBO’s value does not depend on the functional form of αt at all — only the endpoints matter. Schedules still differ in gradient variance and in how you'd like to sample, but not in the objective they optimize. (This is why cutting sampler steps needs no retraining: the model was never trained for a step count in the first place.)
See the invariance from the other side — how different the schedules look while optimizing the identical objective:
Survive with probability αt, absorb into the mask otherwise; independent per position.
Case zs = x (still visible at s, masked between s and t): weight αs · (probability of masking in (s,t]) = αs·(1 − αt/αs) = αs − αt. Case zs = m (already masked by s): weight 1 − αs (mask is absorbing, so it stays masked at t with probability 1).
The weights sum to 1 − αt, the total probability of being masked at t. When revealed, the token is always the true x.
The discrete-time bound telescopes; SUBS zeroes the other terms; the infinitesimal limit leaves w(t) = −α′t/(1−αt).
−α′t = 1 and 1 − αt = t. Near t = 0 each masked token is weighted heavily, but an expected fraction t of tokens is masked — the two factors cancel in expectation, keeping the integrand finite.