Variational autoencoder

Also: VAE

The encoder predicts a mean and variance for a Gaussian over the latent code, a sample is drawn with the reparameterization trick z = μ + σ ⊙ ε, and the decoder reconstructs the input. A KL term pulls the codes toward N(0, I), keeping the latent space smooth and sampleable.

L = E[−log p(x | z)] + β · KL(q(z | x) ‖ N(0, I))

Example

With μ = 0.5, σ = 0.2 and noise ε = 1.5, the sampled code is z = 0.5 + 0.2·1.5 = 0.8. A 1-D code with μ = 1, σ = 1 costs KL = ½(1 + 1 − 1 − 0) = 0.5.

See it in the lesson: Variational Autoencoders →

Related terms

More in Generative Models