An autoencoder is a neural network trained to reproduce its input rather than predict a separate target. An encoder compresses each input into a smaller representation; a decoder uses that representation to reconstruct the original. For a table, an input is one row, with neurons corresponding to columns. For an image, the input can be its pixels. section 16.2.1
The narrowest layer is the embedding, bottleneck, or latent representation. Its values form a compact vector for each item. Reconstruction error measures how far the output is from the input; larger errors can indicate outliers. A two-dimensional latent space can make unusual points visible without making its axes readily interpretable. section 16.2.1 section 16.3.1
Figure 16.2 Example of an AE. The neural network learns to condense any input to as many elements as appear in the middle layer and then reconstruct the data to its original values.
The narrowing and widening layers show where compression happens and how the decoder attempts to recover the input. section 16.2.1
Tabular detection with PyOD
A KDD Cup example ordinal-encodes the table, then fits PyOD’s AutoEncoder and obtains outlier probabilities with predict_proba(X)[:, 1]. The listing sets epochs=5 and a random seed. Treat the resulting scores as detector output to assess, not proof that every flagged row is meaningful. section 16.2.1 section 16.2.2
Image reconstruction
An alibi-detect OutlierAE example reconstructs CIFAR10 images. A boat image is reconstructed closely; after random noise is added, its reconstruction error is high and it is flagged. Comparing the input and reconstruction helps inspect what drove the flag. section 16.4
Autoencoders are one reconstructive approach alongside variational autoencoders and other deep-learning detectors. They can add diversity to an ensemble, but tabular results are not generally stronger than established methods and training can be slower and harder to tune. A variational autoencoder also commonly uses reconstruction error for detection, but has a probabilistic latent representation and a generative objective. Another extension, AEGMM, jointly trains an autoencoder and Gaussian mixture model to assess both reconstruction and the learned representation. section 16.0 section 16.2.2 section 16.4











