ancestral sampling
**Ancestral Sampling** is the standard stochastic sampling procedure for diffusion probabilistic models that generates samples by iteratively applying the learned reverse transition kernel p_θ(x_{t-1}|x_t) from pure noise x_T to clean data x_0, faithfully following the Markov chain defined by the trained reverse diffusion process with noise injection at each step. This is the original DDPM sampling method that directly implements the learned generative Markov chain.
**Why Ancestral Sampling Matters in AI/ML:**
Ancestral sampling is the **most faithful implementation** of the diffusion model's learned distribution, providing the highest sample diversity and most accurate representation of the model's learned probability distribution at the cost of requiring many sampling steps.
• **Reverse Markov chain** — Each step samples x_{t-1} ~ N(μ_θ(x_t, t), σ_t²I) where μ_θ is the learned mean and σ_t is the noise schedule-dependent variance; the noise injection at each step ensures the sampling process matches the trained reverse process
• **Stochastic diversity** — Unlike deterministic DDIM (which maps each noise to a unique output), ancestral sampling produces different outputs from the same initial noise due to independent noise injection at each step, providing maximum sample diversity
• **Full step requirement** — Ancestral sampling typically requires all T steps (e.g., 1000) for high-quality results because skipping steps in the Markov chain violates the trained transition assumptions, leading to quality degradation
• **Variance schedule** — The noise σ_t² injected at each step can be set to σ_t² = β_t (posterior variance, original DDPM) or σ_t² = β̃_t = (1-ᾱ_{t-1})/(1-ᾱ_t)·β_t (posterior mean variance); the choice affects sample quality and diversity
• **Connection to SDE** — Ancestral sampling corresponds to numerically solving the reverse-time SDE with the Euler-Maruyama method, where the noise injection term σ_t·z represents the diffusion coefficient of the reverse SDE
| Property | Ancestral (DDPM) | DDIM (Deterministic) | DDIM (Stochastic) |
|----------|-----------------|---------------------|-------------------|
| Noise Injection | Yes (each step) | No (σ=0) | Partial (0<σ<σ_max) |
| Steps Required | ~1000 | 10-50 | 10-50 |
| Diversity | Maximum | Deterministic | Intermediate |
| Reproducibility | Stochastic | Exact (given z_T) | Stochastic |
| Quality (full steps) | Best | Equal | Equal |
| Quality (few steps) | Poor | Good | Variable |
| Latent Inversion | Not possible | Exact | Approximate |
**Ancestral sampling is the canonical inference procedure for diffusion probabilistic models, faithfully implementing the learned reverse Markov chain with full stochastic noise injection to produce maximum-diversity samples from the model's trained distribution, serving as the theoretical gold standard against which all accelerated and deterministic sampling methods are evaluated.**