Skip to content
StackDecode
AI & ML Atlas
Deep LearningarchitectureAnimated walkthrough

Autoencoders

A network that learns to squeeze data into a code and rebuild it.

The idea

An encoder compresses the input into a small latent code and a decoder tries to reconstruct the input from it. Because the code is smaller than the input, the network is forced to keep only the most important structure. It learns without labels.

loss = ‖x − decoder(encoder(x))‖²

Watch it run

The pipeline lights up one step at a time. Use the controls to pause or step through it.

  1. 1Encode the input into a low-dimensional code.
  2. 2Decode the code back to the input size.
  3. 3Measure the reconstruction error.
  4. 4Backpropagate and update both parts.

loss = ‖x − decoder(encoder(x))‖²

1/4

Step by step

  1. 1Encode the input into a low-dimensional code.
  2. 2Decode the code back to the input size.
  3. 3Measure the reconstruction error.
  4. 4Backpropagate and update both parts.

Where it is used

Compression, denoising, anomaly detection (high reconstruction error), pre-training.

Watch out for

A powerful decoder can simply copy the input if the code is not constrained.

Related