Skip to content

Implement Sylvester NFs (van den Berg et al. 2019) with a tanh residual transform, and Planar as a special case - #80

Open
bhvieira wants to merge 2 commits into
probabilists:masterfrom
bhvieira:sylvester
Open

bhvieira wants to merge 2 commits into
probabilists:masterfrom
bhvieira:sylvester

Conversation

@bhvieira

@bhvieira bhvieira commented Sep 23, 2026 •

Copy link
Copy Markdown

This is the first attempt to add Sylvester Normalizing Flows (van den Berg et al. 2019), and also Planar flows (Rezende et al. 2015), both listed in #28 as requested flow architectures.

The inverse and thus sampling are solved through a bisection method.

I'm open to comments and suggestions! Let me know if anything needs improvement. The part I'm least sure about is the inverse:

  • The planar transform’s denominator clamp breaks its invertibility guarantee
  • Small norm householder vectors produce a nonorthogonal matrix
  • Float32 saturation in tanh lets diagonal products reach -1 producing an infinite negative log determinant
    I haven't found these issues in practice yet, but I think the code is definitely vulnerable to these

@bhvieira bhvieira changed the title Implement Sylvester NFs (van den Berg et al. 2019) with Planar as a special case Implement Sylvester NFs (van den Berg et al. 2019) with a tanh residual transform, and Planar as a special case Sep 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant