Skip to content

Menu

WorksComputer Science

ZENO: Nonlinear filtering with Zakai Equation Neural Operators

Download PDFView on arXiv

Ask your agent about this work

Your agent reads this work through Valency, with its citations and similar works. Paste this at the start of a chat.

Use the Valency MCP. Work: W_h3x8tw9s. Fetch it with get_paper_by_id, then find its nearest works with find_similar_papers and tell me what it adds.

Works with any MCP client. Not connected yet? Connect your agent

Abstract

State inference and parameter learning for nonlinear filters is a core computation for scientific machine learning with varied applications in engineering and neuroscience. The unnormalized filtering distribution is governed by the Zakai equation, a stochastic partial differential equation (SPDE) that combines the forward Kolmogorov operator (known as the Fokker-Planck equation) with observed likelihood updates. Although solving these high-dimensional SPDEs is often impossible analytically and intractable numerically, advances in operator learning and physics-informed machine learning have made it feasible. Harnessing these advances, we introduce the Zakai Equation Neural Operator (ZENO), a model that optimizes a neural operator against a Zakai Equation based physics-informed loss to approximate the exact unnormalized filtering distribution for latent stochastic dynamical systems. We use this ZENO-inferred posterior distribution in an expectation-maximization (EM) framework to perform parameter learning and state inference. We demonstrate ZENO's ability to accurately infer the posterior distribution and learn its corresponding SDE parameters in three simulated stochastic dynamical systems (Double-Well bistable system, Van Der Pol (VDP) oscillator, and Lorenz system) and compare its performance against established methods for latent SDE inference and learning. We show that ZENO recovers previously observed limit cycles representing forward and backward locomotion from a whole-brain imaging dataset of immobilized C. elegans nematodes. ZENO is a novel approach to the problem of nonlinear filtering and dynamical inference through the lens of partial differential equations and operator theory.

Introduction

Estimating a latent dynamical process from a set of noisy observations is a fundamental problem in machine learning for science [Durstewitz et al., 2023]. For example, in neuroscience, it is thought that neural computations are implemented by a latent dynamical system that is expressed by a neural population [Saxena and Cunningham, 2019]. This problem has been well studied in signal-processing as filtering (in the online setting) or smoothing (in the offline setting) a noisy non-linear dynamical system [Yau et al., 2024]. The essence of filtering as Bayesian inference is to estimate the filtering distribution p(zt∣X[0:t])p(z_t\mid X_{[0:t]}) where zt∈Rnz_t \in\mathbb{R}^n is an unobserved latent variable and xt∈Rmx_t \in\mathbb{R}^m (m≥nm \ge n) are observations at each point t∈[0,T]t \in[0,T], while for smoothing the goal is to estimate the posterior distribution p(zt∣X[0:T])p(z_t\mid X_{[0:T]}) [Sarkka, 2013]. These distributions are referred to as the filtering and smoothing distributions respectively.

For continuous time systems, the dynamics of the filtering distribution has been well studied as the Kushner-Stratonovich (KS) equation [Stratonovich, 1960, Kushner, 1964], a stochastic partial differential equation (SPDE). A more tractable analog of the KS equation is the Zakai equation [Zakai, 1969], a linear SPDE governing the unnormalized posterior density. While solving the KS or Zakai equation provides the exact posterior distribution (post-normalization for the Zakai equation), solving these equations is often impossible analytically and intractable numerically for high-dimensional systems [Sabbar and Nisar, 2025]. Alternative methods such as state-space models [7], (switching) linear dynamical systems [Linderman et al., 2017], and deep learning-based latent stochastic differential equations (SDE) [Li et al., 2020] offer a more tractable approach to inference and parameter learning by making assumptions or approximations about the posterior distribution. For example, the Kalman-Bucy filter [Kalman and Bucy, 1961] provides the exact solution to the KS equation under the assumption that dynamics are linear and observation noise is Gaussian. Thus, the need remains for powerful methods that can approximate the filtering posterior without restrictive assumptions while remaining computationally tractable.

Two recent approaches for solving PDEs with neural networks offer a route around these barriers. Physics-informed neural networks (PINNs) supervise the fit with the governing equation rather than labeled solutions, constraining the network’s autodifferentiated derivatives to satisfy the equation at a set of collocation points [Raissi et al., 2019, Karniadakis et al., 2021]. PINNS are applicable when the solution is never observed, as in filtering, and because no parametric form is imposed, they can represent non-Gaussian posteriors governing nonlinear dynamics.

However, PINNs are fit to a single instance of a PDE and must be retrained for each new one, whereas in filtering every observation path X[0,t]X_{[0,t]} drives a distinct instance of the Zakai equation. Neural operators learn the solution operator itself, mapping a PDE’s defining data to its solution and generalizing across instances without retraining [Lu et al., 2021, Azizzadenesheli et al., 2024], but are trained on labeled solutions which filtering never provides. Physics-informed neural operators (PINOs) resolve both obstacles, using the equation’s residual when observations are unavailable to supervise operator learning across a distribution of instances [Wang et al., 2021b, Li et al., 2024].

This is the paradigm we build on to solve the Zakai equation for nonlinear filtering. We present the Zakai Equation Neural Operator (ZENO): A physics-informed neural operator for nonlinear filtering that learns the solution to the Zakai equation. ZENO represents the unnormalized filtering distribution by optimizing a physics informed loss which minimizes the residual between the PINO’s posterior derivatives and the Fokker Planck operator while incorporating likelihood updates at observation times. Unlike current approaches, which use numerical solvers [Leng et al., 2026] for forecasting or a deep-splitting approach [4, 5] (Bågmark et al. 2023b), we leverage neural operators to learn a global solution over the entire observation history. Furthermore, we make no assumptions about the form of the dynamics model and instead estimate the dynamical parameters and observation model in an expectation-maximization [Dempster et al., 1977] like setup.

We show that ZENO is able to achieve similar latent inference accuracy to optimal nonlinear filters in simulated dynamical systems. We then show that ZENO performs dynamical parameter estimation at the same level as other state-of-the-art (SOTA) baselines. Finally, we evaluate our model on a real world neuroscience dataset and find that ZENO is able to recapitulate previously observed latent dynamical structure.

Methods

Background

Problem Formulation

The problem of nonlinear filtering involves estimating the posterior distribution p(zt∣X[0,t])p(z_t \mid X_{[0,t]}), where zt∈Rnz_t \in\mathbb{R}^n is an unobserved latent state and X[0,t]={xtk:tk≤t}X_{[0,t]} = \{x_{t_k}: t_k \le t\} are noisy mm-dimensional observations of z\mathbf{z} taken at discrete times tk=kΔtt_k = k\Delta t. The latent state evolves as a stochastic differential equation

dzt=f(zt,t)dt+g(zt,t)dWt(1)d\mathbf{z}_t = f(\mathbf{z}_t,t)dt + g(\mathbf{z}_t,t)d\mathbf{W}_t \tag*{(1)}

where f:Rn→Rnf : \mathbb{R}^n \to\mathbb{R}^n is the deterministic drift function, g(z,t)g(\mathbf{z},t) is an n×kn \times k diffusion coefficient, and Wt\mathbf{W}_t is a kk dimensional standard Wiener process. The latent state is observed through a noisy readouts:

dxt=h(zt,t)dt+dVt(2)d\mathbf{x}_t = h(\mathbf{z}_t,t)dt + d\mathbf{V}_t \tag*{(2)}

in the continuous case or

xtk=h(ztk)+ϵk,ϵk∼N(0,R)(3)\mathbf{x}_{t_k} = h(\mathbf{z}_{t_k}) + \boldsymbol{\epsilon}_k,\quad\boldsymbol{\epsilon}_k \sim\mathcal{N}(0,\mathbf{R}) \tag*{(3)}

in the discrete case where h:Rn→Rmh : \mathbb{R}^n \to\mathbb{R}^m is the observation readout function, Vt\mathbf{V}_t is an mm-dimensional independent standard Wiener processes, and R\mathbf{R} is the observation noise respectively Yau et al. [2024].

PDEs and SPDEs: Fokker-Planck, Kushner-Stratonovich, and Zakai Equations

The Fokker-Planck equation (FPE) describes the time evolution of the state’s unconditional density, p(z,t)p(\mathbf{z},t), in the absence of any observations, under the dynamics of Equation (1):

∂p∂t=L∗p,L∗p=−∇⋅(fp)+∇∇:(Dp),(4)\frac{\partial p}{\partial t} = \mathcal{L}^{*}p,\quad\mathcal{L}^{*}p = -\nabla\cdot(fp) + \nabla\nabla: (D p), \tag*{(4)}

where D=12g(z,t)gT(z,t)D = \frac{1}{2}g(\mathbf{z},t)g^{\mathsf{T}}(\mathbf{z},t) is the diffusion tensor and L∗\mathcal{L}^{*} is the forward Kolmogorov operator. The term ∇∇:(Dp)=∑i,j∂i∂j(Dijp)\nabla\nabla: (Dp) = \sum_{i,j}\partial_i\partial_j(D_{ij}p) is a generalized (anisotropic) Laplacian, reducing to the familiar D∇2pD\nabla^2p when gg (and hence DD) is scalar.

When one only has access to corrupted observations of the state, the conditional PDF of the state p(zt∣X[0,t])p(\mathbf{z}_t \mid\mathbf{X}_{[0,t]}) is governed by the Kushner Stratonovich stochastic PDE (SPDE):

dp=L∗pdt+p(h(z,t)−h^(z,t))TdIt(5)dp = \mathcal{L}^{*}pdt + p\left(h(\mathbf{z},t) - \hat{h}(\mathbf{z},t)\right)^{\mathsf{T}}d\mathbf{I}_t \tag*{(5)}

where h^\hat{h} is the conditional expectation h^(z,t)=E[h(z,t)∣X[0,t]]\hat{h}(\mathbf{z},t) = \mathbb{E}[h(\mathbf{z},t)\mid\mathbf{X}_{[0,t]}] and dItd\mathbf{I}_t is the innovation process, dIt=dxt−h^(z,t)dtd\mathbf{I}_t = d\mathbf{x}_t - \hat{h}(\mathbf{z},t)dt. For continuous observations (Eq. (2)), analyzing instead the unnormalized probability density function ρ(zt∣X[0,t])\rho(\mathbf{z}_t \mid\mathbf{X}_{[0,t]}) yields a more tractable analog of the Kushner-Stratonovich equation — the linear Zakai equation:

dρ=L∗ρdt+ρh(z,t)dxt.(6)d\rho= \mathcal{L}^{*}\rho dt + \rho h(\mathbf{z},t)d\mathbf{x}_t. \tag*{(6)}

With the discrete observations (Eq. (3)), the Zakai equation reduces to the Fokker–Planck equation between observation times and to a multiplicative likelihood update at each observation, giving the recursion

