TL;DR
Variational Autoencoders (VAEs) are widely successful empirically, but their theoretical convergence properties have remained largely unproven. This paper bridges the gap by establishing the first non-asymptotic convergence guarantees for VAEs trained with Stochastic Gradient Descent (SGD) and Adam, proving a convergence rate of $\mathcal{O}(\log n / \sqrt{n})$. The analysis covers standard VAEs as well as popular variants like $\beta$-VAE, Importance Weighted Autoencoders (IWAE), and Sequential VAEs.
What Problem Does This Paper Address?
VAEs optimize the Evidence Lower Bound (ELBO) to approximate complex data distributions. While they work incredibly well in practice, proving how fast or if they reliably converge to a stationary point during training has been an open challenge.
Previous theoretical work mostly focused on generalization bounds or specific subsets like Black-Box Variational Inference (BBVI) under restrictive "location-scale" parameterizations. This paper tackles the lack of non-asymptotic convergence rates for standard VAE architectures trained using ubiquitous optimizers like SGD and Adam, providing explicit dependencies on hyperparameters like batch size and sample size.
Methods
The authors first prove the mathematical smoothness (Lipschitz continuity of the gradient) of the expected ELBO objective function. They do this for both common gradient estimation methods: the pathwise gradient (the reparameterization trick) and the score function gradient (REINFORCE).
Crucially, to satisfy these smoothness conditions in Deep Gaussian VAEs, they introduce a novel generalized soft-clipping activation function. This function acts approximately linearly within a specified interval but remains bounded and differentiable, unlike standard choices like Hard Tanh. They then leverage this smoothness to derive non-asymptotic convergence rates for standard SGD and Adam optimization routines.
Datasets
The theoretical findings are empirically validated using two standard image datasets:
- CelebA
- CIFAR-100
Key Insights and Ideas
- The Smoothness Breakthrough: Proving convergence in non-convex optimization typically requires the objective function to be smooth. The authors show that the expected ELBO is smooth under broader, less restrictive conditions than previously thought, completely bypassing the need for location-scale parameterization assumptions.
- Activation Functions Matter: Standard activation functions like ReLU are not continuously differentiable, making formal convergence proofs difficult. The proposed generalized soft-clipping function bridges this gap, providing a mathematically sound alternative that performs well in practice.
- Hyperparameter Dependencies: The derived convergence bounds explicitly show how batch size ($B$) and the number of Monte Carlo samples ($K$) impact training. For instance, in IWAEs, increasing $K$ speeds up the theoretical convergence rate, but the authors warn that increasing $K$ independently of $B$ can tank the Signal-to-Noise Ratio (SNR) of the gradients, harming the decoder's learning.
- The Cost of Depth: The theoretical smoothness constant grows exponentially with the number of neural network layers ($N$), providing a formal justification for why deeper VAEs can be significantly harder to train.
Key Results
- Universal Convergence Rate: The paper establishes a non-asymptotic convergence rate of $\mathcal{O}(\log n / \sqrt{n})$ for both SGD and Adam across Linear, Deep Gaussian, $\beta$-VAE, IWAE, and Sequential VAE models.
- Empirical Validation: Experiments on CelebA show that the proposed generalized soft-clipping activation function achieves a convergence profile highly competitive with standard ReLU, validating its practical utility.
- Hyperparameter Effects: As predicted by the theory, smaller values of $\beta$ in $\beta$-VAE and larger values of $K$ in IWAE lead to faster initial convergence to a critical point.
Limitations and Future Work
- The ReLU Gap: While empirical results show ReLU behaves similarly to the proposed smooth activation functions, the mathematical proofs do not directly apply to ReLU due to its non-differentiability at zero.
- Exponential Scaling: The bounds suffer from an exponential dependence on the number of network layers, which might be overly pessimistic compared to real-world deep network behavior.
- Future Directions: The authors suggest exploring non-Gaussian encoder/decoder distributions, alternative deep architectures, and extending these convergence guarantees to Variational Rényi IWAEs.
Summary updated