arXiv:2609.11376math.NASep 2026

Manuscript Offprint

arXiv:2609.11376

Deep operator learning for efficient sampling from invariant measures of stochastic differential equations

Ling Guo, Lei Li, Jingtong Zhang

Abstract

We introduce an amortized neural sampler that combines operator learning with flow methods for sampling. It maps SDE coefficient functions to pushforwards from a reference measure to the invariant measures, enabling efficient sampling across families of stochastic differential equations. Our framework shifts traditional sampling cost to an initial training phase, after which new SDE instances require only one encoder pass and a few ODE solver steps, independent of mixing time. To handle problems in high dimensions, we use Lagrangian trajectory sensors for the coefficient functions and cross attention in the architecture. We also theoretically establish the expressivity and resolution invariance of our framework. Experiments on 1D and 2D SDE families show competitive accuracy with substantial speedups over MCMC in regimes with slow mixing, transfer across sensor counts, and demonstration results on a 64D interacting particle SDE where traditional grid approaches are infeasible.

Keywords. operator learning, invariant measures, stochastic differential equations, amortized sampling, flow matching, uncertainty quantification

MSC 2020. 60H10, 65C05, 68T07

1 Introduction

Sampling from the invariant measures of Stochastic Differential Equations (SDEs) is a fundamental task in applied mathematics, statistical physics, statistics and computer science, which enables the computation of stationary expectations, free energies and rare event probabilities for uncertainty quantification and stochastic control in related applications [23, 26, 17]. Traditional methods, such as Markov Chain Monte Carlo (MCMC) [24, 11, 32], rely on sequential simulations of the dynamics. These methods are intrinsically sequential and generally produce correlated samples. They require an initial equilibration period and a sufficiently long simulation to approach equilibrium, while time discretization may introduce an additional bias. More importantly, for multimodal or metastable systems, transitions between separated regions can result in a prohibitively large mixing time and a small effective sample size. When the drift or diffusion coefficients vary across many problem instances, a new long simulation is usually required for every instance [32], and this repeated mixing cost can become the dominant computational bottleneck.

*Email: lguo@shnu.edu.cn

†^{\dagger}Email: leili2010@sjtu.edu.cn

†^{†}Email: sffred@sjtu.edu.cn

Operator learning [22, 18, 15], which directly learns the map between functions, is gaining interest in scientific machine learning, and provides a natural framework for amortizing this cost over a family of stochastic systems. Consider the coefficient-indexed Stochastic Differential Equation (SDE) taking values in RdR^{d}

dX=b(X)dt+σ(X)dW,(1.1)d X=b(X)d t+\sigma(X)d W, \tag{1.1}

with X0∼μ0X_0 \sim \mu_0, drift b:Rd→Rdb : \mathbb{R}^d \to \mathbb{R}^d, diffusion coefficient σ:Rd→Rd×dW\sigma : \mathbb{R}^d \to \mathbb{R}^{d \times d_W}, and standard Brownian motion WW in RdW\mathbb{R}^{d_W}. Both dimensions are fixed within each coefficient family. Write a:=(b,σ)a := (b, \sigma) for the pair of SDE coefficients throughout this paper, and denote its invariant measure by πa\pi_a. Rather than constructing a separate sampler for each aa, one may seek a generative sampler operator S\mathcal{S} satisfying S(a,⋅)#γ≈πa\mathcal{S}(a, \cdot)_{\#} \gamma \approx \pi_a, where γ\gamma is a simple reference distribution and #\# denotes the pushforward of measures. Thus, S\mathcal{S} takes the drift and diffusion functions, together with a latent random variable, as inputs and returns a sample from the corresponding invariant law. This provides a natural operator learning problem because the inputs aa are functions. After an offline training stage over a suitable family of coefficients, such an operator could be evaluated on previously unseen SDEs and generate samples in parallel without repeating a long mixing simulation for every new query.

