A Kernel Approach for Semi-implicit Variational Inference
Longlin Yu, Ziheng Cheng, Shiyue Zhang, Cheng Zhang
TL;DR
This work tackles the intractability of densities in semi-implicit variational inference by introducing Kernel Semi-Implicit Variational Inference (KSIVI), which leverages reproducing kernel Hilbert spaces to obtain an explicit optimal denoiser and reduces training to a kernel Stein discrepancy objective. By exploiting the semi-implicit hierarchical structure, KSIVI achieves a tractable, gradient-based optimization with variance bounds and non-asymptotic generalization guarantees. The approach is extended to multi-layer Hierarchical KSIVI (HKSIVI) and assessed across synthetic tasks, Bayesian logistic regression, conditioned diffusion, and Bayesian neural networks, demonstrating competitive performance and improved stability relative to SIVI-SM. The paper also investigates kernel choices for heavy-tailed targets and provides a theoretical framework for optimization and generalization in this kernelized VI setting, highlighting practical implications for scalable Bayesian inference.
Abstract
Semi-implicit variational inference (SIVI) enhances the expressiveness of variational families through hierarchical semi-implicit distributions, but the intractability of their densities makes standard ELBO-based optimization biased. Recent score-matching approaches to SIVI (SIVI-SM) address this issue via a minimax formulation, at the expense of an additional lower-level optimization problem. In this paper, we propose kernel semi-implicit variational inference (KSIVI), a principled and tractable alternative that eliminates the lower-level optimization by leveraging kernel methods. We show that when optimizing over a reproducing kernel Hilbert space, the lower-level problem admits an explicit solution, reducing the objective to the kernel Stein discrepancy (KSD). Exploiting the hierarchical structure of semi-implicit distributions, the resulting KSD objective can be efficiently optimized using stochastic gradient methods. We establish optimization guarantees via variance bounds on Monte Carlo gradient estimators and derive statistical generalization bounds of order $\tilde{\mathcal{O}}(1/\sqrt{n})$. We further introduce a multi-layer hierarchical extension that improves expressiveness while preserving tractability. Empirical results on synthetic and real-world Bayesian inference tasks demonstrate the effectiveness of KSIVI.
