Diffusion Models: Forward and Reverse Processes

Imagine you want to generate photorealistic faces, but you only know how to destroy images, not create them. Diffusion models turn this apparent limitation into a strategy. Take real data, and gradually corrupt it into pure noise. This happens through a fixed Markov chain. Then train a neural network to walk that chain backward. It proceeds one small denoising step at a time. Each individual step is easy to learn. A small Gaussian perturbation is much simpler to invert than the entire data-generating distribution at once. Yet composing thousands of these easy steps yields a generator. It is powerful enough to produce state-of-the-art images, audio, and video. This matters because the alternative generative paradigms each pay a steep price. Generative Adversarial Networks require a delicate adversarial equilibrium. This equilibrium is notoriously unstable to train. Autoregressive models scale poorly to high-resolution, non-sequential data. Variational autoencoders often blur fine detail. This happens because they optimize a single-shot reconstruction. Diffusion models sidestep these issues by decomposing generation into many small, well-conditioned sub-problems. The cost is needing many sequential steps at sampling time. The big picture is a two-process design. There is a fixed, non-learned forward process that destroys structure. It does this by adding Gaussian noise over TT steps. There is also a learned reverse process that reconstructs structure. It does this by predicting and removing that noise. Training reduces to a simple regression problem — predict the noise that was added. This works thanks to a closed-form shortcut. The shortcut lets us jump to any noise level in one step. It avoids the need to simulate the chain during training. This connects tightly to The Reparameterization Trick. That trick is what makes the forward process differentiable and samplable in closed form. This article builds the forward chain from first principles. It derives the reparameterized closed form that makes training tractable. It walks through the training and sampling algorithms in full pseudocode. It proves why the training objective is a valid bound on the data likelihood. It closes with a worked numerical trace, common failure modes, and relevant history. That history connects this model family to non-equilibrium thermodynamics and score matching. This is picked up in Denoising and Score-Based Models.

Key takeaways
  • Diffusion models learn to generate data by reversing a fixed Gaussian noising Markov chain.
  • The forward process q(xt∣xt−1)q(x_t \mid x_{t-1}) adds small Gaussian noise at each of TT steps.
  • A reparameterization gives a closed form q(xt∣x0)q(x_t \mid x_0), letting training sample any timestep directly.
  • Training reduces to predicting the noise ϵ\epsilon added to x0x_0, via a simple mean-squared-error loss.
  • Sampling runs the learned reverse chain pθ(xt−1∣xt)p_\theta(x_{t-1}\mid x_t) from pure noise back to data, step by step.
  • The objective is a variational bound (ELBO) on log-likelihood, giving a principled correctness guarantee.
The core insight

Diffusion models replace one hard generation problem with thousands of easy denoising problems, chained together via a fixed forward noising process and its learned reverse.

The idea

A diffusion model defines two coupled stochastic processes over a sequence of latent variables x0,x1,…,xTx_0, x_1, \dots, x_T, where x0x_0 is a real data point (an image, say) and xTx_T is approximately standard Gaussian noise. The forward process q(x1:T∣x0)q(x_{1:T} \mid x_0) is a fixed Markov chain that adds a small amount of Gaussian noise at each step according to a variance schedule β1,…,βT∈(0,1)\beta_1, \dots, \beta_T \in (0,1):

q(xt∣xt−1)=N(xt; 1−βt xt−1, βtI).q(x_t \mid x_{t-1}) = \mathcal{N}\big(x_t;\ \sqrt{1-\beta_t}\, x_{t-1},\ \beta_t I\big).

This process has no learned parameters — it is a fixed corruption schedule, analogous to annealing a physical system toward thermal equilibrium. The reverse process is what we actually learn: a Markov chain pθ(x0:T)p_\theta(x_{0:T}) that starts from p(xT)=N(0,I)p(x_T) = \mathcal{N}(0, I) and applies learned Gaussian transitions

pθ(xt−1∣xt)=N(xt−1; μθ(xt,t), Σθ(xt,t))p_\theta(x_{t-1} \mid x_t) = \mathcal{N}\big(x_{t-1};\ \mu_\theta(x_t, t),\ \Sigma_\theta(x_t, t)\big)

