What is a Reverse Diffusion Model

Abdulkader Helwan
8 min readJan 2, 2024

Reverse diffusion models are a type of generative models that learn to invert a stochastic process that transforms data into noise. They are based on the theory of stochastic differential equations (SDEs), which describe the evolution of a random variable over time under the influence of some noise.

In this story, we will show what is a reverse diffusion model and help you implement one in Python.

High level visualization of one step from the reverse diffusion process

What is the Reverse Diffusion Model!

To build a reverse diffusion model, one needs to define a forward process that corrupts the data by adding noise and scaling down the signal at each step. This process can be seen as a discretization of an SDE that has a known analytical solution. The reverse process then tries to recover the original data from the noise by using a neural network to predict the parameters of a conditional Gaussian distribution at each step. The neural network takes as input the current noisy observation and the step number, and outputs the mean and variance (or covariance) of the Gaussian distribution. The reverse process can also be seen as a discretization of the reverse SDE that corresponds to the forward SDE.

How to Implement a Reverse Diffusion Model?

--

--