# rtqichen/torchdiffeq

Differentiable ODE solvers with full GPU support and O(1)-memory backpropagation.

Repository: https://github.com/rtqichen/torchdiffeq
Canonical: https://ross.abutalabs.com/products/torchdiffeq
Language: Python
License: MIT
License Family: permissive
Last push: 2025-04-04T01:06:00+00:00

## Health v2 (maintenance only)
Score: 39/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 14, release rhythm 35, longevity 100
- inputs: {"age_days": 2849, "days_push": 517, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6477, forks 1000 (observed 2026-08-28T04:09:43.737081+00:00)

## What it is
torchdiffeq is a PyTorch library of differentiable ordinary differential equation (ODE) solvers, best known as the canonical implementation of neural ODEs. It exposes odeint and odeint_adjoint interfaces for solving initial value problems with gradients, using the adjoint method for O(1)-memory backpropagation and full GPU acceleration.

## Use cases
- solve ODE initial value problems with gradients in PyTorch
- train neural ODE / continuous-depth models
- backpropagate through long ODE integrations without storing solver internals
- perform adjoint sensitivity analysis on dynamical systems
- run GPU-accelerated differentiable physics or trajectory simulation
- model systems with differentiable event-based termination

## When to choose
- your model or loss involves integrating an ODE and you need end-to-end gradients in PyTorch
- integration horizons are long enough that standard backprop through solver internals exhausts memory
- you want adaptive-step (e.g., dopri5) ODE solvers that run on GPU as part of a deep learning pipeline
- you are reproducing or extending research on neural ODEs, continuous normalizing flows, or event-triggered dynamics

## When to avoid
- you only need fast non-differentiable ODE solutions in NumPy/SciPy without deep learning
- your stack is JAX, TensorFlow, or another non-PyTorch framework
- you need production-grade stiff-solver features or DAEs beyond what torchdiffeq supports

## Facets
- artifact type: library
- maturity: stable
- function: math, machine-learning, simulation, gpu-computing, deep-learning
- domain: machine-learning, deep-learning, mathematics, simulation
- platform: python, cross-platform
- tags: neural-odes, ode-solver, adjoint-method, differentiable-programming, numerical-integration, dynamical-systems, pytorch, initial-value-problems, scientific-computing, continuous-depth-models, gpu

## Member repositories
- rtqichen/torchdiffeq (main) score 39

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:43.737081+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:44:34.634589+00:00, confidence not recorded.
  - readme: https://github.com/rtqichen/torchdiffeq (fetched 2026-08-28T04:09:43.737081+00:00, sha 7e960d6a3669)
  - registry_pypi: https://pypi.org/pypi/torchdiffeq/json (fetched 2026-08-29T08:41:08.909206+00:00, sha d1e87779595e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
