Abstract: What do auto-encoders learn about the underlying data generating distribution? Recent work suggests that some auto-encoder variants do a good job of capturing the local manifold structure of data. This paper clarifies some of these previous observations by showing that minimizing a particular form of regularized reconstruction error yields a reconstruction function that locally characterizes the shape of the data generating density. We show that the auto-encoder captures the score (derivative of the log-density with respect to the input). It contradicts previous interpretations of reconstruction error as an energy function. Unlike previous results, the theorems provided here are completely generic and do not depend on the parametrization of the auto-encoder: they show what the auto-encoder would tend to if given enough capacity and examples. These results are for a contractive training criterion we show to be similar to the denoising auto-encoder training criterion with small corruption noise, but with contraction applied on the whole reconstruction function rather than just encoder. Similarly to score matching, one can consider the proposed training criterion as a convenient alternative to maximum likelihood because it does not involve a partition function. Finally, we show how an approximate Metropolis-Hastings MCMC can be setup to recover samples from the estimated distribution, and this is confirmed in sampling experiments.
Introduction
For years, auto-encoders (AEs) were used for unsupervised feature learning with significant empirical success, yet their theoretical foundation remained somewhat "fuzzy." While it was understood that forcing an AE to reconstruct inputs through a bottleneck or against noise captured "important" features, a formal link between the reconstruction function and the underlying data probability density $p(x)$ was missing.
This paper by Alain and Bengio provides a rigorous mathematical answer: regularized auto-encoders (such as Denoising or Contractive AEs) learn the score—the gradient of the log-density—of the data distribution. This insight allows AEs to be viewed as efficient generative models that bypass the need for calculating intractable partition functions required by traditional Maximum Likelihood Estimation (MLE).
Methodology
The authors employ the Calculus of Variations to analyze AE behavior in a non-parametric setting, assuming infinite model capacity and training data.
The technical approach involves:
- Unifying Criteria: Demonstrating that Denoising Auto-Encoders (DAEs) with small Gaussian noise are mathematically equivalent to Contractive Auto-Encoders (CAEs) where the penalty applies to the entire reconstruction function $r(x) = g(f(x))$.
- Euler-Lagrange Derivation: Applying these tools to the regularized reconstruction loss to find the optimal reconstruction function.
- Asymptotic Analysis: Investigating the model's behavior as regularization strength ($\lambda$) or noise level ($\sigma$) approaches zero.
- Langevin MCMC: Connecting the learned score to sampling algorithms, where a stochastic walk (Langevin diffusion) generates new samples following the estimated density.
Key Insights: The Reconstruction Vector Field
A central intuition of this work is that the reconstruction vector $(r(x) - x)$ defines a vector field. For any point $x$ in space, the AE's reconstruction $r(x)$ points toward the nearest high-density region of the data manifold.
This connects AEs directly to Score Matching, a statistical method for estimating non-normalized density models. The results are generic: regardless of the specific neural architecture or activation functions, a model minimizing regularized reconstruction loss will converge to the score of the density.
Key Results
The primary theoretical contribution is Theorem 2, which states that the optimal reconstruction function $r^*(x)$ satisfies: $$r^*(x) = x + \lambda \frac{\partial \log p(x)}{\partial x} + o(\lambda)$$ This formally proves that the reconstruction displacement is proportional to the gradient of the log-density.
In numerical experiments on a multi-modal 1D distribution, the authors recovered the original density curve with a maximum error of only $2.6 \times 10^{-4}$, confirming the practical utility of the theory.
Limitations and Future Directions
While foundational, the theory relies on several assumptions:
- Small Noise/Regularization: The proofs assume $\lambda$ or $\sigma$ are very small, whereas practical applications often use larger noise for robustness.
- Infinite Capacity: Real-world networks have finite neurons, and the impact of limited capacity on score estimation requires further study.
- Higher-Order Statistics: The paper focuses on the first-order derivative (the score). The authors hypothesize that the second-order derivative (the Jacobian) captures the local manifold covariance, suggesting that future work should leverage this for improved MCMC sampling.
Summary updated