What are Autoencoders?
An autoencoder is a type of artificial neural network used to learn efficient data codings in an unsupervised manner. Autoencoders are trained to reconstruct the input data from a compressed representation. The aim is to learn a representation (encoding) for a set of data, typically for the purpose of dimensionality reduction. Essentially, an autoencoder is composed of an encoder and a decoder, where the encoder maps the input data to a lower dimensional representation and the decoder reconstructs the data back from the lower dimensional representation.
In fact, Autoencoders are deep models capable of learning dense representations of the input. These representations are called latent representations or codings. An Autoencoder has two distinct components:
- An encoder: This part of the model takes in parameters the input data and compresses it. E(x) = c where x is the input data, c the latent representation and E our encoding function.
- A decoder: This part takes in parameters the latent representation and tries to reconstruct the original input. D(c) = x’ where x’ is the output of the decoder and D our decoding function.
Types of Autoencoders:
1. Vanilla Autoencoders: The most basic type of autoencoders are vanilla autoencoders. Vanilla autoencoders are composed of an input layer, an output layer and one hidden layer in between. The hidden layer has fewer nodes than the input layer, which forces the autoencoders to compress the input data.
2. Sparse Autoencoders: Sparse autoencoders are similar to vanilla autoencoders, but they include an additional regularization term that encourages the model to use only a small subset of the input nodes. This results in a more compact representation of the input data.
3. Denoising Autoencoders: Denoising autoencoders are similar to vanilla autoencoders, but they are trained using corrupted input data. This forces the autoencoders to learn the structure of the input data and disregard the corruptions.
4. Contractive Autoencoders: Contractive autoencoders are similar to sparse autoencoders, but they include an additional regularization term that encourages the model to learn a sparse, but also robust representation of the input data.
5. Convolutional Autoencoders: Autoencoders that use convolutional neural networks (CNNs) to reduce the input dimensionality.
6. Variational Autoencoders: Autoencoders that encode input data as a set of latent variables that are randomly sampled from a specific distribution.
7. Generative Adversarial Autoencoders: Autoencoders that are trained in an adversarial manner to generate new data.
Denoising Autoencoders:
A different type of autoencoder known as denoising autoencoder where we will get a set of hidden units which extract interesting structure from our training set. In main words, A Denoising Autoencoder (DAE) is a type of autoencoder, which is a type of neural network used for unsupervised learning. The DAE is used to remove noise from data, making it better for analysis. The DAE works by taking a noisy input signal and encoding it into a smaller representation, removing the noise. This encoded representation is then decoded back into the original signal, resulting in a clean signal devoid of noise. The DAE is trained using a supervised learning algorithm and can be used for a variety of tasks, such as image and speech denoising, anomaly detection, and data compression.
Let’s derive it from an example:
Topic: Denoising Autoencoder
Idea: Representation should be robust to introduction of noise.
- Random assignment of subset of inputs to 0 with probability v
- Gaussian additive noise
Reconstruction X computed from the corrupted input X
Loss function compares X reconstruction with the noiseless input X
The idea here is that a representation extracted by the encoder that is robust to the introduction of noise into the input and so the idea will be that instead of feeding to the encoder the original input X will actually feed a noisy version of it which is called ‘X’ here is going to be the result of taking X and then passing it through a nice process or some probabilistic process which will take X and then generate this X in some way based on X.
One popular way for this noise problem and one popular choice of this lowest process is to just randomly assign certain elements of the inputs to 0 where we will choose to assign an input to a value of 0 with some probability with some hyperparameter for tuning.
So, let’s say in a example, the probability was ½ then we would iterate over the inputs and then say for this input we flip a coin and the coin says ‘we should add some noise’ or in this case instead of copying ‘X’ we would actually not copy and set the value of that unit in X till to 0. Here If we flip and get a different outcome which says copy so we copy it and again for all the input elements we do this sort of randomly.
If we did that another time for the same input X we get a different pattern of zeros and that’s actually crucial, Now what we have done is that we are feeding to the intone coder of a noisy variant where some of the elements and for this noise process has been essentially erased in a sense we could choose other type of noise, we could add gaussian additive noise by adding say ‘gaussian noise’ with a mean zero in a particular variance which would be a hyperparameter we would have to tune and then try in the dueling denoising auto-encoder. So, from X till we get a encoder value H of X still and then we get a reconstruction X hat and now X hat we don’t compare it to ‘X tilde’, we actually compare it to the original input.
Technical Specifics of Denoising Autoencoders:
The idea of denoising is based on the intentional addition of noise to the input data before the presentation of data. The major technical specifics for this approach include several aspects as follows:
- The denoising autoencoders build corrupted copies of the input images by adding random noise.
- Next, denoising autoencoders attempt to remove the noise from the noisy input and reconstruct the output that is like the original input. A comparison is made between the original image, and the model prediction using a loss function and the goal is to minimize that loss.
- The loss function in denoising autoencoder is :
- Denoising helps the autoencoder learn the latent representation in data and makes a robust representation of useful data possible hence supporting the recovery of the clean original input.
- A final note is about the random corruption/noise addition process in denoising autoencoders considering denoising as a stochastic autoencoder in this case.
Conclusion:
Denoising autoencoders are important for neural networks because they help improve the generalization of the model. By removing noise from inputs, the model is able to better focus on the relevant features and learn from them more efficiently. This helps reduce the risk of overfitting, which can lead to poor performance when applied to new data. Additionally, denoising autoencoders can also be used to improve the robustness of a neural network by making it more tolerant to input noise and other forms of perturbations.
Reference Links: