diffrax: a JAX-based library for autodifferentiable and GPU-capable numerical differential equation solvers

diffrax: a JAX-based library for autodifferentiable and GPU-capable numerical differential equation solvers

What it solves

Diffrax provides a way to numerically solve differential equations—specifically ordinary (ODE), stochastic (SDE), and controlled (CDE) equations—within the JAX ecosystem. It enables these solvers to be autodifferentiable and capable of running on GPUs, which is essential for integrating physics-based models with machine learning.

How it works

Built on JAX, the library uses a unified internal structure to handle different types of equations. It supports a wide variety of solvers (such as Tsit5 and Dopri8), allows the state to be represented as a PyTree, and provides multiple adjoint methods for backpropagation. Because it is JAX-based, almost every part of the process, including the region of integration, is vmappable.

Who it’s for

It is designed for researchers and developers working in scientific computing and AI, particularly those implementing neural differential equations or needing high-performance, differentiable numerical solvers.

Highlights

  • Supports ODE, SDE, and CDE solvers.
  • Fully autodifferentiable and GPU-compatible.
  • Vmappable operations across the library.
  • Support for neural differential equations.
  • Includes a diverse range of solvers, including symplectic and implicit options.

Sources