Understanding Variational Autoencoders: Core Concepts and Training Explained

This article introduces Variational Autoencoders (VAEs), compares them with GANs, explains the underlying variational inference principle, and details how VAEs are trained using the evidence lower bound, complemented by visual diagrams and key equations.

Hulu Beijing
Hulu Beijing
Hulu Beijing
Understanding Variational Autoencoders: Core Concepts and Training Explained

Variational AutoEncoder (VAE)

Two major generative models dominate current research: the Variational AutoEncoder (VAE) and the Generative Adversarial Network (GAN). Unlike GANs, which rely on adversarial training, VAE employs mathematically elegant variational inference to optimise a lower bound of the data likelihood, enabling stable model optimisation.

Key Questions

What is the basic idea of a VAE?

How is variational training performed?

Analysis and Answer

A VAE assumes that each observation x is generated from a latent variable z. The encoder network approximates the posterior distribution q_\phi(z|x), while the decoder network defines the likelihood p_\theta(x|z). Training maximises the evidence lower bound (ELBO):

Figure 1: Generation process
Figure 1: Generation process

The ELBO can be written as

Equation 2: ELBO formulation
Equation 2: ELBO formulation

and after applying Bayes’ rule and the KL‑divergence term, we obtain

Equation 3: Final ELBO expression
Equation 3: Final ELBO expression

The optimisation proceeds by sampling z from the approximate posterior, computing the reconstruction loss \mathbb{E}_{q(z|x)}[\log p(x|z)], and adding the KL‑divergence regulariser KL(q(z|x)\|p(z)). Gradients flow through the re‑parameterisation trick, allowing end‑to‑end training with stochastic gradient descent.

Figure 2: VAE model architecture
Figure 2: VAE model architecture
Figure 3: Parameterised VAE
Figure 3: Parameterised VAE
Figure 4: VAE sampling process
Figure 4: VAE sampling process

Reference

Kingma, D. P., & Welling, M. (2013). Auto‑encoding variational Bayes. *arXiv preprint arXiv:1312.6114*.

Next Issue Preview

The upcoming article will cover Generative Adversarial Networks (GANs), exploring their objective functions and creative applications.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

machine learningdeep learninggenerative modelsVAEvariational autoencoder
Hulu Beijing
Written by

Hulu Beijing

Follow Hulu's official WeChat account for the latest company updates and recruitment information.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.