# Intuitive Explanation of “AutoEncoders”

To my knowledge, Autoencoders are an unsupervised learning technique in which we leverage neural networks for the task of representation learning.

I know there is a lot of topics around autoencoders, I can find the code and run but I'm unable to understand the math and concept of Autoencoders.

I'm looking for intuition in words but also some simple insight into mathematical calculations (I don't know if the latter is possible). Can anybody shed some light on the "AutoEncoders"?

Basically, you reduce the input (dimension) by reducing the neurons per layer. This is the encoder part. Afterwards, based on that very low dimensional representation, the entire data is broken down to only important features. This is what you finally wanna' have: A meaningful, low dimensional data representation. To train and validate this encoder function, you decode this data by mostly using the same topology in a reversed manner. Now there are two options:

1. Either you use the encoder + decoder: So you wanna' be able to restore all your data again only based on these few features. This would be something like a nonlinear PCA.
2. Or you detach the encoder part and use it for new data.

A good example, e.g., is the use for mobile communication which breaks down/encodes the data so that only a significant part of your speech remains, then this data is transfered and at the receiver side it is decoded. Despite from that concept the handling and so on is quite the same like for every neural network (train, validate, minimize error function and so on..). Image source

Autoencoders are for finding a (typically) lower dimensional representation of your data. In other words, it tries to compress/encode your data, which the name comes from.

There are mainly two components: encoder and decoder. Encoder's responsibility is to compress your data (maps it onto another vector space), and Decoder's responsibility is get back the original point, given the encoded version.

Both encoder and decoder are neural networks. The aim is to minimize the reconstruction error, i.e. an input $$\mathbf x$$ is given to the encoder which outputs $$\mathbf y$$, and then $$\mathbf y$$ is given to the decoder which outputs $$\mathbf x'$$, an estimate of the original data point, $$\mathbf x$$. The error to be minimized is the reconstruction error $$||\mathbf x-\mathbf x'||^2$$.

So, just like any other neural network, there is an input/output relationship, target variable, and a cost function. The rest is back-propagation.

Note that this is the common type of an autoencoder, and there are variations and additions in the literature.