-
Notifications
You must be signed in to change notification settings - Fork 162
Description
One feature of Turing
(and similar PPLs) that I am sorely missing in Gen
is the ability to automatically reparameterize a probabilistic program with one or more variables (or I guess, "choices" in the language of Gen) that have bounded support under a transformed space with unbounded support. This means automatically applying transforms such as log
and logit
for the cases of single and double bounded support respectively. As far as I can tell, it's possible to do this manually for any particular program with @transform
, but there does not appear to be any kind of automatic transformation based on the support of the prior distributions.
My question is, therefore, how hard would it be to implement a function (or macro?) that would automatically generate a trace translator alongside the generative function which applies such a reparameterization? Being somewhat new to Gen and its internals, it's a bit hard for me to judge this. I can see where it might be tricky, especially for dynamic generative functions.
I would be curious to hear the opinions of the primary maintainers on what it would take to implement this. I would imagine that this has been discussed before.