Status of tfp.experimental.tangent_spaces
When I use a TransformedDistribution with base SphericalUniform, I get incorrect densities. This is because the Bijector is applied to a manifold of strictly-lower intrinsic dimension than the space it is embedded in. (This is called the base measure problem.) Looking for a solution, I came across the following in the documentation:
- tfp.experimental.tangent_spaces
- tfd.Distribution.experimental_local_measure
- tfb.Bijector.experimental_compute_density_correction
These solve the problem by passing around a TangentSpace along with the point. I was wondering what the status of these components is, and whether there are any plans to add them to distributions like SphericalUniform.
We started the work to fix this, but GeneralSpace (the tangent space we might fall back to for spherical distributions) is not yet implemented. I think internally we have a (non-batch-friendly) version of GeneralSpace that we could maybe push into experimental.
Brian Patton | Software Engineer | @.***
On Tue, Mar 28, 2023 at 7:43 PM Carlos Martin @.***> wrote:
When I use a TransformedDistribution https://www.tensorflow.org/probability/api_docs/python/tfp/substrates/jax/distributions/TransformedDistribution with base SphericalUniform https://www.tensorflow.org/probability/api_docs/python/tfp/substrates/jax/distributions/SphericalUniform, I get incorrect densities. This is because the Bijector https://www.tensorflow.org/probability/api_docs/python/tfp/substrates/jax/bijectors/Bijector is applied to a manifold of strictly-lower intrinsic dimension than the space it is embedded in. (This is called the base measure problem https://proceedings.mlr.press/v130/radul21a.html.) Looking for a solution, I came across the following in the documentation:
- tfp.experimental.tangent_spaces https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/tangent_spaces/
- tfd.Distribution.experimental_local_measure https://www.tensorflow.org/probability/api_docs/python/tfp/substrates/jax/distributions/Distribution#experimental_local_measure
- tfb.Bijector.experimental_compute_density_correction https://www.tensorflow.org/probability/api_docs/python/tfp/substrates/jax/bijectors/Bijector#experimental_compute_density_correction
These solve the problem by passing around a TangentSpace https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/tangent_spaces/TangentSpace along with the point. I was wondering what the status of these components is, and whether there are any plans in the near future to add them for distributions like SphericalUniform.
— Reply to this email directly, view it on GitHub https://github.com/tensorflow/probability/issues/1708, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFJFSI3IGJW3SHAQWCFHF5TW6NZSFANCNFSM6AAAAAAWLHEBUU . You are receiving this because you are subscribed to this thread.Message ID: @.***>
There's now a GeneralSpace in 30c494e3b4acbae039e5c1e74c1e310fc378eafe The test there gives some sense as to how it could be applied, e.g. HalfSphereSpaceTest.
Better yet, @srvasude just committed https://github.com/tensorflow/probability/commit/c7f0ce4dfc128b63526079173207353b0496dc54 which should make the spherical distributions transform correctly in tfp-nightly!