Part of the generative visual computing notes.
Forward corruption
A diffusion model starts with a known corruption process. Let and . One forward step is
Because independent Gaussian increments combine into another Gaussian, we can sample a noisy observation directly:
There is no need to simulate all preceding steps during each training update. At a sufficiently late time, the signal coefficient becomes small and the distribution approaches the chosen Gaussian endpoint. For a finite schedule this is an approximation, not an automatic identity.
The training target
The training program chooses , a noise level , and a Gaussian draw . It then predicts the noise from :
The target is known because the program generated it. The network does not observe the clean image at inference time.
For squared error, the optimal predictor is a conditional mean. Different clean images and noise realizations may produce the same noisy observation. The best prediction at that observation averages the compatible targets. It need not recover the exact noise of every individual example.
The same network handles multiple noise levels, so it must receive information about . Otherwise it would have to infer both the image and the corruption strength from an ambiguous input.
From a bound to denoising
The reverse model defines a latent-variable likelihood through its intermediate states. A variational bound compares its reverse conditionals with posteriors of the known forward process. Under Gaussian parameterizations, terms in that bound become weighted prediction errors.
The common unweighted noise loss changes those weights. It is useful, but it should not be described as exactly the same objective as the full likelihood bound. Shared parameters can make weighting important even when an unconstrained predictor would have the same pointwise optimum.
During generation, the learned weights are fixed. A standard DDPM mean parameterization is
The sampler combines this mean with its chosen reverse variance. After each step, the network is evaluated again on the new state. A single prediction is not reused for the entire trajectory.
Scores
The score is . It points toward increasing log density locally. It is a vector field, not a density value or a probability.
Write Gaussian corruption as . Its conditional score is
Averaging this conditional target at a fixed noisy input gives the marginal score. Thus an ideal noise predictor corresponds to .
For a forward SDE , the reverse-time drift is when integrated from high to low time. The probability-flow ODE uses . Exact scores give matching marginal distributions under the corresponding constructions, but individual paths differ.
The sign convention matters. Writing a reverse equation and then integrating it in increasing time without changing variables changes the process. Also, following a score deterministically is not generally a sampling procedure: it can concentrate points near modes rather than preserve the desired distribution.
Worked example: recovering a clean signal
Let , , and sampled noise . The forward process gives
An exact noise prediction recovers . If the model predicts instead, the clean estimate is . More generally, the clean-estimate error is . The same noise-prediction error can therefore produce a larger clean-estimate error at a noisier timestep. This helps explain why timestep weighting and parameterization affect training.
Further reading
Denoising Diffusion Probabilistic Models connects the forward process, reverse parameterization, and simplified training objective. Keep the distinction between and the cumulative product explicit when following the derivation.