Why should autoencoders work?
Matthew D. Kvalheim, Eduardo D. Sontag
TL;DR
This work explains why autoencoders can effectively compress data lying on low-dimensional manifolds within high-dimensional spaces despite topological obstacles. It proves a PAC-style theorem: for $K\subseteq\mathbb{R}^n$ being a finite union of smooth $k$-dimensional manifolds with boundary, there exists a small exceptional set $K_0$ (in intrinsic measure) such that, for any $\varepsilon>0$, encoder/decoder pairs from universal-approximation classes can achieve $\|G(F(x)) - x\| < \varepsilon$ on $K\setminus K_0$, providing a theoretical justification for practical success. The results combine differential-topology constructs (intrinsic measures, cut loci, reach) with universal approximation to yield a constructive existence claim, complemented by a lower-bound showing global reconstruction is limited by geometry. A numerical example with two interlaced circles demonstrates the method’s ability to open topological obstructions in practice, while Section 4 establishes that global perfection is impossible in general due to reach/topology constraints. The discussion points to rich future directions, including time-series dynamics, Koopman embeddings, and stratified-set extensions, broadening the impact of these theoretical insights on manifold learning and representation learning.
Abstract
Deep neural network autoencoders are routinely used computationally for model reduction. They allow recognizing the intrinsic dimension of data that lie in a $k$-dimensional subset $K$ of an input Euclidean space $\mathbb{R}^n$. The underlying idea is to obtain both an encoding layer that maps $\mathbb{R}^n$ into $\mathbb{R}^k$ (called the bottleneck layer or the space of latent variables) and a decoding layer that maps $\mathbb{R}^k$ back into $\mathbb{R}^n$, in such a way that the input data from the set $K$ is recovered when composing the two maps. This is achieved by adjusting parameters (weights) in the network to minimize the discrepancy between the input and the reconstructed output. Since neural networks (with continuous activation functions) compute continuous maps, the existence of a network that achieves perfect reconstruction would imply that $K$ is homeomorphic to a $k$-dimensional subset of $\mathbb{R}^k$, so clearly there are topological obstructions to finding such a network. On the other hand, in practice the technique is found to "work" well, which leads one to ask if there is a way to explain this effectiveness. We show that, up to small errors, indeed the method is guaranteed to work. This is done by appealing to certain facts from differential topology. A computational example is also included to illustrate the ideas.
