A latent space is a lower-dimensional representation space where data becomes encoded as features that capture essential structure and similarity. In a variational autoencoder, an encoder maps an image into this space, while a decoder reconstructs images from sampled latent states. section 4.1.1
Latent spaces support several generative and multimodal workflows:
- VAEs represent latent states with mean and variance, then sample from a normal distribution to create varied outputs resembling the input data. section 4.1.1
- Diffusion models add noise to latent representations and learn a reverse process that reconstructs data from corrupted states. section 4.1.4
- GANs treat latent space as possible generator input; adversarial training adjusts generator and discriminator parameters toward realistic images. section 4.1.2
- CLIP places text and images in a common representation space, enabling matching and zero-shot image labeling from natural-language classes. section 4.4
Generating a panda image
A diffusion model can begin with a random image, gradually remove noise through its reverse process, and produce an image resembling a panda. section 4.1.4
Figure 4.4 Variational autoencoder architecture
Use the variational autoencoder architecture to trace how an input image moves through the encoder, latent space, and decoder. section 4.1.1

















