Abstract
Variational inference (VI) often faces a trade-off between the simplicity of the approximating distribution and the fidelity to the true posterior. We present Reparameterized Variational Rejection Sampling (RVRS), a hybrid method that utilizes a rejection sampling step to "sculpt" simple proposal distributions into flexible, non-parametric approximations. By introducing a novel low-variance reparameterized gradient estimator, RVRS overcomes the high-variance issues typically associated with rejection sampling in high dimensions. Our results demonstrate that RVRS achieves high fidelity comparable to MCMC-based methods while maintaining the computational efficiency of standard VI, outperforming baselines across various tasks including logistic regression, Gaussian process classification, and Variational Autoencoders.
Introduction
Bayesian inference seeks to approximate complex posterior distributions. Standard Variational Inference (VI) typically employs simple parametric families, such as Gaussians, which often fail to capture intricate correlations or heavy tails. While flexible alternatives like Normalizing Flows exist, they can be difficult to optimize and may ignore the known structure of the target model. Hybrid methods combining VI with Markov Chain Monte Carlo (MCMC) offer high accuracy but are computationally burdensome due to sequential sampling requirements.
This paper revisits Variational Rejection Sampling (VRS). While conceptually elegant, VRS has historically relied on "score-function" gradients, which suffer from extreme variance in high-dimensional latent spaces. We introduce Reparameterized Variational Rejection Sampling (RVRS), which leverages the reparameterization trick to derive a stable, pathwise gradient estimator, making rejection-based variational inference practical for modern machine learning models with continuous latent variables.
Methodology
RVRS begins with a reparameterizable proposal distribution $q_\phi(z)$ (e.g., a Gaussian) and transforms it toward the target posterior using a smoothed rejection sampling mechanism.
- Smoothed Rejection Sampling: Instead of binary acceptance, RVRS uses a logistic function to define an acceptance probability $a_{\phi,\theta}(z)$ based on the log-ratio of the target and proposal densities.
- Reparameterized Gradient Estimator: The primary contribution is a novel gradient estimator for the proposal parameters $\phi$. By exploiting the reparameterizability of the proposal, we derive a low-variance pathwise gradient that maintains the connection between parameters and samples through the rejection step.
- Adaptive Thresholding: To manage the trade-off between approximation quality and computational cost, we implement a gradient-based method to automatically tune the rejection threshold $T$, allowing for direct control over the expected acceptance rate.
- Semi-RVRS: For large-scale hierarchical models, we propose a hybrid approach where global variables are modeled with standard parametric distributions and local variables utilize RVRS, facilitating efficient mini-batch training.
Experimental Evaluation
The authors evaluated RVRS across a diverse set of benchmarks to test its versatility and scalability:
- Logistic Regression: Five UCI datasets (Adult, Bank, Mushroom, Thyroid, Spambase) with varying dimensions.
- Gaussian Process Classification: High-dimensional latent space problems using MiniBooNE, SUSY, and Higgs datasets.
- Variational Autoencoders (VAEs): Amortized inference on the MNIST dataset.
- Hierarchical Models: Bayesian linear regression with Student's t-likelihood on Pol and Bike datasets.
Key Insights and Results
Posterior Sculpting
RVRS actively "sculpts" the proposal density. As shown in Figure 1, a simple Gaussian proposal can be transformed into a complex, non-Gaussian shape that accurately matches challenging target distributions, such as the "funnel" distribution. This allows the method to capture non-parametric features that fixed parametric families cannot.
Stability in High Dimensions
The reparameterized estimator significantly reduces gradient variance compared to standard VRS. Figure 2 illustrates that while standard VRS variance scales poorly with dimension $D$, the RVRS estimator remains stable, enabling its application to high-dimensional problems (up to 256 latent dimensions).
Efficiency and Performance
RVRS consistently outperformed mean-field and multivariate normal baselines. In VAE experiments, RVRS was approximately 5.6x faster than Uncorrected Hamiltonian Annealing (UHA-20) while achieving comparable or superior Evidence Lower Bounds (ELBO). Even with low acceptance rates (5-10%), RVRS matches the accuracy of more expensive MCMC-based methods, providing a "sweet spot" between speed and fidelity.
Conclusion
RVRS provides a powerful alternative to standard variational approximations and expensive MCMC methods. By deriving a low-variance reparameterized gradient for rejection sampling, the authors have made this hybrid approach viable for high-dimensional continuous latent variable models. While rejection sampling eventually faces the curse of dimensionality, RVRS demonstrates impressive performance in moderate to high dimensions. Future work includes exploring more sophisticated initial proposals and refining gradient estimators for model parameters.
Summary updated