Abstract
Variational Autoencoders (VAEs) provide a principled framework for generative modeling but often suffer from training instabilities, posterior collapse, and prior mismatch. We present Regularized Autoencoders (RAEs), a deterministic alternative that replaces the stochastic latent space of VAEs with explicit decoder regularization. By decoupling the autoencoding task from density estimation through an "ex-post" Gaussian Mixture Model (GMM) fitting step, RAEs achieve superior sample quality and stability. Our experiments across image benchmarks and structured data tasks show that RAEs consistently outperform traditional variational methods.
1. Introduction
Deep generative modeling has been dominated by Variational Autoencoders (VAEs) due to their solid probabilistic foundations. However, practitioners frequently encounter significant hurdles during training. The trade-off between reconstruction accuracy and latent space smoothness often leads to "posterior collapse," where the model ignores the latent representation entirely. Furthermore, the reliance on stochastic sampling introduces high-variance gradients, necessitating complex hyperparameter tuning and annealing schedules.
In this work, we propose Regularized Autoencoders (RAEs). By shifting from a probabilistic to a deterministic framework, we simplify the training objective while maintaining—and often exceeding—the generative performance of VAEs.
2. Challenges in Variational Modeling
VAEs typically struggle with three primary issues:
- Posterior Collapse: Powerful decoders can bypass the latent bottleneck, leading to uninformative latent codes.
- Training Instability: The Monte Carlo sampling required for the reparameterization trick introduces noise that can destabilize training.
- Prior Mismatch: The assumption that the aggregated posterior matches a simple Gaussian prior is often violated, leading to poor sample quality when sampling from the prior.
3. The Regularized Autoencoder (RAE) Framework
The RAE framework addresses these challenges by removing stochasticity from the training loop and introducing two key components: explicit regularization and ex-post density estimation.
3.1 Deterministic Training and Regularization
Instead of sampling from a distribution in the latent space, RAEs use a standard deterministic encoder and decoder. To prevent overfitting and ensure a smooth latent space—functions previously served by stochastic noise—we apply explicit regularization to the decoder. We evaluate several techniques, including L2 weight decay, Gradient Penalties (GP), and Spectral Normalization (SN). These constraints encourage the decoder to be Lipschitz continuous, ensuring that small changes in the latent space result in meaningful, smooth changes in the output.
3.2 Ex-Post Density Estimation
A critical innovation of the RAE is the "ex-post" step. Rather than forcing the latent codes to follow a Gaussian distribution during training, we allow the model to learn an unconstrained representation. Once training is complete, we fit a simple density estimator—specifically a 10-component Gaussian Mixture Model (GMM)—to the learned latent codes. This GMM serves as the generative prior, effectively resolving the prior mismatch problem.
4. Experimental Results
We evaluated RAEs on standard image benchmarks (MNIST, CIFAR-10, CelebA) and structured data tasks (arithmetic expressions and molecule generation).
4.1 Quantitative Performance
The RAE variants consistently achieved lower Frechet Inception Distance (FID) scores compared to VAE and Wasserstein Autoencoder (WAE) baselines. Notably, the ex-post GMM step was found to benefit all model types, suggesting that the prior mismatch is a universal issue in autoencoder-based generative models.
4.2 Qualitative Analysis
Visually, RAEs produce sharper reconstructions and samples than VAEs, which are known for generating blurry images. Latent space interpolations demonstrate that despite the lack of a variational constraint, the regularized latent space remains highly structured and continuous.
4.3 Structured Data
The RAE framework also showed significant improvements in discrete, rule-based domains. In molecule generation (ZINC dataset), the "Grammar RAE" increased the validity of generated samples from 28% (standard VAE) to 72%, highlighting the robustness of deterministic regularization in complex latent spaces.
5. Conclusion
Regularized Autoencoders offer a simpler, more stable path to generative modeling by replacing the probabilistic machinery of VAEs with deterministic regularization and ex-post density estimation. This approach not only simplifies the training process but also yields higher-quality samples across a wide range of data modalities. Future work will explore more complex ex-post estimators, such as normalizing flows, to further refine the generative process.
Summary updated