ρ(zt∣X[0,t−Δt])=(eΔtL∗ρ(⋅∣X[0,t−Δt]))(z)(7)\rho(\mathbf{z}_t\mid\mathbf{X}_{[0,t-\Delta t]}) = \left(e^{\Delta t\mathcal{L}^{*}}\rho(\cdot\mid\mathbf{X}_{[0,t-\Delta t]})\right)(\mathbf{z}) \tag*{(7)}
ρ(zt∣X[0,t])=p(xt∣zt)ρ(zt∣X[0,t−Δt])(8)\rho(\mathbf{z}_t\mid\mathbf{X}_{[0,t]}) = p(\mathbf{x}_t\mid\mathbf{z}_t)\rho(\mathbf{z}_t\mid\mathbf{X}_{[0,t-\Delta t]}) \tag*{(8)}

Solving the Zakai equation provides the unnormalized filtering distribution but in practice requires numerical methods such as finite-differences which scale poorly due to their grid dependency.

Physics Informed Neural Operators (PINOs)

In functional analysis, an operator is a function-to-function mapping. Differential equations are naturally expressed in terms of operators: the equation itself defines one operator acting on the unknown function, and its solution — when it exists — defines another, the operator that maps the equation’s data to that solution. For example, for the Fokker-Planck equation, the operator of interest is G:p0↦p(⋅,t)\mathcal{G}: p_0 \mapsto p(\cdot,t), mapping an initial density to the solution at later times.

Neural operators are the generalization of neural networks from functions between finite dimensional vector spaces to infinite dimensional functional spaces (Appendix § 9). They are commonly used to learn the solution operators to differential equations, especially PDEs. In our setting, we seek to learn an operator over the Zakai equation, Gθ:X[0,t]↦ρθ(⋅,t)\mathcal{G}_{\theta}: \mathbf{X}_{[0,t]} \mapsto\rho_{\theta}(\cdot,t), mapping an observation path directly to the corresponding estimated unnormalized filtering density.

While neural operators are data-driven, Physics Informed Neural Operators (PINOs) extend them by incorporating the governing differential equation of the system whose solution is being learned (Appendix § 10). This is enforced by ensuring

∂ρθ∂t≈L∗ρθ,(9)\frac{\partial\rho_\theta}{\partial t} \approx L^* \rho_\theta, \tag*{(9)}

which is satisfied if ρθ\rho_\theta solves the Zakai equation. This enables faster and more stable learning: because Eq. (9) enforces the governing equation, the resulting solutions are consistent with the known dynamics and training remains possible even when no labeled solutions exist, since for SPDEs the true filtering posterior is never observed. These models function by sampling collocation points {z(k)}k=1K\{z^{(k)}\}_{k=1}^{K} on the inferred domain, computing the derivatives of the network at those points through autodifferentiation, and minimizing the discrepancy between the two sides of Eq. (9) at each point.

Model Architecture

We use a unidirectional GRU [Cho et al., 2014, Krishnan et al., 2015] to encode the observation history into a causal context vector (Figure 1. A, B) vt∈Rdvv_t \in\mathbb{R}^{d_v}:

Image not extracted

Figure 1. Architecture Diagram. A) Generative Model. B) Causal GRU encodes observations into context trajectory. C) Context trajectory is fed into the branch of a Deep Operator Network along with substeps to produce basis functions. Trunk network can be queried at any zz and outputs log⁡ρθ\log\rho_\theta, the unnormalized log density. IC loss between the learned posterior and an IC prior N(0,I)\mathcal{N}(0, I) combined with Fokker Planck Residual Loss between observations and Jump Loss at observations D) Posterior Expectation zˉ=Ep(z∣x)[z]\bar{z} = \mathbb{E}_{p(z|x)}[z] computed through MALA based MCMC sampling. E) Dynamics and Observation Parameters fit by regressing against zˉ\bar{z}

ht=GRU⁡(ht−1,[xt⊙mt,mt]),vt=Wvht+bv,(10)h_t = \operatorname{GRU}\left(h_{t-1}, [x_t \odot m_t, m_t]\right), \qquad v_t = W_v h_t + b_v, \tag*{(10)}

where mt∈{0,1}m_t \in\{0,1\} indicates whether xtx_t is observed. By construction, vtv_t depends only on X[0,t]X_{[0,t]}. For each observation interval [t,t+Δt][t, t + \Delta t], the causal context vtv_t is fed into a Deep Operator Network (DeepONet; App. § 9.§ 2) [Lu et al., 2021]. The DeepONet outputs the unnormalized log-density at any latent point zz and any time within the interval [Bågmark et al., 2023b, Hu et al., 2024b]:

log⁡ρθ(z,t+sΔt∣X[0,t])=β+b(vt,s)⊤ψ(z),s∈[0,1],(11)\log\rho_{\theta}(z,t+s\Delta t \mid X_{[0,t]})=\beta+b(v_t,s)^{\top}\psi(z), \qquad s\in[0,1], \tag*{(11)}

where ss is the normalized time since the observation at tt (i.e., s=0s=0 is the posterior after incorporating xtx_t and s=1s=1 is the prediction for t+Δtt+\Delta t). The branch b:Rdv+1→Rpb:\mathbb{R}^{d_v+1}\to\mathbb{R}^{p} is an MLP with one hidden layer (tanh) while the trunk ψ:Rn→Rp\psi:\mathbb{R}^{n}\to\mathbb{R}^{p} is an MLP with three hidden layers (softplus). β∈R\beta\in\mathbb{R} is a learned scalar bias. Because the trunk network can be queried at any zz the model is mesh-free (Figure 1. C).

We parameterize the drift fϕ(z)f_{\phi}(z) of equation 1 as an MLP. We define the diffusion as a shared parameter gϕg_{\phi}. For the readout, hϕh_{\phi} we use a Stiefel observation map [Lee et al., 2026] with learned diagonal observation noise,

hϕ(zt)=Cϕzt+dϕ+ϵ∼N(0,Rϕ),Rϕ=diag⁡(r1,…,rm),(12)h_{\phi}(z_t)=C_{\phi}z_t+d_{\phi}+\epsilon\sim\mathcal{N}(0,R_{\phi}), \qquad R_{\phi}=\operatorname{diag}(r_1,\ldots,r_m), \tag*{(12)}

where Cϕ∈Rm×nC_{\phi}\in\mathbb{R}^{m\times n} has orthonormal columns (Cϕ⊤Cϕ=InC_{\phi}^{\top}C_{\phi}=I_n), i.e. lies on the Stiefel manifold [6], dϕd_{\phi} is a bias vector, and RϕR_{\phi} is the observation noise covariance (Figure 1D).

Initialization. We initialize CϕC_{\phi}, fϕf_{\phi} and z^\hat{z} by subspace identification [Van Overschee and De Moor, 1996, Qin, 2006] before training the operator (Appendix § 11.§ 3) to start in a good initial estimate for learning.

Fitting Procedure

We fit the model with an approach inspired by expectation-maximization [Ghahramani and Roweis, 1998], alternating between learning log⁡ρθ\log\rho_{\theta} with the dynamical and observation parameters ϕ={f,g,C,d,R}\phi=\{f,g,C,d,R\} held fixed (E step) and refitting ϕ\phi with ρθ\rho_{\theta} frozen (M step). Full details are given in Appendix § 11.

E step. We update θ\theta by stochastic gradient descent on

lE=wreslres+ljump+lic,(13)l_E=w_{\mathrm{res}}l_{\mathrm{res}}+l_{\mathrm{jump}}+l_{\mathrm{ic}}, \tag*{(13)}

where each step draws a fresh batch of mesh-free collocation points from a defensive Gaussian mixture [Hesterberg, 1995], half around the projection z^t=Cϕ⊤(xt−dϕ)\hat{z}_t=C_{\phi}^{\top}(x_t-d_{\phi}) and half from a broad Gaussian at the origin. The residual loss lresl_{\mathrm{res}} is the scale-normalized squared residual of the Fokker–Planck equation (Eq. (9)), written for log⁡ρθ\log\rho_{\theta}, between observation times. The jump loss ljumpl_{\mathrm{jump}} is a cross entropy that matches the posterior after each observation to the predicted density multiplied by the likelihood p(xt+1∣zt+1)p(x_{t+1}\mid z_{t+1}), i.e., the Zakai measurement update. The initial condition loss licl_{\mathrm{ic}} matches pθ(z0∣x0)p_{\theta}(z_0\mid x_0) to the posterior under a N(0,I)\mathcal{N}(0,I) prior. Densities are normalized locally over the collocation points by self-normalized importance sampling [Owen, 2013](Appendix § 11.§ 1). After NN E-step updates, we freeze ρθ\rho_{\theta} and compute the posterior means zˉt=Epθ(zt∣X[0,t])[zt]\bar{z}_t=\mathbb{E}_{p_{\theta}(z_t\mid X_{[0,t]})}[z_t] with the Metropolis-adjusted Langevin algorithm (MALA) [Roberts and Tweedie, 1996]

M step After we have an estimate of zˉ\bar{z}, we then fit ϕ\phi in the following order:

  1. Fit the Stiefel readout (Cϕ,dϕ)(C_{\phi},d_{\phi}) by orthogonal Procrustes analysis [Schönemann, 1966]

  2. Regress the drift network fϕf_{\phi} on the increments of zˉt\bar{z}_t

  3. Compute the scalar diffusion gϕg_{\phi} from the remaining increment residuals

  4. Estimate RϕR_{\phi} from the observation directions orthogonal to span⁡(Cϕ)\operatorname{span}(C_{\phi})

Results

Simulated Data

We first benchmark our model on three dynamical systems with known latents by collecting observations xt∼N(C∗zt+d,σobsI)x_t\sim\mathcal{N}(C^{*}z_t+d,\sigma_{\mathrm{obs}}I) where C∗C^{*} is a random linear projection with Cij∗∼N(0,1)C^{*}_{ij}\sim\mathcal{N}(0,1). We evaluate our model on its latent and dynamical RMSE as well as its ability to reconstruct observations

Latent Inference

We first tested how well ZENO could infer the filtering posterior for a double well potential. This system is used in neuroscience as a simple model of decision making and is of interest because the posterior distribution can be bimodal [Duncker et al., 2019]. Because the state is low dimensional and we have access to the exact drift and diffusion, it is tractable to numerically solve the Zakai equation to access the Bayes optimal filter for comparison. In general, this would not be possible as numerical solvers scale exponentially with the dimension of the PDE they are solving. Figure 2A shows that we are able to represent the exact filtering distribution and its mean estimate while Figure 2B and C show that our model is able to scale to a higher dimensional system and accurately reconstruct the VDP oscillator and Lorenz system. We find that ZENO reaches the ceiling set by the optimal filter for the double well equation and Van Der Pol oscillator but gaps the optimal filter by about 0.005 on the Lorenz system [1963] (Figure 2D).

Image not extracted

Figure 2. Latent Inference of Simulated Dynamical Systems. A) Exact filtering distribution for the double well system vs filtering posterior distribution estimated by ZENO. B) Latent Posterior Mean Estimate for the Van Der Pol System. C) Latent Trajectory Inference for the Lorenz Attractor. D) Comparison of ZENO’s normalized root mean squared error with the exact optimal filter for each system.

Dynamics Parameter Learning

After we validated that latent inference by ZENO was accurate, we asked how well it learns system parameters. Figure 3A shows that ZENO learns the double well potential’s cubic drift. On Van Der Pol, we show that ZENO reproduces the limit cycle but the velocity field is slower at the edges of the domain (Figure 3B). Finally, on Lorenz we find that ZENO reconstructs the dynamics but misestimates some directions and speeds of the flow field (Figure 3C).

