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

VariantObjectiveMain use
bottleneck autoencoderreconstruct through low-dimensional compression, representation learning
denoising autoencoderreconstruct from corrupted robust features, score-like intuition
sparse autoencoderadd sparsity penalty on interpretable or disentangled features
masked autoencoderreconstruct hidden tokens or patchesself-supervised pretraining; see MAE
variational autoencoderreconstruction plus latent regularizationprobabilistic 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.

ClaimNeed to check
compression worksreconstruction loss, bitrate or latent size, failure cases
representation transfersfrozen probe, fine-tuning protocol, split rule
generation workssample validity, likelihood or downstream utility
denoising helpscorruption 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.