Abstract
Maximum likelihood training has favorable statistical properties and is popular for generative modeling, especially with normalizing flows. On the other hand, generative autoencoders promise to be more efficient than normalizing flows due to the manifold hypothesis. In this work, we introduce successful maximum likelihood training of unconstrained autoencoders for the first time, bringing the two paradigms together. To do so, we identify and overcome two challenges: Firstly, existing maximum likelihood estimators for free-form networks are unacceptably slow, relying on iteration schemes whose cost scales linearly with latent dimension. We introduce an improved estimator which eliminates iteration, resulting in constant cost (roughly double the runtime per batch of a vanilla autoencoder). Secondly, we demonstrate that naively applying maximum likelihood to autoencoders can lead to divergent solutions and use this insight to motivate a stable maximum likelihood training objective. We perform extensive experiments on toy, tabular and image data, demonstrating the competitive performance of the resulting model. We call our model the maximum likelihood autoencoder (MLAE), also referred to as Free-form Injective Flows (FIF).
Introduction
Generative modeling often relies on the manifold hypothesis: the idea that high-dimensional data (like a 1024x1024 image) actually lives on a much lower-dimensional "surface" or manifold. Standard Normalizing Flows are powerful because they allow for exact maximum likelihood training, but they are constrained by requiring the latent space to be the same size as the data space and needing restrictive, invertible architectures.
Injective Flows were designed to fix the dimensionality problem by using a bottleneck, but they remained stuck with restrictive architectures and slow, iterative training math. Furthermore, training these models naively often leads to "pathological" solutions where the model manifold curves wildly to artificially inflate the likelihood.
Methodology: Free-Form Injective Flows (FIF)
The authors introduce Free-form Injective Flows (FIF), which break these constraints through three key innovations:
- Unconstrained Architecture: Unlike previous flows, FIF can use any standard neural network (like a ResNet or ConvNet) as an encoder and decoder. No special "invertible" layers are required.
- Efficient Gradient Estimator: Calculating the "change of variables" (the Jacobian determinant) is usually the bottleneck. The authors replaced slow, iterative solvers with a single-step estimator. It uses the encoder's Jacobian as a proxy for the decoder's inverse Jacobian, making a training step only about 1.5x to 2x slower than a simple autoencoder.
- Off-Manifold Evaluation: To prevent the model from "cheating" by creating high-curvature manifolds that collapse the data, the authors evaluate the volume change slightly off the manifold. This stabilizes training and forces the manifold to actually center itself on the data.
Key Insights: Overcoming the Curvature Trap
A major "aha" moment in the paper is identifying why previous joint-learning attempts failed. In nonlinear models, the manifold can "wrinkle" or curve excessively to pack data points closer together in the latent space. This lowers the Negative Log-Likelihood (NLL) without actually improving the model.
The realization that an optimized encoder is effectively the Moore-Penrose inverse of the decoder allows for a massive mathematical shortcut. This "pseudo-inverse" relationship is what enables the use of free-form architectures while maintaining stability through corrected gradient computation.
Key Results
The model was evaluated across a diverse range of benchmarks, including toy data, tabular UCI datasets, and image sets like MNIST, CIFAR10, and CelebA.
- Speed: FIF is significantly faster than previous "Rectangular Flows," showing training speedups of 3.9x on POWER and 6.1x on HEPMASS.
- Image Quality: On the CelebA dataset, FIF achieved a Fréchet Inception Distance (FID) of 37.4, significantly outperforming previous SOTA injective flows like Trumpet (47.7) and DNF (52.7).
- Benchmark Performance: In the Pythae benchmark, FIF achieved the best FID score on CelebA among all compared generative autoencoders (including various VAE and WAE variants) when using a ResNet architecture.
Limitations and Future Work
While FIF is a major step forward, the authors note a few areas for improvement. The model assumes a Gaussian latent space during training, but fitting a Gaussian Mixture Model (GMM) to the latent space after training often yields better samples. Additionally, while the method is efficient, very large models might still face memory constraints due to the Jacobian-vector products required. Future work will focus on deeper theoretical investigations into the dynamics of joint manifold and density learning.
Summary updated