Image not extracted

Figure 3. ZENO Drift Estimation Performance. A) True cubic drift of double well (dashed line) overlayed with model estimate. B) True Van Der Pol Vector field (Left) vs Model’s infered Vector Field. C) Lorenz Attractor Dynamics plotted in the xzxz plane. D) Model’s NRMSE performance compared to baselines. Dots represent seeds and error bars are 1 SD.

We compare ZENO to two established approaches: 1) the SING algorithm [Hu et al., 2025], which fits a Gaussian process switching linear dynamical system (gpSLDS) [Hu et al., 2024a] to approximate the drift; and 2)SDE-matching, a simulation-free approach to variational inference of latent SDEs [3]. We found ZENO achieves similar levels of accuracy to these baselines: matching gpSLDS on doublewell and SDE matching on VDP (Figure 3D).

Analysis of whole-brain calcium dynamics in C. elegans

We used ZENO to analyze neuroscience data where the true latent state is unknown and where prior work [Linderman et al., 2019, Glaser et al., 2020, Yezerets et al., 2025] provides the opportunity to compare ZENO’s latent state estimation with established methods. We tested ZENO on a dataset of whole-brain calcium dynamics in immobilized C. elegans [Kato et al., 2015]. Figure 4A-E shows performance on an example worm (StimWorm 1). Specifically, Figure 4A shows that ZENO accurately reconstructs neural observations from the inferred latents. The latent states inferred by ZENO recapitulate reported limit cycles (Figure 4B,C) and the inferred latents are behaviorally relevant and consistent with human-labels (Figure 4D,E). We find that ZENO performs comparable to established state-of-the-art methods on reconstruction R2R^2 and forecasting RMSE1. These results establish that ZENO performs comparably to established methods on real-world datasets of scientific value and can be used for scientific discovery of latent variables from neural measurments.

Image not extracted

Figure 4. Whole-brain calcium dynamics in C. elegans A) Example ZENO reconstruction of RIML neuron. B–C) ZENO recovers limit cycles. D–E) Inferred latents are consistent with known behavioral labels. Model performance compared to baselines on F) reconstruction R2R^2, G) behavior decoding accuracy, and H) forecasting RMSE. Points represent individual worms, separated into NoStim and Stim conditions. Error bars are 1SD.

Related Work

Switching Linear Dynamical Systems. Switching linear dynamical systems are hierarchical models that approximate a nonlinear system with mixtures of linear dynamical systems. They are often fit with Bayesian methods (e.g., expectation maximization) or with variational approximation. Their mixture of linear systems structure balances interpretability and tractability against expressivity: their discrete states and linear dynamics can be interpreted for scientific discovery [Linderman et al., 2017] but their approximate (variational) posteriors, while tractable fit to data, may diverge from the true posterior. Depending on the choice of variational family these models may struggle to match posteriors that are multimodal or asymmetric. ZENO forgoes a hierarchical framework in favor of directly approximating the true posterior distribution.

Latent SDEs. Latent SDEs address a similar problem using a variational autoencoder framework where the prior and posterior processes are governed by a neural stochastic differential equation and the corresponding drift and diffusion functions are modeled as neural networks [Li et al., 2020]. These models offer the flexibility and expressivity of neural networks, optimization with gradient descent, and parallelization offered by GPUs. However, balancing the data reconstruction and Kullback-Leibler (KL) loss that defines their variational objective can often be difficult, (e.g., posterior collapse, where the posterior equals the prior and becomes unusable for anything outside of reconstruction). Simulation-based Latent SDEs established this approach first, using the stochastic adjoint sensitivity method. This required rollouts or simulations from the variational posterior at each gradient step to estimate a path-wise KL loss, which can be expensive for long timescales and numerically sensitive. Simulation-free Latent SDEs extend these ideas without simulation [Course and Nair, 2023]. In

