Abstract
Extracting macroscopic governing equations from high-fidelity microscopic simulations is a central challenge in multiscale modeling. This paper presents a machine learning framework designed to discover effective Stochastic Differential Equations (SDEs) directly from scattered, short-time simulation snapshots. By embedding classical stochastic numerical integrators—such as the Euler-Maruyama and Milstein schemes—directly into the loss function of a neural network, the authors demonstrate that complex drift and diffusion dynamics can be accurately reconstructed without the need for long, continuous trajectories. The framework is validated across diverse systems, including epidemic models, Langevin dynamics, and stochastic partial differential equations (SPDEs).
Introduction
In fields ranging from molecular dynamics to epidemiology, researchers often rely on microscopic simulations to capture the intricate details of a system. Whether tracking individual atoms or simulating disease transmission on a lattice, these agent-based or Monte Carlo methods provide high accuracy but at a massive computational cost. To facilitate long-term predictions and system-level analysis, it is often desirable to derive coarse-grained, macroscopic models, typically formulated as SDEs.
However, deriving these effective SDEs analytically is frequently intractable. Traditional data-driven approaches to discover these equations often struggle with the inherent noise of the data, require massive datasets to estimate transition probabilities, or fail when the time intervals between observations are irregular. This paper addresses these challenges by bridging the gap between deep learning and stochastic numerical analysis.
Methodology: Integrator-Informed Learning
The core innovation of this research is the use of "integrator-informed" loss functions. Rather than treating the neural network as a black-box regressor, the authors structure the training process around the mathematical rules of stochastic integration.
1. Loss Functions from Numerical Schemes
The framework approximates the drift and diffusivity functions of an SDE using neural networks. The loss function is derived from the transition probability density of a numerical step. For instance, using the Euler-Maruyama scheme, the network minimizes the difference between the predicted state and the observed state, weighted by the stochasticity of the system. This approach allows the model to perform a form of "backward error analysis," learning the underlying dynamics that best explain the observed transitions.
2. Learning from Snapshots
Unlike many time-series models that require long, continuous paths, this framework learns from pairs of snapshots $(x_t, x_{t+h})$. Because the time step $h$ is an explicit parameter in the numerical schemes used for the loss function, the model naturally handles data where the interval between observations varies. This makes it particularly well-suited for event-driven simulations, such as the Gillespie algorithm, where the time between events is random.
3. Respecting Physical Constraints
The authors highlight that standard SDE learning fails for certain physical systems, such as underdamped Langevin dynamics, where noise affects velocity but not position. To solve this, they reformulate the loss using symplectic schemes that respect the system's underlying physics. Additionally, for systems where macroscopic variables are not known a priori, the authors utilize Diffusion Maps and SDE-informed auto-encoders to discover a compressed latent space before learning the dynamics.
Experimental Validation
The framework was tested on several challenging datasets to evaluate its accuracy and scalability:
- Epidemic SIRS Model: The model was applied to data from Kinetic Monte Carlo (kMC) simulations on a 2D spatial lattice. The neural network successfully learned the effective mean-field SDE. Simulations of the learned SDE produced probability density functions that matched the computationally expensive kMC results with high precision.
- Stochastic Partial Differential Equations (SPDEs): Using snapshots from a stochastic wave equation, the model reconstructed hidden, spatially varying deterministic and stochastic forcing terms. This demonstrates the framework's capability to handle infinite-dimensional systems by adapting grid-based numerical solvers.
- High-Dimensional Scaling: The approach was tested on toy SDEs ranging from 1 to 19 dimensions. While the model remained accurate in higher dimensions, the authors noted that approximation quality begins to degrade beyond 6 dimensions unless the dataset size is increased to combat data sparsity.
Discussion and Limitations
While the framework is highly data-efficient, it is subject to what the authors call the "Goldilocks" time step. If the observation interval $h$ is too small, the stochastic noise (diffusivity) overwhelms the deterministic signal (drift). Conversely, if $h$ is too large, the numerical approximation of the integrator becomes invalid, leading to inaccurate estimation of the diffusivity. Furthermore, as the method relies on observed snapshots, it may struggle to capture rare events unless the training data is specifically sampled to include them.
Conclusion
By integrating stochastic numerical integrators into the deep learning pipeline, this framework provides a robust and efficient path for discovering macroscopic laws from microscopic data. It eliminates the need for long trajectories and handles variable time steps naturally, making it a powerful tool for coarse-graining complex simulations in physics, biology, and beyond. Future work will explore higher-order integrators and the application of this method to real-world agent-based models where latent variables are not yet identified.
Summary updated