# Stacked Denoising Autoencoders: Learning Useful Representations in a Deep Network with a Local Denoising Criterion

Stacked denoising autoencoders learn useful features by corrupting their inputs

Pascal Vincent, Hugo Larochelle, Isabelle Lajoie, Yoshua Bengio, Pierre-Antoine Manzagol · Journal of Machine Learning Research

- **Problem** Stacked ordinary autoencoders still trail deep belief networks. Plain reconstruction lets a hidden layer simply copy its input, learning no structure.
- **Method** Stacked denoising autoencoders corrupt each input and train each layer to reconstruct the clean version. Unlike plain autoencoders, the loss compares the output with the clean input.
- **Results** On bg-rand, the emphasized variant with salt-and-pepper noise scored 8.52 test error, against 11.28 for ordinary stacked autoencoders.

## Why stacked autoencoders trail DBNs

Layer-wise unsupervised pretraining gives deep networks a better starting point than random initialization, and deep belief networks were the first clear case. Stacking ordinary autoencoders gets close to that result, yielding almost as good classification performance as stacking RBMs. The authors asked why it is only almost as good, and set out to bridge that gap.

They first asked what makes a hidden representation useful, instead of tuning the stacking recipe directly.

Their starting point is the infomax idea that a good representation keeps high mutual information with the input. Mutual information is decomposed as I(X;Y) = IH(X) − IH(X\|Y), so the authors maximize the bound on −IH(X\|Y) with a parametric decoder. Reconstruction alone can be satisfied by the trivial solution of simply copying the input. That copy solution keeps the mutual information high without learning any structure in the data.

The usual fixes constrain the representation, with a bottleneck or with sparsity. The authors chose a different route: they keep the reconstruction objective but change what the encoder sees. This sets up the denoising criterion they introduce next, which the section does not yet test.

## Corrupting the input instead of constraining the code

The reconstruction criterion alone can lead to the trivial solution of simply copying the input. The usual fix is to constrain the representation, as bottleneck and sparse autoencoders do. The authors take a different route: they keep the reconstruction target but corrupt the input before encoding it.

Denoising is a training criterion here, not the goal in itself. The usefulness of the learned representation is judged by the accuracy of a classifier that takes it as input. In the denoising autoencoder, the corrupted input x̃ is drawn from a stochastic mapping qD(x̃\|x) and encoded as y = s(W x̃ + b). The decoder then produces z, and the parameters are trained so that z is close to the uncorrupted input x.

Because z is a deterministic function of the corrupted input rather than of x, the model cannot simply learn the identity.

The authors read the denoising step through the manifold assumption: natural high-dimensional data concentrate near a low-dimensional manifold. Corrupted examples lie farther from that manifold than clean examples do. The learned stochastic operator p(X\|X̃) therefore maps low-probability corrupted points back toward nearby high-probability points.

Points farther from the manifold call for bigger steps, so successful denoising maps even distant points to a small region near the manifold. If the hidden dimension is smaller than the input dimension, the hidden code Y = f(X) can act as a coordinate system on the manifold.

## How one denoising autoencoder computes and learns

A denoising autoencoder starts by corrupting each training example x with a stochastic mapping to a damaged version x̃. The corruption is drawn anew each time the same training example is presented, so the model never sees one fixed damaged copy. The corrupted input x̃ then goes through the encoder, which computes the hidden code y = s(Wx̃ + b), with s the sigmoid.

The decoder maps y back to a reconstruction z = g\_θ′(y), and this z is the quantity the loss is computed on.

The loss compares z with the clean input x, not with the corrupted input x̃, which is the key difference from a basic autoencoder. With an affine plus sigmoid decoder, the loss is the cross-entropy between B(x) and B(z). With an affine decoder, the loss is the squared error between x and z. Parameters start at random values and are updated by stochastic gradient descent to minimize the average reconstruction error over the training set.

The encoder only sees damaged inputs, so it can't settle for the identity map and must learn features that help it denoise.

The paper studies three corruption processes, and each one changes a different part of the input. Additive isotropic Gaussian noise adds noise drawn from N(x, σ²I) to the input. Salt-and-pepper noise sets a fraction ν of the elements to their minimum or maximum value, chosen by a fair coin flip. Masking noise can be read as filling in missing values, so the model learns to fill in the artificially introduced blanks.

