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
Regularized auto-encoders (AEs), such as Denoising Auto-Encoders (DAEs) and Contractive Auto-Encoders (CAEs), have long been successful in unsupervised feature learning. However, the precise nature of what they learn about the underlying probability distribution $p(x)$ has been a subject of debate. This paper provides a theoretical foundation showing that these models implicitly learn the score function—the gradient of the log-density of the data.
The Score Function and Reconstruction
The authors perform a non-parametric analysis of DAEs and a proposed variant, the Reconstruction Contractive Auto-Encoder (RCAE). By applying the Calculus of Variations and Taylor expansions, they demonstrate that as the regularization or noise level $\sigma$ approaches zero, the optimal reconstruction function $r(x)$ relates to the data density $p(x)$ as follows: $$r(x) \approx x + \sigma^2 \frac{\partial \log p(x)}{\partial x}$$ This fundamental result implies that the reconstruction vector $r(x) - x$ is not merely an error signal but an estimate of the score. This contradicts the previous intuition that the reconstruction error magnitude $\|r(x) - x\|$ acts as an energy function; instead, it is the direction of the vector that points toward regions of higher density.
Vector Field Interpretation
The most significant insight is the interpretation of the auto-encoder as learning a vector field. For any point $x$ in the input space, the model suggests a direction $r(x)-x$ that moves "uphill" on the probability density function.
This vector field effectively "sinks" into the high-density manifold. By following these vectors, one can identify the local structure and dimensionality of the data distribution.
1D Analysis and Fixed Points
To visualize this in a simpler setting, consider a 1D multimodal distribution. The reconstruction function $r(x)$ acts as a map that drives points toward local maxima of the density.
As shown in the figure, the points $x_1, x_2, x_3$ where $r(x) = x$ (the fixed points) correspond to the peaks of the distribution. The blue arrows indicate the direction of the vector field $r(x)-x$, showing how the model pushes inputs toward these high-probability regions.
Generative Capabilities and MCMC
Since the auto-encoder captures the score, it can be utilized as a generative model. The authors demonstrate that the learned score can be used to perform Metropolis-Hastings MCMC sampling. By calculating energy differences between points using the estimated score, the model can generate new samples that match the training distribution's manifold structure. Experiments on synthetic 10D manifolds confirm that the samples produced are visually and statistically consistent with the original data.
Conclusion and Limitations
This work bridges the gap between heuristic auto-encoder training and formal density estimation. However, several practical considerations remain. The "small noise" assumption is critical; if $\sigma$ is too large, the density estimate becomes overly smooth, while a $\sigma$ that is too small may lead to "spurious maxima" in regions where data is sparse. Additionally, while the framework is robust for continuous data, extending these derivatives-based insights to discrete domains remains an area for future research.
Summary updated