Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende SDE View of Diffusion Models | Advanced Diffusion Formulations
Diffusion Models and Generative Foundations

bookSDE View of Diffusion Models

To understand modern diffusion models, you need to see how they can be described using stochastic differential equations (SDEs). An SDE is a mathematical tool for modeling systems that evolve over time with both deterministic and random (stochastic) components. In the context of diffusion models, SDEs provide a flexible and powerful way to describe how data is gradually corrupted by noise (the forward process) and how you can reverse this process to generate new data (the reverse process). This SDE perspective unifies many diffusion models and allows you to connect them with ideas from stochastic calculus and probabilistic modeling.

Mathematically, an SDE describes the evolution of a variable, such as an image or signal, as it is perturbed by noise over continuous time. The forward SDE can be written as:

dx=f(x,t)dt+g(t)dWtdx = f(x, t) dt + g(t) dW_t

Here, xx is the data at time tt, f(x,t)f(x, t) is a drift term (deterministic change), g(t)g(t) is a diffusion coefficient (scaling the noise), and dWtdW_t represents a small increment of a Wiener process (Brownian motion). This equation tells you how to add noise to the data step-by-step.

The reverse SDE describes how to go backward in time, removing noise to recover data from noise. Its form is:

dx=[f(x,t)g(t)2xlogpt(x)]dt+g(t)dWˉtdx = [f(x, t) - g(t)^2 \nabla_x \log p_t(x)] dt + g(t) d\bar{W}_t

where xlogpt(x)\nabla_x \log p_t(x) is the score function (the gradient of the log probability density at time tt), and dWˉtd\bar{W}_t is a Wiener process running backward in time. This equation is central to sampling from diffusion models: if you can estimate the score function, you can simulate this reverse SDE to generate new samples.

To see this in action, imagine you have a simple one-dimensional signal, such as a pixel value between 0 and 1. The forward SDE gradually adds Gaussian noise to this value, making it look more and more like pure noise as time increases. At time t=0t=0, the value is clean; as tt approaches 1, the value is almost completely random.

If you could perfectly estimate the score function at every time step, you could then run the reverse SDE starting from random noise. As you simulate the reverse SDE, the signal becomes less noisy and eventually resembles data drawn from the original distribution. This process is the foundation for generating realistic samples from a diffusion model using SDEs.

question mark

Which of the following best describes the purpose of the reverse SDE in diffusion models?

Select the correct answer

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 3. Capítulo 1

Pregunte a AI

expand

Pregunte a AI

ChatGPT

Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla

Suggested prompts:

Can you explain what the score function is and how it's estimated in practice?

How does the reverse SDE actually generate new data samples?

Are there any intuitive examples or visualizations to help understand these SDE processes?

Awesome!

Completion rate improved to 8.33

bookSDE View of Diffusion Models

Desliza para mostrar el menú

To understand modern diffusion models, you need to see how they can be described using stochastic differential equations (SDEs). An SDE is a mathematical tool for modeling systems that evolve over time with both deterministic and random (stochastic) components. In the context of diffusion models, SDEs provide a flexible and powerful way to describe how data is gradually corrupted by noise (the forward process) and how you can reverse this process to generate new data (the reverse process). This SDE perspective unifies many diffusion models and allows you to connect them with ideas from stochastic calculus and probabilistic modeling.

Mathematically, an SDE describes the evolution of a variable, such as an image or signal, as it is perturbed by noise over continuous time. The forward SDE can be written as:

dx=f(x,t)dt+g(t)dWtdx = f(x, t) dt + g(t) dW_t

Here, xx is the data at time tt, f(x,t)f(x, t) is a drift term (deterministic change), g(t)g(t) is a diffusion coefficient (scaling the noise), and dWtdW_t represents a small increment of a Wiener process (Brownian motion). This equation tells you how to add noise to the data step-by-step.

The reverse SDE describes how to go backward in time, removing noise to recover data from noise. Its form is:

dx=[f(x,t)g(t)2xlogpt(x)]dt+g(t)dWˉtdx = [f(x, t) - g(t)^2 \nabla_x \log p_t(x)] dt + g(t) d\bar{W}_t

where xlogpt(x)\nabla_x \log p_t(x) is the score function (the gradient of the log probability density at time tt), and dWˉtd\bar{W}_t is a Wiener process running backward in time. This equation is central to sampling from diffusion models: if you can estimate the score function, you can simulate this reverse SDE to generate new samples.

To see this in action, imagine you have a simple one-dimensional signal, such as a pixel value between 0 and 1. The forward SDE gradually adds Gaussian noise to this value, making it look more and more like pure noise as time increases. At time t=0t=0, the value is clean; as tt approaches 1, the value is almost completely random.

If you could perfectly estimate the score function at every time step, you could then run the reverse SDE starting from random noise. As you simulate the reverse SDE, the signal becomes less noisy and eventually resembles data drawn from the original distribution. This process is the foundation for generating realistic samples from a diffusion model using SDEs.

question mark

Which of the following best describes the purpose of the reverse SDE in diffusion models?

Select the correct answer

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 3. Capítulo 1
some-alt