Recovering a corrupted element is only possible because dimensions depend on each other, so the authors expect the method to make less sense for very low dimensional problems.

## Weighting corrupted dimensions more heavily

Masking and salt-and-pepper noise erase only a changing subset of the input's components, which invites a different weight on each group. The weight α applies to the reconstruction error on corrupted components, and β applies to the components left untouched. Both α and β are treated as hyperparameters rather than fixed constants. For the squared loss, the error on the indexes J(x̃) of corrupted components is multiplied by α, and the remaining components are multiplied by β.

The emphasis is motivated by the fact that the autoencoder must fill in the erased components, so their error should carry more weight.

The cross-entropy version applies the same split to its per-component terms. The authors call this the emphasized denoising autoencoder. Full emphasis sets α to 1 and β to 0, so the loss only counts the prediction of corrupted elements. Double emphasis sets α to 1 and β to 0.5, so corrupted components weigh twice as much as the untouched ones.

Gaussian noise corrupts every dimension, so emphasis doesn't apply to it.

Emphasis is tuned like the other hyperparameters, with the noise level and layer size chosen on the validation set. On the three data sets, the emphasized SDAE with salt-and-pepper noise was the winning SDAE variant. Table 4 reports these test errors, and the emphasized variant improved rot and bg-rand over the plain SDAE-3SP. Even so, DBN-3 still performs significantly better than the best SDAE variant on bg-rand.

## Stacking denoising autoencoders into a deep network

Stacking denoising autoencoders follows the same pattern as stacking RBMs in deep belief networks or ordinary autoencoders. Each layer is trained on the output of the layer below it, one layer at a time. Input corruption is used only during the initial denoising training of each individual layer, so that the layer learns useful feature extractors.

Once the mapping fθ is learnt, it is applied to uncorrupted inputs from then on.

The paper's Figure 3 shows the full procedure for learning and stacking several denoising layers. The top-level output representation of the stack can feed a stand-alone supervised learner, such as a Support Vector Machine or a multi-class logistic regression. The paper's Figure 4 illustrates this second option.

Stacking denoising autoencoders yielded equivalent or better classification performance than DBNs on all but one of the benchmark problems. In most cases, stacking denoising autoencoders improved performance significantly over stacking ordinary autoencoders. Kernel SVMs also benefit from the representations learnt layer by layer in this unsupervised way.

The authors also looked at the learned feature extractors directly, which showed Gabor-like edge detectors on natural image patches. Ordinary autoencoders did not learn these edge detectors. The method is a simple variation on ordinary autoencoders, and the main open choice is the kind and level of corrupting noise. The authors found that simple, generic noise types with little tuning of the noise level already gave high performance.

## What the learned filters look like

The authors trained both regular and denoising autoencoders on 12 by 12 patches from whitened natural scene images. Training ran for 500000 stochastic gradient descent weight updates at a fixed learning rate of 0.05. A regular under-complete autoencoder with 50 hidden units learned local blob detectors, which the authors call uninteresting.

The over-complete regular autoencoder with 200 hidden units produced filters with no recognizable structure, looking entirely random. Denoising autoencoders at small noise levels look like regular autoencoders, because a noise level of 0 is identical to a regular autoencoder.

That result resembles what sparse coding and ICA learn, and resembles simple cell receptive fields. The L2 weight-decay autoencoder, with the same 200 hidden units, learned nothing interesting beyond some local blob detectors. The authors tried a wide range of weight-decay values, from 0.0001 to 1.0, and never got Gabor-like filters.

The authors also tested salt-and-pepper and masking noise at corruption levels of 10%, 25% and 55%. With 10% salt-and-pepper noise, the filters were oriented Gabor-like edge detectors, slightly less localized than with Gaussian noise. Masking noise yielded a mixture of edge detectors and grating filters, with 55% zero-masking giving oriented gratings.

All three noise types produced some potentially useful edge detectors, and different corruption types and levels gave qualitatively different filters.

## Digit filters across noise levels

The authors trained MNIST denoising autoencoders with tied weights, cross-entropy reconstruction error and zero-masking noise, all from the same random starting point. Their goal was to see how the noise level alone changes the learned filters, so only the corruption level varied between runs. At 0% corruption, most filters looked totally random, and only a few specialized as little ink blob detectors.

