Manuscript Offprint
arXiv:2610.33939Stable and Calibrated Latent Force ODE Filters
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Estimating unobserved forces in mechanistic systems is a central task of scientific machine learning. Approximate Gaussian filtering methods that synthesize mechanistic and empirical information have shown remarkable capacity in jointly identifying latent processes together with the system state in a single forward-backward pass. The resulting latent force ODE filter framework channels information from observational data specifically into the unknown parts of the system. This work addresses open questions about calibration and stability of the method. We show that the joint posterior over state and force is the reweighted conventional latent force posterior. This uncovers a crucial dependence of the stability of the method on the prior variance of the system state, which effectively controls the flow of information from observations to the latent force through the mechanistic system. From this insight, we construct an improved algorithm that provides stable and calibrated plug-and-play inference. We demonstrate the improved framework on several simulated experimental settings.
1 INTRODUCTION
Many dynamical systems are driven by external forces that cannot be observed directly. Examples include wind loads acting on a bridge, stimulus currents driving a neuron, and contact forces disturbing a robot. Downstream decision making requires uncertainty quantification and identification of such unknown inputs. Hybrid models, which combine mechanistic knowledge in the form of differential equations with function approximations learned from data, leverage the advantages of both: the expressivity of function approximation and the generalizability of mechanistic models.
Latent force models (LFMs) (Álvarez et al., 2009; Hartikainen et al., 2012) are hybrid models that place a Gaussian process (GP) prior on the force, integrate it through the differential equation into a joint input-state prior, and condition this prior on the data. For systems described by ordinary differential equations (ODEs), Schmidt et al. (2021) introduced an adjacent approach, which we refer to as latent force ODE filters. It builds on ODE filters (Tronarp et al., 2019; Kersting et al., 2020b), probabilistic numerical solvers that treat the local gradient information of the vector field as data within a Bayesian inference framework (Cockayne et al., 2019; Hennig et al., 2022). State and force are modeled as independent GPs, and the mechanistic information only enters at inference time, essentially treating the dynamics model as data. Adding empirical observations then lifts the solver to a hybrid model. In ODE filters, the mechanistic information is encoded as pseudo-data pinned to zero, not a real measurement of the system. Conditioning confines the prior to the restricted measure that is consistent with the dynamics (Da Costa et al., 2025). Pinning the residual to zero is harmless while it only serves to solve the dynamics, but consequential once it is used as evidence for calibration and model selection. For latent force ODE filters, these aspects have not been studied yet. Model selection and calibration thus remain open challenges, hindering real-world applications and comparison to competing hybrid methods.
Contributions This paper turns the pseudo-data distinction into a calibration principle for latent force ODE filters. We show that the state diffusion of the prior process not only scales the numerical uncertainty but also controls the rate at which the latent force learns from the residual. This dual role leads to two failure modes (Fig. 1). A small diffusion enforces the dynamics too rigidly: the force compensates for the limited expressivity of the state prior, uncertainty bands contract, and the posterior fails to model the data. A large diffusion decouples force and state: the force is poorly inferred and the state interpolation is massively underconfident. Selecting the diffusion from the residual evidence, as is common for ODE filters, over-

Figure 1: The state diffusion controls the latent force inference. Latent force ODE filter on the Duffing oscillator of Eq. (16) with the position observed (Appendix D). Center: the diffusion that maximizes (Sec. 3.4). Left and right: times smaller and times larger. Bands: mean standard deviations of the classical latent force model with the probabilistic numerical solver, , and of the full latent force ODE filter posterior .
enforces the dynamics. Selecting it instead by the information the data carry about the force, given the ODE, avoids both failures and yields calibrated and accurate posteriors.
Our main contributions are:
• We show that the posterior of a latent force ODE filter factorizes into a classical latent force model posterior and a Gibbs weight on the force whose temperature is the state diffusion. Latent force inference fails for both too high and too low values of the prior diffusion (Secs. 3.1–3.3).
• We propose selecting the diffusion by the mutual information of force and data given the ODE, and evaluate it within an algorithm that refines the grid and calibrates hyperparameters (Secs. 3.4 and 3.5).
• On three nonlinear systems, selecting the diffusion by recovers the force on every problem from a single start (Sec. 4).
2.1 ODE filters
ODE filters are probabilistic solvers of initial value problems
with , known initial values and . For notational simplicity we write the scalar first-order case, . ODE filters treat numerical integration as sequential Bayesian inference (Tronarp et al., 2019) and compute a posterior over solutions that quantifies the numerical error due to limited compute,
Prior. Smoothness assumptions are encoded by a Gauss–Markov prior on the extended state , usually the integrated Wiener process IWP(q) that models as Brownian motion. Its Markov property gives the discrete state space form
with and in closed form for the order , step size and diffusion (Schober et al., 2019), which enables linear-in-time filtering and smoothing (Hartikainen and Särkkä, 2010). The order sets the convergence rate (Kersting et al., 2020b).
Data. The ODE enters as pseudo-data on the residual at the grid nodes ,
(4)
where is typically zero but can represent model misspecification or linearization error (Kersting and Hennig, 2016; Kersting et al., 2020b). Nonlinear f are handled by approximate filters (Särkkä and Svensson, 2023).
Calibration. With , a time-invariant diffusion scales the whole posterior covariance and is calibrated by its quasi-maximum likelihood estimate under the residual evidence . A time-varying diffusion allows online calibration and adaptive step-size selection (Bosch et al., 2021).
2.2 Latent force models
Consider a dynamical system driven by an unknown input, disturbance, or latent force , observed on a discrete time grid through a measurement model ,
(5)
where measurements are corrupted by additive Gaussian noise . The latent force inference problem considered hereafter is to identify an open-loop input that generates a trajectory observed through the measurements , formulated as Bayesian inference on the joint input-state posterior . Latent force models (Álvarez et al., 2009; Hartikainen et al., 2012) construct a joint input-state prior by integrating the input prior through the ODE .
2.3 Latent force ODE filters
Latent force ODE filters (Schmidt et al., 2021), in turn, place independent Gauss–Markov priors on extended inputs and states, with state space form:
(6)
The extended states X and U are obtained by appending x and u with their first and derivatives, respectively. We write for the diffusion of the state prior, , and for the hyperparameters of state and force prior, with . Any Gauss–Markov prior is admissible. The integrated Wiener process is the default state prior, as for ODE filters (Sec. 2.1), while the force prior can benefit from additional structure that makes the inverse problem more identifiable (Stuart, 2010). Inference is performed by conditioning on the sparse noisy observations and the dense ODE residuals , with observation models:
(7)
The residual grid is finer than the measurement grid, , and contains the measurement times, . The specific is a modeling choice and can in principle be selected adaptively to control the numerical error (Bosch et al., 2021). For notational simplicity we abbreviate and , as well as , and accordingly. Schmidt et al. (2021) summarize state and force into an extended state and model and observations into generalized observations (Fig. 2), and compute the joint posterior in a single extended Kalman smoother pass. Performing the observation update after the ODE update instead splits the joint log-likelihood into a residual and an observation term:
Here, is the number of observations up to , and the grid index of . The two sums are log-likelihoods, the residual evidence and the observation evidence . The remainder of the paper assumes the following setting: State priors are IWPs and force priors Matérn processes (Appendix B). All model misspecification is absorbed into the latent force . The observation noise and force smoothness are known. Calibration thus requires selecting state smoothness , state diffusion , force length scale and variance and the grid density . For the full predict and update equations see Appendix C.

