Variational autoencoders

Draft

Draft

This page is a skeleton for review: a short opening, planned headings, diagrams and references. The article is not written yet. It is listed here so the chapter can be checked as a whole. (Quarto’s draft: true would hide the page from the preview, so we mark the draft in this callout instead.)

Encode, a distribution, decode

A plain autoencoder compresses an input and then reconstructs it. A variational autoencoder (VAE) does something extra: it learns a distribution in the middle, usually a simple one such as a Gaussian, so you can draw a new point from that space and decode it into a new sample. This page will tell that idea in plain language, and sit it next to Generative adversarial networks and Diffusion models in this chapter.

The idea

  • An encoder does not output one code; it outputs the parameters of a distribution (a mean and a spread).
  • A decoder turns a draw from that distribution back into data.
  • The training loss has two jobs: reconstruct the input, and keep the learned distribution close to a chosen prior. That second term is a Kullback–Leibler (KL) divergence — the same kind of “how different are these two distributions?” already used on What is distillation?, in another setting.

Why people used VAEs

  • You get a generator and a structured latent space you can walk through.
  • Training is usually more stable than the GAN game, at the cost of samples that often look blurrier than a good GAN (and, later, than a diffusion model).
  • Planned: one short comparison table (VAE / GAN / diffusion) once those three pages exist, not a long bake-off here.

What this page will not do

  • It will not derive every \(\beta\)-VAE variant, or turn into a variational-inference textbook. The teaching point is the probabilistic bottleneck and the two-term loss.

Planned diagrams

  • Light and dark: encoder \(\to\) a small Gaussian “cloud” \(\to\) decoder, with a reconstruction arrow and a KL arrow to the prior.
  • Optional: a short walk in latent space (two decoded points and a point in between).

Planned references

See also

Back to top