Efficient and Accurate Gradients for Neural SDEs
Patrick Kidger, James Foster, Xuechen Li, Terry J. Lyons
Abstract
Neural SDEs combine many of the best qualities of both RNNs and SDEs: memory efficient training, high-capacity function approximation, and strong priors on model space. This makes them a natural choice for modelling many types of temporal dynamics. Training a Neural SDE (either as a VAE or as a GAN) requires backpropagating through an SDE solve. This may be done by solving a backwards-in-time SDE whose solution is the desired parameter gradients. However, this has previously suffered from severe speed and accuracy issues, due to high computational cost and numerical truncation errors. Here, we overcome these issues through several technical innovations. First, we introduce the reversible Heun method. This is a new SDE solver that is algebraically reversible: eliminating numerical gradient errors, and the first such solver of which we are aware. Moreover it requires half as many function evaluations as comparable solvers, giving up to a speedup. Second, we introduce the Brownian Interval: a new, fast, memory efficient, and exact way of sampling and reconstructing Brownian motion. With this we obtain up to a speed improvement over previous techniques, which in contrast are both approximate and relatively slow. Third, when specifically training Neural SDEs as GANs (Kidger et al. 2021), we demonstrate how SDE-GANs may be trained through careful weight clipping and choice of activation function. This reduces computational cost (giving up to a speedup) and removes the numerical truncation errors associated with gradient penalty. Altogether, we outperform the state-of-the-art by substantial margins, with respect to training speed, and with respect to classification, prediction, and MMD test metrics. We have contributed implementations of all of our techniques to the torchsde library to help facilitate their adoption.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 5db07c21-1681-442e-91e3-7ca9387d5fa5Cited by top-tier papers21
- Path Integral Sampler: A Stochastic Control Approach For SamplingQinsheng Zhang, Yongxin ChenICLR 2022 · 177 citations
- Neural Stochastic PDEs: Resolution-Invariant Learning of Continuous Spatiotemporal DynamicsCristopher Salvi, Maud Lemercier, Andris GerasimovicsNeurIPS 2022 · 70 citations
- Trajectory Flow Matching with Applications to Clinical Time Series ModellingXi Zhang, Yuan Pu, Yuki Kawamura, Andrew Loza et al.NeurIPS 2024 · 44 citations
- Stable Neural Stochastic Differential Equations in Analyzing Irregular Time Series DataYongKyung Oh, Dongyoung Lim, Sungil KimICLR 2024 · 44 citations
- Neural Ideal Large Eddy Simulation: Modeling Turbulence with Neural Stochastic Differential EquationsAnudhyan Boral, Zhong Yi Wan, Leonardo Zepeda-Núñez, James Lottes et al.NeurIPS 2023 · 23 citations
Builds on14
- Score-Based Generative Modeling through Stochastic Differential EquationsYang Song, Jascha Sohl-Dickstein, Diederik P. Kingma, Abhishek Kumar et al.ICLR 2021 · 1,270 citations
- Neural Controlled Differential Equations for Irregular Time SeriesPatrick Kidger, James Morrill, James Foster, Terry J. LyonsNeurIPS 2020 · 850 citations
- Stochastic Normalizing FlowsHao Wu, Jonas Köhler, Frank NoéNeurIPS 2020 · 230 citations
- Neural SDEs as Infinite-Dimensional GANsPatrick Kidger, James Foster, Xuechen Li, Terry J. LyonsICML 2021 · 214 citations
- Neural Rough Differential Equations for Long Time SeriesJames Morrill, Cristopher Salvi, Patrick Kidger, James FosterICML 2021 · 176 citations
Related papers
- MaRS: A Fast Sampler for Mean Reverting Diffusion based on ODE and SDE SolversAo Li, Wei Fang, Hongbo Zhao, Le Lu et al.ICLR 2025
- Neural Stochastic Flows: Solver-Free Modelling and Inference for SDE SolutionsNaoki Kiyohara, Edward Johns, Yingzhen LiNeurIPS 2025 · 5 citations
- Minimizing Trajectory Curvature of ODE-based Generative ModelsSangyun Lee, Beomsu Kim, Jong Chul YeICML 2023 · 84 citations
- Unifying Bayesian Flow Networks and Diffusion Models through Stochastic Differential EquationsKaiwen Xue, Yuhao Zhou, Shen Nie, Xu Min et al.ICML 2024 · 27 citations
- Rex: A Family of Reversible Exponential (Stochastic) Runge-Kutta SolversZander Blasingame, Chen LiuICML 2026 · 2 citations