Figure 2: Directed graphical model of the latent force ODE filter. State and force are coupled only through the residual pseudo-observation and the initial state. , : prior hyperparameters. Shaded: observed. Plates: N grid nodes and observation times. : mechanism f, replaced at inference by Z.
3 METHOD
The latent force ODE filter posterior factorizes into a LFM posterior and a weight that measures how much the residual updates the force (Sec. 3.1). The weight arises from the ODE filter construction, which conditions on the mechanistic information. The state diffusion enters both factors (Sec. 3.2): it sets the numerical uncertainty in the LFM factor and is the temperature of the weight. Latent force inference fails at both ends (Sec. 3.3, Fig. 1). For a small diffusion, the weight selects the force from the residual alone and the data are ignored. For a large diffusion, the LFM factor no longer depends on the force and the data cannot inform it. In Section 3.4 we argue that both failures occur when the mutual information between the data and the force under the model decreases. As a consequence, the state diffusion loses its interpretation from classical ODE filters, and calibration results do not transfer. We therefore propose an algorithm for latent force ODE filters in Section 3.5 that serves as scaffolding to study different calibration objectives (Sec. 3.4).
3.1 Posterior factorization
The full posterior of the graphical model in Fig. 2 factorizes into a classical LFM posterior reweighted by a factor : . Conditioning on the residual Z first gives
with
Conditionals on Z can be read as “given the ODE”. is the posterior of a latent force model (Hartikainen et al., 2012), in which the deterministic ODE solution is replaced by the probabilistic numerical solution . The weight W measures how much the force prior changes through the ODE observations Z.
3.2 State diffusion
The state diffusion enters both factors of Eq. (9): it scales the numerical uncertainty in , and it is the temperature of . We show this for a single residual update from an independent prior on state and force, with the residual linearized as (derivation in Appendix C.1). The predicted state covariance and the state part of the innovation covariance, , are both proportional to . Given the force, the numerical solution inside is
with gain . The diffusion cancels in the gain, so, as in a classical ODE filter, it leaves the mean of the solution unchanged and scales its covariance . The weight depends on the force through the likelihood of the residual with the state marginalized, :
(11)
The weight therefore takes the form of a Gibbs distribution with temperature and energy .
3.3 Failure directions
The two roles of the diffusion conflict, and in both limits the data stop informing the force, each time through one of the two factors (Fig. 1).
Hard enforcement: . The numerical uncertainty vanishes, and tends to a classical latent force model with the solution map , which can fit the data. The weight , however, concentrates on the forces of least energy , which the residual alone determines. The posterior of the force therefore no longer depends on the data, although would fit them. In Fig. 1 (left), follows the truth, while the posterior departs from the data over the first part of the window with narrow bands.
Weak enforcement: . The weight tends to one, and the posterior to , which itself depends on the diffusion: the covariance of the numerical solution grows with , while its dependence on the force stays fixed. The likelihood of the force in therefore becomes flat. The state explains the data on its own, and the force keeps its prior. In Fig. 1 (right), the posterior coincides with , the force keeps its prior width, and the state follows the observations with bands that widen between them.
In the filter, the gain with which an observation updates the force vanishes in proportion to in the first limit and to in the second (Appendix C.1, Table C.1).
3.4 Selecting the diffusion
Table 1 lists the candidate objectives considered for selecting the state diffusion . They form two pairs, one scoring the evidence of the data and one the information the data carry about the force.
Table 1: Criteria for the state diffusion (line 6 of Algorithm 1): evidence (top) and information (bottom), causal member first, with the cost of one evaluation in filter passes.
| Criterion | Definition | Passes |
|---|---|---|
| Eq. (8) | ||
| Eq. (14) | ||
| Eq. (13) |
Evidence. The observation evidence of Eq. (8) is the sum of the filter's one-step-ahead predictive log-likelihoods of the observations. The conditional evidence conditions every observation on all residuals and has been used for parameter inference (Tronarp et al., 2022; Wu and Lysy, 2024). Both score how well the model fits the data.
Information. In both failure directions the data stop informing the force (Sec. 3.3). How much they inform it given the ODE is measured by the mutual information of and under (Cover and Thomas, 2006),
(12)
with the expectation under and the (conditional) entropy. The mutual information is the expected reduction in the uncertainty about the force when the data are observed in addition to the ODE. For the model linearized at the trajectory , all these conditionals are Gaussian with covariances that do not depend on the values conditioned on, and
(13)
Both covariances are those of a linear Gaussian state-space model and follow from covariance recursions (Appendix C.2). The one-step-ahead form of the mutual information is the directed information from the force to the data given the residuals (Massey, 1990),
(14)
with the innovation covariance of in the filter that computes (Appendix C) and the same with the force known.
Diffusion sweeps. Figure 3 and the sweeps of Appendix D isolate the role of the diffusion: the force hyperparameters are held at the truth and is varied over a log-spaced grid, separately on each grid density . At every the posterior is computed with the iterated extended Kalman smoother (IEKS) (Bell, 1994), and the force error and the criteria of Table 1 are evaluated at the converged linearization (Appendix D). Each curve shows which diffusion a criterion would select if the force prior were known. Calibrating the diffusion on the residual evidence treats it only as a numerical uncertainty and selects hard enforcement. decreases towards both failure directions, and its maximizer lies on the plateau of low force error on every grid.

