Introduction
In large-scale Bayesian machine learning, Stochastic Variational Inference (SVI) has become the standard for approximating posterior distributions in models with massive datasets. SVI achieves scalability by utilizing stochastic optimization with mini-batches of data. However, a significant limitation of standard SVI is its reliance on the mean-field approximation. This assumption posits that latent variables are independent of one another and the global parameters in the approximating distribution. While computationally convenient, this independence often fails to capture the inherent correlations between global trends and local observations, leading to a "brittle" optimization landscape characterized by numerous poor local optima.
Methodology: Structured Stochastic Variational Inference (SSVI)
To address these shortcomings, we introduce Structured Stochastic Variational Inference (SSVI). Unlike the traditional mean-field approach that factorizes the variational distribution as $q(z, \beta) = q(z)q(\beta)$, SSVI preserves dependencies by employing a conditional structure: $$q(z, \beta) = q(\beta) \prod_n q(z_n | \beta)$$ This formulation allows local hidden variables ($z_n$) to adapt dynamically based on the current state of the global parameters ($\beta$).
Technical Innovations
- Stochastic Natural Gradients: Updates for global parameters are derived using natural gradients, which respect the information-geometric structure of the distribution space.
- SSVI-A (Approximate Gradient): To mitigate the computational cost of calculating full gradients for structured distributions, we propose SSVI-A. This variant omits a complex covariance-like term, resulting in an algorithm nearly as fast as standard SVI with minimal bias.
- Algorithmic Flexibility: The framework is optimized for conditionally conjugate models but remains flexible enough to incorporate MCMC or other sampling techniques for non-conjugate dependencies.
Experimental Evaluation
The efficacy of SSVI was evaluated across three distinct modeling tasks:
- Latent Dirichlet Allocation (LDA): Applied to a corpus of 3.8 million Wikipedia articles to test large-scale topic modeling.
- Dirichlet Process Mixture of Bernoullis: A synthetic study involving 1,000 binary vectors to assess the model's ability to recover the true number of latent clusters.
- Bayesian Nonparametric Nonnegative Matrix Factorization (GaP-KL-NMF): Evaluated on synthetic audio spectrograms to determine if the model could accurately recover underlying basis components.
Key Insights and Results
Optimization Landscape Smoothing
A primary finding is that restoring dependencies significantly smooths the Evidence Lower Bound (ELBO) objective. Mean-field SVI often converges to suboptimal solutions because its independence constraints create a rugged optimization surface. By allowing correlations, SSVI avoids these local optima, consistently finding higher-quality solutions.
Predictive Performance and Robustness
In the Wikipedia LDA task, SSVI and SSVI-A achieved substantially higher predictive log-likelihoods compared to standard SVI. Furthermore, SSVI demonstrated remarkable robustness to hyperparameter initialization (e.g., the Dirichlet prior $\eta$), a known sensitivity in traditional SVI.
Latent Structure Discovery
In the Dirichlet Process experiment, the true data contained 56 components. SSVI-A successfully identified 54, whereas mean-field SVI recovered only 17, significantly underestimating the data's complexity. Similarly, in the NMF audio recovery task, SSVI-A identified nearly all original basis components with high correlation, while mean-field SVI failed to identify the majority of patterns.
Conclusion
Structured Stochastic Variational Inference represents a significant advancement over mean-field methods by incorporating local-global dependencies. This structural change not only improves the accuracy of posterior approximations but also fundamentally alters the optimization landscape, making the inference process more robust and less prone to local optima. Future work will explore applying SSVI to deeper hierarchies of global parameters and investigating formal quantifications of the "smoothing" effect observed in structured variational objectives.
Summary updated