Autoencoder
An autoencoder learns an encoder and decoder that reconstruct an input through a bottleneck representation. It is both an architecture pattern and a representation-learning objective.
The basic form is:
where is the encoder, is the decoder, is the latent representation, and is a reconstruction loss.
For continuous inputs, a common reconstruction loss is:
For categorical tokens, reconstruction is often a negative log-likelihood:
where can be all positions or only masked or corrupted positions.
Key Ideas
- The bottleneck forces the model to compress information needed for reconstruction.
- The encoder and decoder can be MLPs, CNNs, Transformers, GNNs, or geometry-aware modules.
- Denoising autoencoders reconstruct clean inputs from corrupted inputs.
- Variational autoencoders add a probabilistic latent variable and a regularization term.
- Masked autoencoding is closely related to self-supervised learning.
Variants
| Variant | Objective | Main use |
|---|---|---|
| bottleneck autoencoder | reconstruct through low-dimensional | compression, representation learning |
| denoising autoencoder | reconstruct from corrupted | robust features, score-like intuition |
| sparse autoencoder | add sparsity penalty on | interpretable or disentangled features |
| masked autoencoder | reconstruct hidden tokens or patches | self-supervised pretraining; see MAE |
| variational autoencoder | reconstruction plus latent regularization | probabilistic latent generation |
For a denoising autoencoder:
The corruption process is part of the learning signal, not a harmless detail.
Representation Boundary
Good reconstruction does not automatically imply a useful representation. A model can reconstruct low-level detail while ignoring the factor needed for a downstream task.
| Claim | Need to check |
|---|---|
| compression works | reconstruction loss, bitrate or latent size, failure cases |
| representation transfers | frozen probe, fine-tuning protocol, split rule |
| generation works | sample validity, likelihood or downstream utility |
| denoising helps | corruption type, clean target, robustness metric |
Practical Checks
- Check what reconstruction target is used: raw input, masked tokens, coordinates, features, or graph attributes.
- Verify whether good reconstruction implies useful downstream representation for the target task.
- Watch for trivial identity mappings when the bottleneck or corruption is too weak.
- Separate architecture choices from the reconstruction objective.
- State whether is deterministic, stochastic, discrete, continuous, global, or token-wise.
- Check that train/validation preprocessing and masking policies match the reported claim.