FFVB: Reparameterization Trick
This section describes a control variate technique for variance reduction.
See: Variational Bayes Introduction, Fixed Form Variational Bayes
Reparameterization Trick
We emphasize that
where
where the
In particular, the gradient
hence
The gradient
The reparametrization gradient estimator
In typical VB applications, the number of Monte Carlo samples
With the reparameterization trick, a small
Algorithm 6 provides a detailed implementation of the FFVB approach that uses the reparameterization trick and adaptive learning. A small modification of Algorithm 6 (not presented) gives the implementation of the FFVB approach that uses the reparameterization trick and natural gradient.
Algorithm 6: FFVB with reparameterization trick and adaptive learning
- Input: Initial
, adaptive learning weights , fixed learning rate , threshold , rolling window size and maximum patience . Model-specific requirement: function and its gradient . - Initialization
- Generate
, . -
Compute the unbiased estimate of the LB gradient
- Set
, , , . - Set
, and .
- Generate
- While
:- Generate
, -
Compute the unbiased estimate of the LB gradient
-
Compute
and -
Compute
and update -
Compute the lower bound estimate
-
If
: compute the moving average lower boundand if
patience = 0; else . - If
, - Set
- Generate
Next: GVB with Cholesky decomposed covariance