probability icon indicating copy to clipboard operation
probability copied to clipboard

Status of tfp.experimental.tangent_spaces

Open carlosgmartin opened this issue 2 years ago • 3 comments

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:

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.

carlosgmartin avatar Mar 28 '23 23:03 carlosgmartin

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:

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: @.***>

brianwa84 avatar Apr 03 '23 17:04 brianwa84

There's now a GeneralSpace in 30c494e3b4acbae039e5c1e74c1e310fc378eafe The test there gives some sense as to how it could be applied, e.g. HalfSphereSpaceTest.

brianwa84 avatar Apr 13 '23 13:04 brianwa84

Better yet, @srvasude just committed https://github.com/tensorflow/probability/commit/c7f0ce4dfc128b63526079173207353b0496dc54 which should make the spherical distributions transform correctly in tfp-nightly!

brianwa84 avatar Apr 19 '23 11:04 brianwa84