patrick-kidger / patrick-kidger/diffrax
Specify solver orders for SDEs more precisely
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.1k
- Forks
- 189
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 1
Description
At the moment:
- the ODE order is specified
- an SDE order is specified -- in principle for whatever the most general type of noise that solver is expecting. (e.g. general noise for Euler, commutative noise for Milstein)
This isn't very flexible. For example what about solving an additive-noise problem with Heun? In this case Heun gets strong order 1, rather than the 0.5 it is specified with. At the moment orders are (only) used for adaptive stepping, so practically speaking this can be handled by passing the appropriate local_order to diffrax.PIDController, but this isn't well-advertised.
Generally speaking determining this automatically seems to be a huge can of worms. The strong convergence order for every kind of solver for every kind of noise simply aren't known. (Which is the reason we punt the problem into user-land instead.) Moreover we'd probably need to do some pretty involved introspection of the information we're passed to determine what kind of order to expect, that may well simply be wrong in edge cases.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the current ODE/SDE order handling and the local_order option on diffrax.PIDController, starting with the solver-order behavior described here. Determine how order should be specified for different noise assumptions, and verify that adaptive stepping can represent the additive-noise Heun case without relying on an undocumented workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100