Solving ODEs as Inference
Summary
An ordinary differential equation (ODE) defines the solution curve as the integral of a vector field along its own path. Solving the initial value problem (IVP) can be cast as curve fitting / regression: the solution is a latent function to be inferred from evaluations of at a grid of points, which act as data on the derivative . Restricting the prior to Gauss–Markov processes makes this inference a linear-time Bayesian filtering/smoothing problem, producing the family of ODE filters and smoothers; an alternative, non-Bayesian family perturbs classical solvers (perturbative solvers).
Overview
This note frames the entire Part VI programme. An ODE is the mechanistic model of a dynamical system whose derivative is known everywhere as a function of state, but whose actual trajectory must be computed. The recurring thesis of probabilistic numerics applies: a solver is a numerical agent that infers a latent quantity (here the solution curve) from a finite number of computations (here evaluations of the vector field ), and should return a calibrated posterior — not just a point estimate.
The key conceptual move (Skilling 1991; Hennig & Hauberg 2014; Chkrebtii et al. 2016; rigorously Tronarp et al. 2019) is that solving an IVP is a regression problem on the derivative. Because we can only evaluate at estimated points, the “data” are generated on-the-fly and sequentially, one time step at a time — which is exactly the setting of Gauss–Markov filtering.
Main Content
The initial value problem
ODE and IVP (Def. 36.1, 36.2)
An ordinary differential equation is a relation
between a curve and a vector field (dynamics) on a non-empty open set . The curve is a solution of the initial value problem (IVP) if additionally
If an additional final condition is imposed, the problem becomes a boundary value problem (BVP).
Symbols: the solution/state at time ; its time derivative; the vector field mapping state to derivative; the (known) initial state; the time interval; the state dimension.
Restriction to first-order autonomous ODEs is without loss of generality: an th-order ODE is reduced to first order by stacking derivatives into an augmented state ; and a non-autonomous is analogous. (Notation is decluttered by hiding .)
Well-posedness: existence, uniqueness, regularity
Not every IVP has a well-defined solution (multiple solutions, or blow-up before ). Two assumptions exclude these pathologies.
Local Lipschitz assumption (Assumption 36.3)
is open, , and is locally Lipschitz continuous: for each subset there is with
Picard–Lindelöf (Theorem 36.4)
Under Assumption 36.3, choose with and set . Then there is a unique local solution . If and , the unique global solution exists on .
Regularity of IVP solutions (Theorem 36.6)
Under Assumption 36.3 and Assumption 36.5 (, i.e. is -times continuously differentiable, for some ), the unique solution is one order more regular than : .
Proof sketch. Induction over . Base case : continuity of plus the fundamental theorem of calculus applied to the ODE. Inductive step: differentiate the ODE once more, using .
This regularity is the crucial fact exploited by probabilistic solvers: if is smooth, the solution has well-defined derivatives that can be modelled explicitly in a state-space representation and extrapolated by Taylor polynomials.
From IVP to regression: the state-space (derivatives) view
The solution can be regarded as curve fitting of a time series using information about at grid points , obtained from evaluations of . Jointly modelling with a Gaussian process and treating this as GP regression is the abstract idea; the naive cost is . Restricting to Gauss–Markov priors (laws of linear time-invariant SDEs) collapses the cost to via smoothing — see ODE Filters and Smoothers.
The pivotal insight (developed fully in Classical ODE Solvers as Regression) is that after discarding the artificial local “flow map” constructs of classical numerics, approximating is nothing but a regression on the data set
where is the solver’s current numerical estimate. The circularity ( appears on both sides) is harmless because the solver, like a filter, proceeds sequentially through time: at each a predictive mean conditioned on preceding steps is already available.
Relation to integration
ODEs are the “nonlinear extension” of univariate integration: if the vector field is independent of , i.e. , the IVP reduces to the quadrature problem , solvable by any method of Part II. Consequently, any ODE solver that models by a GP reduces to Bayesian Quadrature on such linear instances (made precise in ODE Filters and Smoothers, the EKF0/BQ equivalence). Beyond quadrature, ODE solvers additionally require iterative learning of using its own previous estimates and tracking of accumulated uncertainty over time.
Two families of probabilistic solvers
- ODE filters and smoothers (ODE Filters and Smoothers, Theory of ODE Filters and Smoothers): impose a Gauss–Markov prior on and its derivatives and compute a posterior by (extended/unscented) Kalman filtering + RTS smoothing, or by particle filtering for the full non-Gaussian posterior. This family contains classical Runge–Kutta and Nordsieck methods as posterior means.
- Perturbative solvers (Perturbative ODE Solvers): do not compute a posterior. They build a stochastic simulator by perturbing a classical solver so that the injected noise matches the numerical error; randomised runs are samples from the distribution of numerically possible trajectories. They can represent bifurcations and chaos, but must simulate the ODE multiple times.
Examples
Ill-posed IVPs (from §36)
Non-unique: with admits infinitely many solutions for and afterwards, for any . Finite-time blow-up: with has , which cannot be extended past the singularity . Both violate the conditions guaranteeing a well-defined solution; there is then nothing to approximate. Assumptions 36.3/36.5 exclude such cases, so numerical error retains its meaning.
Higher-order ODE as first-order system
A second-order ODE becomes first-order via and . Classical solvers always do this reduction; ODE filters can alternatively model the higher-order ODE directly by choosing a suitable state-space model with enough derivatives (Exercise 38.2; Bosch, Tronarp & Hennig 2022).
Connections
- Instantiates Computation as Probabilistic Inference and the The Numerical Agent agenda for the ODE problem class.
- The engine is Gauss-Markov Processes and SDEs (the prior) and Bayesian Filtering and Smoothing (the inference).
- Reduces to The Integration Problem / Bayesian Quadrature when is independent of .
See Also
- Classical ODE Solvers as Regression — makes the “IVP = regression on ” claim rigorous and shows classical solvers are posterior means.
- ODE Filters and Smoothers — the central algorithmic realisation via state-space models.
- Perturbative ODE Solvers — the alternative, non-Bayesian family.
- Further Topics in ODE Solvers — BVPs, inverse problems, PDEs, and the frontier.