Denoising training pushed the filters to differentiate more, because the autoencoder had to recover missing pixels from the remaining ones.

As the corruption rose, a much larger proportion of filters became visibly structured. The authors reasoned that denoising a more corrupted input requires bigger, less local structures.

With further noise, these blobs become slightly bigger stroke detectors. By grow, the authors mean that the larger structure at a higher noise level is related to the smaller one at a lower level. The two structures share about the same position and orientation.

## Benchmark classification results

The benchmark compares stacked denoising autoencoders (SDAE) with stacked regular autoencoders (SAE) and stacked restricted Boltzmann machines (DBN). It has ten problems: the standard MNIST set with 60000 training examples, and eight harder image variants with 10000 training examples each. Three of those eight are artificial 28 × 28 binary image classification tasks.

The tenth problem is a variation of the tzanetakis audio genre data set, with 10000 three-second clips split across 10 genres. All problems except tzanetakis use the standard train, validation and test splits from Larochelle et al. (2007). The validation set chooses the hyperparameter configuration, including the corruption level and the emphasis.

On bg-rand, SDAE-3 with salt-and-pepper noise and emphasis reaches 8.52±0.24 test error. That beats SAE-3 at 11.28±0.28 and the RBF SVM at 14.58±0.31 on the same problem. DBN-3 still scores 6.73±0.22 on bg-rand, so it performs significantly better than the best SDAE variant there. The authors had hoped the emphasized variants would catch up with DBN-3 on bg-rand, and they did not.

Across the benchmark, the authors state that SDAE gives equivalent or better classification than DBN on all but one problem.

On rot, SDAE-3 with masking noise scores 9.53±0.26, against 10.30±0.27 for both SAE-3 and DBN-3. On basic, the SDAE-3 variants score between 2.48±0.14 and 2.84±0.15, compared to 3.11±0.15 for DBN-3. Emphasis with salt-and-pepper noise is the strongest SDAE variant on these three problems, and it helps most on rot and bg-rand. The authors note that a regular SAE gives weaker results than SDAE on most problems, so the denoising criterion is what closes the gap.

## Denoising pretraining versus training on noisy inputs

Training on noisy inputs amounts to training on a virtually expanded data set, and it can be applied to any classifier. Denoising pretraining works differently: SDAE uses the denoising criterion only to learn initial feature extractors at each layer. Those extractors then initialize a noiseless supervised training phase, so the noise never reaches the final fine-tuning.

Noisy inputs can be used for only the pretraining, or for both the pretraining and the fine-tuning, in the SAE case. For SVM training, the authors augmented the training set by generating 9 extra variations of each original example.

The authors compared SDAE with an RBF SVM and with two SAE variants trained on noisy inputs. SAE(1) used noisy inputs for pretraining only, while SAE(2) used them for both pretraining and supervised fine-tuning. All stacked models used hidden layers of 1000 neurons each and zero-masking noise. Denoising pretraining with SDAE, over a large range of noise levels, gave significantly improved performance on three data sets.

Training with noisy inputs sometimes degraded performance, and sometimes improved it only slightly. At 0% noise, the three stacked models correspond to an ordinary SAE.

The next experiment varied the corruption type and added emphasis on the three problems used before. Besides zero-masking noise, the authors trained 3 hidden layer SDAE with salt-and-pepper noise and Gaussian noise. The emphasized variant was tried only for masking and salt-and-pepper noise, since Gaussian noise corrupts every dimension. SVM served only as a simple baseline, because the main focus was comparing noisy SAE with SDAE.

In Table 4, SDAE-3SP with emphasis reached 8.52 on bg-rand, compared to 11.28 for SAE-3 and 14.58 for the RBF SVM. DBN-3 still scored 6.73 on bg-rand, so it stayed better than the best SDAE variant there.

## SDAE features for SVM classifiers

The authors asked whether SDAE features help classifiers other than the neural network, such as SVMs. They fed the representations from the purely unsupervised phase of SDAE, at the first, second and third hidden layer, to a linear SVM and an RBF-kernel SVM. For computational reasons, they didn't retune the SDAE hyperparameters. Instead, they picked the best SDAE-pretrained networks with 1000 units per layer, based on validation performance after fine-tuning.

