In diffusion models, particularly those used for generative modeling like Denoising Diffusion Probabilistic Models (DDPM), the forward diffusion process is designed to progressively add noise to the data in a controlled manner. This process transforms the data distribution into a noise distribution (typically a standard Gaussian) over a series of time steps.
Understanding the Forward Process:
The forward diffusion process is defined as a Markov chain where each step adds a small amount of noise to the data from the previous step. The process is designed such that:
- Signal Attenuation: At each time step ( t ), the signal (i.e., the data from the previous step ( x_{t-1} )) is attenuated by a factor.
- Noise Addition: A certain amount of Gaussian noise is added to the attenuated signal.
Mathematical Formulation:
The forward process is specified by the conditional distribution:
[
q(x_t | x_{t-1}) = \mathcal{N}\left(x_t; \sqrt{\alpha_t} , x_{t-1}, (1 - \alpha_t) , \mathbf{I}\right)
]
Here:
- ( \alpha_t ) is a variance schedule parameter between 0 and 1, controlling the rate of noise addition at each time step.
- ( \sqrt{\alpha_t} ) is the signal scaling factor.
- ( (1 - \alpha_t) ) is the variance of the added noise.
Why Multiply ( x_{t-1} ) by ( \sqrt{\alpha_t} )?
Multiplying ( x_{t-1} ) by ( \sqrt{\alpha_t} ) serves to attenuate the signal at each time step. This scaling ensures that as time progresses, the influence of the original data diminishes, and the noise dominates. Here's why this specific form is chosen:
-
Controlled Signal Decay:
- By scaling ( x_{t-1} ) with ( \sqrt{\alpha_t} ), the amplitude of the signal decreases over time.
- The cumulative effect over multiple steps leads to a gradual decay of the original data, preventing sudden changes that could destabilize the diffusion process.
-
Consistent Variance of the Noise:
- The added Gaussian noise has a variance of ( (1 - \alpha_t) ), which complements the signal scaling.
- This choice ensures that the total variance of ( x_t ) remains consistent and is a convex combination of the signal and noise variances.
-
Mathematical Convenience:
- This formulation allows for the marginal distribution ( q(x_t | x_0) ) to be derived analytically, which is crucial for training diffusion models.
- It simplifies computations in the reverse process when sampling from the model.
Illustrative Equation:
The update rule for ( x_t ) can be written as:
[
x_t = \sqrt{\alpha_t} , x_{t-1} + \sqrt{1 - \alpha_t} , \epsilon_t
]
where ( \epsilon_t \sim \mathcal{N}(0, \mathbf{I}) ) represents Gaussian noise.
This equation shows that ( x_t ) is a combination of the attenuated previous state ( x_{t-1} ) and new noise ( \epsilon_t ):
- Signal Part: ( \sqrt{\alpha_t} , x_{t-1} )
- Noise Part: ( \sqrt{1 - \alpha_t} , \epsilon_t )
Intuition Behind ( \sqrt{\alpha_t} ):
- Think of ( \alpha_t ) as the proportion of the signal retained at step ( t ).
- ( \sqrt{\alpha_t} ) scales the previous signal amplitude accordingly.
- Over multiple steps, the signal component is progressively reduced as ( \sqrt{\alpha_{t}} \sqrt{\alpha_{t-1}} \cdots = \sqrt{\bar{\alpha}_t} ), where ( \bar{\alpha}_t ) is the cumulative product of ( \alpha ) up to time ( t ).
Conclusion:
Multiplying ( x_{t-1} ) by ( \sqrt{\alpha_t} ) in the mean of the Gaussian transition kernel ( q(x_t | x_{t-1}) ) implements a controlled attenuation of the signal during the diffusion process. This design balances the decay of the original data with the incremental addition of noise, allowing the forward process to smoothly transition the data distribution into a noise distribution. It also ensures mathematical tractability, facilitating the derivation of key distributions needed for model training and sampling.
References:
- Denoising Diffusion Probabilistic Models by Jonathan Ho et al.
- Diffusion Models Beat GANs on Image Synthesis by Prafulla Dhariwal and Alexander Nichol.
Answer Summary:
Because in the diffusion model’s forward process, each data point ( x_{t-1} ) is attenuated by multiplying it with ( \sqrt{\alpha_t} ) before adding noise, so the mean of ( q(x_t | x_{t-1}) ) scales ( x_{t-1} ) by ( \sqrt{\alpha_t} ) to reflect the gradual signal decay at each step.