In-Context Learning of Stochastic Differential Equations with Foundation Inference Models

Patrick Seifner, K. Cvejoski, D. Berghaus, C. Ojeda, Ramsés J. Sánchez
2/1/2025

No confident code implementation found for this paper.

Abstract

Stochastic differential equations (SDEs) describe dynamical systems where deterministic flows, governed by a drift function, are superimposed with random fluctuations, dictated by a diffusion function. The accurate estimation (or discovery) of these functions from data is a central problem in machine learning, with wide application across the natural and social sciences.

Show full abstract

Yet current solutions either rely heavily on prior knowledge of the dynamics or involve intricate training procedures. We introduce FIM-SDE (Foundation Inference Model for SDEs), a pretrained recognition model that delivers accurate in-context (or zero-shot) estimation of the drift and diffusion functions of low-dimensional SDEs, from noisy time series data, and allows rapid finetuning to target datasets. Leveraging concepts from amortized inference and neural operators, we (pre)train FIM-SDE in a supervised fashion to map a large set of noisy, discretely observed SDE paths onto the space of drift and diffusion functions. We demonstrate that FIM-SDE achieves robust in-context function estimation across a wide range of synthetic and real-world processes -- from canonical SDE systems (e.g., double-well dynamics or weakly perturbed Lorenz attractors) to stock price recordings and oil-price and wind-speed fluctuations -- while matching the performance of symbolic, Gaussian process and Neural SDE baselines trained on the target datasets. When finetuned to the target processes, we show that FIM-SDE consistently outperforms all these baselines.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{seifner2025incontext,
  title  = {In-Context Learning of Stochastic Differential Equations with Foundation Inference Models},
  author = {Patrick Seifner and K. Cvejoski and D. Berghaus and C. Ojeda and Ramsés J. Sánchez},
  year   = {2025},
  eprint = {2502.19049},
  archivePrefix = {arXiv},
  doi    = {10.52202/085713-5104},
  url    = {https://doi.org/10.52202/085713-5104},
  journal = {Neural Information Processing Systems}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.19049.svg)](https://codeofpaper.com/paper/2502.19049)

Discussion