Baselines for reparameterizable variables

Is there an idiomatic way to use baselines with reparameterizable variables? (For example, Reducing reparameterization gradient variance.) Or should I subclass TraceGraph_ELBO and implement this?

TraceGraph_ELBO appears to only use baselines if they are defined on non-reparameterizable variables. If baselines are provided on reparameterizable variables, they are ignored. (At least, that is my understanding based on the documentation and source code.)

Is something like what is described in the paper referenced already implemented under the hood in TraceGraph_ELBO? If not, is it because these methods not (anecdotally) helpful? Would an as-general-as-possible implementation of the method in the paper be a useful contribution to the pyro package?

Thanks

i’m assuming by baselines you mean control variates?

in any case the answer is no. we have no machinery for reducing gradient variance for reparameterizable latent variables, since that usually isn’t much of an issue in practice (and increasing the number of particles can be effective where it is an issue).

from my perspective there are at least two reasons we haven’t implemented methods like those you linked:

  • they are difficult (or at least annoying) to implement in full generality
  • they don’t seem to be all that effective empirically, at least given the complexity involved

contributions are always welcome. but can you maybe give some more context about the problem(s) you’re interested in?

1 Like

Yes, I mean control variates. I was able to resolve the issue I was having without adding control variates. I was interested in implementing this because I was running up against memory limitations.

I was also curious about the internals and about the effectiveness of variance reduction techniques for reparameterizable variables. Thanks for the info.

please see e.g. this more recent paper for better approaches

1 Like