Autoencoder
A network trained to copy its input through a bottleneck — which forces it to learn what matters, and is the ancestor of most representation learning.
When not to use it
- For dimensionality reduction, by default. PCA is faster, deterministic, interpretable, and often equivalent. Use an autoencoder when the structure is genuinely non-linear.
- For generation. A plain autoencoder's latent space has holes. Sampling from it decodes to garbage. That's what VAEs are for.
- On dirty data, for anomaly detection. If anomalies are in the training set, the model learns to reconstruct them and they become invisible.
- When you don't have much data. You're learning a compression scheme; that needs examples.
Reach for something else instead
- PCA — for linear structure, which is more often enough than people expect.
- VAE — when you need the latent space to be generative.
- Pretrained embeddings — usually better than an autoencoder you trained yourself.
- UMAP — for visualisation specifically.
Sources & further reading
- Baldi & Hornik (1989), Neural Networks and Principal Component Analysis — the linear autoencoder learns PCA; the result that bounds what autoencoders add.
- Hinton & Salakhutdinov (2006), Reducing the Dimensionality of Data with Neural Networks — deep autoencoders beating PCA; part of what revived the field.
- Vincent et al. (2008), Extracting and Composing Robust Features with Denoising Autoencoders — denoising as the better objective, and the ancestor of diffusion.
Primary sources, listed so you can check the claims on this page rather than take them on trust.
Where people go wrong
- Making the bottleneck too wide, so the network learns to copy and compresses nothing.
- Expecting to sample from the latent space. Plain autoencoders aren't generative.
- Using one where PCA would do. A linear autoencoder is PCA — you've added complexity for nothing.
- Training an anomaly detector on data containing anomalies, which teaches the model they're normal.