tensorflow / tensorflow/probability

What is the difference between DenseVariational and DenseReparameterization?

Open
#727 9 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
4.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

The (global) re-parametrization trick is described in the paper Auto-Encoding Variational Bayes. The local re-parametrization trick is described in Variational Dropout and the Local Reparameterization Trick. The flipout estimator is described in Flipout: Efficient Pseudo-Independent Weight Perturbations on Mini-Batches.

The documentation of the tfp.layers.DenseVariational says

This layer uses variational inference to fit a "surrogate" posterior to the distribution over both the kernel matrix and the bias terms

This layer fits the "weights posterior" according to the following generative process:

[K, b] ~ Prior()
M = matmul(X, K) + b
Y ~ Likelihood(M)

How is this different than variational inference with the re-parametrization trick? Does it mean that, in the case of tfp.layers.DenseVariational, you directly sample from the prior? Shouldn't this create high variance during training? Moreover, shouldn't you actually sample from the posterior (rather than the prior)? Finally, what does "likelihood" in Y ~ Likelihood(M) mean?

Can you point me to the paper or implementation that you based your implementation on?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the tfp.layers.DenseVariational and DenseReparameterization API documentation and the three papers linked in the issue. Compare the documented generative process with the implementation and identify what the terms posterior, prior, likelihood, and reparameterization mean there. Done means the documentation clearly answers the listed questions and cites the relevant implementation or source paper.

Written by the indexing model from the issue text.

Assessment

Domain
documentation, machine-learning
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.