Skip to content
BIASED

β-VAE and VQ-VAE

Block 1 of 8~2 min

Two knobs on the ELBO

The VAE leaves two complaints behind. Its samples are blurry, and its fixed Gaussian prior is only roughly filled by the codes the encoder actually produces, so a prior sample can land where the decoder was never trained. The topic The reparameterization trick also left a hint: a different fixed decoder variance reweights the KL term.

Start again from the ELBO of one image:

L(x)=Eqφ(z∣x)[log⁡pθ(x∣z)]⏟reconstruction−DKL(qφ(z∣x) ∥ p(z))⏟KL to the prior.\mathcal L(x) = \underbrace{\mathbb E_{q_\varphi(z \mid x)}\big[\log p_\theta(x \mid z)\big]}_{\text{reconstruction}} - \underbrace{D_{\mathrm{KL}}\big(q_\varphi(z \mid x)\,\|\,p(z)\big)}_{\text{KL to the prior}} .

The first term wants the code to say as much about xx as possible; the second charges for every nat it says. That leaves two independent knobs:

  • change the balance between the terms — the β-VAE;
  • change what a code is, a continuous Gaussian or one symbol out of KK — the VQ-VAE.

The first moves along a trade-off. The second changes where the difficulty of generation lives. Notation as before: an image xx, a code zz, an encoder qφ(z∣x)q_\varphi(z \mid x), a decoder pθ(x∣z)p_\theta(x \mid z), a prior p(z)p(z).

Answers are saved on the server and tied to this browser until you sign in.