Figure 3: The force error is smallest where is largest. (a) Relative force error and (b) mutual information against the state diffusion on Duffing (Appendix D), with the IEKS and at the truth. One line per grid density (color bar). Per grid, ◆ marks the maximizer of and ■ that of .
3.5 Stable and Calibrated Latent Force ODE Filters
Algorithm 1 implements the latent force ODE filter with calibration of the state diffusion and the force hyperparameters. The state prior is chosen as smooth as the force allows, , where is the order of the ODE. A filter pass on a coarse initial grid can diverge, which the local error estimate of ODE filters detects (Bosch et al., 2021), and the algorithm then moves to a finer grid (Appendix E.2). The posterior is computed with an IEKS, re-linearizing at the smoothed trajectory until convergence (Tronarp et al., 2021). Within each iteration the diffusion is selected by a criterion of Table 1, and the force parameters are fitted on the observation evidence , both at the fixed trajectory and with L-BFGS-B (Byrd et al., 1995). Since is fitted on for every criterion, the variants differ only in how the diffusion is selected. In the algorithm, is the posterior mean of the force at the observation times on grid , and its posterior standard deviation at the interval midpoints. A grid is accepted once the force estimate has moved by less than posterior standard deviations from the previous grid and reproduces the data through the ODE, . Here is the root-mean-square whitened residual of the observations against the ODE solved from the smoothed state with the force mean as a known input (Appendix E.4).
Algorithm 1 Latent force ODE filter with the diffusion selected by a criterion (Table 1).
Input:
Output:
1:
2: coarsest grid with stable EK1 at
3: predicted means of this EK1 pass
4: for do
5: for do IEKS
6: L-BFGS-B
7: L-BFGS-B
8: smoother
9:
10: if changed by then break
11: if and then break
4 EXPERIMENTS
We run Algorithm 1 with each criterion J of Table 1 and compare the criteria with each other and with the classical latent force model. The main experiment (Sec. 4.1) uses three nonlinear systems driven by a force drawn from the model's prior, so that the only unknowns are the force and the hyperparameters that the algorithm calibrates. Selecting the diffusion by recovers the force on every problem (Sec. 4.2). Section 4.3 repeats the comparison off-model, with forces outside the prior, details in Appendix A.2.
4.1 Setup
Data. Each of the three systems below is driven by one scalar force drawn from a Matérn-5/2 prior ( ) and observed at K equidistant times on under Gaussian noise of known variance. Noise levels are reported as a signal-to-noise ratio (SNR) in amplitude, the standard deviation of the noise-free observed signal divided by the noise standard deviation. For each system we draw force and noise 20 times, which gives 60 problems.
FitzHugh–Nagumo.
(FitzHugh, 1961; Nagumo et al., 1962) with , and . As in Arnold and Lloyd (2018), only the membrane potential v is observed, at K=300 times on with an SNR of 5. The force has and .
Duffing.
(Kovacic and Brennan, 2011) with , and . As in input-state estimation from accelerometers (Rogers et al., 2020a), the acceleration is observed at times on with an SNR of 100. The force has and .
Lorenz-96.
(Lorenz, 1996) with cyclic indices, sites, and the initial state on the attractor. The force acts on site 0, and the sites are observed at times on with an SNR between 2.8 and 4.5 across the sites. The force has and .
Model and baseline. Every criterion runs Algorithm 1 from the same initialization (Appendix E.1). The reported fit is the one on the grid that the algorithm accepts, or on the last grid if none is accepted (Appendix E.4). The classical latent force model runs through the same algorithm with the ODE filter replaced by a Runge–Kutta discretization treated as exact, so it has no diffusion to select, except on Lorenz-96, where an isotropic process noise on the state is fitted with (Appendix E.5).
Metrics. We score the force u and one state component (Duffing: x, FitzHugh–Nagumo: v, Lorenz-96:
at the midpoints between observations. For a scored quantity with posterior mean and variance , the errors are , the relative error is , and calibration is judged via the Chi-square statistic (Bar-Shalom et al., 2001)
A calibrated posterior gives . Lower and higher values imply under- and overconfidence, respectively. The error ratio of a method on a problem is its relative force error divided by the smallest relative force error that any method reaches on that problem. A method misses the force when its error ratio exceeds 1.5. We summarize the fitted force hyperparameters by the force roughness with , the combination of the Matérn hyperparameters that data on a fixed time window can at best identify (Zhang, 2004). The roughness ratio is the roughness of the fitted force prior divided by that of the true prior, below one for a force that is too smooth and above one for a force that is too rough.
Implementation. All methods are implemented in JAX (Bradbury et al., 2018) in double precision and run single-threaded on the CPU of an Apple M4 Pro machine, for about 30 CPU hours in total. Appendix E gives the tolerances of Algorithm 1, the initialization, the search boxes and the remaining implementation details. All code is publicly available .
4.2 Results
Figure 4 compares the criteria on the 60 problems by error ratio, force and roughness ratio, and Appendix A shows every fit that misses the force. Every method recovers the force on at least 56 of the 60 problems, so the criteria differ in the few fits that fail. Selecting the diffusion by recovers the force on every problem and gives the best calibrated force bands. misses the force on 4 problems (Fig. A.1). On two of them, it selects a weakly enforced diffusion, at which the force is too smooth. With held at the truth, is maximized at the weak-enforcement edge on these problems (Fig. D.2), so they are failures of the criterion, not of its optimization. misses the force on 1 problem, a Lorenz-96 problem that also misses, with a force that is too rough (Fig. A.3, left). D misses the force on 4 problems of Lorenz-96, 3 of them with a force that is too rough, and is otherwise as accurate as I (Fig. A.2). The classical model misses the force on a single problem, just above the threshold (Fig. A.3, right).
A fit takes about a minute on a single CPU thread. The median over the three systems ranges from 50 to 72 s with , despite its four filter passes per evaluation (Table 1), from 42 to 86 s with the other criteria, and from 37 to 56 s with the classical model, whose grid ladder always runs to the end (Appendix E.5).
4.3 Off-model data
We repeat the comparison with truth forces that are not draws of the model's prior, a rougher Matérn-3/2 draw, a sinusoid and a piecewise-constant force (10 problems per system and force), and on an SIR model in which the force sets the transmission rate and enters through the state (20 problems). Appendix A.2 gives the forces, the SIR model, the full results (Fig. A.4) and example posteriors (Fig. A.5). misses the force on 1 of these 110 problems, against 12 for , 6 for , 4 for D and none for the classical model. Most failures of the evidence criteria are on the rough forces, with overconfident bands, and those of D on the sinusoid, with wide ones. On the SIR model, where the force enters through the state, , D and the classical model recover the force on every problem, the evidence criteria miss one each, and the force lies in the calibrated interval on nearly every problem. For the piecewise-constant force the bands of every method are mostly overconfident, since a Matérn-5/2 prior is unsuitable to model jumps.
5 RELATED WORK
Latent force models. LFMs were introduced for linear ODEs, where a GP prior on the force induces a GP prior on the state through the Green's function (Álvarez et al., 2009), and nonlinearity remains their main limitation. In state-space form (Hartikainen and Särkkä, 2010), inference is linear in time (Hartikainen and Särkkä, 2011), approximate Gaussian filtering reaches nonlinear dynamics (Hartikainen et al., 2012; Särkkä and Svensson, 2023), and LFMs enter stochastic and model predictive control (Särkkä et al., 2019; Landgraf et al., 2022). Beyond filtering, nonlinear LFMs use variational inference with normalizing flows (Ward et al., 2020), adjoints through a numerical solver (Moss et al., 2021) and deep GPs of ODE-based process convolutions (Baldwin-McDonald et al., 2025).
Input estimation in structural dynamics. Structural dynamics treats the same problem as input-state or input-state-parameter estimation, mostly by appending the force to the state of a Kalman filter, as in the augmented (AKF) (Lourens et al., 2012; Naets et al., 2015) and dual Kalman filter (Eftekhar Azam et al., 2015). Nayek et al. (2019) bring GP latent force models
https://github.com/paufisch/lfcal

Figure 4: Error ratio, force and roughness ratio of the criteria and the classical LFM on the 60 problems. Columns: Duffing, FitzHugh–Nagumo and Lorenz-96, one dot per problem and method. Top: error ratio, the relative force error over the smallest relative force error of any method on the same problem, with the miss threshold 1.5 dashed. Fits above it are outlined, also in the rows below. Middle: force , with the 95% interval of a calibrated posterior whose errors are correlated as the true force prior in gray (Appendix E.6). Bottom: roughness ratio of the fitted force prior to the true one, below one for a force that is too smooth and above one for a force that is too rough.
(GPLFMs) to the field and show that AKF variants are GPLFMs with random-walk priors, and Rogers et al. (2020b) add parameter estimation. The unbiased minimum-variance filter (Gillijns and De Moor, 2007) is the infinite-variance limit of the AKF (Ding et al., 2023), with a bias-variance tradeoff in between (Li et al., 2026).
Calibrating ODE filters on data. ODE filters conditioned on measurements have mostly served parameter inference of the vector field. Kersting et al. (2020a) include the data in the filter pass and fit the parameters to the resulting likelihood by gradient descent. Tronarp et al. (2022) condition on the ODE first and score the data under the resulting physics-enhanced prior, optimizing the diffusion jointly with the parameters. Beck et al. (2024) read this diffusion as a weight of the data against the ODE solution and lower it along a fixed schedule. Wu and Lysy (2024) compute from two filter passes, again fitting the prior scales jointly with the parameters. In latent force inference, by contrast, Schmidt et al. (2021) fix the diffusion per experiment, and its role has not been analyzed. Sec. 3.1 does so and explains why the residual evidence selects the wrong direction. The conditional evidence of Table 1 is the likelihood of Tronarp et al. (2022) and Wu and Lysy (2024), and its one-step-ahead form (Sec. 3.4).
6 LIMITATIONS
The experiments use equidistant measurements and fixed grids without adaptive steps, so stiff dynamics may need finer grids than Algorithm 1 reaches. The filter scales cubically in the dimension of the extended state, which limits the method to low-dimensional systems. Nonlinear dynamics are handled by the Gaussian approximation of the extended Kalman filter, and beyond the single update of Sec. 3.2 the results of this paper are empirical findings without guarantees. The classical latent force model is competitive on every system here, and a calibrated latent force ODE filter matches rather than surpasses it.
7 CONCLUSION
This work augments the latent force ODE filter framework, which was presented by Schmidt et al. (2021) mainly in the context of experimental evaluation, with a theoretical analysis of the resulting joint posterior over state and latent force. Besides a better understanding of the relationship of the method to classic latent force models, the findings entail best practices for model selection by surfacing a crucial dual role of the prior state diffusion parameter. In doing so, this paper advances the framework towards broad applicability for a variety of real-world use cases.
Acknowledgments
The authors gratefully acknowledge financial support by the European Research Council through ERC CoG Action 101123955 ANUBIS; the DFG Cluster of Excellence “Machine Learning – New Perspectives for Science”, EXC 2064/2; the DFG SPP 2298 (Project HE 7114/6-1), and the Carl Zeiss Foundation, (project “Certification and Foundations of Safe Machine Learning Systems in Healthcare”), as well as funds from the Ministry of Science, Research and Arts of the State of Baden-Württemberg. The authors thank the International Max Planck Research School for Intelligent Systems (IMPRS-IS) for supporting Paul Fischer.
References
Álvarez, M. A., Luengo, D., and Lawrence, N. D. (2009). Latent force models. In International Conference on Artificial Intelligence and Statistics, pages 9–16.
Arnold, A. and Lloyd, A. L. (2018). An approach to periodic, time-varying parameter estimation using nonlinear filtering. Inverse Problems, 34(10):105005.
Baldwin-McDonald, T., Shi, X., Shen, M., and Álvarez, M. A. (2025). Deep latent force models: ODE-based process convolutions for Bayesian deep learning. Machine Learning, 114(8):192.
Bar-Shalom, Y., Li, X. R., and Kirubarajan, T. (2001). Estimation with applications to tracking and navigation. John Wiley & Sons.
Beck, J., Bosch, N., Deistler, M., Kadhim, K. L., Macke, J. H., Hennig, P., and Berens, P. (2024). Diffusion tempering improves parameter estimation with probabilistic integrators for ordinary differential equations. In International Conference on Machine Learning, pages 3305–3326.
Bell, B. M. (1994). The iterated Kalman smoother as a Gauss–Newton method. SIAM Journal on Optimization, 4(3):626–636.
Bosch, N., Hennig, P., and Tronarp, F. (2021). Calibrated adaptive probabilistic ODE solvers. In International Conference on Artificial Intelligence and Statistics, pages 3466–3474.
Bradbury, J., Frostig, R., Hawkins, P., Johnson, M. J., Leary, C., Maclaurin, D., Necula, G., Paszke, A., VanderPlas, J., Wanderman-Milne, S., and Zhang, Q. (2018). JAX: Composable transformations of Python+NumPy programs. Software library.
Byrd, R. H., Lu, P., Nocedal, J., and Zhu, C. (1995). A limited memory algorithm for bound constrained optimization. SIAM Journal on Scientific Computing, 16(5):1190–1208.
Cockayne, J., Oates, C. J., Sullivan, T. J., and Girolami, M. (2019). Bayesian probabilistic numerical methods. SIAM Review, 61(4):756–789.
Cover, T. M. and Thomas, J. A. (2006). Elements of Information Theory. Wiley, 2 edition.
Da Costa, N., Pfortner, M., and Cockayne, J. (2025). Constructive disintegration and conditional modes. arXiv preprint arXiv:2508.00617.
Ding, B., Zhang, T., and Fang, H. (2023). Infinity augmented state Kalman filter and its application in unknown input and state estimation. Journal of the Franklin Institute, 360(16):11916–11931.
Eftekhar Azam, S., Chatzi, E., and Papadimitriou, C. (2015). A dual Kalman filter approach for state estimation via output-only acceleration measurements. Mechanical Systems and Signal Processing, 60–61:866–886.
FitzHugh, R. (1961). Impulses and physiological states in theoretical models of nerve membrane. Biophysical Journal, 1(6):445–466.
Gillijns, S. and De Moor, B. (2007). Unbiased minimum-variance input and state estimation for linear discrete-time systems. Automatica, 43(1):111–116.
Hairer, E., Nørsett, S. P., and Wanner, G. (1993). Solving Ordinary Differential Equations I: Nonstiff Problems, volume 8 of Springer Series in Computational Mathematics. Springer, Berlin, Heidelberg, 2 edition.
Hartikainen, J. and Särkkä, S. (2010). Kalman filtering and smoothing solutions to temporal Gaussian process regression models. In IEEE International Workshop on Machine Learning for Signal Processing, pages 379–384.
Hartikainen, J. and Särkkä, S. (2011). Sequential inference for latent force models. In Conference on Uncertainty in Artificial Intelligence, pages 311–318.
Hartikainen, J., Seppänen, M., and Särkkä, S. (2012). State-space inference for non-linear latent force models with application to satellite orbit prediction. In International Conference on Machine Learning, pages 903–910.
Hennig, P., Osborne, M. A., and Kersting, H. P. (2022). Probabilistic numerics: Computation as machine learning. Cambridge University Press.
Imhof, J. P. (1961). Computing the distribution of quadratic forms in normal variables. Biometrika, 48(3/4):419–426.
Kermack, W. O. and McKendrick, A. G. (1927). A contribution to the mathematical theory of epidemics. Proceedings of the Royal Society of London. Series A, 115(772):700–721.
Kersting, H., Krämer, N., Schiegg, M., Daniel, C., Tiemann, M., and Hennig, P. (2020a). Differentiable likelihoods for fast inversion of ‘likelihood-free’ dynamical systems. In International Conference on Machine Learning, pages 5198–5208.
Kersting, H. P. and Hennig, P. (2016). Active uncertainty calibration in Bayesian ODE solvers. In Conference on Uncertainty in Artificial Intelligence, pages 309–318.
Kersting, H. P., Sullivan, T. J., and Hennig, P. (2020b). Convergence rates of Gaussian ODE filters. Statistics and Computing, 30(6):1791–1816.
Kovacic, I. and Brennan, M. J., editors (2011). The Duffing equation: Nonlinear oscillators and their behaviour. John Wiley & Sons.
Krämer, N. and Hennig, P. (2024). Stable implementation of probabilistic ODE solvers. Journal of Machine Learning Research, 25(111):1–29.
Landgraf, D., Völz, A., and Graichen, K. (2022). Nonlinear model predictive control with latent force models. In American Control Conference, pages 4979–4984.
Li, S., Shi, D., Lyu, X., Tang, J., and Shi, L. (2026). Bias-variance trade-off in Kalman filter-based disturbance observers. Automatica, 187:112906.
Lorenz, E. N. (1996). Predictability: A problem partly solved. In ECMWF Seminar on Predictability, volume 1, pages 1–18.
Lourens, E., Reynders, E., De Roeck, G., Degrande, G., and Lombaert, G. (2012). An augmented Kalman filter for force identification in structural dynamics. Mechanical Systems and Signal Processing, 27:446–460.
Massey, J. L. (1990). Causality, feedback and directed information. In Proceedings of the International Symposium on Information Theory and its Applications (ISITA), pages 303–305.
Moss, J. D., Opolka, F. L., Dumitrascu, B., and Liò, P. (2021). Approximate latent force model inference. arXiv preprint arXiv:2109.11851.
Naets, F., Croes, J., and Desmet, W. (2015). An online coupled state/input/parameter estimation approach for structural dynamics. Computer Methods in Applied Mechanics and Engineering, 283:1167–1188.
Nagumo, J., Arimoto, S., and Yoshizawa, S. (1962). An active pulse transmission line simulating nerve axon. Proceedings of the IRE, 50(10):2061–2070.
Nayek, R., Chakraborty, S., and Narasimhan, S. (2019). A Gaussian process latent force model for joint input-state estimation in linear structural systems. Mechanical Systems and Signal Processing, 128:497–530.
Rogers, T. J., Worden, K., and Cross, E. J. (2020a). Bayesian joint input-state estimation for nonlinear systems. Vibration, 3(3):281–303.
Rogers, T. J., Worden, K., and Cross, E. J. (2020b). On the application of Gaussian process latent force models for joint input-state-parameter estimation: With a view to Bayesian operational identification. Mechanical Systems and Signal Processing, 140:106580.
Särkkä, S., Álvarez, M. A., and Lawrence, N. D. (2019). Gaussian process latent force models for learning and stochastic control of physical systems. IEEE Transactions on Automatic Control, 64(7):2953–2960.
Särkkä, S. and Solin, A. (2019). Applied stochastic differential equations. Cambridge University Press.
Särkkä, S. and Svensson, L. (2023). Bayesian filtering and smoothing. Cambridge University Press, second edition.
Schmidt, J., Krämer, N., and Hennig, P. (2021). A probabilistic state space model for joint inference from differential equations and data. In Advances in Neural Information Processing Systems, pages 12374–12385.
Schober, M., Särkkä, S., and Hennig, P. (2019). A probabilistic model for the numerical solution of initial value problems. Statistics and Computing, 29(1):99–122.
Stuart, A. M. (2010). Inverse problems: A Bayesian perspective. Acta Numerica, 19:451–559.
Tronarp, F., Bosch, N., and Hennig, P. (2022). Fenrir: Physics-enhanced regression for initial value problems. In International Conference on Machine Learning, pages 21776–21794.
Tronarp, F., Kersting, H. P., Särkkä, S., and Hennig, P. (2019). Probabilistic solutions to ordinary differential equations as nonlinear Bayesian filtering: A new perspective. Statistics and Computing, 29(6):1297–1315.
Tronarp, F., Särkkä, S., and Hennig, P. (2021). Bayesian ODE solvers: the maximum a posteriori estimate. Statistics and Computing, 31(3):23.
Ward, W. O. C., Ryder, T., Prangle, D., and Álvarez, M. A. (2020). Black-box inference for non-linear latent force models. In International Conference on Artificial Intelligence and Statistics, pages 3088–3098.
Wu, M. and Lysy, M. (2024). Data-adaptive probabilistic likelihood approximation for ordinary differential equations. In International Conference on Artificial Intelligence and Statistics, pages 1018–1026.
Zhang, H. (2004). Inconsistent estimation and asymptotically equal interpolations in model-based geostatistics. Journal of the American Statistical Association, 99(465):250–261.
Appendix
A ADDITIONAL EXPERIMENTAL RESULTS
A.1 Failures
Figures A.1, A.2 and A.3 show every fit that misses the force, with an error ratio above 1.5, on the 60 problems of Sec. 4.1, one column per problem, with the fit of and of the classical model on the same problem.

Figure A.1: The 4 misses of . Force (top) and the scored state with its data (bottom) against . On Duffing the acceleration is observed, so no data are shown. Bands: mean standard deviations. Purple (outline): by . Blue: by . Navy (dotted): classical LFM. Dashed: truth.

Figure A.2: The 4 misses of , all on Lorenz-96. Force (top) and the observed site with its data (bottom) against . Bands: mean standard deviations. Purple (outline): by . Blue: by . Navy (dotted): classical LFM. Dashed: truth.

Figure A.3: The miss of (left) and of the classical model (right). Force (top) and the scored state (bottom) against . Bands: mean standard deviations. Purple (outline): the failing method. Blue: by . Navy (dotted): classical LFM. Dashed: truth.
A.2 Forces outside the prior and the SIR model
The misspecified forces keep the model of Sec. 4.1, a Matérn-5/2 prior with unknown , but draw the truth differently, each with the marginal standard deviation of the prior. The Matérn-3/2 force is a draw of the rougher prior with the same length scale. The sinusoid has the angular frequency with uniform on [0.7, 1.4] and a uniform phase. The piecewise-constant force switches at the times of a Poisson process with mean spacing , to levels drawn from . The SIR model (Kermack and McKendrick, 1927) describes the susceptible and infected fractions of a population under a time-varying transmission rate,
with , per day and , and the recovered fraction left implicit. The force enters multiplicatively through the state, so the ODE is not affine in the force. The infected fraction is observed daily on , , with an SNR of 10. The force has and days.
Figure A.4 compares the criteria on all 110 problems. Figure A.5 shows a typical problem of each kind on which every method has an error ratio below 1.5, the one on which the force error of is closest to its median over such problems.
B MATÉRN PRIORS IN STATE-SPACE FORM
A stationary Gaussian process with Matérn- covariance , where is the modified Bessel function of the second kind and is an inverse length scale parameter, admits a state-space representation whenever for (Hartikainen and Särkkä, 2010; Särkkä and Solin, 2019). The corresponding SDE is a stable linear system of order with transfer function from the driving noise to the process value
with length scale and marginal variance . Its power spectral density is flat for and rolls off as above the cutoff , which is set by the length scale. The smoothness sets the sample path regularity: Matérn- sample paths are times differentiable, and the state vector carries the process and its first derivatives (Hartikainen and Särkkä, 2010).

Figure A.4: Error ratio and force off the model. One dot per problem and method, for truth forces outside the model's prior (pooled over Duffing, FitzHugh–Nagumo and Lorenz-96, 10 problems each) and for the SIR model. Top: error ratio, with the miss threshold 1.5 dashed. Fits above it are outlined, also in the row below. Bottom: force , with the 95% interval of a calibrated posterior whose errors are correlated as the model's force prior in gray (Appendix E.6), one interval per pooled system, drawn on top of each other.
C UPDATE EQUATIONS
The prediction and update equations of the latent force ODE filter are presented here in more detail and in block form. Both ODE and observation updates are performed using the extended Kalman filter update (Särkkä and Svensson, 2023).
State At the previous step, :
Predict One step ahead, :
Update (ODE) :
The residual is replaced by its first-order Taylor expansion at the predicted mean (extended Kalman filter),
with predicted residual and Jacobians
Innovation covariance, with B and C the blocks at the current node of the stacked Jacobians of Sec. 3.1:
Kalman gain:

Figure A.5: Example posteriors off the model. One problem per kind of truth force (columns), chosen as in the text. Force (top) and the scored state with its data (bottom) against . Bands: mean standard deviations. Blue: by . Purple (outline): by . Navy (dotted): classical LFM. Dashed: truth. The posteriors nearly coincide, and for the piecewise-constant force all of them round off the jumps, which a Matérn-5/2 prior cannot represent.
Posterior covariance:
Update (OBS) :
The observation is expanded to first order at the ODE-updated mean, with (exact for linear ), giving the joint observation operator and predicted observation . Innovation covariance:
Kalman gain:
Posterior covariance:
C.1 Single update from an independent prior
This subsection writes out one residual update and one observation update for a prediction in which state and force are independent, and makes every dependence on the state diffusion explicit. It is the example of Secs. 3.2 and 3.3.
Prior The prediction has zero mean and no cross-covariance, and the diffusion is factored out of the state covariance, , as in :
The linearized residual is then .
Update (ODE) :
Kalman gain:
Posterior mean and covariance, with and inserted into :
Force marginal and state conditional The posterior factorizes as . Marginalizing the state out of the residual model gives the likelihood of the force,
so that the force marginal is the force prior times a Gibbs factor with temperature :
In precision form, . The ratio of Sec. 3.1 is this Gibbs factor up to a constant, and so is the weight . Given the force, the state is distributed as
The diffusion cancels in the gain, since and are both proportional to it: with the force given and , the state is the only source of uncertainty in the residual. The mean of the state given the force therefore does not depend on the diffusion, and its covariance is proportional to it. The blocks of decompose accordingly:
Update (OBS) :
For a linear observation with , the predicted observation is . Innovation covariance and Kalman gain inherit the dependence on the diffusion from :
Posterior mean and covariance, with and inserted into :
Limits of the diffusion Table C.1 lists the leading order of the quantities of both updates as and as . It assumes that , and are invertible. is, since is positive definite after a prediction step and every row of contains the highest derivative . need not be: a scalar force that enters one of components of the ODE gives rank , as on FitzHugh–Nagumo, Lorenz-96 and the SIR model. The limits for therefore use the pseudo-inverse and the projection onto the range of that is orthogonal in the metric ,
which does not depend on the diffusion. If the force reaches every component of the residual, as on Duffing, and .
For , the weight concentrates on the forces of least energy, . The force takes up the part of the residual that it can reach and is certain of it, . The state takes up the rest, , which vanishes if , and its covariance vanishes. Both gains of the observation update vanish with , so the data change neither state nor force: to leading order, the moments after the observation update are those before it.
For , the force keeps its prior, and the state covariance diverges. The cross-covariance stays bounded: by the decomposition above, , where does not depend on the diffusion and is at most the prior variance of the force. The state gain tends to with , so the state interpolates the observation, , and the remaining state covariance is proportional to the diffusion. It diverges in every component that neither the residual nor the observation fixes, such as the higher derivatives of an IWP() state with . In the multi-step filter these are the directions in which the state moves freely between the observations, where the bands of Fig. 1 (right) widen. The force gain vanishes as , since stays bounded while diverges, so the force keeps its prior after the observation update as well.
Table C.1: Limits of the single update as and . Leading order of the single residual update (top), of the innovation covariance and gains of the subsequent observation update (middle), and of the posterior after both updates (bottom), as and as . Blue: the entry vanishes in the limit. Orange: it diverges in proportion to . Black: it tends to a finite limit that does not depend on the diffusion. , and are proportional to . If the force reaches every component of the residual, , and and the state means vanish in proportion to for .
Mutual information For the single update, the two covariances of Eq. (13) are the innovation covariance of the observation with the force unknown and with the force known,
By the decomposition of above, , so that
The information is that of a signal in noise. The signal is the variance the residual leaves in the force, , seen through the state: it vanishes as for and saturates at its prior value .
for . The noise is the observation noise plus the numerical uncertainty of the state given the force: it tends to for and grows in proportion to for . To leading order,
The information thus vanishes in both failure directions and is largest in between, as in Fig. 3.
C.2 Covariance recursions for the information criteria
At a frozen linearization the model is linear and Gaussian, and the covariances of Eqs. (13) and (14) do not depend on the values of the data. Their log-determinants follow from the prediction error decomposition: in a Kalman filter that processes the residuals and the observations in time order, the observation after the residual at the same node, is the sum of the log-determinants of all innovation covariances. Only the covariance part of the filter of Appendix C is needed. With the joint residual Jacobian at node ,
and, at the node of an observation, and , and elsewhere . Run with and without the observations, this recursion gives
with the innovation covariances of the recursion without the observations. With the force known, the same two recursions run on the state block alone, with , , and in place of , , and , and the initial covariance of the state given the force, which is zero here (Sec. E.1). Marking their innovation covariances by a tilde,
needs four recursions, with and without the observations and with the force unknown and known, and the two with the observations. Each costs about as much as a filter pass, and its gradient in follows by automatic differentiation.
D DIFFUSION SWEEPS
Figures 1, 3, D.1 and D.2 isolate the state diffusion: they hold the force hyperparameters at the truth and compute the posterior with the IEKS.
Protocol. Figures 3, D.1 and D.2 run the IEKS on a log-spaced grid of , separately on each grid density . Figure 1 runs 10 IEKS iterations at each of its three diffusions on Duffing at . A point counts as converged once the root-mean-square change of the scored state component over the last iteration is at most , and only converged points are drawn. The sweep runs by continuation from the weak-enforcement end. Each starts from the converged trajectory of the next larger one, and from the EK1 smoothed mean at the largest value, after an unconverged point, or if the warm start does not converge. An upward pass then restarts every unconverged point from its converged smaller neighbor. Figure D.1 iterates in chunks of six IEKS iterations, at most six chunks per point, and scores at the interval midpoints. Figures 3 and D.2 run 30 iterations per point and score at the observation times. There the maximizers of and are refined by a parabola in through the best grid point and its two neighbors and evaluated again, while the pick of is its best grid point. Figure 1 uses the maximizer of on Duffing at .
Observation designs. The sweeps use earlier observation designs of the systems of Sec. 4.1, with the same dynamics and force priors. On FitzHugh–Nagumo, and is observed at times on with an SNR of 14. On Duffing, and the position is observed at times on with an SNR of about 20. On Lorenz-96, the sites are observed at times on with an SNR between 5.6 and 9.0.

Figure D.1: Relative error and of force and state against the state diffusion. Relative error of force and state (top rows) and their (bottom rows) against on Duffing, FitzHugh–Nagumo and Lorenz-96 (columns) with at the truth, one line per grid density , computed with the IEKS iterated to convergence. Only converged points are drawn. Diamonds: the maximizing on each grid (Fig. D.2), placed on the curves by interpolation. Squares: the maximizing . Both in the grid's color.
E IMPLEMENTATION DETAILS
This appendix gives the parts of Algorithm 1 and of the experiments that the main text only names. Filter and smoother are implemented in square-root form (Krämer and Hennig, 2024), and all gradients are computed by automatic differentiation through them.
E.1 Grid, initialization and search boxes
On grid density , the steps of size have nodes , and Algorithm 1 doubles up to . The observation times are nodes, and is even, so that the interval midpoints at which the posterior is scored are nodes as well. The residual is linearized to first order (EK1), with .
Initial law The force starts from the stationary distribution of its prior, , with the solution of the Lyapunov equation of the Matérn SDE with drift and dispersion (Särkkä and Solin, 2019 and Appendix B). The state starts from the known initial values , and for second-order systems. Higher derivatives follow from differentiating the ODE at with Taylor-mode automatic differentiation (Krämer and Hennig, 2024). For an additive force these derivatives are affine in the force, , with the Jacobian of the Taylor coefficients of the state with respect to the force.

Figure D.2: Force error and the four criteria against the state diffusion on three problems that misses. Relative force error, and below their maxima, and (rows) against on the first FitzHugh–Nagumo, the 11th Duffing and the 10th Lorenz-96 problem of Sec. 4.2 (columns), with the IEKS and at the truth, one line per grid density . Only converged points are drawn. Each criterion's row marks its own maximizer: stars for , plus signs for , triangles for and diamonds for .
state, so that the joint initial distribution is exactly Gaussian,
The state thus has no initial uncertainty of its own, and the ODE holds exactly at t = 0 for every force.
Search boxes and start The hyperparameters are fitted in boxes. The force variance , in units of the marginal variance of the true force, lies in , and the length scale within a factor of the truth. The diffusion lies in , with on Duffing, on FitzHugh–Nagumo and Lorenz-96, and on the SIR model. The start lies at the fractions 0.8, 0.7 and 0.3 of the boxes of , and , the same for every criterion: the diffusion on the weak-enforcement side, a large force amplitude and a short length scale .
E.2 Stability guard
A filter pass counts as stable if the local error estimate of ODE filters (Bosch et al., 2021) stays below one at every step. At step n, the residual is linearized with Jacobians and as in Appendix C, and is the linearized residual at the predicted mean . It gives the local diffusion estimate and the local error on the components of the ODE's state,
with the dimension of the residual, and absolute and relative tolerance one. The pass is stable if . The guard is checked on the EK1 pass at that starts a grid (line 2) and on the pass at the fitted in every iteration of the IEKS. After an unstable iteration the grid is discarded, and the next grid starts again from .
E.3 Fitting at a frozen linearization
In each iteration of the IEKS, the residual is linearized at the trajectory , and the hyperparameters are fitted at this frozen linearization by L-BFGS-B (Byrd et al., 1995) in their boxes, with at most 100 iterations. A non-finite value counts as with zero gradient. The diffusion is fitted first, by the criterion , from its current value, and then by . For all three are fitted jointly. All four criteria are maximized with their gradients. The IEKS stops when at the fitted changes by less than between iterations, or after iterations. A finer grid keeps the diffusion of the previous grid's fit and its trajectory , interpolated linearly in time, and restarts the force hyperparameters from .
E.4 Grid acceptance
Let and be the posterior mean and standard deviation of the force on grid . The force estimate has settled if its change at the observation times is small against its posterior standard deviation at the interval midpoints , in root mean square,
with . The fit reproduces the data through the ODE if . For , the observation times are split into windows of intervals, starting at the observation indices . In window , the ODE is solved from the smoothed mean of the ODE's state at by the classical Runge–Kutta method with 32 steps per observation interval, with the force mean interpolated linearly between the nodes. With the solution at the observation times of its window, and the noise standard deviation of channel of the -dimensional observations,
A fit consistent with the data gives . The check exposes a fit in which the numerical freedom of the state, not the force, carries the data: the ODE driven by the force mean then departs from them within a window even where the smoothed state follows them. It does not always expose a force that is small against the autonomous dynamics over a window, such as the damped force of on the 19th FitzHugh–Nagumo problem (Fig. A.1), which passes the check with . If no grid is accepted, the last fit is reported, and the force is flagged as not identified.
E.5 Baselines
Tronarp et al. (2022) and Wu and Lysy (2024) as published evaluate on their own one-pass EK1 filters at rather than at a frozen IEKS linearization. The former run a filter without the data and condition the backward Markov chain of its smoother on the data, the latter subtract of the filter without the data from of the filter with the data. At a shared linearization the two coincide, and in our experiments is evaluated at the frozen IEKS linearization and maximized by L-BFGS-B with its gradient like the other criteria. The classical latent force model (Hartikainen et al., 2012) runs through Algorithm 1, with the ODE filter replaced by the classical Runge–Kutta discretization of the ODE (Hairer et al., 1993), treated as exact, and the force in the same Matérn state-space form. It takes Runge–Kutta steps per observation interval, with the force evaluated at the stage times from the force state. Without a state prior there is no diffusion to select, and a grid is accepted on the change of the force alone, against its posterior standard deviation at the observation times. The ladder runs to the end and the accepted grid is read off afterwards, so its wall-clock time includes all five grids. On Lorenz-96 an isotropic process noise on the state is fitted with , starting at the observation noise variance per observation interval, and kept from the coarser grid like the diffusion. On odd grids the force at the midpoints is bridged between its neighboring nodes, and the state is not scored.
E.6 Calibration interval of the
If the standardized errors at the scored midpoints are distributed as with a correlation matrix , then is distributed as , with the eigenvalues of and independent. Its distribution function follows from the formula of Imhof (1961),
a single integral, which we evaluate by quadrature and solve for the 2.5 % and 97.5 % quantiles.
The interval in Figs. 4 and A.4 depends only on the design of a system, the number n of scored midpoints and the true length scale , and is the same for every fit on it. It takes the standardized force errors to be correlated like the Matérn-5/2 force prior,
With midpoints a distance T/n apart, the interval is set by n and the ratio : the smoother the force relative to the window, the fewer independent errors and the wider the interval.