Abstract: We extend the existing framework of semi-implicit variational inference (SIVI) and introduce doubly semi-implicit variational inference (DSIVI), a way to perform variational inference and learning when both the approximate posterior and the prior distribution are highly flexible, semi-implicit distributions. By providing an asymptotically exact "sandwich" bound on the Evidence Lower Bound (ELBO), DSIVI enables stable, discriminator-free optimization, leading to state-of-the-art prior formulations for Variational Autoencoders (VAEs) and improved inference in Bayesian Neural Networks.
Introduction
In Variational Inference (VI), researchers approximate complex, intractable posterior distributions with simpler, parameterized ones. To maintain mathematical tractability, standard VI typically requires both the prior and the approximate posterior to be "explicit" distributions (such as Gaussians) where the probability density function (PDF) can be calculated exactly. However, this simplicity often leads to over-regularization, manifesting as overpruning in Bayesian Neural Networks (BNNs) or poor latent representations in Variational Autoencoders (VAEs).
To address this, researchers have turned to implicit distributions (e.g., outputs of a neural network given random noise). While these allow for high flexibility, they lack an evaluable PDF, often necessitating unstable adversarial training (like GANs) or biased kernel density estimators. While Semi-Implicit Variational Inference (SIVI) allowed for implicit posteriors without discriminators, it still required an explicit prior. This work introduces Doubly Semi-Implicit Variational Inference (DSIVI) to allow both the prior and the posterior to be implicit.
Methodology
DSIVI extends the SIVI framework by accommodating semi-implicit priors alongside semi-implicit posteriors. A distribution is considered "semi-implicit" if it is an infinite mixture of an explicit conditional distribution (like a Gaussian) mixed with an implicit distribution.
The authors provide several key theoretical contributions:
- Lower Bound Proof: They mathematically prove that the original SIVI surrogate objective is a strict lower bound on the true ELBO.
- DSIVI Lower Bound: They derive a new, asymptotically exact lower bound for the ELBO that supports semi-implicit priors.
- Sandwiching the ELBO: Using the variational representation of KL divergence, they derive an upper bound. This "sandwiches" the true ELBO between two bounds that both tighten as the number of Monte Carlo samples ($K$) increases, allowing for a reliable estimate of the inference gap.
Experimental Setup
The framework was evaluated across several benchmarks:
- Synthetic Toy Datasets: 1D Student's t, Laplace, Gaussian mixtures, and a 2D "banana" distribution to assess convergence and stability.
- MNIST: Used for real-world evaluation in training Bayesian Neural Networks and Variational Autoencoders (including Hierarchical VAEs).
Key Results and Insights
DSIVI provides a discriminator-free approach to implicit VI that is significantly more stable than prior methods like Adversarial Variational Bayes (AVB). By sandwiching the ELBO, the method allows for unbiased estimation without the finicky nature of adversarial training.
Bayesian Neural Networks
On the MNIST dataset, DSIVI demonstrates the superiority of marginal inference over standard joint inference. With a sample size of just $K=10$, DSIVI matches the performance of exact marginal variational inference, significantly outperforming joint inference approaches.
Variational Autoencoders
A major advantage of DSIVI is its ability to use the "aggregated posterior" (the average of all posteriors over the training set) directly as a semi-implicit prior. This serves as a natural upgrade to the popular VampPrior method. In testing, DSIVI-agg with $K=5000$ achieved a test log-likelihood of -82.16 on MNIST, outperforming standard VAE+VampPrior baselines. Similar gains were observed in Hierarchical VAE (HVAE) architectures.
Conclusion
DSIVI offers a general-purpose framework for highly flexible probabilistic modeling. While the computational cost scales linearly with the number of samples ($K$), the stability and performance gains are substantial. Future work involves applying semi-implicit priors to more complex generative architectures and hierarchical Bayesian models that currently struggle with the limitations of explicit prior distributions.
Summary updated