Abstract: Kernel Semi-Implicit Variational Inference (KSIVI) is introduced as a robust and efficient framework for training complex hierarchical probability models. By replacing the unstable minimax optimization common in score-matching methods with an analytical solution derived from Reproducing Kernel Hilbert Spaces (RKHS), KSIVI minimizes the Kernel Stein Discrepancy (KSD) directly. This approach provides faster convergence, enhanced stability, and the first rigorous theoretical convergence guarantees for semi-implicit models.
Introduction
Variational Inference (VI) is a fundamental tool in Bayesian machine learning for approximating complex posterior distributions. However, practitioners often face a dilemma: utilize simple, tractable distributions (like Gaussians) that lack the capacity to capture complex structures, or employ flexible "implicit" models (like neural networks) that possess intractable densities, making them difficult to optimize via standard methods like the Evidence Lower Bound (ELBO).
Semi-Implicit Variational Inference (SIVI) provides a middle ground by defining distributions hierarchically. While flexible, SIVI has historically relied on "minimax" score-matching objectives (SIVI-SM) which are notoriously unstable, computationally expensive, and require extensive hyperparameter tuning of an adversarial neural network.
Methodology
KSIVI eliminates the need for lower-level adversarial optimization through two key innovations:
- The Kernel Trick: The search for an optimal adversarial function is restricted to a Reproducing Kernel Hilbert Space (RKHS). In this space, the lower-level optimization problem yields a closed-form, analytical solution.
- Kernel Stein Discrepancy (KSD): By substituting the analytical solution back into the objective, the training goal becomes the minimization of the KSD. Due to SIVI’s hierarchical structure, this KSD can be computed using only the conditional score function, which remains tractable even when the marginal density is not.
This transformation collapses a volatile minimax "game" into a stable, single-level optimization problem that can be trained efficiently using standard stochastic gradient descent optimizers like Adam.
Experimental Evaluation
The researchers evaluated KSIVI across several benchmarks to test flexibility and scalability:
- Synthetic Distributions: Banana-shaped, Multimodal, and X-shaped 2D distributions.
- Bayesian Logistic Regression: UCI Waveform dataset (21D).
- High-Dimensional Inference: A 100D conditioned diffusion process based on Langevin SDEs.
- Bayesian Neural Networks (BNN): Standard UCI regression benchmarks (e.g., Boston Housing, Protein).
Key Results
KSIVI demonstrated superior stability and speed compared to SIVI-SM. In the 100-dimensional diffusion task, KSIVI was significantly faster (~57s vs ~70s per 10k iterations) and avoided the "bumpy" posterior estimates characteristic of minimax methods.
As shown in the convergence plots, KSIVI (blue) reaches a lower KL divergence faster and with much less variance than the adversarial SIVI-SM (orange). Furthermore, the quality of the resulting approximations is highly accurate across diverse geometries.
On Bayesian Logistic Regression tasks, KSIVI captured pairwise correlations between variables more accurately than standard SIVI. In BNN benchmarks, it performed on par with or better than state-of-the-art variants in terms of RMSE and NLL while maintaining higher computational efficiency.
Discussion and Conclusion
KSIVI represents a significant theoretical and practical advancement. By shifting from "games" between neural networks to direct functional optimization, it provides hyperparameter relief—removing the need to tune adversarial network architectures or learning rates. It also provides the first convergence analysis for SIVI with non-linear reparameterization.
Despite its strengths, KSIVI's performance is tied to kernel selection; standard RBF kernels may struggle with heavy-tailed distributions in very high dimensions. Future work may explore unbounded or Riesz kernels to further improve performance in high-dimensional, non-convex landscapes.
Summary updated