Interactive demo · Probabilistic Machine Learning: Advanced Topics · Chapter 10

Mean-field Ising denoising

A binary 64×64 image of the letter A (pixels zi = ±1) is observed with Gaussian noise, xi = zi + σεi. An Ising prior with coupling W says that neighbouring pixels agree. Mean-field variational inference replaces each pixel by its mean μi = Eq[zi] and repeats the update μi ← tanh(W Σj∼i μj + xi/σ2), either for all pixels at once (parallel, optionally damped) or one pixel at a time (sequential, which is coordinate ascent and never lowers the ELBO). Left: the noisy image; middle: the means after the chosen number of sweeps; right: the ELBO after each sweep.

Updates

Coupling W

Noise level σ

Damping λ (1 = no damping)

Sweeps shown

Try these

The noise is drawn from a fixed seed, so the same settings always give the same image. The means start at μi = tanh(xi/σ2), the evidence alone. "Error" is the fraction of pixels whose sign of μi differs from the clean image; "flips" is the fraction whose sign changed in the last sweep. The ELBO omits the constant −log Z0 of the prior.

In the lecture notes