to walk back from noise to data. Because each forward step adds only a small perturbation (for large TT and small βt\beta_t), the reverse transition is also approximately Gaussian — this is the key mathematical fact that makes the reverse process learnable with a simple neural network rather than an intractable arbitrary distribution. The crucial computational trick, using the reparameterization trick, is that the marginal q(xt∣x0)q(x_t \mid x_0) has a closed form: letting αt=1−βt\alpha_t = 1-\beta_t and αˉt=∏s=1tαs\bar\alpha_t = \prod_{s=1}^t \alpha_s,

q(xt∣x0)=N(xt; αˉt x0, (1−αˉt)I),xt=αˉt x0+1−αˉt ϵ,  ϵ∼N(0,I).q(x_t \mid x_0) = \mathcal{N}\big(x_t;\ \sqrt{\bar\alpha_t}\, x_0,\ (1-\bar\alpha_t) I\big), \qquad x_t = \sqrt{\bar\alpha_t}\, x_0 + \sqrt{1-\bar\alpha_t}\, \epsilon,\ \ \epsilon\sim\mathcal N(0,I).

This means we can sample a noised version of any data point at any timestep tt in a single step, with no need to iterate through t−1t-1 intermediate steps. Training therefore never has to simulate the chain — it just picks a random tt, generates xtx_t directly, and asks a network to recover the noise ϵ\epsilon that was added. This is what makes diffusion training embarrassingly parallel and efficient, distinguishing it sharply from the sequential nature of sampling.

How it works

Step 1 — Choose a noise schedule. Fix TT (commonly 1000) and a schedule {βt}t=1T\{\beta_t\}_{t=1}^T, e.g. linear from 10−410^{-4} to 0.020.02, or a cosine schedule. Precompute αt=1−βt\alpha_t = 1-\beta_t and αˉt=∏s≤tαs\bar\alpha_t = \prod_{s\le t}\alpha_s.

Step 2 — Training. For each minibatch, sample real data x0x_0, sample a random timestep t∼Uniform{1,…,T}t \sim \text{Uniform}\{1,\dots,T\}, sample noise ϵ∼N(0,I)\epsilon \sim \mathcal N(0,I), form xtx_t using the closed-form reparameterization above, and train a network ϵθ(xt,t)\epsilon_\theta(x_t, t) to predict ϵ\epsilon via mean-squared error. The network is typically a U-Net with time-step embeddings (often sinusoidal, as in Transformers) injected at every resolution level.

Step 3 — Sampling. Start from xT∼N(0,I)x_T \sim \mathcal N(0, I). For t=T,…,1t = T, \dots, 1, use ϵθ(xt,t)\epsilon_\theta(x_t, t) to estimate the reverse mean μθ(xt,t)\mu_\theta(x_t, t), then sample xt−1x_{t-1} from the Gaussian reverse transition (adding fresh noise except at the final step). After TT iterations, x0x_0 is a generated sample. ```

# ---------- Precompute schedule ---------- function PRECOMPUTE_SCHEDULE(T, beta_min, beta_max): beta[1..T] <- LINSPACE(beta_min, beta_max, T) alpha[1..T] <- 1 - beta alpha_bar[1..T] <- CUMULATIVE_PRODUCT(alpha) # alpha_bar[t] = prod_{s<=t} alpha[s] return beta, alpha, alpha_bar

# ---------- Training ---------- function TRAIN(data_distribution, T, beta, alpha, alpha_bar, epsilon_theta, num_steps): for step in 1..num_steps: x0 <- SAMPLE_BATCH(data_distribution) # shape [B, ...] t <- SAMPLE_UNIFORM_INT(1, T, size=B) # one timestep per example eps <- SAMPLE_GAUSSIAN(shape=x0.shape) # target noise sqrt_ab <- SQRT(alpha_bar[t]) # broadcast over batch sqrt_1mab <- SQRT(1 - alpha_bar[t]) x_t <- sqrt_ab x0 + sqrt_1mab eps # closed-form forward sample eps_pred <- epsilon_theta(x_t, t) # network's noise estimate loss <- MEAN_SQUARED_ERROR(eps_pred, eps) UPDATE_PARAMETERS(epsilon_theta, GRADIENT(loss)) return epsilon_theta

# ---------- Sampling (ancestral sampling, DDPM) ---------- function SAMPLE(T, beta, alpha, alpha_bar, epsilon_theta): x <- SAMPLE_GAUSSIAN(shape=DATA_SHAPE) # x_T ~ N(0, I) for t in T, T-1, ..., 1: eps_pred <- epsilon_theta(x, t) coef1 <- 1 / SQRT(alpha[t]) coef2 <- beta[t] / SQRT(1 - alpha_bar[t]) mu <- coef1 (x - coef2 eps_pred) # posterior mean estimate if t > 1: sigma <- SQRT(beta[t]) # or posterior variance, see below z <- SAMPLE_GAUSSIAN(shape=DATA_SHAPE) else: sigma <- 0 z <- 0 x <- mu + sigma z return x # approx sample from data distribution ``` The training loop's correctness hinges entirely on the closed-form line `x_t <- sqrt_abx0 + sqrt_1mabeps`: it is exactly* a sample from q(xt∣x0)q(x_t\mid x_0) by the reparameterization trick applied to a Gaussian, so no chain simulation, and no bias, is introduced. The sampling loop's mean formula `mu` comes from Bayes' rule applied to the forward process (derived in the next section) — it is the mean of q(xt−1∣xt,x0)q(x_{t-1}\mid x_t, x_0) with x0x_0 replaced by its estimate implied by ϵθ\epsilon_\theta.

