Abstract
Variational Inference (VI) is a powerful tool for approximating complex posterior distributions, yet its stochastic implementation—Black Box Variational Inference—often suffers from high gradient variance. This noise leads to slow convergence and instability, particularly as the optimization approaches a local optimum where the signal-to-noise ratio (SNR) typically collapses. We present Multi-level Monte Carlo Variational Inference (MLMCVI), a novel framework that applies Multilevel Monte Carlo (MLMC) techniques to the optimization path. By recycling parameters and gradients from previous steps and using correlated sampling, MLMCVI significantly reduces variance and maintains a high SNR throughout the optimization process. Empirical evaluations on Bayesian regression and classification tasks demonstrate that MLMCVI achieves faster convergence and higher data efficiency than existing state-of-the-art methods.
Introduction
In modern Bayesian machine learning, Variational Inference (VI) allows us to handle intractable posteriors by optimizing the Evidence Lower Bound (ELBO). The reparameterization trick is commonly used to obtain stochastic gradient estimates. However, as the optimization nears convergence, the magnitude of the true gradient (the signal) decreases while the variance of the Monte Carlo estimate (the noise) remains relatively constant. This plummeting SNR forces the optimizer to use smaller steps or more samples, leading to inefficient training. While control variates and Quasi-Monte Carlo (QMC) methods offer some relief, they often introduce complexity or fail in high-dimensional settings.
Methodology: Recycling Gradients
The core innovation of MLMCVI is the treatment of the optimization history as a natural hierarchy for Multilevel Monte Carlo. Instead of generating independent samples at each step, MLMCVI "recycles" information from the previous iteration.
Telescoping Sums and Correlated Sampling
Standard MLMC estimates an expectation through a sequence of increasingly accurate approximations. In MLMCVI, the gradient at the current step $\lambda_t$ is estimated by taking the gradient from the previous step $\lambda_{t-1}$ and adding a correction term. To ensure this correction term has low variance, the gradients at $\lambda_t$ and $\lambda_{t-1}$ are calculated using the exact same random noise $\epsilon$. Because the parameters $\lambda_t$ and $\lambda_{t-1}$ are typically very close in the parameter space, their gradients are highly correlated, making their difference—the "correction"—extremely stable.
Adaptive Complexity and Stability
MLMCVI introduces an adaptive sample size $N_t$ that is theoretically linked to the learning rate scheduler $\eta_t$. As the learning rate decays and the parameters stabilize, the algorithm automatically reduces the required number of samples, optimizing computational resources. Additionally, the framework incorporates a proximal operator to ensure theoretical stability when dealing with unbounded reparameterized variables, effectively providing a principled form of gradient clipping.
Comparative Analysis
MLMCVI distinguishes itself from previous variance reduction techniques by its unique combination of adaptive sampling and maintained SNR. As shown in the table below, while methods like RQMC improve the order of variance, MLMCVI is the first to provide a mechanism for adaptive sample sizes and a guaranteed signal-to-noise ratio throughout the optimization trajectory.
Experimental Results
The authors validated MLMCVI across several standard Bayesian benchmarks, including Hierarchical Linear Regression (HLR), Bayesian Logistic Regression (BLR) on Breast Cancer and Fashion-MNIST datasets, and Bayesian Neural Networks (BNN) on the Wine Quality dataset.
- Convergence Speed: MLMCVI consistently reached higher ELBO values faster (in wall-clock time) than vanilla MCVI and Randomized Quasi-Monte Carlo (RQMC) across all tasks.
- Variance Reduction: Empirical results confirmed that MLMCVI maintains lower gradient variance and a significantly higher SNR in the late stages of training compared to baselines.
- Data Efficiency: On the Fashion-MNIST dataset, MLMCVI achieved test log-likelihoods using only 20% of the training data that were comparable to those achieved by baseline methods using the full dataset.
Conclusion
MLMCVI provides a robust and efficient framework for variational inference by leveraging the inherent hierarchy of the optimization process. By recycling past gradients and adaptively managing sample sizes, it overcomes the SNR collapse that plagues standard stochastic VI. While currently optimized for Gaussian variational families, the "recycling" logic of MLMCVI holds promise for broader applications in general stochastic optimization problems. Future work will focus on extending these theoretical guarantees to non-Gaussian distributions and further refining the hyperparameter tuning process.
Summary updated