Skip to content
AI360Xpert
Core ML
Visual explainer

Autoencoders

Learn how autoencoders compress data into a latent representation to find its true underlying structure.

Real-world data has thousands of dimensions, but the true variations are usually just a handful.
Real-world data has thousands of dimensions, but the true variations are usually just a handful.

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

By passing data through a narrow bottleneck, we force the network to discard noise and keep only the essentials.
By passing data through a narrow bottleneck, we force the network to discard noise and keep only the essentials.

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 encoder compresses the input into a latent code, and the decoder reconstructs it.
The encoder compresses the input into a latent code, and the decoder reconstructs it.

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

By comparing the reconstructed output with the original input, the model trains itself without manual labels.
By comparing the reconstructed output with the original input, the model trains itself without manual labels.

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

The space between codes is completely unconstrained, so sampling random points yields meaningless garbage.
The space between codes is completely unconstrained, so sampling random points yields meaningless garbage.

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.

What to Read Next