Figure
Forward noising chain (top) and learned reverse denoising chain (bottom)
Diffusion: Forward (fixed) vs Reverse (learned) x₀ x₁ x₂ x_T-1 x_T q(x₁|x₀) q(x₂|x₁) add noise ×(T-2) forward: fixed Gaussian noising, no parameters ··· x_T x_T-1 x₂ x₁ x₀ ··· p_θ(x_T-1|x_T) p_θ(x₀|x₁) reverse: learned denoiser ε_θ(x_t, t), run sequentially

Complexity & correctness

Time complexity. Training one step costs O(C)O(C) where CC is the cost of one forward/backward pass of the denoising network (typically a U-Net), independent of TT — this is because the closed-form reparameterization lets us jump directly to any xtx_t without simulating intermediate steps. Sampling one image costs O(T⋅C)O(T \cdot C), since the reverse chain must be simulated sequentially, one network evaluation per timestep; this is the well-known efficiency bottleneck of diffusion models relative to single-pass generators like GANs or VAEs. Accelerated samplers (e.g. DDIM, higher-order solvers) reduce the effective number of sampling steps to O(T′)O(T') with T′≪TT' \ll T (often 20–50), by treating the reverse process as a discretized ODE/SDE rather than a strict Markov chain, but this is a refinement built on the same forward/reverse formalism.

Space complexity. O(P)O(P) for the network parameters θ\theta, plus O(D)O(D) per sample for the data dimensionality DD (a single image tensor is stored and overwritten at each denoising step; no need to store the whole trajectory unless it is being visualized).

Correctness — the variational bound. The reverse process is trained to make pθ(x0)p_\theta(x_0) close to the true data distribution. Since pθ(x0)=∫pθ(x0:T) dx1:Tp_\theta(x_0) = \int p_\theta(x_{0:T})\, dx_{1:T} is intractable to compute directly, training instead maximizes a variational lower bound (an ELBO), exactly as in a hierarchical VAE:

log⁡pθ(x0)≥Eq[log⁡pθ(x0∣x1)−∑t=2TDKL(q(xt−1∣xt,x0) ∥ pθ(xt−1∣xt))−DKL(q(xT∣x0) ∥ p(xT))].\log p_\theta(x_0) \ge \mathbb{E}_q\left[\log p_\theta(x_0\mid x_1) - \sum_{t=2}^T D_{KL}\big(q(x_{t-1}\mid x_t, x_0)\,\|\,p_\theta(x_{t-1}\mid x_t)\big) - D_{KL}\big(q(x_T\mid x_0)\,\|\,p(x_T)\big)\right].

This bound follows from Jensen's inequality applied to log⁡pθ(x0)=log⁡Eq(x1:T∣x0)[pθ(x0:T)q(x1:T∣x0)]\log p_\theta(x_0) = \log \mathbb E_{q(x_{1:T}|x_0)}\left[\frac{p_\theta(x_{0:T})}{q(x_{1:T}|x_0)}\right], the same derivation pattern used for the standard ELBO in variational autoencoders. Because the forward posterior q(xt−1∣xt,x0)q(x_{t-1}\mid x_t, x_0) is Gaussian (a consequence of qq being a linear-Gaussian chain, using Bayes' rule on jointly Gaussian variables), each KL term between two Gaussians has a closed form, reducible to a squared difference of means. Substituting the reparameterized forms of xtx_t shows that this difference of means is proportional to ∥ϵ−ϵθ(xt,t)∥2\|\epsilon - \epsilon_\theta(x_t,t)\|^2 — precisely the training loss used in the pseudocode above. In other words, minimizing the simple noise-prediction MSE loss is provably minimizing (a reweighted version of) a true variational bound on data log-likelihood, not an ad hoc heuristic.

