Explainer 5 of 6 · Generative · interactive
Latent space
What does a model need so that every point between two digits makes sense?
Watch
The idea
An autoencoder squeezes an image through a narrow middle, here just two numbers, and learns to rebuild it. The two numbers become coordinates on a map of digits.
A plain autoencoder leaves gaps: points between the training codes decode to nonsense. A variational autoencoder encodes each image as a small cloud, not a point, and is penalised for spreading the clouds out, which fills the map in.
The result is a continuous space: move a point a little and the digit changes a little, which is what lets the decoder generate digits it has never seen.
Try it
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
Or draw a digit
The encoder places your drawing on the map, and the decoder redraws it from those two numbers.