[Paper Review] Reparameterization Gradients through Acceptance-Rejection Sampling Algorithms
This paper introduces Rejection Sampling Variational Inference (RSVI), a method that enables reparameterization gradients for variational distributions simulated via acceptance-rejection sampling—commonly used for distributions like Gamma and Dirichlet. By leveraging differentiable transformations from established rejection sampling algorithms, RSVI achieves significantly lower gradient variance than state-of-the-art methods, leading to faster convergence in stochastic gradient variational inference.
Variational inference using the reparameterization trick has enabled large-scale approximate Bayesian inference in complex probabilistic models, leveraging stochastic optimization to sidestep intractable expectations. The reparameterization trick is applicable when we can simulate a random variable by applying a differentiable deterministic function on an auxiliary random variable whose distribution is fixed. For many distributions of interest (such as the gamma or Dirichlet), simulation of random variables relies on acceptance-rejection sampling. The discontinuity introduced by the accept-reject step means that standard reparameterization tricks are not applicable. We propose a new method that lets us leverage reparameterization gradients even when variables are outputs of a acceptance-rejection sampling algorithm. Our approach enables reparameterization on a larger class of variational distributions. In several studies of real and synthetic data, we show that the variance of the estimator of the gradient is significantly lower than other state-of-the-art methods. This leads to faster convergence of stochastic gradient variational inference.
Motivation & Objective
- To extend the applicability of reparameterization gradients beyond exponential family distributions to those requiring acceptance-rejection sampling.
- To address the high variance of gradient estimators in stochastic variational inference when using non-differentiable accept-reject steps.
- To enable efficient, low-variance optimization for complex probabilistic models with flexible variational families.
- To leverage decades of research in rejection sampling transformations to construct differentiable, black-box reparameterization schemes.
Proposed method
- The method formulates variational inference using rejection sampling algorithms as the underlying simulation mechanism for latent variables.
- It identifies differentiable transformations within existing rejection samplers (e.g., for Gamma and Dirichlet) and uses them to construct reparameterization gradients.
- The approach 'removes the lid' from black-box rejection samplers, treating the accept-reject decision as a differentiable process via implicit reparameterization.
- It applies shape augmentation and stochastic optimization to further reduce gradient variance.
- The method supports both location-scale and shape-scale parameterizations of variational distributions.
- It integrates seamlessly with automatic differentiation frameworks like autograd for end-to-end training.
Experimental results
Research questions
- RQ1Can reparameterization gradients be effectively applied to variational distributions generated via acceptance-rejection sampling, despite the discontinuity in the accept-reject step?
- RQ2How does the variance of the gradient estimator from RSVI compare to state-of-the-art methods like g-rep and BBVI in complex models?
- RQ3To what extent does RSVI improve convergence speed and stability in stochastic gradient variational inference for models with Gamma and Dirichlet factors?
- RQ4Can the method be generalized to other rejection-based samplers, such as adaptive or sequential rejection sampling?
- RQ5What is the computational cost and scalability of RSVI compared to existing gradient estimation techniques?
Key findings
- RSVI reduces gradient variance by up to 3–4 orders of magnitude compared to g-rep, with median variance reductions from 1.2e4 to 4.5e3 on the NIPS dataset.
- On the Olivetti faces dataset, RSVI achieves significantly faster initial improvement in the ELBO compared to g-rep, BBVI, and ADVI.
- The method achieves approximately two times faster wall-clock convergence than g-rep in comparable implementations.
- Increasing the number of shape augmentation steps (B) further reduces gradient variance, with maximum variance dropping from 3.5e12 to 1.6e11 as B increases.
- RSVI enables reparameterization for a broader class of distributions, including Gamma and Dirichlet, which were previously intractable with standard reparameterization.
- The approach is computationally efficient, as rejection sampling transformations are typically cheaper to evaluate than alternative gradient estimation schemes.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.