They then used the saved weights from before fine-tuning, so the features come from unsupervised denoising training only.

SVM performance benefits significantly from the higher-level representation learnt by SDAE. On most problems, SVM performance improves steadily as the representations come from ever higher layers. The authors note that linear SVMs benefiting from a non-linear processed input is not too surprising. Figure 13 shows the test performance of linear and RBF SVMs on two data sets as they train on higher-level representations.

To check that the learnt representation caused the gain, the authors trained SVMs on random-weight networks of the same architecture. In that control, performance degraded as the higher-level representations were used.

## Generated samples from stacked denoising autoencoders

Stacked autoencoders can't be treated as fully specified generative models, because they lack a model of their top-layer distribution. A visible sample starts from the top-layer encoding of a randomly picked training input. Top-down sampling then alternates Bernoulli sampling with deterministic decoding, layer by layer, down to the visible input.

The same procedure also works as an alternative sample-generation method for DBNs built by stacking RBMs.

To see what variations the deep part of the network has learnt, the authors keep one fixed input and draw several top-down samples from its top-layer representation. Figure 15 shows this variability for networks pretrained as SAE, SDAE and DBN on MNIST, all without supervised fine-tuning. The SDAE and DBN networks were pretrained with salt-and-pepper noise.

This comparison is visual and qualitative, and the authors don't measure sample quality with a number.

Neither DBN nor SDAE guarantees that class boundaries stay intact in generated samples. Across all cases, unlike SAE, the regenerated patterns look like samples from the same unknown input distribution as the training set.

## Limitations and open questions

The benchmark covers MNIST, eight image variants and tzanetakis, and corruption level and emphasis were picked per problem on the validation set. DBN-3 still performs significantly better than the best SDAE variant on bg-rand, even after the emphasized variants were tried. The bg-rand problem favors RBMs, because pixel-wise independent noise matches what an RBM expects.

The authors expect denoising to make less sense for very low-dimensional problems, because recovering corrupted components relies on dependencies between dimensions. They didn't test very low-dimensional problems, so that boundary stays unexplored in this work. The emphasis extension was defined for both squared and cross-entropy losses, with alpha and beta as hyperparameters.

The filter results come from one setup, 12 by 12 natural image patches with a linear decoder and a squared reconstruction cost. The filters at small noise levels were not shown, so the transition from regular to Gabor-like detectors is only described. Neither DBN nor SDAE guarantees that class boundaries are kept in generated samples, since a 7 can move closer to a 9 for DBN.

SDAE can also break open the loop of an 8 so that it looks like a 3, which shows the same limit. The generated patterns look like samples from the input distribution, but this comes from unsupervised training only.

## Paper info

