๐Ÿงฌ Variational Inference

Machine Learning / Inference

Variational inference is a technique for approximating complex distributions with a latent variable model,

where is a latent not present in the dataset. We design and to be simple distributions (usually ๐Ÿ‘‘ Gaussian), and composing them together allows us to represent much more complex distributions.

To optimize such a model, we find

Intuitively, this means we want to "guess" the given and maximize their probabilities. However, it's unclear how to calculate because this distribution is usually very complex. Variational inference addresses this by approximating

In other words, we'll estimate this complex distribution with a simple one, and we can show that even with this approximation, we can bound as

via ๐ŸŒˆ Jensen's Inequality. This is called the ๐Ÿ’ผ Evidence Lower Bound.

Usually, there are way too many datapoints to have an exact for all . Instead, we amortize by learning a model , sometimes called the encoder, which brings us to the ๐Ÿ–‹๏ธ Variational Autoencoder. This fundamental idea underlies many concepts, including ๐Ÿ•ฏ๏ธ Diffusion models and ๐ŸŽ›๏ธ Control As Inference.

Content by William Liang, written in Obsidian.
Thank you to all the educators who made these notes possible.