The generative sampler has been extensively studied in recent years, including normalizing flows and the continuous versions [31, 7]; Boltzmann generators [25]; score-based diffusion models [35]. The flow matching approach [19, 20] provides a regression framework for training continuous normalizing flows by learning a target velocity field, while avoiding adversarial objectives. FlowKac uses temporal normalizing flows and the Feynman–Kac formula for Fokker–Planck equations [8]; the weak adversarial networks enforce the weak equation through a minimax problem involving trial and test networks [39], whereas the weak generative sampler uses randomized test functions to train a transport map directly and avoids the adversarial minimax optimization [5]. Although these methods can substantially reduce the cost of sampling a prescribed target, they are typically trained for a fixed distribution or a single stochastic system. The objective here is instead to combine generative sampling with operator learning. Let us have also brief review of the neural operators. Representative neural operators include DeepONet [22], which encodes input functions through branch networks and evaluates outputs through a trunk network; the Fourier Neural Operator [18, 15], which parameterizes integral operator layers in the Fourier domain; multi-input operators (MIONet) [14], which accommodates several functional inputs through multiple branch networks; and Variable-Input Deep Operator Networks (VIDON) [29], which allows the number and locations of input sensors to vary between samples. Recently, generative neural operators have also been extended to learning probability laws on function spaces, first through adversarial neural operators [30] and more recently through operator flow matching for stochastic process priors [34, 12]. Huang and Lai use an empirical measure limit for sample-based attention [12]. Continuum attention also interprets discrete attention as an approximation of a population operator [6].

We propose an amortized neural sampler that uses neural operators and the flow matching [19] to construct a reusable map from previously unseen drift and diffusion functions of the SDE (1.1) to samples from their corresponding invariant measures. Let A denote the space of admissible coefficient pairs. We assume a is drawn from a distribution π\pi over A, and we have access to existing samples {ai,xi}\{a_i, x_i\} generated via MCMC or other experimental methods. We want to learn a neural operator vθv_\theta that functions as a conditional velocity field:

dxdt=vθ[a](x,t),(1.2)\frac{d x}{d t}=v_{\theta}[a](x,t), \tag{1.2}

and apply it to unseen a=(b,σ)a = (b, \sigma) to generate samples from the steady state distribution of the SDE defined by a. Since the inference procedure requires evaluating vθv_{\theta} multiple times to solve the ODE (1.2), we adopt an encoder-decoder design: for a given pair a=(b,σ)a = (b, \sigma), the input functions are encoded once into a latent representation, which is then reused across all ODE integration steps, thereby reducing the computational cost at inference time. We use the Perceiver architecture [13] to aggregate the embeddings of random Lagrangian trajectory sensors into a context vector of fixed dimension.

The main contributions of this work are as follows:

  • We formulate an operator-conditioned amortized sampler for parametric families of SDEs, which combines neural operator encoders with continuous normalizing flows. The high cost of training is incurred once, and the trained model then generates approximate invariant measure samples for unseen coefficient instances at an inference cost decoupled from the mixing time of the system.

  • An architecture with attention uses random Lagrangian trajectory sensors for problems in high dimensions. The architecture accepts variable sensor counts during training and inference. The random trajectory sensors do not require a mesh and support flexible domains.

  • We prove theoretically the expressivity of the operator samplers for compact sets of admissible coefficient functions, and also the resolution invariance properties for the proposed random Lagrangian attention sampler. We first establish that the continuity of the map from the coefficient functions to the flow that transforms a reference measure to the target measure. The resolution invariance of random Lagrangian sensors with attention aggregation is established by uniform law of large numbers for compact attention classes.

The remainder of this paper is organized as follows. Section 2 introduces the mathematical setting and section 3 presents the general framework. Section 4 describes the Lagrangian attention sampler in detail. Section 5 provides the theoretical analysis for the expressivity and section 6 establishes the resolution invariance. Lastly, Section 7 reports the experimental evaluation.

References (35)