AI Glossary

Autoencoder

An autoencoder is a neural network trained to encode an input into an internal code and reconstruct the input from that code. A smaller bottleneck is one design; other autoencoders use constraints or regularization to learn useful representations.

· Updated · Chain of Thought

An encoder maps an input to a code, and a decoder maps that code back to a reconstruction. Training penalizes differences between the reconstruction and its target. The internal representation belongs to a latent space; its coordinates do not automatically have human-readable meanings.

For example, a basic autoencoder can turn a 28-by-28 grayscale digit image into 32 numbers, then reconstruct 784 pixel values. A denoising version instead receives a corrupted image and learns to reconstruct a clean target. Neither setup requires a digit-category label for every image.

A bottleneck or suitable constraint matters because simply copying the input can be an easy but unhelpful solution. Reconstruction error can help flag unusual inputs, but a high error is not proof of a defect, and a low error is not proof of normality. Check it against the actual task. An autoencoder’s reconstruction objective also differs from an embedding model trained specifically to rank relevant search results.

Learn by reconstructing an inputAn encoder maps 784 grayscale pixel values to a 32-value code. A decoder reconstructs 784 pixel values. Reconstruction loss compares the result with the original input; training updates the encoder and decoder. The code does not require digit-category labels. Learn by reconstructing an inputA basic bottleneck autoencoder; dimensions are illustrative Input784 pixelsEncoderMap inputCode32 valuesDecoderMap codeOutput784 pixelsOriginal inputReconstruction targetReconstruction lossCompare input with outputA denoising version uses a corrupted input and a clean target.A useful code needs a bottleneck or suitable training constraints.
A basic reconstruction path from the Deep Learning autoencoder chapter. This example uses a small code; not all autoencoders reduce dimensionality. Download the image

Sources

Go deeper