sbi icon indicating copy to clipboard operation
sbi copied to clipboard

Use ODE solvers/integrators to improve score matching training

Open psteinb opened this issue 9 months ago • 1 comments

🚀 Feature Request

Is your request related to a problem?

The Score Matching Estimators do benefit from solving the ODE which they approximate by establishing an SDE during training. ODEs would help solve the continuous problem, while the SDEs remain in the discrete representation.

...

Describe the solution you'd like

We would have to research which ODE solvers we may want to interface with. A simple solution would be to convert all torch.Tensor instances into numpy.ndarrays and use scipy.odeint as scipy is already a dependency of sbi. However, this will likely not work for bigger problem sizes.

Describe alternatives you've considered

As suggested by @gmoss13, a viable library to do the ODE integration within pytorch would be torchdiffeq. But more research is required to check pros/cons of adding this or any other library as a dependency to sbi

📌 Additional Context

ODE based training for score matching estimators will support high dimensionality use cases of sbi

psteinb avatar Mar 18 '25 10:03 psteinb

This has been solved in the refactoring of NPSE and FMPE into the vector field estimators, no?

It's now possible to train a NPSE and then sample with ode backend via zuko.

what would be the benefits of torchdiffeq over zuko?

janfb avatar Oct 20 '25 11:10 janfb