Notes on the use of autoencoders

Construction an autoencoder (A) is a unsupervised learning NN technique in which an input X is mapped to itself X->A->X. Importantly there are multiple layers in this NN which contains in the interior a "bottleneck" which has a capacity smaller than the input and output layers. The purpose of the bottleneck is to form a set of latent variables encoding the salient part of the samples while filtering out the noise. Since 1990s, there have been introduced several varients.

More flexible than PCA

Like PCA, autoencoders can be use for dimentionality reduction, but have the added benefit that datapoints are not necessarily compressed into a hyperplane as the encoding is allowed to be non-linear.

Survey and Overview

Variational Autoencoders

KL Divergence

Disentangled Variational Autoencoders

Variations

Howto

A variational autoencoder implementation in keras with a custom training step, also applicable is Custom Training Using the Stragegy Class. Withing a custom loss function, it's sometimes necessary to get the epoch number.

Handling the tradeoff reconstruction error and KL divergence example in Balancing Reconstruction vs KL Loss Variational Autoencoder on Cross Validated stack exchange.