tensorflow / tensorflow/probability

Variational Gaussian process loss- possible math error

Open
#1,304 1 comment 0 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

In the documentation for variational Gaussian process applied to minibatches (https://github.com/tensorflow/probability/blob/v0.12.1/tensorflow_probability/python/distributions/variational_gaussian_process.py#L572), the KL term is rescaled by batch_size/num_training_points_. I assume the reconstruction error term (expected log-likelihood) is not scaled and represents a sum over all data points in the minibatch. My understanding is the unbiased estimator for the full-data variational loss should instead be given -(num_training_points_/batch_size)*reconstruction_error + KL_term (or, on a per-observation basis, this could be divided by the total observations constant: -(1/batch_size)*reconstruction_error + (1/num_training_points_)*KL_term). Otherwise, if the batch size is not constant across minibatches, the estimator will be biased. If this is true, perhaps the weight should be on the reconstruction error term instead of the KL term in the variational_loss. Please let me know if I am missing something.

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 variational Gaussian process documentation and implementation around line 572 of tensorflow_probability/python/distributions/variational_gaussian_process.py, then inspect the variational_loss API behavior. Verify how reconstruction and KL terms are scaled for minibatches of different sizes; done means the estimator's scaling is confirmed and the implementation or documentation is corrected accordingly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.