Pages and contents
Pages
On this page
Sparse Autoencoders
Adapted from Sparse autoencoder lecture notes (Andrew Ng)
Problem
Supervised labelling of data is difficult to scale and generalize. Autoencoders allow us to implement unsupervised learning. The sparse autoencoder enforces a constraint that most of the neurons in a layer are inactive.
Autoencoders
Autoencoders try to learn the identity function . By placing constraints on the network, you can extract interesting information about the data by trying to “learn” the identity map. For example if you have 100 pixel inputs but only 50 hidden units, the network must learn an optimal compressed form of the data. This algorithm often produces similar outputs to principal component analysis (PCA), but with the power to learn non-linearities.
Sparsity
The sparsity constraint enforced by SAEs is defined by the average activation of a hidden unit , averaged over the training set.
We want to enforce where is the sparsity parameter, a value close to zero such as . This means that most hidden activation units will be zero most of the time, enforcing the autoencoder to learn sparse representations of data, increasing the number of distinct concepts that it can learn per hidden size. SAEs also penalize from deviating too much from . The penalty term choice is somewhat arbitrary, but an example is
where is the number of neurons in the hidden layer. This penalty term is based on KL divergence (a measurement of how different two distributions are) and can be written as .
Shortcomings
The SAE is not by itself competitive with the leading supervised feature extraction architectures.