Honest tradeoffs. The forward process being fixed (not learned) sacrifices some flexibility for tractability and stable training — there is no adversarial game and no mode collapse in the GAN sense. The price is slow sampling (TT sequential network calls), high compute cost, and sensitivity to the noise schedule and number of steps: too few steps make the Gaussian reverse-step assumption inaccurate; too many steps waste compute. The variational bound is also a lower bound on likelihood, so a model can score well on the training objective while still producing samples with subtly wrong tails or texture — an accepted looseness in exchange for tractable, stable training.

Worked example

Consider a toy 1-D "image" that is literally a single pixel value, x0=2.0x_0 = 2.0, so we can hand-trace the arithmetic. Use T=4T=4 with a simple linear schedule for illustration.

ttβt\beta_tαt=1−βt\alpha_t = 1-\beta_tαˉt=∏s≤tαs\bar\alpha_t = \prod_{s\le t}\alpha_sαˉt\sqrt{\bar\alpha_t}1−αˉt\sqrt{1-\bar\alpha_t}
10.100.900.9000.9490.316
20.200.800.7200.8490.529
30.300.700.5040.7100.704
40.400.600.3020.5500.835

Training-time forward sampling (closed form). Suppose training draws t=3t=3 and samples noise ϵ=1.0\epsilon = 1.0 (a fixed value here for tracing, instead of random, to make the arithmetic checkable). Then

x3=αˉ3 x0+1−αˉ3 ϵ=0.710×2.0+0.704×1.0=1.420+0.704=2.124.x_3 = \sqrt{\bar\alpha_3}\, x_0 + \sqrt{1-\bar\alpha_3}\, \epsilon = 0.710 \times 2.0 + 0.704 \times 1.0 = 1.420 + 0.704 = 2.124.

The network ϵθ(x3=2.124, t=3)\epsilon_\theta(x_3=2.124,\ t=3) is asked to output a prediction close to 1.01.0; suppose it (imperfectly) outputs ϵ^=0.8\hat\epsilon = 0.8. The squared-error loss contribution is (1.0−0.8)2=0.04(1.0-0.8)^2 = 0.04, and this drives a gradient update pushing ϵθ\epsilon_\theta's prediction upward, toward 1.01.0, at input (2.124,3)(2.124, 3).

Sampling-time reverse walk. Now suppose after training, ϵθ\epsilon_\theta is reasonably accurate. Start from noise x4=1.5x_4 = 1.5 (drawn from N(0,1)\mathcal N(0,1), here fixed for the trace). At t=4t=4: suppose ϵθ(1.5,4)=0.55\epsilon_\theta(1.5, 4) = 0.55. Compute

coef1=1α4=10.6=1.291,coef2=β41−αˉ4=0.40.835=0.479,\text{coef1} = \frac{1}{\sqrt{\alpha_4}} = \frac{1}{\sqrt{0.6}} = 1.291, \qquad \text{coef2} = \frac{\beta_4}{\sqrt{1-\bar\alpha_4}} = \frac{0.4}{0.835} = 0.479,
μ=1.291×(1.5−0.479×0.55)=1.291×(1.5−0.263)=1.291×1.237=1.597.\mu = 1.291 \times (1.5 - 0.479 \times 0.55) = 1.291 \times (1.5 - 0.263) = 1.291 \times 1.237 = 1.597.

Adding noise σ4z=0.4×(−0.2)=−0.126\sigma_4 z = \sqrt{0.4}\times(-0.2) = -0.126 gives x3=1.597−0.126=1.471x_3 = 1.597 - 0.126 = 1.471. Repeating this for t=3,2,1t=3,2,1 (each time re-evaluating ϵθ\epsilon_\theta at the new xtx_t and the corresponding tt) walks the chain back toward values clustering near the original data mode x0=2.0x_0=2.0 — not exactly recovering 2.1242.124 or 2.02.0 because sampling is stochastic and the network is imperfect, but statistically consistent with the data distribution the network was trained on. This mirrors the real algorithm: training touches one random tt per example using the closed form; sampling must traverse every tt from TT down to 11 sequentially.

