VQ-VAE / VQ-GAN

Generative models · generative · 2017 · images · audio

What it is

A discrete codebook bottleneck turns continuous data into tokens that a prior model (often a transformer) can generate.

When to use it

Tokenizing images and audio for autoregressive generation; the latent space inside every latent diffusion model.

Caveats

The codebook can collapse, with only a fraction of codes ever used, and the commitment loss needs tuning. Quantization throws away fine detail, and generating new samples requires training a separate prior over the codes.

Key ideas

  • Encoder outputs are snapped to the nearest entry in a learned codebook
  • Images or audio become sequences of discrete tokens
  • VQ-GAN adds adversarial and perceptual losses for sharper reconstructions
  • The token sequences feed a transformer or diffusion prior

Related architectures

Original paper

Neural Discrete Representation Learning (2017, arXiv)

Browse all 198 architectures

The architecture landscape, in one place.

Two things get called “ML architecture”: the classical statistical model families, and the neural network wirings. Both are here, tagged by what they are and what data they eat.

Start from your problem

Architectures

0 shortlisted