Read the equation
The helper forms √ᾱ times the clean vector plus √(1−ᾱ) times a noise vector. With independent standard Gaussian noise and 0≤ᾱ≤1, this samples the usual forward Gaussian corruption distribution. The left-hand q denotes a distribution in theory, while the right-hand expression is a sample construction, not a probability-density value.
Terms & definitions
| Term | Meaning in this source |
|---|---|
| x_0 | Clean vector |
| alpha_bar | Cumulative signal-retention coefficient |
| epsilon | Standard Gaussian noise vector |
How it works
Read the definition from its right-hand expression to the quantity on the left. Its surrounding source records the intended input, state, or parameter context. Where the source leaves an operation unspecified, this page preserves that gap.
Assumptions & limits
Source recovery establishes that the expression appears in this record. Its mathematical validity, implementation behavior, and interpretation must be assessed separately. See the linked source and research notes for the checks available for this version.
Original context
Read the surrounding source passage
return result
}
// ═══════════════════════════════════════════════════════════════════════════════
// DIFFUSION EQUATIONS
// ═══════════════════════════════════════════════════════════════════════════════
// ForwardDiffusion computes q(x_t | x_0) = √ᾱ_t x_0 + √(1-ᾱ_t) ε
func ForwardDiffusion(x0 []float64, alphaBar float64, noise []float64) []float64 {
sqrtAlpha := math.Sqrt(alphaBar)
sqrtOneMinusAlpha := math.Sqrt(1.0 - alphaBar)
result := make([]float64, len(x0))
for i := range result {
n := 0.0
if i < len(noise) {
n = noise[i]
}Exact original notation
ForwardDiffusion computes q(x_t | x_0) = √ᾱ_t x_0 + √(1-ᾱ_t) ε