Skip to content
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

additional features for NPSE #1370

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

gmoss13
Copy link
Contributor

@gmoss13 gmoss13 commented Jan 18, 2025

What does this implement/fix? Explain your changes

This introduces some additional features for score estimation named in #1226, namely:

  • allow enable_transform = True for score-based potentials
  • implement MAP calculation for score-based posteriors
  • Implements rejection sampling for score-based posteriors to ensure prior coverage
  • Allow IID observations for score-based posteriors (@manuelgloeckler has started working on this - let's discuss what's missing and merge our branches)
  • implements custom converged() method for NPSE

Does this close any currently open issues?

#1226

Any relevant code examples, logs, error output, etc?

Any other comments?

  • Currently, calling score_based_posterior.map() is still quite slow. We get the gradient of the log probs with respect to theta by using the score estimator, but still computing the log-probs explicitly in gradient_ascent, which is more expensive. To get around this, we save a low-accuracy ode_flow to calculate the log-probs more quickly. Ideally, we might want to write a custom gradient_ascent function for calculating the MAP for score estimators to avoid doing this altogether.
  • I increased the tolerance of the test in linearGaussian_npse_test.py::test_npse_map - as far as I can tell, the reason this failed with the lower tolerance is not because of MAP calculation, but because score-based posteriors are currently slightly less accurate (at least for our test tasks).

@gmoss13 gmoss13 linked an issue Jan 18, 2025 that may be closed by this pull request
@gmoss13 gmoss13 force-pushed the 1226-missing-features-and-todos-for-score-estimation branch from 53bd4f9 to 0b49bf3 Compare January 18, 2025 18:58
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.

missing features and todos for score estimation
1 participant