Original article can be found here (source): Deep Learning on Medium
These days I’ve made research on autoencoders explanation and almost all of those articles are not trying to explain why we should use autoencoders, what they used for and all those articles were about only describing what autoencoders are. In my opinion, this is not a good kickstart for those who read about autoencoders the first time. Because, when you look at the description of autoencoders you get confused what for they are useful. In this series of articles, I will start by answering the question of why we need autoencoders and then only after I will introduce what autoencoders are.
The content of the article:
1.Why we should use autoencoders and what are the benefits of autoencoders?
2. What are the autoencoders?
1. Why we should use autoencoders and what are the benefits of autoencoders?
When you look up to other descriptions and explanations of what autoencoders are, soon you start getting confused about why autoencoders are so useful and why they try to reproduce from the input data to output with minimum loss. I think that I should start explaining autoencoders with why they are so useful to keep things clear enough. There are several main use cases of autoencoders. Such as:
1.1 Data compression
Autoencoders can be used widely in data compression and transmission of compressed data. To give some basic idea where data compression with autoencoders can be used, here I will give some spoiler of how autoencoders work. Autoencoders are a type of neural network that works in a self-supervised fashion. So in autoencoders, there are three main building blocks: encoder, decoder, and coder or latent space. So, as usual, you feed the autoencoder with data you want to use and then encoder encodes or simply extracts useful features of input data and stores it in latent space. And then the decoder does the same but in the opposite order.
As data compression is one of the main advantages of autoencoders, it can be successfully implemented in data transmission problems. Imagine server uploads to internet only Latent Space Representation of the input image, depending on your request:
And then, in the same manner, you download the Latent Space Representation to your mobile device and then you decode your Latent Space Representation to get output result(for example image, video, audio files) even with better resolution/quality than it was in input:
1.2 Denoising data
Quality loss of data (images/audio/video) is one main problem/issue in data transmission. Due to connection status or bandwidth, data such as image and audio can lose in quality, therefore the problem of denoising data arises. Denoising data is one of the cool advantages of autoencoders,
Ideally, we would like to have our autoencoder is sensitive to reconstruct our latent space representation and insensitive enough to generalize the encoding of input data. One of the ways of such a method is to corrupt the input data, adding random noise to input data and then encode that corrupted data.
The output from decoder is then compared with original image as shown above.
2. What are the autoencoders?
Autoencoders — are the type of artificial neural networks. Autoencoder aims to learn representation for input data. Along with the reduction side, reconstruction is learned, where reconstruction side — decoder tries to reconstruct the input data from previously learned representation — Latent Space Representation with minimum loss. Usually, autoencoders consist of three-part: encoder — the part that includes input layer and hidden layer, bottleneck — this is where learned/compressed data is stored, and decoder — the part that starts from hidden layer and ends with output layer, as shown below:
As visualized above, we can take an unlabeled dataset and frame it as a supervised learning problem tasked with outputting x̂ , a reconstruction of the original input x. This network can be trained by minimizing the reconstruction error, (x,x̂ ), which measures the differences between our original input and the consequent reconstruction.
In the next part I will write about how autoencoders work and show it’s implementation with Keras.