Concepts

Autoencoders

3 min readintermediateUpdated 28 Sept 2026
1 · In one line

An autoencoder learns an encoder that maps an input to a code and a decoder that reconstructs the input from that code.

1 · What it is

An autoencoder learns an encoder that maps an input to a code and a decoder that reconstructs the input from that code. An encoder can map high-dimensional inputs to low-dimensional codes. A decoder maps those codes back toward the input space.

Mean-squared error measures the difference between an output and a target. The loss can be followed in the backward direction. A denoising autoencoder can learn to map corrupted inputs to clean targets.

An autoencoder can learn a lower-dimensional code and a reconstruction function. A denoising criterion can be purely unsupervised. A wide hidden layer can learn the identity function.

2 · Why it exists

An encoder compresses an input and a decoder reconstructs it.

Compact codesAn encoder can map high-dimensional inputs to low-dimensional codes.
Learned decodingA decoder maps those codes back toward the input space.
Noisy inputsA denoising autoencoder can learn to map corrupted inputs to clean targets.
3 · How it works

Follow one input through a bottleneck and reconstruction.

The input is encoded to a compressed representation and then decoded.
  1. 1 · encodeMap the input to a hidden code.
  2. 2 · constrainPass information through a code with fewer dimensions than the input.
  3. 3 · decodeMap the code back into the input space.
  4. 4 · compareMeasure reconstruction error between the output and target.
  5. 5 · learnFollow the loss in the backward direction.

A denoising autoencoder maps a noisy image to a clean image.

4 · Where it's used
WhoWhat they askWhat it works with
Data analyst“Can these records be represented with fewer values?”High-dimensional feature vectors
Imaging team“Can noise be removed from this image?”Paired noisy and clean images
Operations team“Which samples reconstruct unusually poorly?”Reconstruction errors for observed samples
5 · What it solves, and what it doesn't
solves
  • An autoencoder can learn a lower-dimensional code and a reconstruction function.
  • A denoising autoencoder can reconstruct clean data from corrupted input.
  • A denoising criterion can be purely unsupervised.
  • A linear one-hidden-layer autoencoder with squared error learns weights spanning the principal-component subspace.
doesn't solve
  • A wide hidden layer can learn the identity function.
  • Even a one-node bottleneck can overfit.
  • Reconstruction alone is not sufficient for learning useful representations.
6 · Go deeper

Sources used

This explainer is written in original language. The links below support its factual claims.

  1. paperAutoencoders, Bank, Koenigstein and Giryes · read 28 Sept 2026
  2. paperFrom Principal Subspaces to Principal Components with Linear Autoencoders, Elad Plaut · read 28 Sept 2026
  3. docsConvolutional autoencoder for image denoising, Keras · read 28 Sept 2026
  4. docsNeural Networks, PyTorch · read 28 Sept 2026
  5. paperStacked Denoising Autoencoders, Vincent et al., JMLR · read 28 Sept 2026