Abstract
Variational Autoencoders (VAE) are popular generative models used to sample from complex data distributions. Despite their empirical success in various machine learning tasks, significant gaps remain in understanding their theoretical properties, particularly regarding convergence guarantees. This paper aims to bridge that gap by providing non-asymptotic convergence guarantees for VAE trained using both Stochastic Gradient Descent and Adam algorithms. We derive a convergence rate of $\mathcal{O}(\log n / \sqrt{n})$, where $n$ is the number of iterations of the optimization algorithm, with explicit dependencies on the batch size, the number of variational samples, and other key hyperparameters. Our theoretical analysis applies to both Linear VAE and Deep Gaussian VAE, as well as several VAE variants, including $\beta$-VAE and IWAE. Additionally, we empirically illustrate the impact of hyperparameters on convergence, offering new insights into the theoretical understanding of VAE training.
Introduction
Variational Autoencoders (VAEs) have been a cornerstone of generative modeling for a decade, powering applications from image synthesis to anomaly detection. While practitioners have successfully trained these models for years, a rigorous mathematical understanding of their convergence properties has remained elusive. In "Theoretical Convergence Guarantees for Variational Autoencoders" (AISTATS 2025), researchers provide the first non-asymptotic convergence rates for VAEs trained with standard optimization algorithms like Stochastic Gradient Descent (SGD) and Adam.
The primary challenge in analyzing VAE optimization lies in the Evidence Lower Bound (ELBO), the objective function VAEs maximize. The ELBO involves an expectation over a latent distribution that evolves during training, making it difficult to establish the "smoothness" (Lipschitz continuous gradients) required for standard convergence proofs in non-convex optimization.
Methods
The study provides a non-asymptotic analysis, calculating error bounds after a finite number of steps $n$. Key methodological contributions include:
- Smoothness Proofs: Rigorous proof of the smoothness of the expected ELBO for both the Pathwise Gradient (reparameterization trick) and the Score Function Gradient (REINFORCE).
- Generalized Soft-Clipping: To satisfy mathematical requirements for smoothness in Deep VAEs, the authors introduce a new activation function—a "smooth" version of a clipped identity. This maintains the linearity needed for deep learning while providing the bounded properties required for the proof.
- Unified Framework: The analysis extends beyond basic VAEs to include $\beta$-VAEs, Importance Weighted Autoencoders (IWAE), and Sequential VAEs for time-series data.
Key Insights
- The $\mathcal{O}(\log n / \sqrt{n})$ Rate: This confirms VAEs are as theoretically efficient as many simpler neural network training tasks.
- Hyperparameter Impact: The theory explicitly shows how hyperparameters affect speed. For instance, in $\beta$-VAEs, smaller $\beta$ (less regularization) leads to faster convergence. In IWAEs, increasing the number of variational samples $K$ improves the rate by reducing gradient variance.
- Activation Functions: While ReLU is popular, it technically violates smoothness assumptions. However, experiments show ReLU behaves similarly to the proposed "theoretically safe" soft-clipping function.
- Adam vs. SGD: The analysis of Adam includes an explicit dependency on the total parameter dimension ($d^*$), reflecting the cost of adaptive step sizes in high-dimensional spaces.
Key Results
Theoretical proofs demonstrate that for both SGD and Adam, the expected squared norm of the gradient vanishes at a rate of $\mathcal{O}(\log n / \sqrt{n})$. These findings were validated using standard benchmarks: CelebA and CIFAR-100.
As shown in Figure 1, the gradient norm follows the predicted $1/\sqrt{n}$ trend. Furthermore, the proposed generalized soft-clipping function (parameterized by $s$) achieved faster and more stable convergence than standard ReLU in several test cases, particularly for the IWAE model.
Limitations and Future Work
The current proof assumes a compact parameter space, where weights stay within a bounded region. Future work could address cases where weights grow very large. Additionally, extending the formal proof to non-smooth activations like ReLU and exploring alternative distributions (e.g., Categorical or Von-Mises) or complex architectures like Transformers remain open challenges.
Summary updated