All projects Generative Models

Probabilistic Diffusion

Turn noise into structure by learning to reverse a gradual diffusion.

Study & implementation 2023 DiffusionScore matchingDenoising
Probabilistic Diffusion diagram

Motivation

Denoising diffusion probabilistic models generate data by inverting a fixed noising process: samples are corrupted toward pure Gaussian noise over many steps, and a neural network learns to walk that trajectory backwards. The appeal is that a hard sampling problem is decomposed into a long sequence of easy denoising problems.

Method

A forward Markov chain adds Gaussian noise on a fixed variance schedule $\beta_t$. Because Gaussians compose, any noise level is reachable in closed form, which makes training a simple regression: predict the noise $\epsilon$ that was added at a randomly sampled timestep.

\[ q(x_t \mid x_0) = \mathcal{N}\!\left(x_t;\ \sqrt{\bar\alpha_t}\,x_0,\ (1-\bar\alpha_t)\mathbf{I}\right) \]

Mathematical core

The training objective reduces to a weighted denoising loss, and the learned network approximates the score of the noised data distribution — the gradient of its log-density. Reversing the chain is then equivalent to following that score field back toward the data manifold, which connects the discrete model to a continuous-time stochastic differential equation.

\[ \mathcal{L}_{\text{simple}} = \mathbb{E}_{t,\,x_0,\,\epsilon}\Big[\,\lVert \epsilon - \epsilon_\theta(x_t, t)\rVert^2\,\Big] \]

Notes

Implemented and studied as part of my work on the stochastic-calculus view of generative modeling. It is the entry point to the score-based SDE framework that underlies my publications on diffusion for time-series data.