blei-lab / edward

A probabilistic programming language in TensorFlow. Deep generative models, variational inference.
http://edwardlib.org
Other
4.83k stars 760 forks source link

raise error if HMC explores outside boundary #799

Open dustinvtran opened 6 years ago

dustinvtran commented 6 years ago

Raised by private discussions with Anne Bauer, when say, you define a Uniform latent variable over (0, 3) and perform HMC on it. There is no explicit error and HMC just "runs". The only indication of error is with acceptance rate 1 or 0.

emilemathieu commented 6 years ago

You could "link" distributions so that their new image spaces are uncounstrained. Therefore you avoid rejecting HMC proposal because of distributions support being violated. Then you "unlink" them when needed. That's what's done in Stan (and Turing).

dustinvtran commented 6 years ago

If I understand correctly, linking requires evaluation to access the supports. This is not possible with TensorFlow's deferred execution model. Instead, it requires a more sophisticated system for parameterizing a Distribution's support such that bijectors can be a function of its Tensor boundaries.