Inference & Sampling

When a posterior cannot be written down, it must be approximated and sampled. This base covers variational inference and the ELBO, energy-based models, and Langevin dynamics / SGLD — a way to sample from an unnormalized density using only its gradient, and the inner loop of CryoWGEN.

Target p(x)Sample histogram

Hundreds of walkers start uniform and, under Langevin dynamics, drift along the gradient of the log-density with added noise until they settle on the two modes. A larger step is faster but, taken too far, overshoots detail. Only the gradient is needed — no normalizing constant.

Articles in this base 3 articles