{"id":13520932,"url":"https://github.com/patrick-kidger/diffrax","last_synced_at":"2025-11-17T15:32:10.274Z","repository":{"id":37473060,"uuid":"389461512","full_name":"patrick-kidger/diffrax","owner":"patrick-kidger","description":"Numerical differential equation solvers in JAX. Autodifferentiable and GPU-capable. https://docs.kidger.site/diffrax/","archived":false,"fork":false,"pushed_at":"2025-04-25T15:28:01.000Z","size":7207,"stargazers_count":1607,"open_issues_count":189,"forks_count":147,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-04-27T03:58:57.792Z","etag":null,"topics":["deep-learning","differential-equations","dynamical-systems","equinox","jax","machine-learning","neural-differential-equations","neural-networks"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patrick-kidger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["patrick-kidger"]}},"created_at":"2021-07-25T23:42:12.000Z","updated_at":"2025-04-27T00:06:32.000Z","dependencies_parsed_at":"2023-10-16T14:15:23.746Z","dependency_job_id":"f2a1c9d3-1c19-4517-929b-bb7b65cb161e","html_url":"https://github.com/patrick-kidger/diffrax","commit_stats":{"total_commits":543,"total_committers":28,"mean_commits":"19.392857142857142","dds":"0.12154696132596687","last_synced_commit":"ada5229c46ed041b30090b969f9943082e5300d6"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrick-kidger%2Fdiffrax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrick-kidger%2Fdiffrax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrick-kidger%2Fdiffrax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrick-kidger%2Fdiffrax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrick-kidger","download_url":"https://codeload.github.com/patrick-kidger/diffrax/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251085194,"owners_count":21533841,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","differential-equations","dynamical-systems","equinox","jax","machine-learning","neural-differential-equations","neural-networks"],"created_at":"2024-08-01T06:00:24.578Z","updated_at":"2025-11-17T15:32:10.231Z","avatar_url":"https://github.com/patrick-kidger.png","language":"Python","funding_links":["https://github.com/sponsors/patrick-kidger"],"categories":["Models and Projects","Software","Python","1. Core Frameworks \u0026 Libraries","⚗️ Scientific Machine Learning","Libraries"],"sub_categories":["Python","Neural Differential Equations","New Libraries"],"readme":"\u003ch1 align='center'\u003eDiffrax\u003c/h1\u003e\n\u003ch2 align='center'\u003eNumerical differential equation solvers in JAX. Autodifferentiable and GPU-capable.\u003c/h2\u003e\n\nDiffrax is a [JAX](https://github.com/google/jax)-based library providing numerical differential equation solvers.\n\nFeatures include:\n\n- ODE/SDE/CDE (ordinary/stochastic/controlled) solvers;\n- lots of different solvers (including `Tsit5`, `Dopri8`, symplectic solvers, implicit solvers);\n- vmappable _everything_ (including the region of integration);\n- using a PyTree as the state;\n- dense solutions;\n- multiple adjoint methods for backpropagation;\n- support for neural differential equations.\n\n_From a technical point of view, the internal structure of the library is pretty cool -- all kinds of equations (ODEs, SDEs, CDEs) are solved in a unified way (rather than being treated separately), producing a small tightly-written library._\n\n## Installation\n\n```\npip install diffrax\n```\n\nRequires Python 3.10+.\n\n## Documentation\n\nAvailable at [https://docs.kidger.site/diffrax](https://docs.kidger.site/diffrax).\n\n## Quick example\n\n```python\nfrom diffrax import diffeqsolve, ODETerm, Dopri5\nimport jax.numpy as jnp\n\ndef f(t, y, args):\n    return -y\n\nterm = ODETerm(f)\nsolver = Dopri5()\ny0 = jnp.array([2., 3.])\nsolution = diffeqsolve(term, solver, t0=0, t1=1, dt0=0.1, y0=y0)\n```\n\nHere, `Dopri5` refers to the Dormand--Prince 5(4) numerical differential equation solver, which is a standard choice for many problems.\n\n## Citation\n\nIf you found this library useful in academic research, please cite: [(arXiv link)](https://arxiv.org/abs/2202.02435)\n\n```bibtex\n@phdthesis{kidger2021on,\n    title={{O}n {N}eural {D}ifferential {E}quations},\n    author={Patrick Kidger},\n    year={2021},\n    school={University of Oxford},\n}\n```\n\n(Also consider starring the project on GitHub.)\n\n## See also: other libraries in the JAX ecosystem\n\n**Always useful**  \n[Equinox](https://github.com/patrick-kidger/equinox): neural networks and everything not already in core JAX!  \n[jaxtyping](https://github.com/patrick-kidger/jaxtyping): type annotations for shape/dtype of arrays.  \n\n**Deep learning**  \n[Optax](https://github.com/deepmind/optax): first-order gradient (SGD, Adam, ...) optimisers.  \n[Orbax](https://github.com/google/orbax): checkpointing (async/multi-host/multi-device).  \n[Levanter](https://github.com/stanford-crfm/levanter): scalable+reliable training of foundation models (e.g. LLMs).  \n[paramax](https://github.com/danielward27/paramax): parameterizations and constraints for PyTrees.  \n\n**Scientific computing**  \n[Optimistix](https://github.com/patrick-kidger/optimistix): root finding, minimisation, fixed points, and least squares.  \n[Lineax](https://github.com/patrick-kidger/lineax): linear solvers.  \n[BlackJAX](https://github.com/blackjax-devs/blackjax): probabilistic+Bayesian sampling.  \n[sympy2jax](https://github.com/patrick-kidger/sympy2jax): SymPy\u003c-\u003eJAX conversion; train symbolic expressions via gradient descent.  \n[PySR](https://github.com/milesCranmer/PySR): symbolic regression. (Non-JAX honourable mention!)  \n\n**Awesome JAX**  \n[Awesome JAX](https://github.com/n2cholas/awesome-jax): a longer list of other JAX projects.  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrick-kidger%2Fdiffrax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrick-kidger%2Fdiffrax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrick-kidger%2Fdiffrax/lists"}