[Paper Review] Variance reduction properties of the reparameterization trick
This paper provides a theoretical analysis of why the reparameterization trick reduces gradient variance in variational inference, showing that under mean-field Gaussian and quadratic log-joint density assumptions, the reparameterization gradient estimator has lower marginal variance than the score function estimator due to reduced variation over the sampling region. The key contribution is a formal variance decomposition that explains the empirical success of the reparameterization trick.
The reparameterization trick is widely used in variational inference as it yields more accurate estimates of the gradient of the variational objective than alternative approaches such as the score function method. Although there is overwhelming empirical evidence in the literature showing its success, there is relatively little research exploring why the reparameterization trick is so effective. We explore this under the idealized assumptions that the variational approximation is a mean-field Gaussian density and that the log of the joint density of the model parameters and the data is a quadratic function that depends on the variational mean. From this, we show that the marginal variances of the reparameterization gradient estimator are smaller than those of the score function gradient estimator. We apply the result of our idealized analysis to real-world examples.
Motivation & Objective
- To understand the theoretical reasons behind the superior performance of the reparameterization trick in variational inference.
- To compare the variance properties of the reparameterization gradient estimator and the score function gradient estimator under idealized assumptions.
- To derive analytical expressions for marginal variances of both estimators in a simplified setting where the variational approximation is mean-field Gaussian and the log-joint density is quadratic in the variational mean.
- To validate the theoretical findings on real-world models where the assumptions do not strictly hold, such as multinomial logistic regression and Bayesian neural networks.
Proposed method
- Assume a mean-field Gaussian variational approximation and a quadratic log-joint density function that depends on the variational mean, enabling analytical tractability.
- Derive closed-form expressions for the marginal variances of the score function and reparameterization gradient estimators using second-order Taylor expansion of the log-joint density.
- Apply Rao-Blackwellization to derive a lower bound on the marginal variance of the score function estimator, enabling direct comparison with the reparameterization estimator.
- Use the derived variance expressions to analyze how curvature, scale parameters, and mean values affect estimator efficiency.
- Validate theoretical insights on real models: Bayesian multinomial logistic regression and a two-layer Bayesian neural network, despite non-quadratic log-joint densities.
- Conduct three experiments on MNIST data to study the impact of scale parameters and mean values on gradient variance, comparing empirical results with theoretical predictions.
Experimental results
Research questions
- RQ1Why does the reparameterization trick yield lower-variance gradient estimators than the score function method in practice?
- RQ2How do the marginal variances of the score function and reparameterization gradient estimators compare under mean-field Gaussian and quadratic log-joint assumptions?
- RQ3What role does the variation of the gradient estimator over its sampling region play in determining variance reduction?
- RQ4How do curvature, scale parameters, and mean values affect the relative efficiency of the two gradient estimators?
- RQ5To what extent do the theoretical variance expressions derived under idealized assumptions still explain gradient variance behavior in non-ideal, real-world models?
Key findings
- The reparameterization gradient estimator has lower marginal variance than the score function estimator because it exhibits less variation over the sampling region of the variational distribution.
- The score function estimator contains higher-order powers of the variational mean, leading to greater variability compared to the reparameterization estimator.
- Marginal variances for both estimators increase with the local curvature of the log-joint density around the variational mean, as measured by the norm of the Hessian matrix.
- The score function estimator's marginal variance increases as the variational scale parameters approach zero, whereas the reparameterization estimator remains stable under such conditions.
- Despite the non-quadratic nature of the log-joint density in Bayesian neural networks, the theoretical intuition about reduced variation over the sampling region still explains the variance reduction observed in practice.
- Empirical results on MNIST logistic regression show that the theoretical variance expressions capture the trend in gradient variance, especially when scale parameters are small, even though the approximation degrades as variance increases.
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.