patrick-kidger / patrick-kidger/diffrax
Add support for Jax.experimental.jet.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.1k
- Forks
- 189
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 1
Description
Is it possible to add support to diffrax for jax.experimental.jet? I would like be able to calculate higher order derivatives of the output of an ODE with respect to it's input, and repeated calls to the jacobian are obviously slow to perform. It seems like jax.jet provides a solution to this problem (see: https://github.com/jax-ml/jax/issues/5152#issuecomment-2636319226 and https://github.com/robochimps/vibrojet/blob/main/examples/jet_example.ipynb), as it is capable of reusing previous partial derivatives to calculate the next in a series. I understand that there is currently no jet rule for lax.scan and lax.while which might complicate matters, but even so is this something that could eventually be implemented into diffrax?
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
Start by reviewing diffrax's tracing and differentiation paths alongside the referenced JAX jet example and the lack of jet rules for lax.scan and lax.while. Determine whether higher-order derivatives through an ODE can be supported, then verify that jax.experimental.jet works for the relevant solver paths and repeated derivative calculations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100