Back

Mean-field VI on a banana

What you are seeing: the simplest variational inference setup, fit to the simplest distribution that breaks it. Target: a Rosenbrock-style "banana" logp(x,y)=((1x)2+100(yx2)2)/20\log p(x, y) = -((1 - x)^2 + 100 (y - x^2)^2)/20, a long curved valley. Variational family: a product q(x,y)=N(μx,σx2)N(μy,σy2)q(x, y) = N(\mu_x, \sigma_x^2)\,N(\mu_y, \sigma_y^2), axis-aligned Gaussian (mean-field). VI maximizes ELBO=Eq[logp]+H(q)\text{ELBO} = E_q[\log p] + H(q) by gradient ascent.

The contour lines are the target logp\log p. The orange ellipse is the current qq. The yellow trace below is the ELBO over training. The "best" Gaussian approximation cannot follow the banana's curvature; it settles into a compact ellipse at the bend.

Figure 1. Mean-field VI on a Rosenbrock banana, reparameterization gradient with K = 32 Monte Carlo samples per step.
lr0.005
K (MC)32
speed5

WHAT TO TRY

  • Vary each control and watch the rail readouts respond.
  • Compare the diagnostic plot against the live scene.