liveBook · Manning

Autoencoder

As explained in Introduction to Generative AI, Second Edition

An autoencoder is a neural network that learns to encode data into a compressed representation and reconstruct the original data from it.

An autoencoder is a neural network that compresses an image into a smaller representation, then reconstructs the image from that representation. The compressed form, called a latent representation, captures patterns such as facial expressions, face angles, and skin tones. section 4.2

Its basic operation has two linked stages:

  • An encoder extracts a compressed set of patterns from the original image. section 4.2
  • A decoder uses those patterns to reconstruct an image resembling the original. section 4.2
  • Using one encoder with separate decoders can map characteristics from one face onto another. section 4.2

Face-swapping

In a deepfake workflow, the same encoder extracts latent features from two faces. A decoder trained for Face B then reconstructs Face A’s features with characteristics such as Face B’s eyes, nose, mouth, and lighting. section 4.2

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

The diagram shows how one encoder produces shared latent features while two decoders reconstruct the faces. section 4.2

How Introduction to Generative AI, Second Edition covers it

How deep it goes
Defines encoding, latent representations, and reconstruction, then sketches face-swapping; it stops short of implementation details.
Examples
Uses facial expressions, face angles, skin tones, and a single-encoder, two-decoder face swap.
What you can do after
Evaluate/understand how compression and reconstruction support face-swapping and why synthetic-media trust is difficult.
How it connects
Connects neural networks, encoder-decoder architectures, latent representations, deepfake technology, GANs, diffusion models, and synthetic media.

Also explained in

Compare how 12 books explain autoencoder →

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.