Autoencoders
Learn how autoencoders compress data into a latent representation to find its true underlying structure.
Raw data like images or audio contains thousands of dimensions. However, most of those dimensions are redundant. The true structure—the core factors that explain the data—often lies on a much lower-dimensional manifold hidden inside the raw pixels.
The Bottleneck
If we squeeze the data through a narrow bottleneck layer, the network cannot simply copy the input to the output. It is forced to learn a highly compressed vocabulary, stripping away the noise to preserve only the most essential structure.
Encoder and Decoder
The architecture consists of two halves. The encoder maps the high-dimensional input down into a dense, narrow latent code. The decoder takes that latent code and attempts to expand it back out into the original high-dimensional shape.
Self-Supervised Loss
Because the goal is simply to reconstruct the input, the network uses the input itself as the target label. It measures the reconstruction loss between the original and the output, allowing it to train entirely self-supervised on unlabeled data.
Where It Breaks
Standard autoencoders only optimize the exact points they encode. They place no constraints on the empty space between those points. If you try to generate new data by sampling a random latent point, the decoder will produce meaningless, blurry garbage.
The Quick Version
- The problem: High-dimensional data is full of redundant noise.
- The bottleneck: Forcing data through a narrow layer strips the noise.
- The mechanism: An encoder compresses to a code; a decoder rebuilds.
- The payoff: Trains on raw data without any human labels.
- The limit: The latent space is unconstrained, so generation fails.