Sparse Coding
Sparse coding minimizes the objective
Lsc=||WH−X||22
reconstruction term+λ||H||1sparsity term
where W is a matrix of bases, H is a matrix of codes and X is a matrix of the data we wish to represent. λ implements a trade of between sparsity and reconstruction. Note that if we are given H, estimation of Wis easy via least squares.
Autoencoders
Autoencoders are a family of unsupervised neural networks. There are quite a lot of them, e.g. deep autoencoders or those having different regularisation tricks attached--e.g. denoising, contractive, sparse. There even exist probabilistic ones, such as generative stochastic networks or the variational autoencoder. Their most abstract form is
D(d(e(x;θr);θd),x)
but we will go along with a much simpler one for now:
Lae=||Wσ(WTX)−X||2
where
σ is a nonlinear function such as the logistic sigmoid
σ(x)=11+exp(−x)
Difference:
1 When you only have little labled data and a lot of unlabeled data, it's better to use the autoencoders.
You can first train a deep autoencoder network using all the training data including labeled and unlabeled.
And then fine-tune the network using only the labeled data. But if you use the sparse coding, you should
use another method such as SVM for the classificaiton.
2 The sparse coding is to learn the over-complete set of basis vectors for representations. However, the
autoencoder usually to learn the under-complete basis vectors for representations.
3 The sparse requirment is not neccessary for the autoencoders but neccessary for the sparse coding.
Comments
Post a Comment