Common pitfalls & traps

PitfallWhy it happensConsequence
Confusing training-time and sampling-time computationForgetting that training uses the closed-form jump to xtx_t, while sampling must iterate the chainImplementing training with an unnecessary TT-step loop, wasting compute
Wrong variance schedule scalingUsing βt\beta_t directly as the reverse-step variance without checking whether posterior variance β~t\tilde\beta_t is more appropriateBlurry or noisy samples, unstable low-step sampling
Off-by-one in αˉt\bar\alpha_t indexingCumulative product started at wrong index or t=0t=0 term mishandledx0x_0 itself gets corrupted, or xTx_T is not close enough to standard Gaussian
Predicting x0x_0 vs. predicting ϵ\epsilon inconsistentlyMixing parameterizations (ϵ\epsilon-prediction, x0x_0-prediction, velocity-prediction) without converting formulas correctlyLoss looks fine numerically but the sampler produces garbage
Too few sampling steps at inferenceAssuming a model trained with T=1000T=1000 can be sampled with very few DDPM steps without a special fast samplerCoarse Gaussian-transition assumption breaks, quality collapses
Ignoring numerical underflow in αˉt\bar\alpha_t for large TTProduct of many terms close to 1 can still underflow in low precisionNaNs late in the forward chain, unstable training near t≈Tt\approx T

Pioneers & history

The mathematical seed of diffusion models is the observation, borrowed from non-equilibrium statistical physics, that a complex distribution can be reached by slowly perturbing a simple one and that the perturbation process is invertible if simulated finely enough. This connects diffusion models to two adjacent lineages: variational inference (making the reverse chain trainable via an ELBO) and score matching / Langevin dynamics (an alternative, closely related view developed independently and unified with diffusion models in later work, which is the bridge to Denoising and Score-Based Models).

Origins · 1 minJascha Sohl-Dickstein and how this was discovered
JS
Jascha Sohl-Dickstein
b. 1982 · Stanford / Google Brain researcher who, with collaborators, first formalized deep generative modeling via a learned reversal of a non-equilibrium thermodynamic diffusion process (2015)

History
2015
— Sohl-Dickstein, Weiss, Maheswaranathan, and Ganguli introduce deep unsupervised learning using nonequilibrium thermodynamics, defining the forward/reverse diffusion framework.
2019
— Song and Ermon connect denoising score matching with Langevin dynamics, offering a continuous-time and score-based perspective on the same idea.
2020
— Ho, Jain, and Abbeel introduce Denoising Diffusion Probabilistic Models (DDPM), showing the simplified ϵ\epsilon-prediction loss achieves image quality competitive with GANs.
2020–2021
— Song, Meng, and Ermon propose DDIM, an implicit, non-Markovian sampler drastically reducing the number of sampling steps.
2021–2022
— Classifier-free guidance, latent diffusion, and large text-to-image systems (Stable Diffusion, Imagen, DALL·E 2) scale diffusion models to industrial text-conditioned generation.

Where this matters

Diffusion models now underpin most state-of-the-art image generation systems, including Stable Diffusion, Midjourney's backend, DALL·E 2/3, and Google's Imagen, all of which train a U-Net-style ϵθ\epsilon_\theta (often operating in a compressed latent space rather than pixel space, for efficiency) using exactly the forward/reverse machinery described here. The same framework generalizes beyond images: diffusion is used for audio and speech synthesis, video generation, 3D shape and molecule generation (important in drug discovery, where the data lives on non-Euclidean manifolds and the forward process must be adapted accordingly), and even as a component of reinforcement learning policies (diffusion policies for robotic control). The core forward-noising/reverse-denoising abstraction is also the conceptual bridge into score-based generative modeling, where the reverse process is reinterpreted as integrating an estimated score function — a connection formalized through stochastic differential equations and central to understanding modern accelerated samplers.

Ask the tutor: How does the score-based (score matching + Langevin dynamics) view of diffusion relate mathematically to the noise-prediction ϵθ\epsilon_\theta network described here?

Why use Gaussian noise specifically, rather than some other corruption process?

