Guidance as Variance Matching

Ali Backour1*, Artem Lukoianov1*, Frank Permenter2, Tommi Jaakkola1, Justin Solomon1, Vincent Sitzmann1
1Massachusetts Institute of Technology  2Toyota Research Institute  * equal contribution

TL;DR

Skip to How it works → The rule → Results → Citing

Classifier-free guidance and autoguidance push a diffusion model's prediction away from a weaker one, \(D_w = D_0 + w\,(D_1 - D_0)\). Everyone uses it, and the scale \(w\) is tuned by hand. We find that:

  • At the scales used in practice, guidance makes the prediction of the posterior mean worse, while samples get better.
  • Posterior-mean predictions have less variance than the data, and guidance restores it.
  • Picking \(w\) so that the guided predictions vary as much as the data recovers the published scales of eleven models across image, video, audio, motion and world generation, with no tuning.
  • Each model's error scatters like a scaled-down copy of the posterior covariance; guidance scales the difference of two such errors back up to a sample of the posterior.
Predicted against published guidance scales for eleven models; SD 3.5 Medium samples at three scales; guidance in both directions; checkpoint against retrained weak models
(a) Our variance-matched scale recovers the published scales of widely used models across modalities (Spearman \(\rho = 0.96\)). (b) SD 3.5 Medium at the FID-optimal, the FDDINOv2-optimal and our scale. (c) Guidance works in both directions: extrapolating either model away from the other improves both metrics. (d) Guiding a model with its own earlier checkpoint needs a larger scale than guiding it with a retrained model.

How it works

A two-dimensional example with real trained networks: the data is a mixture of ten Gaussians, and we look at one noisy input \(x_t\) at \(\sigma=0.4\). Step through, or press play.

Training-set size \(N\)
0: weak model1: strong model

The rule

Write the guided prediction as \(D_w = D_0 + w\,(D_1-D_0)\), where \(D_1\) is the primary prediction (conditional, or the strong model) and \(D_0\) the reference (unconditional, or the weak model). Over noisy versions \(x_t\) of a few hundred calibration examples, choose \(w\) so that the guided predictions vary as much as the clean data:

$$\operatorname{Var}_{x_t\sim p_t}\!\big[D_w(x_t)\big] \;=\; \operatorname{Var}_{x_0\sim p_{\text{data}}}\!\big[x_0\big].$$

The left side is quadratic in \(w\), so the scale has a closed form, per noise level or as one constant:

$$w^\star(t)=\frac{b(t)\pm\sqrt{b(t)^2-a(t)\,c(t)}}{a(t)},\qquad \begin{aligned} a&=\operatorname{Var}[D_1-D_0],\\ b&=\operatorname{Var}[D_0]-\operatorname{tr}\operatorname{Cov}(D_0,D_1),\\ c&=\operatorname{Var}[D_0]-\operatorname{Var}[x_0]. \end{aligned}$$

It needs one pass of the two networks over the calibration inputs; nothing is sampled. When \(c<0\) the two roots have opposite signs, so the rule also predicts that guidance can work with a negative scale.

Compute it for your model
pip install -e .
python compute_w.py --model toy
python compute_w.py --guidance cfg \
  --model stabilityai/stable-diffusion-3.5-medium \
  --dataset coco
Code and every experiment of the paper →

Results

Scales tuned to image metrics are much lower than ours and give washed-out, distorted samples. Below, SD 3.5 Medium at the FID-optimal scale, the FDDINOv2-optimal scale and our variance-matched scale, with the same prompt and seed in each row; in our user study, people preferred ours to both.

Published scales against ours for every model, including video, audio and motion →

Citing

@article{backour2026guidance,
  title   = {Guidance as Variance Matching},
  author  = {Backour, Ali and Lukoianov, Artem and Permenter, Frank and
             Jaakkola, Tommi and Solomon, Justin and Sitzmann, Vincent},
  journal = {arXiv preprint},
  year    = {2026}
}