ElemedexA pocket encyclopedia of AI architectures

Glossary (TM) › Architectural parts

TM075

Autoencoder

Also: auto-encoder, AE

In Spanish: Autocodificador

A network trained to reproduce its own input through a bottleneck: an encoder compresses, a decoder reconstructs, and what is learned lives in the intermediate code.

An autoencoder has two halves. The encoder maps the input x to a lower-dimensional code z; the decoder tries to rebuild x from z. The loss measures how far the reconstruction is from the original, for instance ‖x − d(e(x))‖². The model is thus trained to predict its own input, but forced to pass through the narrow representation of its hidden units (Witten et al., 2017, p. 445). No labels are needed: it is self-supervised learning in its purest form.

What it learns. Without nonlinearities, an autoencoder finds the same subspace as principal component analysis (PCA). With several nonlinear layers it can compress better than PCA with the same number of dimensions and arrange the data into more natural groupings, as Hinton and Salakhutdinov (2006) showed (Witten et al., 2017, pp. 446–447). Around that time it was used to pretrain deep networks layer by layer, because optimizing them directly proved difficult (2017, p. 448).

Variants. The denoising autoencoder receives a corrupted input (for instance, with some values set to zero) and must restore the original (Vincent et al., 2008). It is a direct ancestor of masked language modeling: BERT defines itself by contrast with it, since it predicts only the masked words rather than the whole input (Devlin et al., 2019, p. 4174). The VAE encodes distributions instead of points, and latent diffusion models work in the latent space of an autoencoder (Rombach et al., 2022). Chollet (2021) warns that the classical autoencoder, by contrast, does not yield particularly useful or well-structured latent spaces (2021, sec. 12.4).

A philosophical angle. Buckner (2024) uses the generative half of these networks to answer a challenge Fodor posed to Hume: how does an empiricist mind produce particular ideas from general representations? The decoder can reconstruct an exemplar it has seen, or average the codes of a category and render a "typical" member (2024, pp. 210–211). Whether reconstructing is the same as imagining is, of course, the open question.

Sources

  • Buckner, C. J. (2024). From deep learning to rational machines: What the history of philosophy can teach us about the future of artificial intelligence. Oxford University Press. https://doi.org/10.1093/oso/9780197653302.001.0001 §
  • Chollet, F. (2021). Deep learning with Python (2nd ed.). Manning Publications. §
  • Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019). BERT: Pre-training of deep bidirectional transformers for language understanding. In J. Burstein, C. Doran, & T. Solorio (Eds.), Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers) (pp. 4171–4186). Association for Computational Linguistics. https://doi.org/10.18653/v1/N19-1423 §
  • Kingma, D. P., & Welling, M. (2014). Auto-encoding variational Bayes. In 2nd International Conference on Learning Representations (ICLR 2014). https://doi.org/10.48550/arXiv.1312.6114 §
  • Rombach, R., Blattmann, A., Lorenz, D., Esser, P., & Ommer, B. (2022). High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (pp. 10674–10685). IEEE. https://doi.org/10.1109/CVPR52688.2022.01042 §
  • Vincent, P., Larochelle, H., Bengio, Y., & Manzagol, P.-A. (2008). Extracting and composing robust features with denoising autoencoders. In Proceedings of the 25th International Conference on Machine Learning (pp. 1096–1103). Association for Computing Machinery. https://doi.org/10.1145/1390156.1390294 §
  • Witten, I. H., Frank, E., Hall, M. A., & Pal, C. J. (2017). Data mining: Practical machine learning tools and techniques (4th ed.). Morgan Kaufmann. https://doi.org/10.1016/C2015-0-02071-8 §