---
title: Autoencoder
description: 'A model trained to encode an input into an internal representation and decode that representation into a reconstruction of the input.'
canonical_url: 'https://darkfactory.dev/glossary/autoencoder'
markdown_url: 'https://darkfactory.dev/glossary/autoencoder.md'
collection: glossary
date_published: '2026-08-03T00:00:00-04:00'
date_modified: '2026-08-26T00:00:00-04:00'
---

# Autoencoder


## Definition

An autoencoder trains two functions together. The encoder maps an input to an internal code, and the decoder uses that code to reconstruct the input. Training minimizes a reconstruction loss between the original and reconstructed examples.

To make the code useful, designers normally constrain or regularize the internal path. If the model has enough capacity and no useful constraint, it can learn an identity function and reconstruct inputs without discovering a reusable representation. A narrow bottleneck limits the code's dimensions. Sparse, denoising, and contractive autoencoders impose different constraints. A variational autoencoder adds a probabilistic latent model and a distribution-matching term, so it is more than a standard autoencoder with random noise.

## Deep autoencoders

Geoffrey Hinton and Ruslan Salakhutdinov's 2006 Science paper is an influential early deep-autoencoder result. They trained a multilayer network with a small central layer to reconstruct high-dimensional inputs and used the learned code for dimensionality reduction. The paper documents an important use of the term rather than a clean claim that its authors coined it.

## Distinguish it from nearby terms

An encoder can feed a classifier, retrieval system, or another decoder without reconstructing its input. Reconstruction is what makes the pair an autoencoder. Principal component analysis also produces lower-dimensional reconstructions, but it is linear; an autoencoder can learn nonlinear mappings.

## Check your understanding

An autoencoder reconstructs its training examples almost perfectly, but its code has the same size as the input and no regularization. What evidence would show that it learned a useful representation instead of copying the input?

## Related terms

- [Encoder](https://darkfactory.dev/glossary/encoder)
- [Decoder](https://darkfactory.dev/glossary/decoder)
- [Latent space](https://darkfactory.dev/glossary/latent-space)
- [Variational autoencoder (VAE)](https://darkfactory.dev/glossary/variational-autoencoder)

## Evidence and further reading

- [Google Machine Learning Glossary](https://developers.google.com/machine-learning/glossary/)
- [Deep Learning](https://www.deeplearningbook.org/)
- [Reducing the Dimensionality of Data with Neural Networks](https://doi.org/10.1126/science.1127647)
