Variational autoencoder

ID: variational-autoencoder

A variational autoencoder is a generative model with a latent variable and a learned approximation to its posterior distribution given an observation . Write the model as . A recognition network, implemented as a neural network, produces the parameters of ; a generative decoder specifies . Using one recognition rule across observations is amortized inference, rather than solving a fresh independent optimization problem for every input.[ref]
Training maximizes an evidence lower bound, often written
The first term scores reconstruction under the declared likelihood; the second compares the inferred latent law with the prior. The identity
proves that it is a lower bound, since Kullback-Leibler divergence is nonnegative. It becomes tight when the recognition law equals the model posterior, under the usual density/support conditions.[ref]
For a one-dimensional Gaussian example, let the prior be and the recognition law be . Substituting their log densities and using gives
At , , this is . The value is a penalty for this particular latent law, not the whole training loss. Gaussian reparameterization writes with fixed-law standard-normal noise so that gradients can pass through the sampled latent value. After training, generation instead draws from the prior and then the generative decoder; it need not start from an observed input.
A Variational Autoencoder (VAE) is a type of generative model that is used in unsupervised machine learning tasks to learn the underlying structure of data. It combines principles from probabilistic graphical models and neural networks. Here are the key components and ideas behind VAEs: ### Structure A VAE typically consists of two main components: 1. **Encoder (Recognition Model)**: This part of the VAE takes input data and encodes it into a lower-dimensional latent space.

New to topics? Read the docs here!