SDE-matching, Bartosh et al. [ [3] use methods inspired by diffusion models and flow matching to learn latent dynamics through a KL divergence between the posterior and prior drift functions. In Neural Stochastic Flows, Kiyohara et al. [2025] directly model the conditional law governing the solution to the latent SDE using normalizing flows. Finally, in Neural Kolmogorov Equations, Bizzi and Fink [ [8] represents the SDE in its infinite dimensional form, but does not learn parameters of a latent SDE. ZENO is a simulation-free latent-SDE model that uses a physics based loss instead of a reconstruction/ELBO, enabling learning the parameters of a latent SDE.

Physics-informed Neural Networks for the Fokker-Planck and Zakai Equations. Other works have investigated using PINNs for solving the Fokker-Planck equation (FPE) [Xu et al., 2020, Zhai et al., 2020, Chen et al., 2020, Hu et al., 2024b] and Zakai equation [1] (Bågmark et al. 2023b). Liu et al. [2021] solve the FPE as an inverse problem by fitting a network to the FPE solution and fitting the drift and diffusion in alternating steps. However, they use a grid based approach and only demonstrate it on one-dimensional systems. Furthermore, they assume that at least a noisy version of the PDF is accessible for training and do not handle unobserved latents. Azimov and Kim [ [1] learn the FPE solution and use it for Bayesian updates to solve for the filtering distribution, but assume known drift and diffusion functions. Both methods propagate the solution step-wise. To our knowledge, our approach is the first to simultaneously perform state inference of the full FPE solution operator while learning unknown dynamics functions using EM.

Discussion

Here, we introduced ZENO, a physics-informed neural operator that approximates the unnormalized filtering distribution by learning the solution operator of the Zakai equation. On synthetic systems, ZENO matched or came close to optimal numerical filters for latent inference and performed on par with state-of-the-art methods for parameter learning. On whole-brain C. elegans recordings, it was comparable to baselines on forecasting and produced more behaviorally informative latents, at the cost of slightly lower reconstruction R2R^2, which we expect relaxing the Stiefel constraint on the observation model to address.

ZENO achieves similar performance to state-of-the-art methods but does not outperform them in all cases. All established methods we benchmarked against are estimating the smoothing distribution, which integrates observations both forward and backward in time, thereby providing a superior marginal distribution that can be used as a target. Future directions should investigate extending ZENO to inferring the smoothing distribution by learning the solution to the backwards stochastic PDE [Pardoux, 1982]. Additionally, it may be possible to improve the objective for fitting the drift and diffusion by casting it as an inverse problem but that is outside the scope of this work. Finally, our model uses a single set of parameters to represent the entire dynamical system even in cases where there are different dynamical regimes such as in our application to C. elegans. Models such as decomposed linear dynamical systems [Yezerets et al., 2025] handle this through mixtures of dictionaries of linear dynamical systems. A similar idea could be combined with our model by using operator splitting methods [Serrano et al., 2026]. In fact, one may be able to represent switches in regimes through jumps by generalizing the Forward Kolmogorov operator to Levy processes [Jia and Benson, 2019, Leng et al., 2026]. Overall, ZENO represents a novel approach to the problem of nonlinear filtering and dynamical inference through the lens of partial differential equations and operator theory.

AI use statement

In this work, we used generative AI tools for generation of synthetic data sets, to provide feedback on research methodology or experiments, and implement methods. We have not used generative AI tools to propose or refine hypotheses, clean and reformat dataset, support qualitative and thematic data analysis, or interpret results and formulating mathematical claims, providing critical ingredients for proving mathematical claims, assisting in the writing of proofs, or assisting with translation are not applicable to this work. Additionally, we used generative AI tools for to modify scientific figures, suggest experimental parameters, create or edit software code, and brainstorming. We have reviewed all AI-assisted work. We checked LLM-generated research ideas for potential plagiarism through a manual literature survey. LLM-generated code was verified and tested for correctness by the authors.

We take responsibility for the final content of this work, including text, claims or artifacts produced with the aid of generative AI.

Reproducibility statement

Code is opensourced at https://github.com/aaprasad/zeno. Model checkpoints, datasets and results assets can be provided upon request.

Author Contributions

A.P. and B.D.D. devised the research question and model. A.P. implemented the model and ran experiments. A.P. and B.D.D wrote the paper. S.W.F. edited the paper and provided expertise on C. elegans data. S.W.F. and B.D.D provided financial support for the project.

Acknowledgments and Disclosure of Funding

A.P is supported by the Henry E. Singleton Fellowship and the MIT Brain & Cognitive Sciences Department. S.W.F is supported by the Howard Hughes Medical Institute and by the National Institute of Health (NIH R01 NS131457). B.D. is supported by a Alfred P. Sloan Foundation Research Fellowship.

Primer on Operator Learning

Formulation

Most deep learning methods map between finite-dimensional vector spaces, F:Rn→RmF:\mathbb{R}^{n}\to\mathbb{R}^{m}. Many scientific problems instead involve maps between function spaces. For example, to solve a differential equation we are interested in solving

Au=v\mathcal{A}u=v

where A\mathcal{A} is a differential operator: a map that takes in a function and outputs its derivative. Formally, we want to approximate an operator

G=A−1:V→U,v↦u=G(v),\mathcal{G}=\mathcal{A}^{-1}:\mathcal{V}\to\mathcal{U},\qquad v\mapsto u=\mathcal{G}(v),

where U\mathcal{U} and V\mathcal{V} are (typically Banach) spaces of functions defined on domains D⊂RdD\subset\mathbb{R}^{d} and D′⊂Rd′D'\subset\mathbb{R}^{d'}. Operator learning fits a parametric approximation Gθ≈G\mathcal{G}_{\theta}\approx\mathcal{G} from input–output pairs {(ui,vi)}i=1N\{(u_i,v_i)\}_{i=1}^{N} by minimizing an error such as 1N∑i∥Gθ(vi)−ui∥U2\frac{1}{N}\sum_i\|\mathcal{G}_{\theta}(v_i)-u_i\|_{\mathcal{U}}^2. An example of these input-output pairs could be the evaluations of a PDE on some domain paired with the PDE solution.

The difficulty is that functions are infinite-dimensional objects, while any computer sees them only through finite discretizations. While a high resolution discretization will lead to improved performance, generating high resolution data is expensive. A good operator-learning architecture defines a map that is meaningful independently of how inputs and outputs are sampled.

Deep Operator Networks (DeepONet)

DeepONet [Liu et al., 2021] builds on the universal approximation theorem for nonlinear operators of Chen and Chen [1995]. This theorem shows that any continuous operator can be approximated arbitrarily well by a sum of products between two networks: one that encodes the input function and one that encodes the output location.

Given an input function vv observed at MM fixed "sensor" locations {zm}1M\{z_m\}_{1}^{M}, a DeepONet evaluates the output function at a query point z∈D′z\in D' as

Gθ(v)(z)=∑k=1pbk(v(z1),…,v(zM))ψk(z)+β.\mathcal{G}_{\theta}(v)(z)=\sum_{k=1}^{p}b_k\bigl(v(z_1),\ldots,v(z_M)\bigr)\psi_k(z)+\beta.

The branch network b:RM→Rpb:\mathbb{R}^{M}\to\mathbb{R}^{p} encodes the input function into pp coefficients while the trunk network ψ:Rd′→Rp\psi:\mathbb{R}^{d'}\to\mathbb{R}^{p} produces pp basis functions evaluated at the query location. The solution operator is thus a linear combination of learned basis functions {ψk}\{\psi_k\} with input-dependent coefficients {bk(v)}\{b_k(v)\}. This formulation enables the output to be mesh-free. The trunk can be queried at any zz, so outputs can be evaluated anywhere in D′D'. However, input is tied to a fixed discretization. The branch expects vv at the same MM sensors for every sample, so the input side is not discretization-invariant without further modification.

Primer on Physics Informed Neural Networks (PINNs)

Classical numerical solvers for partial differential equations often fail to scale to higher dimensions due to exponential scaling with the dimensionality of the domain. Instead, modern machine learning based approaches amortize the solution to a PDE by directly fitting neural networks to the derivative-solution pairs. However, these data-driven models ignore known physics and tend to need large datasets which can be expensive to generate. Physics-informed neural networks (PINNs) are a modern approach that represent the solution of a differential equation as a neural network and train it to satisfy both the observed data and the equation itself. This approach has been made practical by automatic differentiation in modern deep learning frameworks.

Formulation

Consider a general differential equation on a domain Ω⊂Rd\Omega\subset\mathbb{R}^{d}, possibly with time t∈[0,T]t \in[0,T]:

Aλu=s(z,t),(z,t)∈Ω×(0,T],Bu=b(z,t),(z,t)∈∂Ω×(0,T],u(z,0)=u0(z).\begin{aligned} \mathcal{A}_{\lambda}u &= s(z,t), && (z,t) \in\Omega\times(0,T],\\ \mathcal{B}u &= b(z,t), && (z,t) \in\partial\Omega\times(0,T],\\ u(z,0) &= u_{0}(z). \end{aligned}

Here, Aλ\mathcal{A}_{\lambda} is a differential operator with parameters λ\lambda (for example, Aλ=∂t−L∗\mathcal{A}_{\lambda} = \partial_{t} - \mathcal{L}^{*} for the Fokker-Planck equation), and B\mathcal{B} is a boundary operator. A PINN approximates the solution by a network uθ(z,t)u_{\theta}(z,t), typically a multilayer perceptron with smooth activations such as tanh or sinusoids.

Because Aλ[uθ]\mathcal{A}_{\lambda}[u_{\theta}] can be evaluated exactly at any point by automatic differentiation of the network with respect to its inputs, one defines

Aλuθ(z,t)≈s(z,t),(14)\mathcal{A}_{\lambda}u_{\theta}(z,t) \approx s(z,t), \tag*{(14)}

which is true if uθu_{\theta} solves the differential equation.

Training

Training minimizes a composite loss evaluated on sets of points sampled from the domain:

L(θ)=wrLr+wbLb+w0L0+wdLd,\mathcal{L}(\theta) = w_{r}\mathcal{L}_{r} + w_{b}\mathcal{L}_{b} + w_{0}\mathcal{L}_{0} + w_{d}\mathcal{L}_{d},

with one term per source of information:

Lr=1Nr∑i=1Nr∣Aλ[uθ](zir,tir)−s(zir,tir)∣2,Lb=1Nb∑i=1Nb∣B[uθ](zib,tib)−b(zib,tib)∣2,L0=1N0∑i=1N0∣uθ(zi0,0)−u0(zi0)∣2,Ld=1Nd∑i=1Nd∣uθ(zid,tid)−uiobs∣2.\begin{aligned} \mathcal{L}_{r} &= \frac{1}{N_{r}}\sum_{i=1}^{N_{r}}\left|\mathcal{A}_{\lambda}[u_{\theta}](z_{i}^{r},t_{i}^{r}) - s(z_{i}^{r},t_{i}^{r})\right|^{2}, \qquad \mathcal{L}_{b} = \frac{1}{N_{b}}\sum_{i=1}^{N_{b}}\left|\mathcal{B}[u_{\theta}](z_{i}^{b},t_{i}^{b}) - b(z_{i}^{b},t_{i}^{b})\right|^{2},\\ \mathcal{L}_{0} &= \frac{1}{N_{0}}\sum_{i=1}^{N_{0}}\left|u_{\theta}(z_{i}^{0},0) - u_{0}(z_{i}^{0})\right|^{2}, \qquad \mathcal{L}_{d} = \frac{1}{N_{d}}\sum_{i=1}^{N_{d}}\left|u_{\theta}(z_{i}^{d},t_{i}^{d}) - u_{i}^{\mathrm{obs}}\right|^{2}. \end{aligned}

{(zir,tir)}\{(z_{i}^{r},t_{i}^{r})\} are called collocation points. The loss can be read as a soft penalty method: the differential equation acts as a regularizer that constrains the network wherever data are absent.

ZENO Fitting Procedure

This section gives the full E and M steps summarized in § 2.3. We alternate between learning the unnormalized log-density ℓθ=log⁡ρθ\ell_{\theta} = \log\rho_{\theta} with ϕ={f,g,C,d,R}\phi= \{f,g,C,d,R\} fixed and refitting ϕ\phi with ρθ\rho_{\theta} frozen, in the spirit of expectation-maximization [Ghahramani and Roweis, 1998]. Throughout, mt∈{0,1}m_{t} \in\{0,1\} indicates whether xtx_{t} is observed, and the Gaussian log-likelihood is log⁡p(xt∣z)=−12(xt−Cz−d)TR−1(xt−Cz−d)\log p(x_{t} \mid z) = -\frac{1}{2}(x_{t}-Cz-d)^{\mathsf{T}}R^{-1}(x_{t}-Cz-d) up to a constant. Hyperparameters are listed in Appendix § 12.§ 2.1.

E step

During the E step, we hold ϕ\phi fixed and update the operator’s parameters θ\theta by gradient descent on ℓE\ell_{E}, recomputed at each step from a freshly sampled batch of collocation points.

Collocation points. At every (t,trajectory)(t,\text{trajectory}) site we draw KK collocation points, half from a component around the data-driven latent estimate and half from a broad “defensive” component that covers regions the first might miss [Hesterberg, 1995]:

qt(z)=12N(z;mtz^t,σt2I)+12N(z;0,σb2I),z^t=CϕT(xt−dϕ),σt={σnmt=1σbmt=0.(15)q_{t}(z) = \frac{1}{2}\mathcal{N}(z; m_{t}\hat{z}_{t},\sigma_{t}^{2}I) + \frac{1}{2}\mathcal{N}(z;0,\sigma_{b}^{2}I), \qquad\hat{z}_{t} = C_{\phi}^{\mathsf{T}}(x_{t}-d_{\phi}), \qquad\sigma_{t} = \begin{cases} \sigma_{n} & m_{t}=1\\ \sigma_{b} & m_{t}=0. \end{cases} \tag*{(15)}

At unobserved frames the first component is therefore also broad and centered at the origin.

Residual loss. For the isotropic diffusion gg, dividing the Fokker–Planck equation ∂tρ=L∗ρ\partial_t \rho= \mathcal{L}^{*}\rho by ρ\rho gives its log-space form ∂tℓ=Aϕ[ℓ]\partial_t \ell= \mathcal{A}_{\phi}[\ell] with

Aϕ[ℓ](z)=−∇⋅fϕ(z)−fϕ(z)⋅∇ℓ(z)+12gϕ2(∥∇ℓ(z)∥2+Δℓ(z)).(16)\mathcal{A}_{\phi}[\ell](z) = -\nabla\cdot f_{\phi}(z) - f_{\phi}(z) \cdot\nabla\ell(z) + \frac{1}{2}g_{\phi}^{2}(\lVert\nabla\ell(z)\rVert^{2} + \Delta\ell(z)). \tag*{(16)}

Because ss is time normalized by the observation interval, ∂t=Δt−1∂s\partial_t = \Delta t^{-1}\partial_s, and we minimize the scale-normalized residual

lres=1∣C∣∑(t,s,z)∈C(Δt−1∂sℓθ−Aϕ[ℓθ])2sg⁡[Aϕ[ℓθ]]2+sg⁡[Δt−1∂sℓθ]2+1,(17)l_{\mathrm{res}} = \frac{1}{|\mathcal{C}|}\sum_{(t,s,z)\in\mathcal{C}}\frac{(\Delta t^{-1}\partial_s\ell_{\theta}-\mathcal{A}_{\phi}[\ell_{\theta}])^{2}}{\operatorname{sg}[\mathcal{A}_{\phi}[\ell_{\theta}]]^{2}+\operatorname{sg}[\Delta t^{-1}\partial_s\ell_{\theta}]^{2}+1}, \tag*{(17)}

where sg⁡(⋅)\operatorname{sg}(\cdot) is the stop-gradient operator and C\mathcal{C} contains, for each trajectory, a random subset of observation intervals tt redrawn at every step, NsN_s evenly spaced times s∈[0,1]s \in[0,1] within each interval, and that interval’s collocation points zz. The denominator normalizes the residual to prevent blow up at collocation points far from the mode of a sharp density [Wang et al., 2021a], and stop-gradienting the denominator prevents the optimizer from reducing the loss by inflating that magnitude rather than by reducing the residual. The spatial derivatives of the trunk network, the time derivative of the branch network and the divergence of the drift are computed with forward-mode automatic differentiation.

Self-normalized densities. The normalized log-posterior after the observation at tt is estimated over the collocation points by self-normalized importance sampling [Owen, 2013]:

log⁡pθ(zt(k)∣X[0,t])=ℓθ(zt(k),0∣X[0,t])−LSE⁡k(wt(k))+log⁡K,(18)\log p_{\theta}(z_t^{(k)} \mid X_{[0,t]}) = \ell_{\theta}(z_t^{(k)},0 \mid X_{[0,t]}) - \operatorname{LSE}_{k}(w_t^{(k)}) + \log K, \tag*{(18)}

with importance weights wt(k)=ℓθ(zt(k),0∣X[0,t])−log⁡qt(zt(k))w_t^{(k)} = \ell_{\theta}(z_t^{(k)},0 \mid X_{[0,t]})-\log q_t(z_t^{(k)}), where LSE⁡k\operatorname{LSE}_k is the log-sum-exp over index kk, so that 1K∑kewt(k)\frac{1}{K}\sum_k e^{w_t^{(k)}} estimates the normalizer.

Jump loss. The predicted density is represented by self-normalized weights on the next interval’s collocation points,

log⁡Wpred,t(k)=logsoftmax⁡k(sg⁡[ℓθ(zt+1(k),1∣X[0,t])−log⁡qt+1(zt+1(k))]),(19)\log W_{\mathrm{pred},t}^{(k)} = \operatorname{logsoftmax}_k\left(\operatorname{sg}\left[\ell_{\theta}(z_{t+1}^{(k)},1 \mid X_{[0,t]})-\log q_{t+1}(z_{t+1}^{(k)})\right]\right), \tag*{(19)}

where ℓθ(zt+1(k),1∣X[0,t])\ell_{\theta}(z_{t+1}^{(k)},1 \mid X_{[0,t]}) is interval tt’s density propagated to s=1s=1 using coefficients conditioned only on history through tt, but evaluated at interval t+1t+1’s collocation points. Multiplying by the likelihood gives the target of the Zakai measurement update,

log⁡Wtgt,t(k)=logsoftmax⁡k(log⁡Wpred,t(k)+mt+1log⁡p(xt+1∣zt+1(k))),(20)\log W_{\mathrm{tgt},t}^{(k)} = \operatorname{logsoftmax}_k\left(\log W_{\mathrm{pred},t}^{(k)} + m_{t+1}\log p(x_{t+1}\mid z_{t+1}^{(k)})\right), \tag*{(20)}

so at an unobserved frame the target is the predicted density itself and the density simply propagates. We match the posterior at t+1t+1 to this target with the cross entropy

ljump=−1B(T−1)∑b∑t=0T−2∑kWtgt,t(k)log⁡pθ(zt+1(k)∣X[0,t+1]),(21)l_{\mathrm{jump}} = -\frac{1}{B(T-1)}\sum_b\sum_{t=0}^{T-2}\sum_k W_{\mathrm{tgt},t}^{(k)}\log p_{\theta}(z_{t+1}^{(k)}\mid X_{[0,t+1]}), \tag*{(21)}

averaged over the BB trajectories.

Initial condition loss. We match the first posterior to the prior N(0,I)\mathcal{N}(0,I) multiplied by the first likelihood:

lic=−1B∑b∑kWic(k)log⁡pθ(z0(k)∣x0),(22)l_{\mathrm{ic}} = -\frac{1}{B}\sum_b\sum_k W_{\mathrm{ic}}^{(k)}\log p_{\theta}(z_0^{(k)}\mid x_0), \tag*{(22)}

where

log⁡Wic(k)=logsoftmax⁡k(log⁡N(z0(k);0,I)+m0log⁡p(x0∣z0(k))−log⁡q0(z0(k))).(23)\log W_{\mathrm{ic}}^{(k)} = \operatorname{logsoftmax}_k\left(\log\mathcal{N}(z_0^{(k)};0,I)+m_0\log p(x_0\mid z_0^{(k)})-\log q_0(z_0^{(k)})\right). \tag*{(23)}

Total loss. The E-step loss is

lE=wreslres+ljump+lic,(24)l_E = w_{\mathrm{res}}l_{\mathrm{res}}+l_{\mathrm{jump}}+l_{\mathrm{ic}}, \tag*{(24)}

where wres≥0w_{\mathrm{res}}\ge0 balances the residual, which spreads the posterior, against the measurement updates, which sharpen it. The jump and initial-condition terms use every interval, while the residual uses the random subset of intervals described above. We minimize lEl_E with Adam [Kingma and Ba, 2017] under an exponentially decaying learning rate; each update uses the gradient over all training trajectories, accumulated in chunks to bound memory, and resamples the collocation points and residual intervals, so the E step consists of many such updates rather than a single fit to convergence.

Algorithm 1 summarizes one E-step update.

Algorithm 1 One gradient update to log⁡ρθ\log\rho_\theta

Require: operator parameters θ\theta; fixed ϕ={fϕ,gϕ,Cϕ,dϕ,Rϕ}\phi= \{f_\phi, g_\phi, C_\phi, d_\phi, R_\phi\}; training windows X0:T−1X_{0:T-1} with observation mask m0:T−1m_{0:T-1} for BB trajectories; interval Δt\Delta t

Require: collocation sizes KK (state), NsN_s (time in interval), NtN_t (residual intervals); proposal scales σn,σb\sigma_n, \sigma_b; residual weight wresw_{\mathrm{res}}

  1. z^t←CϕT(xt−dϕ)\hat{z}_t \leftarrow C_\phi^{\mathsf{T}}(x_t-d_\phi) for all t,bt,b

  2. for each site (t,b)(t,b) do

  3. draw zt(k)z_t^{(k)}: half from N(mtz^t,σt2I)\mathcal{N}(m_t\hat{z}_t,\sigma_t^2\mathbf{I}), half from N(0,σb2I)\mathcal{N}(0,\sigma_b^2\mathbf{I}) ▹\triangleright Eq. (15)

  4. end for

  5. draw a random subset T\mathcal{T} of NtN_t intervals; set S={0,1Ns−1,…,1}\mathcal{S} = \{0,\frac{1}{N_s-1},\ldots,1\}

  6. compute contexts vtv_t with the causal GRU and ℓθ(zt(k),s∣X[0,t])\ell_\theta(z_t^{(k)},s\mid X_{[0,t]}) at s∈{0,1}s\in\{0,1\}

  7. log⁡pθ(zt(k)∣X[0,t])←\log p_\theta(z_t^{(k)}\mid X_{[0,t]})\leftarrow self-normalized estimate ▹\triangleright Eq. (18)

  8. for t=0,…,T−2t=0,\ldots,T-2 do

  9. log⁡Wpred,t(k)←logsoftmax⁡k(sg⁡[ℓθ(zt+1(k),1∣X[0,t])−log⁡qt+1(zt+1(k))])\log W_{\mathrm{pred},t}^{(k)}\leftarrow\operatorname{logsoftmax}_k\left(\operatorname{sg}[\ell_\theta(z_{t+1}^{(k)},1\mid X_{[0,t]})-\log q_{t+1}(z_{t+1}^{(k)})]\right) ▹\triangleright Eq. (19)

  10. log⁡Wtgt,t(k)←logsoftmax⁡k(log⁡Wpred,t(k)+mt+1log⁡p(zt+1∣zt+1(k)))\log W_{\mathrm{tgt},t}^{(k)}\leftarrow\operatorname{logsoftmax}_k\left(\log W_{\mathrm{pred},t}^{(k)}+m_{t+1}\log p(z_{t+1}\mid z_{t+1}^{(k)})\right) ▹\triangleright Eq. (20)

  11. end for

  12. ljump←l_{\mathrm{jump}}\leftarrow cross entropy of log⁡pθ(zt+1(k)∣X[0,t+1])\log p_\theta(z_{t+1}^{(k)}\mid X_{[0,t+1]}) under Wtgt,tW_{\mathrm{tgt},t} ▹\triangleright Eq. (21)

  13. lic←l_{\mathrm{ic}}\leftarrow cross entropy of log⁡pθ(z0(k)∣x0)\log p_\theta(z_0^{(k)}\mid x_0) under WicW_{\mathrm{ic}} ▹\triangleright Eqs. (22)–(23)

  14. for (t,s,z)∈T×S×{zt(k)}(t,s,z)\in\mathcal{T}\times\mathcal{S}\times\{z_t^{(k)}\} do

  15. forward-mode AD: ∂sℓθ\partial_s\ell_\theta, ∇ℓθ\nabla\ell_\theta, Δℓθ\Delta\ell_\theta, fϕf_\phi, ∇⋅fϕ\nabla\cdot f_\phi; form Aϕ[ℓθ]A_\phi[\ell_\theta]

  16. end for

  17. lres←l_{\mathrm{res}}\leftarrow scale-normalized residual ▹\triangleright Eq. (17)

  18. lE←wreslres+ljump+licl_E\leftarrow w_{\mathrm{res}}l_{\mathrm{res}}+l_{\mathrm{jump}}+l_{\mathrm{ic}} ▹\triangleright Eq. (24)

  19. θ←Adam⁡(θ,∇θlE)\theta\leftarrow\operatorname{Adam}(\theta,\nabla_\theta l_E), accumulating ∇θlE\nabla_\theta l_E over chunks of trajectories

Posterior means. After NN gradient steps, we freeze θ\theta and estimate zˉt=Epθ(zt∣X[0,t])[zt]\bar{z}_t=\mathbb{E}_{p_\theta(z_t\mid X_{[0,t]})}[z_t] by sampling each filtering marginal pθ(zt∣X[0,t])∝exp⁡ℓθ(z,0∣X[0,t])p_\theta(z_t\mid X_{[0,t]})\propto\exp\ell_\theta(z,0\mid X_{[0,t]}) with the Metropolis-adjusted Langevin algorithm (MALA) [Roberts and Tweedie, 1996]. For each (time, trajectory) site we run KcK_c parallel chains, initialized at z^t=CϕT(xt−dϕ)\hat{z}_t=C_\phi^{\mathsf{T}}(x_t-d_\phi) at observed frames and from N(0,σb2I)\mathcal{N}(0,\sigma_b^2\mathbf{I}) at unobserved frames, with the proposal

z′=z+ϵ∇zℓθ(z,0)+2ϵξ,ξ∼N(0,I),(25)z' = z+\epsilon\nabla_z\ell_\theta(z,0)+\sqrt{2\epsilon}\xi,\qquad\xi\sim\mathcal{N}(0,\mathbf{I}), \tag*{(25)}

followed by a Metropolis–Hastings correction. During the first third of the sweeps (burn-in) the step size ϵ\epsilon of each site adapts toward an acceptance rate of 0.574 [Roberts and Rosenthal, 1998], and zˉt\bar{z}_t is the average of the chain states over the remaining sweeps.

M step

Once, we have a posterior mean estimate, we refit ϕ\phi through an M step.

Observation map. We first refit the Stiefel readout by orthogonal Procrustes analysis [Schönemann, 1966]:

Cϕ=UVT,dϕ=xˉ−Cϕzˉ,(26)C_\phi=UV^{\mathsf{T}},\qquad d_\phi=\bar{x}-C_\phi\bar{z}, \tag*{(26)}

where UVTUV^{\mathsf{T}} is the singular value decomposition of the empirical cross-covariance M=∑t(xt−xˉ)(zˉt−zˉ)TM=\sum_t(x_t-\bar{x})(\bar{z}_t-\bar{z})^{\mathsf{T}} and xˉ,zˉ\bar{x},\bar{z} are the means of the observations and of the posterior means. We record how far the readout moved, δCϕ=1−1n∑icos⁡ϑi\delta C_\phi=1-\frac{1}{n}\sum_i\cos\vartheta_i, where ϑi\vartheta_i are the principal angles between the new and previous column spaces of CϕC_\phi.

Drift. Only if δCϕ\delta C_\phi is below a tolerance, so that the latent coordinates have stabilized, do we refit the drift, by minimizing with Adam, warm-started from the current network,

ldrift=1∣V∣∑t∈V∥fϕ(zˉt)−zˉt+1−zˉtΔt∥2+λ∥ϕ∥2+αlcurv,z~t=zˉ+Δt2fϕold(zˉt),(27)l_{\mathrm{drift}}=\frac{1}{|\mathcal{V}|}\sum_{t\in\mathcal{V}}\left\|f_\phi(\bar{z}_t)-\frac{\bar{z}_{t+1}-\bar{z}_t}{\Delta t}\right\|^2+\lambda\|\phi\|^2+\alpha l_{\mathrm{curv}},\qquad\tilde{z}_t=\bar{z}+\frac{\Delta t}{2}f_\phi^{\mathrm{old}}(\bar{z}_t), \tag*{(27)}

Algorithm 2 M step

Require: frozen operator θ\theta; current ϕ={fϕ,gϕ,Cϕ,dϕ,Rϕ}\phi= \{f_\phi, g_\phi, C_\phi, d_\phi, R_\phi\}; training windows X0:T−1X_{0:T-1}, mask m0:T−1m_{0:T-1}; interval Δt\Delta t

Require: broad scale σb\sigma_b; stability tolerance τC\tau_C; drift iterations MM, weight decay λ\lambda, curvature weight α\alpha; floor gmin⁡g_{\min}; flag BOOTSTRAP

Require: MALA estimate of zˉ\bar{z}

  1. z^t←Cϕ⊤xt−dϕ\hat{z}_t \leftarrow C_\phi^\top x_t - d_\phi for all tt

  2. if BOOTSTRAP then

  3. zˉt←z^t\bar{z}_t \leftarrow\hat{z}_t ▷ no operator yet

  4. end if

  5. Cold←CϕC_{\mathrm{old}} \leftarrow C_\phi; (Cϕ,dϕ)←(C_\phi, d_\phi) \leftarrow orthogonal Procrustes fit of xx on zˉ\bar{z} ▷ Eq. (26)

  6. δC←1−1n∑icos⁡ϑi(Cϕ,Cold)\delta_C \leftarrow1 - \frac{1}{n}\sum_i \cos\vartheta_i(C_\phi,C_{\mathrm{old}})

  7. V←{t:mt=mt+1=1}\mathcal{V} \leftarrow\{t:m_t=m_{t+1}=1\}

  8. if δC<τC\delta_C < \tau_C then ▷ refit dynamics only once the sensor is stable

  9. z~t←zˉt+Δt2fϕ(zˉt)\tilde{z}_t \leftarrow\bar{z}_t + \frac{\Delta t}{2}f_\phi(\bar{z}_t) for t∈Vt \in\mathcal{V} ▷ RK2 midpoint, current drift

  10. for j=1,…,Mj=1,\ldots,M do

  11. draw unit directions utu_t; fϕ←Adam⁡(fϕ,∇ldrift)f_\phi\leftarrow\operatorname{Adam}(f_\phi,\nabla l_{\mathrm{drift}}) ▷ Eqs. (27)–(28)

  12. end for

  13. end if

  14. gϕ←g_\phi\leftarrow trapezoidal residual estimate, floored at gmin⁡g_{\min} ▷ Eq. (29)

  15. if not BOOTSTRAP then

  16. ri←r_i \leftarrow orthogonal-complement estimate for each dimension ii ▷ Eq. (30)

  17. end if

  18. return ϕ={fϕ,gϕ,Cϕ,dϕ,Rϕ}\phi= \{f_\phi,g_\phi,C_\phi,d_\phi,R_\phi\}

where V\mathcal{V} is the set of times at which both xtx_t and xt+1x_{t+1} are observed and fϕoldf_\phi^{\mathrm{old}} is the drift before the refit. Evaluating the drift at the second-order Runge–Kutta midpoint z~t\tilde{z}_t removes the O(Δt)O(\Delta t) bias of regressing fϕ(zˉt)f_\phi(\bar{z}_t) on the forward increment. The weight decay λ∥ϕf∥2\lambda\lVert\phi_f\rVert^2 acts on all weights and biases, and the curvature penalty is a finite-difference estimate of the squared second directional derivative along a random unit direction utu_t, redrawn at each iteration,

lcurv=1δ4∣V∣∑t∈V∥fϕ(z~t+δut)−2fϕ(z~t)+fϕ(z~t−δut)∥2,(28)l_{\mathrm{curv}}=\frac{1}{\delta^4|\mathcal{V}|}\sum_{t\in\mathcal{V}}\left\lVert f_\phi(\tilde{z}_t+\delta u_t)-2f_\phi(\tilde{z}_t)+f_\phi(\tilde{z}_t-\delta u_t)\right\rVert^2, \tag*{(28)}

with δ\delta equal to 5% of the average standard deviation of the latent coordinates.

Diffusion. We refit the scalar diffusion from the trapezoidal increment residual under the current drift:

gϕ=max⁡{(Δtn∣V∣∑t∈V∥rt∥2)1/2,gmin⁡},rt=zˉt+1−zˉtΔt−12(fϕ(zˉt)+fϕ(zˉt+1)).(29)g_\phi=\max\left\{\left(\frac{\Delta t}{n|\mathcal{V}|}\sum_{t\in\mathcal{V}}\lVert r_t\rVert^2\right)^{1/2},g_{\min}\right\},\qquad r_t=\frac{\bar{z}_{t+1}-\bar{z}_t}{\Delta t}-\frac{1}{2}\left(f_\phi(\bar{z}_t)+f_\phi(\bar{z}_{t+1})\right). \tag*{(29)}

Observation noise. Finally, we refit the diagonal observation noise Rϕ=diag⁡(r1,…,rm)R_\phi=\operatorname{diag}(r_1,\ldots,r_m) from the observation directions orthogonal to span⁡(Cϕ)\operatorname{span}(C_\phi), which no latent state can explain:

ri=1∣O∣∑t∈O[(I−CϕCϕ⊤)(xt−dϕ)]i21−∥Cϕi,:∥2,(30)r_i=\frac{1}{|\mathcal{O}|}\sum_{t\in\mathcal{O}}\frac{\left[(I-C_\phi C_\phi^\top)(x_t-d_\phi)\right]_i^2}{1-\lVert C_{\phi i,:}\rVert^2}, \tag*{(30)}

where O\mathcal{O} is the set of observed frames and 1−∥Cϕi,:∥2=(I−CϕCϕ⊤)ii1-\lVert C_{\phi i,:}\rVert^2=(I-C_\phi C_\phi^\top)_{ii}.

Algorithm 2 summarizes the M step, which is run once every NN E-step updates and once, in bootstrap mode, at initialization (Appendix § 11.§ 3).

Initialization

To initialize the model, we take inspiration from subspace identification [Van Overschee and De Moor, 1996, Qin, 2006]. We form the mean-centered future block Hankel matrix of the observations, take its top-nn left singular vectors, and set CϕC_{\phi} to the orthonormalized first block row, with dϕ=xˉd_{\phi} = \bar{x}. A linear dynamics matrix A=(Adisc−I)/ΔtA = (A_{\mathrm{disc}} - I)/\Delta t is then obtained by least squares, z^t+1≈Adiscz^t\hat{z}_{t+1} \approx A_{\mathrm{disc}}\hat{z}_{t}, on the projection z^t=CϕT(zt−dϕ)\hat{z}_{t} = C_{\phi}^{\mathsf{T}}(z_{t} - d_{\phi}). We warm start the drift network by regressing fϕ(z)f_{\phi}(z) onto AzAz at points drawn uniformly from a box around the origin, initialize gϕg_{\phi} and RϕR_{\phi} to fixed values, and initialize the operator randomly. Before any operator training we take one bootstrap M step that uses z^t\hat{z}_{t} in place of the MALA posterior means; it refits CϕC_{\phi}, dϕd_{\phi}, fϕf_{\phi} and gϕg_{\phi} as above and leaves RϕR_{\phi} at its initial value.

Experimental Details

All experiments are trained on one GPU; Models are initialized randomly and a new simulated dataset is generated per seed. However methods using the same seed use the same dataset as input. ZENO and all baselines are implemented in Python (≥3.10\ge3.10) on JAX (≥0.6\ge0.6) (Bradbury et al. [ [9]): ZENO uses Equinox (≥0.13\ge0.13) for its networks and Optax (≥0.2\ge0.2) for optimization [DeepMind et al., 2020], SDE Matching uses the same stack with Diffrax (0.7) (Kidger [2021]) for its forecast rollouts, gpSLDS uses the authors’ SING implementation (Hu et al., 2025]), and experiments are configured with Hydra [Yadan, 2019].

Datasets

Simulated systems. We benchmark on latent SDEs dz=f(z) dt+G dWdz = f(z)\,dt + G\,dW with three drifts. For the double well and the Van der Pol oscillator we follow the systems of Duncker et al. [2019]; for the Lorenz system we follow the setup of Li et al. [2020], Bartosh et al. [ [3], Hu et al. [2025], replacing their multiplicative noise with an additive diffusion.

Double well: f(z)=az(1−z2)f(z) = az(1-z^{2}), a=4a = 4,

Van der Pol: f1(z)=τμ(z1−13z13−z2)f_{1}(z) = \tau\mu\left(z_{1} - \frac{1}{3}z_{1}^{3} - z_{2}\right), f2(z)=τz1/μf_{2}(z) = \tau z_{1}/\mu, τ=15\tau= 15, μ=2\mu= 2,

Lorenz: f1(z)=σ(z2−z1)f_{1}(z) = \sigma(z_{2} - z_{1}), f2(z)=z1(ρ−z3)−z2f_{2}(z) = z_{1}(\rho- z_{3}) - z_{2}, f3(z)=z1z2−βz3f_{3}(z) = z_{1}z_{2} - \beta z_{3}, (σ,ρ,β)=(10,28,8/3)(\sigma, \rho, \beta) = (10, 28, 8/3).

Each trajectory is simulated with an Euler–Maruyama scheme whose step is at most 1 ms and is refined so that every observation time is hit exactly. Observations are xt∼N(Czt+d,ϵ2I)x_{t} \sim\mathcal{N}(Cz_{t} + d, \epsilon^{2}I) on a regular grid. For the double well and Van der Pol, CC and dd are a random Gaussian sensor with elements drawn IID from the standard normal distribution and shared by all splits. the noise is added in physical units. For Lorenz, observations are xt∼N(zt,ϵ2I)x_{t} \sim\mathcal{N}(z_{t}, \epsilon^{2}I), the clean signal is standardized with train-only constants, and the noise is added after this normalization, following the diffrax Kidger [2021] reference. Training, validation and test trajectories are independent draws that share the sensor. Before training, observations are standardized using training data only through a per-channel centering and one global scale set by the leading singular values of the training observations. Table 1 lists the parameters of each dataset.

Whole-brain calcium imaging in C. elegans. The dataset of Kato et al. [2015] contains 12 immobilized worms. Five worms (WT NoStim) were recorded spontaneously for about 18 minutes (3021–3311 frames at 2.8–3.1 Hz, 109–135 identified neurons), and seven worms (WT Stim) were recorded for about 12 minutes (2017–2201 frames, 107–151 neurons) while oxygen stimuli were delivered; we do not model the stimulus, so the Stim recordings are treated as an unconditional benchmark. We use the corrected fluorescence traces at the native frame rate with no smoothing, clipping or derivative preprocessing. Following the whole-trace protocol of Yezerets et al. [2025], we fit a separate model to each worm and fit and score every frame of the recording; reconstruction and forecasting scores on this dataset are therefore in-sample. Recordings are cut into windows of 200 frames (training stride 100, non-overlapping scoring windows); each neuron is centered by its training mean and all neurons are divided by one global signal scale, the geometric mean of the top-10 singular values of the training frames. Every method uses a 10-dimensional latent state and an observation-noise initialization of 0.1 in standardized units, which is then learned. Human-annotated behavioral states accompany each recording (7 labeled states for NoStim, 4 for Stim; frames labeled NOSTATE are excluded); they are never used to fit or select a dynamical model.

Double wellVan der PolLorenz
Latent dimension dd123
Drift parametersa=4a = 4τ=15\tau= 15, μ=2\mu= 2(10,28,8/3)(10, 28, 8/3)
Diffusion GG1I2I_20.3I30.3 I_3
Initial state z0z_0N(0,1)\mathcal{N}(0, 1)Unif⁡([−3,3]2)\operatorname{Unif}([-3, 3]^2)N(0,I3)\mathcal{N}(0, I_3)
Duration TT (s)332
Observations per trajectory301301100
Observation interval Δt\Delta t (s)0.010.012/99≈0.02022/99 \approx0.0202
Simulation step (s)10−310^{-3}10−310^{-3}≤10−3\le10^{-3}
SensorGaussian C,dC, dGaussian C,dC, didentity
Observed channels DD15203
Observation noise SD ϵ\epsilon0.51.50.01
Trajectories (train / val / test)20 / 5 / 1020 / 5 / 101024 / 128 / 128

Table 1. Simulated datasets. dd is the latent dimension and DD the number of observed channels. GG multiplies dWdW. The observation noise SD ϵ\epsilon is in physical units for the double well and Van der Pol and in units of the standardized clean signal for Lorenz. Trajectory counts are train / validation / test.

Training

Every method receives the same standardized data, observation grid, dimensions and validation cadence. Gradient-based methods (ZENO, SDE Matching) train for 10,000 steps on the double well, Van der Pol and Kato datasets and 3,000 steps on Lorenz, with validation every 100 steps; gpSLDS is fit by variational EM for 50 iterations. Each method selects its checkpoint on the validation split with a criterion that does not use ground truth (Section D.2.1–D.2.3), and the test split is scored once, after selection, with 128 posterior and forecast samples. Baselines run in float64; ZENO in float32. For the simulated systems we ran six seeds (0–5) per dataset and method; the seed changes both the data draw and the initialization. For Kato we fit one model per worm (seed 0) and treat animals as the replicates.

ZENO

The E-step minimizes lEl_E with Adam [Kingma and Ba, 2017] with λ=2×10−3\lambda= 2 \times10^{-3} with an exponential decay of β=0.9998\beta= 0.9998 per step, using full-batch gradients accumulated over chunks of 16 trajectories. The Fokker–Planck residual is evaluated at 4 time-in-interval collocation points s∈[0,1]s \in[0, 1] on 24 randomly chosen observation intervals per step, and at NzN_z mesh-free state collocation points per (interval, trajectory) drawn from the defensive mixture with σn=0.3\sigma_n = 0.3 and σb=1.6\sigma_b = 1.6. Every 2,000 E-steps we run one M-step: the filter mean is read out with 64 MALA chains of 30 sweeps per site (the first third is burn-in; the step size self-tunes to an acceptance rate of 0.574 [Roberts and Rosenthal, 1998]), the Stiefel sensor is refit by orthogonal Procrustes, the drift network is refit for 400 Adam iterations at learning rate 2×10−32 \times10^{-3} against the increment target evaluated at the RK2 predicted midpoint (det⁡mid\operatorname{det}_{\mathrm{mid}}), the scalar diffusion is refit from the trapezoidal increment residual, and the diagonal observation noise RR is refit from the residual directions orthogonal to span⁡(C)\operatorname{span}(C). The drift is refit only when the sensor has moved little since the previous M-step. The sensor and a linear dynamics matrix are initialized by temporal subspace identification; the drift network is warm-started to those linear dynamics and one bootstrap M-step from the projection z^=CT(x−d)\hat{z} = C^{\mathsf{T}}(x-d) precedes any operator training. The operator itself is randomly initialized with the default uniform fan-in scheme. Checkpoints are selected by the forecast RMSE on the validation windows (16 forecast samples), the same quantity that is reported on the test split. Table 2 lists the different ZENO hyperparameters used for each dataset.

ComponentHyperparameterValue
Context encodercausal GRU hidden / context dimension64 / 64
DeepONetbasis size pp64
branch MLP hidden width128
trunk MLP width ×\times depth, activation64 ×\times 3, softplus
Drift fϕf_{\phi}MLP width ×\times depth, activation64 ×\times 3, tanh
Diffusionscalar gg: initial value / lower bound1.0 / 0.05
Observation modelStiefel CC, bias dd, diagonal RR (learned)yes
E-stepoptimizer, learning rate, decay per stepAdam, 2×10−32 \times10^{-3}, 0.9998
ss-collocation points, intervals per step4, 24
collocation proposal (σn,σb)(\sigma_n, \sigma_b)(0.3, 1.6)
residual weight wresw_{\mathrm{res}}0.4
trajectories per gradient chunk16
M-stepE-steps between M-steps2,000
drift iterations, learning rate400, 2×10−32 \times10^{-3}
drift weight decay λ\lambda3×10−43 \times10^{-4}
drift targetRK2 midpoint (det_mid)
MALA chains ×\times sweeps64 ×\times 30
sensor-stability tolerance for refitting ff0.05
Initializationsensor / dynamicssubspace ID + bootstrap M-step
Selectioncriterion (validation), forecast samplesprefix forecast RMSE, 16
DW / VDP / Lorenz / Kato
Per datasetlatent dd, observed DD1, 15 / 2, 20 / 3, 3 / 10, NN
state collocation points NzN_z128 / 256 / 384 / 128
drift curvature penalty α\alpha10−310^{-3} / 10−310^{-3} / 10−310^{-3} / 0
training steps10k / 10k / 3k / 10k

Table 2. ZENO hyperparameters. Shared values apply to every dataset; the last four rows are the only per-dataset settings.

gpSLDS

We use the authors’ SING implementation [Hu et al., 2025] of the gpSLDS [Hu et al., 2024a] with the smoothly switching linear (SSL) kernel. Table 3 lists the settings we used; the per-dataset entries were chosen on validation data from single-seed tuning runs. Held-out inference runs SING’s E-step with the learned drift frozen, starting each trial from the closed-form posterior under the Brownian prior followed by drift-free E-steps (warm_iters), which is what keeps inference stable at small σ\sigma; the variational inducing distribution is initialized at the prior N(0,Kzz)\mathcal{N}(0, K_{zz}). On Kato, 3 of the 12 fits used a second configuration (a fixed prior noise σ=1\sigma= 1, 3 regimes, learned emission and SING’s neural natural-gradient schedule) and the configuration reported for each animal is the one with the lower in-sample forecast RMSE. gpSLDS is therefore a per-animal best-of over hyperparameters on Kato, while ZENO and SDE Matching use one fixed configuration for all worms.

Shared hyperparameterValue
Kernelsmoothly switching linear (SSL)
Variational EM iterations50
Natural-gradient E-steps per iteration15
Adam M-steps per iteration (kernel hyperparameters)50 (Kato: 10)
Drift-free warm E-steps per trial15
Held-out inference iterations (parameters frozen)15
Initial slope-variance prior1.0
Regime fixed-point initializationN(0,I)\mathcal{N}(0,I)
Emission C,d,RC,d,Rclosed-form updates (Kato: frozen at PCA init.)
Precisionfloat64
Per-dataset hyperparameterDouble wellVan der PolLorenzKato
Linear regimes3334
Prior noise scale σ\sigma (fixed by SING)1.01.00.30.3
M-step learning rate10−210^{-2}3×10−33 \times10^{-3}10−210^{-2}10−210^{-2}
SSL kernel expectation1-sample MC5-pt Gauss–Hermite3-pt Gauss–Hermite2d2d sigma points
Inducing points16 (grid)8×88 \times8 (grid)434^{3} (grid)64 (kk-means)
Inducing-grid padding (fraction of PCA range)0.250.250.25–
Natural-gradient schedule ρ\rhosyntheticsyntheticconstant 0.1constant 0.1
Inference sub-steps per observation interval1141
Partition temperature τ\tau0.50.50.55
Trials per vEM iteration202016all windows

Table 3. gpSLDS hyperparameters. The upper block is shared; the lower block is per dataset. Kato lists the primary configuration (9 of 12 animals; the alternative used for the other three is given in the text).

SDE Matching

We implement the diagonal-Gaussian marginal specialization of SDE Matching [3] in JAX. The prior is a latent SDE with a neural drift and a constant diagonal diffusion; the posterior marginals q(zt∣x)=N(m(t),diag⁡s(t)2)q(z_t \mid x) = \mathcal{N}(m(t), \operatorname{diag} s(t)^2) are produced by a network that reads the time and the state of a backward GRU run over the observations (so the encoder is a smoother), and the posterior drift follows in closed form from dm/dtdm/dt, ds/dtds/dt and the diffusion (time derivatives by forward-mode differentiation). No SDE is solved during training. The objective is the initial KL plus the path energy, estimated at 4 uniformly sampled times per trajectory and multiplied by the physical duration, plus the observation negative log-likelihood at sampled times multiplied by the number of observations; there is no KL annealing or time normalization. Forecasts integrate the learned prior from the posterior at the end of the prefix with an Euler–Maruyama step of 0.01. Table 4 lists the hyperparameters, which are identical on every dataset except for the step budget.

HyperparameterValue
Prior drift networkMLP d→64→64→dd \to64 \to64 \to d, tanh, last layer zero-initialized
Prior diffusionconstant diagonal, softplus-parameterized, initialized at 0.3
Encoderbackward GRU, hidden size 64
Marginal network (m,log⁡s)(m,\log s)MLP (2⋅64+1)→64→64→2d(2 \cdot64 + 1) \to64 \to64 \to2d, tanh
Initial prior p(z0)p(z_0)learned diagonal Gaussian
Emission C,dC,daffine, initialized by PCA of the training observations
Observation noisediagonal, learned; init. at the dataset noise SD (Kato: 0.1)
Matching times per trajectory4
Optimizer, learning rateAdam, 10−310^{-3}
Gradient-norm clipping10
Batch size (trajectories)16
Training steps10,000 (Lorenz: 3,000)
Validation cadence / selectionevery 100 steps / validation objective (neg. ELBO)
Forecast solver step0.01
Precisionfloat64

Table 4. SDE Matching hyperparameters (identical for all datasets unless noted).

Evaluation Metrics

Simulated Data

Because the generating latents are known, we score the simulated systems directly, on independent test trajectories. The latent state is identifiable only up to an affine transformation, so we first fit an unrestricted affine map z↦zA+bz \mapsto zA + b by least squares from the inferred posterior means to the true latents on the validation split, after checkpoint selection, and freeze it before scoring the test split. This removes coordinate ambiguity without fitting away test error. No latent alignment enters the observation-space scores.

Reconstruction R2R^2 and RMSE. With x^t=Cϕzˉt+dϕ\hat{x}_t = C_{\phi}\bar{z}_t + d_{\phi} the reconstruction from the posterior mean and xt∗=C∗zt+d∗x_t^* = C^*z_t + d^* the noiseless signal (both in standardized units),

RMSE⁡rec=1TBD∑t,b,i(x^t,b,i−xt,b,i∗)2,Rrec2=1−∑t,b,i(x^t,b,i−xt,b,i∗)2∑t,b,i(xt,b,i∗−xˉi∗)2.\operatorname{RMSE}_{\mathrm{rec}} = \sqrt{\frac{1}{TBD}\sum_{t,b,i}(\hat{x}_{t,b,i}-x^*_{t,b,i})^2}, \qquad R^2_{\mathrm{rec}} = 1-\frac{\sum_{t,b,i}(\hat{x}_{t,b,i}-x^*_{t,b,i})^2}{\sum_{t,b,i}(x^*_{t,b,i}-\bar{x}_i^*)^2}.

where bb indexes test trajectories, ii channels and xˉi∗\bar{x}_i^* is the channel mean over the test split.

Latent NRMSE. With z~t=zˉtA+b\tilde{z}_t=\bar{z}_tA+b the aligned posterior mean and σj\sigma_j the standard deviation of latent coordinate jj over the training trajectories,

NRMSE⁡lat=1TBd∑t,b,j((z~t,b,j−zt,b,j)/σj)2.\operatorname{NRMSE}_{\mathrm{lat}}=\sqrt{\frac{1}{TBd}\sum_{t,b,j}\left((\tilde{z}_{t,b,j}-z_{t,b,j})/\sigma_j\right)^2}.

Dynamics NRMSE. The learned drift is compared with the true drift at the same ground-truth test states: each true state zz is mapped into the model’s coordinates, u=(z−b)A−1u=(z-b)A^{-1}, the learned field is evaluated there and mapped back, and

NRMSE⁡dyn=1TBd∑t,b∥fϕ(ut,b)A−f(zt,b)∥21T′B′d∑t,b∥f(zt,btrain)∥2.\operatorname{NRMSE}_{\mathrm{dyn}}= \frac{\sqrt{\frac{1}{TBd}\sum_{t,b}\lVert f_{\phi}(u_{t,b})A-f(z_{t,b})\rVert^2}} {\sqrt{\frac{1}{T'B'd}\sum_{t,b}\lVert f(z^{\mathrm{train}}_{t,b})\rVert^2}}.

so that the denominator is the RMS true drift on the training states. Because both fields are evaluated at the true states, latent-trajectory error does not enter this metric; it evaluates the analytic drift, not finite differences of noisy paths.

Forecasting NRMSE. The second half of every test trajectory is hidden. Each method infers its posterior from the first half only, then propagates its learned prior SDE forward (128 sample paths) and we compare the mean forecast, mapped through the learned sensor, with the clean signal on the hidden half. The RMSE is divided by the pooled standard deviation of the per-channel-centered clean test signal, so that predicting the channel means scores 1.

Kato Dataset

There is no ground-truth latent, clean signal or drift, so the scores are observation-space and behavioral.

Reconstruction R2R^2. R2R^2 between the reconstruction Cϕzˉt+dϕC_{\phi}\bar{z}_t+d_{\phi} and the observed standardized fluorescence, pooled over neurons.

Forecasting NRMSE. The second half (100 frames, about 34 s) of every 200-frame window is hidden, the posterior is inferred from the first half, and the learned prior is propagated across the hidden half (128 samples). The RMSE of the mean forecast against the observed frames is divided by the RMSE of persistence, i.e., of repeating the last observed frame, so values below 1 beat the persistence floor of that worm.

Behavioral decoding. After the dynamical model is frozen we fit a class-balanced multinomial logistic regression from the posterior-mean latents to the annotated behavioral states. Features are standardized with training statistics; the inverse regularization strength C∈{10−3,…,102}C \in\{10^{-3},\ldots,10^2\} is selected by validation balanced accuracy (ties favor stronger regularization), and we report balanced accuracy (mean per-class recall) on held-out frames. Chance is 1/71/7 for N̂ostim and 1/41/4 for Stim worms.

Additional Results

Table 5 summarizes the simulated benchmarks behind Figure 3D for ZENO, gpSLDS and SDE Matching. Six seeds were run per dataset and method; as in the figure, the seed with the worst dynamics NRMSE for each (dataset, method) pair is excluded and the remaining five are reported (this drops one diverged gpSLDS fit on Van der Pol, seed 4, whose reconstruction R2R^2 was −2.85-2.85; for the other pairs the dropped seed is an ordinary fit). ZENO reports its causal filtering posterior, whereas gpSLDS

DatasetMethodR2↑R^2 \uparrowRMSE ↓\downarrowLatentDynamicsForecast
Double wellZENO0.988 ±\pm 0.0040.027 ±\pm 0.0030.107 ±\pm 0.0130.342 ±\pm 0.0850.644 ±\pm 0.163
Double wellgpSLDS0.992 ±\pm 0.0020.023 ±\pm 0.0030.090 ±\pm 0.0100.321 ±\pm 0.1880.574 ±\pm 0.127
Double wellSDE Matching0.984 ±\pm 0.0080.030 ±\pm 0.0050.106 ±\pm 0.0240.488 ±\pm 0.2010.605 ±\pm 0.141
Van der PolZENO0.978 ±\pm 0.0040.048 ±\pm 0.0020.154 ±\pm 0.0060.271 ±\pm 0.0300.655 ±\pm 0.067
Van der PolgpSLDS0.987 ±\pm 0.0020.038 ±\pm 0.0020.127 ±\pm 0.0050.192 ±\pm 0.0470.766 ±\pm 0.026
Van der PolSDE Matching0.981 ±\pm 0.0010.045 ±\pm 0.0010.139 ±\pm 0.0050.251 ±\pm 0.0540.766 ±\pm 0.074
LorenzZENO1.000 ±\pm 0.0000.018 ±\pm 0.0010.014 ±\pm 0.0010.057 ±\pm 0.0020.029 ±\pm 0.002
LorenzgpSLDS1.000 ±\pm 0.0000.012 ±\pm 0.0000.009 ±\pm 0.0000.038 ±\pm 0.0020.031 ±\pm 0.001
LorenzSDE Matching1.000 ±\pm 0.0000.019 ±\pm 0.0010.010 ±\pm 0.0010.055 ±\pm 0.0030.065 ±\pm 0.007

Table 5. Simulated benchmarks: mean ±\pm SD over 5 seeds. Reconstruction R2R^2 and RMSE are against the noiseless signal in standardized units; latent, dynamics and forecasting errors are normalized as defined in Section D.3 (lower is better for all but R2R^2). ZENO scores are filtering estimates; the baselines are smoothers.

Image not extracted

Figure 5. Example results for a NoStim worm from the Kato Dataset. See Figure 4A-E and SDE Matching report smoothing posteriors that condition on the full trajectory; the forecasting column is the one metric that is prefix-only for every method.

Table 6 lists the per-worm scores behind Figure 4F–H. All scores follow the whole-trace protocol and are in-sample except the decoding probe, which holds out its own frames. gpSLDS forecast rollouts diverged on three animals (ratio to persistence above 10; marked “div.”). Over the 12 animals, mean reconstruction R2R^2 is 0.830 (ZENO), 0.857 (gpSLDS) and 0.858 (SDE Matching); mean decoding balanced accuracy is 0.624, 0.524 and 0.482; and the mean forecast ratio is 0.78, 1.95 (over the nine non-diverged gpSLDS rollouts) and 0.71.

WormNNTT (s)ZENOgpSLDSSDE Matching
R2R^2 ↑\uparrowDecode ↑\uparrowForecast ↓\downarrowR2R^2 ↑\uparrowDecode ↑\uparrowForecast ↓\downarrowR2R^2 ↑\uparrowDecode ↑\uparrowForecast ↓\downarrow
NoStim 010910800.8760.6170.6130.8910.4030.6580.8830.2320.652
NoStim 113510800.8620.5370.7610.8930.2500.7310.8840.2550.701
NoStim 213110800.8010.5770.7820.8400.3640.7700.8330.4810.774
NoStim 312510800.8940.4920.7300.9060.4990.8060.8910.4640.628
NoStim 412910800.8500.6410.8380.8560.726div.0.8590.6310.813
Stim 01077200.8110.7240.9160.8740.7060.7330.8650.6300.703
Stim 11227200.8560.7290.7860.8490.3980.7170.8590.5420.586
Stim 21247200.8000.6010.8530.8990.464div.0.8870.4580.550
Stim 31347200.7820.6640.7420.8190.688div.0.8200.6070.667
Stim 41237200.8300.5240.9420.8380.5044.3330.8580.4361.090
Stim 51517200.7950.7060.7490.8190.8056.8340.8220.5040.665
Stim 61467200.8040.6770.6750.7950.4801.9590.8350.5380.730

Table 6. Kato et al. (2015) per-worm results. NN is the number of recorded neurons and TT the recording length in seconds. For each method: reconstruction R2R^2 (↑\uparrow), behavioral decoding balanced accuracy (↑\uparrow; chance 1/7 NoStim, 1/4 Stim) and forecast RMSE relative to persistence (↓\downarrow; below 1 beats persistence). “div.” marks a diverged forecast rollout.

References

  1. [1]Sherkhon Azimov and Sangil Kim. Integrating physics-informed neural networks with Bayesian inference for nonlinear filtering. Communications in Nonlinear Science and Numerical Simulation, 159:109837, August 2026. ISSN 1007-5704. doi: 10.1016/j.cnsns.2026.109837. URL https://www.sciencedirect.com/science/article/pii/S1007570426001978.DOI
  2. [3]Grigory Bartosh, Dmitry Vetrov, and Christian A. Naesseth. SDE Matching: Scalable and Simulation-Free Training of Latent Stochastic Differential Equations. June 2025. URL https://openreview.net/forum?id=OHd11h52Fi.arxiv.org/abs/2502.02472
  3. [4]Christian Beck, Sebastian Becker, Patrick Cheridito, Arnulf Jentzen, and Ariel Neufeld. Deep splitting method for parabolic pdes. SIAM Journal on Scientific Computing, 43(5):A3135–A3154, January 2021. ISSN 1095-7197. doi: 10.1137/19M1297919. URL http://dx.doi.org/10.1137/19M1297919.
  4. [5]Christian Beck, Sebastian Becker, Patrick Cheridito, Arnulf Jentzen, and Ariel Neufeld. Deep learning based numerical approximation algorithms for stochastic partial differential equations, 2026. URL https://arxiv.org/abs/2012.01194.
  5. [6]Thomas Bendokat, Ralf Zimmermann, and P.-A. Absil. A grassmann manifold handbook: basic geometry and computational aspects. Advances in Computational Mathematics, 50(1), January 2024. ISSN 1572-9044. doi: 10.1007/s10444-023-10090-8. URL http://dx.doi.org/10.1007/s10444-023-10090-8.
  6. [7]Christopher M. Bishop. Pattern Recognition and Machine Learning. Information science and statistics. Springer, New York, 2006. ISBN 978-0-387-31073-2.
  7. [8]Arthur Bizzi and Olga Fink. Towards Neural Kolmogorov Equations: Parallelizable SDE Learning with Neural PDEs. November 2025. URL https://openreview.net/forum?id=4PbIFxqosC#discussion.
  8. [9]James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Yash Katariya, Chris Leary, Dougal Maclaurin, George Necula, Adam Paszke, Jake VanderPlas, Skye Wanderman-Milne, and Qiao Zhang. JAX: composable transformations of Python+NumPy programs, 2018. URL http://github.com/jax-ml/jax.

AI tools statement

No AI-use declaration is available for this version in Valency.

The available record does not establish whether AI systems or models contributed to this work.

How AI tools are recorded

Paper details

Cite this paper

Publication

Published
Version
Latest

Data & code

Code, data, proofs and workflows the authors linked for testing, review and reproduction. These links are part of this work’s metadata and are released under the same license as the rest of that metadata. Valency doesn’t host the files; each keeps the license set where it’s hosted.

Pick where to look, or just type