-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Score-based density estimators for SBI #1015
Conversation
@pfuhr do you agree to your contributions being re-licensed under Apache 2.0 in the future? |
Yes, I agree that my contributions are re-licensed under Apache 2.0 in the future. |
Alright, I integrated everything with the current main and fixed some problematic side effects/bugs we introduced. The following stuff still has to be implemented/improved:
If you have time/want to do some of the points @rdgao @jsvetter, let me know. We can also chat about what should be done in more detail. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1015 +/- ##
==========================================
- Coverage 85.44% 78.20% -7.24%
==========================================
Files 101 110 +9
Lines 7941 8632 +691
==========================================
- Hits 6785 6751 -34
- Misses 1156 1881 +725
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
partial review.
dc853d3
to
d554a35
Compare
3511a09
to
80e87b8
Compare
c0217b4
to
e53ed53
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left quite a few comments, but most can be addressed pretty easily. I think we're almost ready to merge this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got tired towards the end, but reviewed about 80%
…d fixed some docstrings
59ab6fe
to
6daf716
Compare
6daf716
to
cb6adff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Pushed a couple of small doc fixes but otherwise happy to merge!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks all good now. Great effort everyone 👏
What does this implement/fix? Explain your changes
This PR implements score-based methods for SBI (and related methods like flow matching). The first goal is to have a running version for score-based NPE. Later-on NLE, sequential methods and methods that can deal with multiple observations can be tackled.
This includes new base-classes for the required vectorfield-estimators and posteriors.
PosteriorScoreBasedPotential
andScorePosterior
gradient
method to all potentials, e.g., for running gradient ascent for MAP. (NPSE can directly use the score then, other potentials use autograd on the log_prob)Left for a future PR (see #1226 ):
iid_bridge
for IID data as in Geffner et al.Does this close any currently open issues?
fixes #962
fixes #956