liveBook · Manning

Latent space

As explained in Introduction to Generative AI, Second Edition

A latent representation is a compressed numerical representation that captures patterns or characteristics of the original data.

A latent representation is a compressed numerical representation of data. For an image, it captures patterns such as facial expressions, face angles, and skin tones rather than preserving the complete original file. section 4.2

In an autoencoder, an encoder converts an image into latent features, and a decoder reconstructs an image from those features. Using one encoder with separate decoders can transfer characteristics between faces, supporting face-swapping and other deepfake applications. section 4.2

Face-swapping

The same encoder extracts latent features from Face A and Face B. A decoder trained for Face B then reconstructs Face A's features as a realistic blend, mapping characteristics such as eyes, nose, mouth, and lighting. section 4.2

Figure 4.2 Deepfake creation using autoencoders with a single encoder and two decoders

Shows how one encoder and two decoders use latent features to create a deepfake face blend. section 4.2

How Introduction to Generative AI, Second Edition covers it

How deep it goes
Defines the representation and describes encoder-decoder behavior, without implementation-level detail.
Examples
Uses facial expressions, face angles, skin tones, and face-swapping as concrete examples.
What it assumes
Builds on the encoder-decoder idea while defining latent representation through image examples.
What you can do after
Understand how compressed image characteristics can support reconstruction and face-swapping.
How it connects
Connects latent representations to autoencoders, encoder-decoder models, deepfakes, GANs, and diffusion models.

Also explained in

Compare how 18 books explain latent space →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Introduction to Generative AI, Second Edition. The section links point to the parts of the book it draws on.