Gaussian noise is chosen because it makes both the forward marginal q(xt∣x0)q(x_t\mid x_0) and the true reverse posterior q(xt−1∣xt,x0)q(x_{t-1}\mid x_t, x_0) analytically tractable Gaussians, thanks to closure properties of Gaussian distributions under linear combinations. This tractability is what allows a closed-form training loss and a simple parametric family (Gaussian) for the learned reverse transition. Other corruption processes (e.g. masking, blurring, or discrete corruption for categorical data) have been explored and can work, but they generally lose the clean closed-form marginal and posterior that make Gaussian diffusion both mathematically elegant and computationally cheap to train. The Gaussian choice also connects diffusion to well-studied continuous-time stochastic processes (Brownian motion, Ornstein-Uhlenbeck processes), enabling the SDE-based generalizations used in score-based modeling.

How is the number of steps TT chosen, and what happens if it's too small or too large?

TT trades off sample quality against sampling cost. If TT is too small, each forward step must add a large amount of noise to reach xT≈N(0,I)x_T \approx \mathcal N(0,I) within so few steps, which makes the true reverse posterior far from Gaussian — violating the core approximation that lets a Gaussian pθ(xt−1∣xt)p_\theta(x_{t-1}\mid x_t) work well. This produces blurry or artifact-laden samples. If TT is too large, training is largely unaffected (since training samples tt directly via the closed form), but sampling becomes extremely slow, since the reverse chain must be simulated sequentially for all TT steps. In practice TT around 1000 is common for training, with fast samplers (DDIM, DPM-Solver) used at inference to effectively collapse this to 20-50 evaluations without retraining.

What is the difference between predicting ϵ\epsilon, predicting x0x_0, and predicting the "velocity"?

These are three mathematically equivalent parameterizations of the same reverse mean, related by the closed-form relationship xt=αˉtx0+1−αˉtϵx_t = \sqrt{\bar\alpha_t} x_0 + \sqrt{1-\bar\alpha_t}\epsilon: given any one of ϵ\epsilon, x0x_0, or a linear combination called velocity vv, the others can be algebraically recovered. Empirically, ϵ\epsilon-prediction (as in the original DDPM) tends to work well at moderate noise levels but can behave poorly at very high noise (tt near TT), where the signal is nearly all noise and predicting x0x_0 becomes numerically more stable, motivating x0x_0- or vv-prediction variants used in some modern systems. The choice affects loss weighting and numerical stability far more than it affects the underlying variational bound, which is invariant to reparameterization.

Are diffusion models a special case of variational autoencoders?

Yes, in a precise technical sense: a diffusion model is a deep, hierarchical VAE where the "encoder" (the forward process) is fixed rather than learned, and the latent variables x1,…,xTx_1,\dots,x_T have the same dimensionality as the data rather than a lower-dimensional bottleneck. The training objective is derived exactly the way the standard VAE ELBO is derived, via Jensen's inequality applied to an importance-weighted marginal likelihood. The key structural differences are that the encoder has no learnable parameters, there are typically hundreds to thousands of latent layers instead of one, and each individual KL term between adjacent-timestep Gaussians is analytically tractable, which is what makes an otherwise enormous hierarchical model trainable at scale.

How does classifier-free guidance fit into this forward/reverse framework?

Classifier-free guidance modifies the reverse process to steer sampling toward a condition cc (such as a text prompt), without changing the forward process at all. During training, the network learns both a conditional noise predictor ϵθ(xt,t,c)\epsilon_\theta(x_t, t, c) and an unconditional one ϵθ(xt,t,∅)\epsilon_\theta(x_t, t, \varnothing), typically by randomly dropping the condition during training. At sampling time, the two predictions are linearly combined with a guidance scale ww, extrapolating away from the unconditional prediction toward the conditional one. This is a sampling-time modification layered on top of the same reverse Markov chain machinery, which is why it works with any diffusion backbone without retraining the forward process.

Why is sampling described as sequential — could the reverse steps be parallelized across timesteps?

The reverse steps cannot be parallelized across tt in the standard formulation because each step's input xt−1x_{t-1} is only defined once xtx_t has been sampled — it is a genuine Markov chain, not an independent set of computations. This is fundamentally different from training, where each minibatch example independently samples its own random tt via the closed form and requires no dependency on other timesteps. Research on faster samplers (DDIM, consistency models, distillation techniques) works around this sequential bottleneck by either reducing the number of necessary steps or by training a separate model to jump directly from noise to data in very few evaluations, but a plain DDPM reverse chain fundamentally requires TT sequential network calls.

Before this

Where this leads