Introduction
In generative modeling, Variational Autoencoders (VAEs) and Wasserstein Autoencoders (WAEs) are foundational architectures. These models compress high-dimensional data into a low-dimensional "latent space" to facilitate reconstruction and generation. Traditionally, researchers force these latent representations to follow a pre-defined prior distribution—most commonly a simple isotropic Gaussian.
However, this "Gaussian habit" introduces a fundamental conflict. When using a stochastic encoder, forcing the latent space into a rigid bell curve creates a compromise between reconstruction accuracy and shape-matching. This tug-of-war often degrades image quality and can be mathematically at odds with the true underlying structure of the data, particularly in tasks like feature disentanglement.
The Variance Constrained Autoencoder (VCAE)
To address these limitations, the Variance Constrained Autoencoder (VCAE) shifts the focus from shape constraints to variance constraints. The core innovations include:
- Variance-Only Penalization: Instead of penalizing the model for deviating from a Gaussian shape, VCAE only penalizes it if the total variance of the latent space deviates from a target value. This allows the model to discover the optimal latent "shape" for reconstruction.
- Stochastic Encoding with Fixed Noise: The model employs fixed-variance additive noise in the latent layer, acting as a noisy communication channel that preserves the neighborhood structure of the data.
- Normalizing Flows for Sampling: Since the learned latent distribution is non-Gaussian and complex, VCAE uses a chain of normalizing flows (NF) trained after the autoencoder. These flows learn to map a simple Gaussian to the VCAE's complex aggregate posterior, enabling high-quality sampling.
Experimental Results
The VCAE was evaluated against standard benchmarks including MNIST, CelebA, and 3D-Shapes. The results demonstrate that relaxing the Gaussian constraint leads to significant improvements in both reconstruction and generative quality.
Image Reconstruction and Generation
On the MNIST and CelebA datasets, VCAE consistently outperformed standard VAEs and WAEs. As shown in the table below, VCAE achieved substantially lower reconstruction errors and superior Frechet Inception Distance (FID) scores, which measure the quality of generated samples. For instance, on MNIST, VCAE reached a Test FID of 7.68, compared to 23.03 for a standard VAE.
Disentanglement and Generalization
For disentanglement tasks, the authors introduced TC-VCAE, which adds a Total Correlation (TC) penalty. On the 3D-Shapes dataset, TC-VCAE achieved a disentanglement score of 0.93, matching the state-of-the-art FactorVAE. Crucially, it achieved this without forcing the discrete factors of variation (like object orientation) into a Gaussian distribution, which is inherently ill-suited for such data.
Furthermore, in experiments with limited data (ReducedMNIST), VCAE demonstrated superior resistance to overfitting compared to deterministic models, proving that its stochastic nature effectively regularizes the learning process.
Conclusion
VCAE offers a more flexible and theoretically grounded approach to autoencoding by abandoning rigid prior shapes in favor of simple variance constraints. While it requires a two-stage training process—first for the autoencoder and then for the normalizing flows—the gains in reconstruction fidelity and generative quality make it a powerful alternative to traditional VAEs. Future work may explore more complex constraints or alternative noise types to further refine the latent space structure.
Summary updated