AutoEncoder (AE) and Variational AutoEncoder (VAE)

KEEP IN TOUCH | THE GEN AI SERIES

Rahul S
6 min readFeb 12, 2024

Autoencoder (AE) and Variational Autoencoder (VAE) are end-to-end networks used to compress the input data. They transform the data from a higher to lower-dimensional space.

Autoencoder is used to learn efficient embeddings of unlabeled data for a given network configuration. It comprises two parts — an encoder and a decoder. The encoder compresses the data from a higher-dimensional space to a lower-dimensional space (called the latent space), while the decoder does the opposite i.e., convert the latent space back to higher-dimensional space.

The idea is to ensure that latent space captures most of the information from the dataset space. So we force input to encoder as output to the decoder, with a suitable loss function and backpropagation, come to right weights.

For a little mathematics, one can check the following diagram and equations.

ENCODER

  • Input data x is fed to the encoder function e_theta(x).
  • x is passed through a series of layers (parametrised by the variable theta) which…

--

--