Efficient Training of Neural SDEs Using Stochastic Optimal Control

Rembert Daems 1,2, Manfred Opper 3,4,5, Guillaume Crevecoeur 1,2 and Tolga Birdal 6 1- D2Lab, Ghent University, Belgium 2- FlandersMake@UGent – corelab MIRO, Belgium 3- Dept. of Theor. Comp. Science, Technical University of Berlin, Germany 4- Inst. of Mathematics, University of Potsdam, Germany 5- C · 2025

Read Efficient Training of Neural SDEs Using Stochastic Optimal Control by Rembert Daems 1,2, Manfred Opper 3,4,5, Guillaume Crevecoeur 1,2 and Tolga Birdal 6 1- D2Lab, Ghent University, Belgium 2- FlandersMake@UGent – corelab MIRO, Belgium 3- Dept. of Theor. Comp. Science, Technical University of Berlin, Germany 4- Inst. of Mathematics, University of Potsdam, Germany 5- C (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2505-17150.txt.

Introduction

Rembert Daems and co-authors speed up the training of neural stochastic differential equations, models that describe time series as noisy, learned flows. Such models promise honest uncertainty estimates, but fitting them by variational inference means grinding through an expensive optimization again and again. Their 2025 paper borrows the mathematics of optimal control to do part of the job exactly.

The control term that steers the inference is split into a linear part and a leftover nonlinear part. For the linear part, stochastic control theory hands over the optimal answer in closed form, so nothing needs learning there. Only the leftover is modeled by a neural network. Training therefore starts from a lower cost and converges faster, the authors report, without trimming the model's expressive range. The hierarchy, exact where possible and learned where necessary, is the paper's portable idea.

Catalog record

CREATORRembert Daems 1,2, Manfred Opper 3,4,5, Guillaume Crevecoeur 1,2 and Tolga Birdal 6 1- D2Lab, Ghent University, Belgium 2- FlandersMake@UGent – corelab MIRO, Belgium 3- Dept. of Theor. Comp. Science, Technical University of Berlin, Germany 4- Inst. of Mathematics, University of Potsdam, Germany 5- C
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE15 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2505-17150

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Efficient Training of Neural SDEs Using Stochastic Optimal Control Rembert Daems 1,2, Manfred Opper 3,4,5, Guillaume Crevecoeur 1,2 and Tolga Birdal 6 1- D2Lab, Ghent University, Belgium 2- FlandersMake@UGent – corelab MIRO, Belgium 3- Dept. of Theor. Comp. Science, Technical University of Berlin, Germany 4- Inst. of Mathematics, University of Potsdam, Germany 5- Centre for Sys. Modelling and Quant. Biomed, University of Birmingham, UK 6- Dept. of Computing, Imperial College London, UK Abstract We present a hierarchical, control theory inspired method for variational inference (VI) for neural stochastic differential equations (SDEs). While VI for neural SDEs is a promising avenue for uncertainty-aware reasoning in time-series, it is computationally challenging due to the iterative nature of maximizing the ELBO. In this work, we propose to decompose the control term into linear and residual non-linear components and derive an optimal control term for linear SDEs, using stochastic optimal control. Modeling the non-linear component by a neural network, we show how to efficiently train neural SDEs without sacrificing their expressive power. Since the linear part of the control term is optimal and does not need to be learned, the training is initialized at a lower cost and we observe faster convergence. 1 Introduction Continuous-time models of dynamical systems provide a powerful framework for capturing the intricate variations in real-world phenomena. Among these, stochastic differential equations (SDEs) extend the capabilities of deterministic models by abstracting away unaccounted factors into instantaneous noise. SDEs naturally model various processes, including the motion of small particles (e.g., molecules) and financial market dynamics. When combined with neural networks [ 1 , 2 ] , they become expressive tools for learning from irregular time-series observations. Despite their promise, path-wise inference for neural SDEs remains a notorious challenge due to the complexity in fitting the non-Gaussian posterior distributions. Variational inference (VI) has become a prevalent tool with significant success in scaling inference methods [ 3 ] . Yet, computational challenges persist. Existing works attempt to address these issues in VI for neural SDEs in various ways. Park et al. [ 4 ] introduced finite-dimensional matching for efficient path comparison to train neural SDEs. Kidger et al. [ 5 ] adopted a generative-adversarial approach to train these models. Course and Nair [ 6 ] proposed an amortized method for fast VI in latent neural SDEs, scaling efficiently with data size using a linear posterior. However, resorting to linear posteriors is a severe limitation in practice. Inspired by optimal control theory , we propose a novel approach to efficiently perform VI in neural SDEs. Our key idea is to represent the prior as the combination of a linear model and a residual non-linear model. We leverage this decomposition to split the control function—used to compute the variational posterior—into two components. The first linear component is tractable and admits a closed-form solution, making it computationally efficient but less expressive. The residual non-linear component, modeled by a neural network, captures higher-order effects at the cost of iterative optimization. We combine the strengths of these two approaches. First, we compute the linear part in closed form, which serves as an efficient initialization for the neural network modeling the non-linear residual. This hierarchical design allows us to achieve faster and more stable inference compared to existing approaches that directly model the full control term [ 2 , 3 ] . In summary, our contributions are: 1. We derive the optimal control function solution for VI of a linear SDE driven by Brownian motion (BM), or by Markov–approximated fractional BM. 2. We propose a neural SDE model with a linear and a residual non-linear (neural network) part, both for the prior SDE and the control terms, for which the linear part is optimal and does not need to be optimized or learned. 3. We show that our proposed model trains faster and more stable than a standard non-linear network model on a financial data. We will make our implementation publicly available upon publication. 2 Variational Inference of Stochastic Differential Equations Definition 1 (SDEs driven by BM (BMSDE)) . A common generative model for stochastic dynamical systems considers a set of observational data {\cal{D}}=\{O_{1},\ldots,O_{M}\} , where the O_{i} are generated (conditionally) independent at random at discrete times t_{i} with a likelihood p_{\theta}\left(O_{i}\mid X(t_{i})\right) . The prior information about the unobserved path \{X(t);t\in[0,\;T]\} of the latent process X(t)\in\mathbb{R}^{D} is given by the assumption that X(t) fulfils the SDE: \mathrm{~d}X(t)=b_{\theta}\left(X(t),t\right)\mathop{}\!\mathrm{d}{t}+\sigma_{\theta}\left(X(t),t\right)\mathop{}\!\mathrm{d}{B(t)} ( Prior -SDE) The drift function b_{\theta}\left(X(t),t\right)\in\mathbb{R}^{D} models the deterministic part of the change \mathrm{~d}X(t) of the state variable X(t) during the infinitesimal time interval \mathop{}\!\mathrm{d}{t} , whereas the diffusion matrix \sigma_{\theta}\left(X(t),t\right)\in\mathbb{R}^{D\times B} encodes the strength of the added Gaussian white noise process, where \mathop{}\!\mathrm{d}{B(t)}\sim{\cal{N}}(0,\mathop{}\!\mathrm{d}t)\in\mathbb{R}^{B} is the infinitesimal increment of a vector of independent Wiener processes during \mathop{}\!\mathrm{d}{t} . Definition 2 (Posterior SDE) . The paths of the Prior-SDE can be steered by adding a control term u(X(t),t) that depends on all variables to be optimised and the observations, to the drift resulting in the variational posterior [ 7 , 2 ] : \mathop{}\!\mathrm{d}\tilde{X}(t)=\left(b_{\theta}\left(\tilde{X}(t),t\right)+\sigma_{\theta}\left(\tilde{X}(t),t\right)u\left(\tilde{X}(t),t\right)\right)\mathop{}\!\mathrm{d}{t}+\sigma_{\theta}\left(\tilde{X}(t),t\right)\mathop{}\!\mathrm{d}{B(t)} (1) In what follows, we will assume a parametric form for the control function u(\tilde{X}(t),t)\equiv u_{\phi}(\tilde{X}(t),t) and will recall a scheme for inferring the variational parameters (\theta,\phi) , i . e . variational inference. Proposition 1 (Variational Inference for BMSDE [ 7 , 2 ] ) . The variational parameters \phi are optimised by minimising the KL–divergence between the posterior and the prior, where the corresponding evidence lower bound (ELBO) is maximized to find the most likely parameters \theta : \hskip-1.99997pt\sum_{i=1}^{M}\log p\left(O_{i}\mid\theta\right)\geq\mathbb{E}_{\tilde{X}}\left[\sum_{i=1}^{M}\log p_{\theta}\left(O_{i}\mid\tilde{X}(t_{i})\right)-\int_{0}^{T}\frac{1}{2}\left\|u_{\phi}\left(\tilde{X}(t),t\right)\right\|^{2}\mathop{}\!\mathrm{d}{t}\right] (2) where the observations \{O_{i}\} are included by likelihoods p_{\theta}\left(O_{i}\mid\tilde{X}(t_{i})\right) and the expectation is taken over random paths of the approximate posterior process defined by ( eq. 1 ). 3 Optimal Control for Variational Inference for SDEs Our approach uses optimal control to decouple the possible linear and non-linear effects in the drift. While the linear part is easier to solve in closed-form, the non-linear terms will account for the complex variations in real data. In the sequel, we describe these two parts, respectively, finally leveraging the strengths of both. 3.1 Optimal posterior control term for a linear prior SDE The control term u(x,t)\vcentcolon=u_{\phi}(x,t) can be obtained explicitly from the solution of the transformed Hamilton–Jacobi–Bellman equation (HJBE) [ 8 , 9 , 10 ] : u(x,t)=\sigma_{\theta}(x,t)^{\top}\nabla_{x}\log\mathbb{E}_{\text{prior}}\left[\prod_{i:t_{i}>t}p_{\theta}\left(O_{i}\mid X(t_{i})\right)|X(t)=x\right]. (3) In general, such expectations over the paths of the Prior-SDE involve solving second order partial differential equations in the D+1 variables and are intractable in closed form. However, in what follows, we will show how to compute it exactly when both the prior process X(t) and the observation likelihood are Gaussian. This requires the drift b_{\theta}\left(x,t\right) to be a linear function in x , and the diffusion \sigma_{\theta}(t) independent of x . Proposition 2 . For a process X(t) with linear drift and state-independant diffusion \sigma(t) where we have M observations {\bm{O}}=[O(T_{1}),\dots,O(T_{M})] after time t , the optimal control term takes the form: \displaystyle u(x,t) \displaystyle=\sigma(t)^{\top}\nabla_{x}\log{\cal{N}}({\bm{O}};{\bm{m}}_{x},{\bm{C}}+\bm{\Sigma}_{0}) (4) \displaystyle=\sigma(t)^{\top}\left(\nabla_{x}{\bm{m}}_{x}\right)^{\top}({\bm{C}}+\bm{\Sigma}_{0})^{-1}\left({\bm{O}}-{\bm{m}}_{x}\right), (5) where p({\bm{X}}({\bm{T}})|x)={\cal{N}}({\bm{m}}_{x},{\bm{C}}) is the joint Gaussian distribution of the solutions of the prior SDE {\bm{X}}({\bm{T}})=[X(T_{1}),\dots,X(T_{M})] conditioned on X(t)=x having mean vector by {\bm{m}}_{x} and covariance matrix by {\bm{C}} . The observation likelihood is assumed to be of the form {\cal{N}}({\bm{O}};0,\bm{\Sigma}_{0}) . Sketch of the proof. Under these

Read the complete text