- **Authors**: Pascal Vincent, Hugo Larochelle, Isabelle Lajoie, Yoshua Bengio, Pierre-Antoine Manzagol
- **Venue**: Journal of Machine Learning Research · Published
- **Added**: 2026-11-11
- **Original paper terms**: [Check in the original ↗](https://www.jmlr.org/papers/v11/vincent10a.html)
- **What we show**: Paper info and commentary

[Original paper ↗](https://www.jmlr.org/papers/v11/vincent10a.html) · [PDF ↗](https://jmlr.org/papers/volume11/vincent10a/vincent10a.pdf)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Pascal Vincent, Hugo Larochelle, Isabelle Lajoie, Yoshua Bengio, Pierre-Antoine Manzagol (2010). Stacked Denoising Autoencoders: Learning Useful Representations in a Deep Network with a Local Denoising Criterion. Journal of Machine Learning Research. https://www.jmlr.org/papers/v11/vincent10a.html

**BibTeX**

```
@article{vincent2010stacked,
  title = {{Stacked Denoising Autoencoders: Learning Useful Representations in a Deep Network with a Local Denoising Criterion}},
  author = {Pascal Vincent and Hugo Larochelle and Isabelle Lajoie and Yoshua Bengio and Pierre-Antoine Manzagol},
  year = {2010},
  journal = {Journal of Machine Learning Research},
  url = {https://www.jmlr.org/papers/v11/vincent10a.html}
}
```

## Other paper commentary

- [Unsupervised Cross-lingual Representation Learning at Scale](https://refivu.com/en/papers/6b2842f9-6ee4-433e-84ed-ae8dc85bdb0a-unsupervised-cross-lingual-representation-learning-at-scale.md)
- [DeepWalk: Online Learning of Social Representations](https://refivu.com/en/papers/dd05ed66-43b8-4f25-93ca-264ea076a439-deepwalk-online-learning-of-social-representations.md)
- [Representation Learning: A Review and New Perspectives](https://refivu.com/en/papers/b38149f8-9f53-4406-8d25-bb93c21c4bc9-representation-learning-a-review-and-new-perspectives.md)
- [Representation Learning with Contrastive Predictive Coding](https://refivu.com/en/papers/cd05bbc6-eff6-4b02-b9ef-45070ef6704a-representation-learning-with-contrastive-predictive-coding.md)
- [GloVe: Global Vectors for Word Representation](https://refivu.com/en/papers/d4308808-78ba-4fc7-a70c-6e67f906e337-glove-global-vectors-for-word-representation.md)
- [Metamorphic testing of learned AC optimal power flow surrogates reveals representation dependence](https://refivu.com/en/papers/fa665462-dba3-45c9-a6d2-bbeac44186f3-metamorphic-testing-of-learned-ac-optimal-power-flow.md)
- [Retrieval-Augmented Generation for Large Language Models: A Survey](https://refivu.com/en/papers/ac45776a-0a09-4a03-a773-f9aa88c71453-retrieval-augmented-generation-for-large-language-models-a.md)
- [MissForest - nonparametric missing value imputation for mixed-type data](https://refivu.com/en/papers/ab5b3748-ade4-4bb9-b016-975b4f82baee-missforest-nonparametric-missing-value-imputation-for-mixed.md)
- [Wasserstein Generative Adversarial Networks](https://refivu.com/en/papers/9dd731a6-c15d-470e-bde7-26b1e3e185ca-wasserstein-generative-adversarial-networks.md)
- [Deformable DETR: Deformable Transformers for End-to-End Object Detection](https://refivu.com/en/papers/e0311cd6-f252-409d-a37d-7b236622ec8e-deformable-detr-deformable-transformers-for-end-to-end.md)
- [BERTScore: Evaluating Text Generation with BERT](https://refivu.com/en/papers/30f8b3be-d1a1-4c44-9203-702fc98d0cc9-bertscore-evaluating-text-generation-with-bert.md)
- [Swin-Unet: Unet-like Pure Transformer for Medical Image Segmentation](https://refivu.com/en/papers/178a13b8-5d0e-4448-a1cb-759db558ade3-swin-unet-unet-like-pure-transformer-for-medical.md)

## Terms in this paper

- [MNIST](https://refivu.com/en/terms/28b9bb66d1c6-mnist)
- [stochastic gradient descent](https://refivu.com/en/terms/a49650824022-stochastic-gradient-descent)
- [Cross-Entropy loss](https://refivu.com/en/terms/14067bdf8b9f-cross-entropy-loss)
- [weight decay](https://refivu.com/en/terms/893a4733693a-weight-decay)
- [mutual information](https://refivu.com/en/terms/31de24f17a5e-mutual-information)
- [Restricted Boltzmann Machine](https://refivu.com/en/terms/a9b573306664-restricted-boltzmann-machine)
- [denoising autoencoder](https://refivu.com/en/terms/4aafa529dbd9-denoising-autoencoder)
- [SVM](https://refivu.com/en/terms/790227edd68d-svm)
- [Contrastive Divergence](https://refivu.com/en/terms/48bb66ae919b-contrastive-divergence)
- [Deep Belief Networks](https://refivu.com/en/terms/c68573ed59e8-deep-belief-networks)
- [squared error loss](https://refivu.com/en/terms/84e1e32d5ea9-squared-error-loss)
- [stacked denoising autoencoder](https://refivu.com/en/terms/cd05119c247f-stacked-denoising-autoencoder)
- [Test error rate](https://refivu.com/en/terms/e48f5abd37a3-test-error-rate)
- [masking noise](https://refivu.com/en/terms/43e990d37e0a-masking-noise)
- [restricted Boltzmann machines](https://refivu.com/en/terms/09dd65db9c1f-restricted-boltzmann-machines)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/cb6395a1-e271-4606-9f55-568fc487c575-stacked-denoising-autoencoders-learning-useful)
