--- id: diffrax version: "0.7.2" license: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) license_treatment: permissive maintenance: active --- # diffrax — GPU+autodiff-capable ODE/SDE/CDE solvers written in JAX. License: permissive · Maintenance: active · Downloads: 357.1K/mo ## What it is and what it does Diffrax is a JAX-native library for solving differential equations—ODEs, SDEs, and CDEs—with full automatic differentiation and GPU support. It unifies the treatment of different equation types under a single internal architecture, making it compact and composable. The library is designed for researchers and practitioners working with neural differential equations, dynamical systems, and scientific computing where gradient-based optimization through the solver is needed. The package integrates tightly with the JAX ecosystem (equinox, jaxtyping, lineax, optimistix) and supports advanced features like vmappable solvers, PyTree state representations, dense solutions, and multiple adjoint methods for backpropagation. It includes a range of solvers from standard choices like Dopri5 to specialized symplectic and implicit methods, all callable from a unified interface. Use it for: - Training neural differential equations where gradients flow through the solver during backpropagation. - Solving systems of ODEs/SDEs on GPU for large-scale scientific simulations with automatic differentiation. - Implementing controlled differential equations for sequence modeling and time-series tasks. - Research prototyping of dynamical systems where vmappable solvers enable batched integration over parameter ranges. - Combining differential equation solving with JAX's functional programming model in end-to-end differentiable pipelines. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Diffrax provides numerical solvers for ordinary, stochastic, and controlled differential equations in JAX, with automatic differentiation and GPU acceleration built in. Yes, if you work with differential equations in JAX or need autodiff through a solver. Low install friction, active maintenance, permissive license, and no known vulnerabilities. The Alpha status and tight coupling to the JAX ecosystem mean it's best suited for research and projects where you can tolerate API changes; for production systems requiring long-term stability, verify that the specific solver and adjoint method you need are stable. ## Install pip install diffrax uv add diffrax poetry add diffrax ## Installing diffrax Before you install: Low friction install with a pure-Python wheel. Requires Python 3.11+ and depends on established JAX ecosystem packages (equinox, jax, jaxtyping, lineax, optimistix). Repository is active with recent commits and 2084 stars. License in practice: Apache 2.0 permissive license allows commercial and derivative use with minimal restrictions—you must include a copy of the license and note any modifications, but there are no copyleft obligations. Quickstart: pip install diffrax from diffrax import diffeqsolve, ODETerm, Dopri5 import jax.numpy as jnp def f(t, y, args): return -y term = ODETerm(f) solver = Dopri5() y0 = jnp.array([2., 3.]) solution = diffeqsolve(term, solver, t0=0, t1=1, dt0=0.1, y0=y0) Requires Python 3.11+; JAX must be installed and functional (may require GPU/TPU drivers for hardware acceleration). Verify before relying: - Whether all solver types (Tsit5, Dopri8, symplectic, implicit) are production-ready or still experimental given Alpha status. - Performance characteristics and numerical accuracy compared to other differential equation libraries. - Specific GPU/TPU compatibility and performance gains in practice. ## Package facts - License: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 357.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags differential equation solver jax, ode sde cde solvers, neural differential equations, autodiff gpu differential equations, jax numerical integration, dynamical systems solver, stochastic differential equations jax, jax-ecosystem, neural-odes, autodiff [View on SkillFed](https://skillfed.io/packages/diffrax) · [View on PyPI](https://pypi.org/project/diffrax/)