OnsagerFlow: Learning mesoscopic dynamics from microscopic simulation

Yue Zhao, Shiqi Wu, Qianxiao LiAI4X-AC 2026 Poster 2026

TL;DR

OnsagerFlow bridges the gap between microscopic simulations and mesoscopic dynamics by learning stochastic partial differential equations (SPDEs) directly from data. By embedding the fundamental Fluctuation-Dissipation Theorem (FDT) into the learning pipeline, it guarantees thermodynamic consistency while accurately capturing rare, noise-driven physical phenomena that traditional deterministic models miss.

What Problem Does This Paper Address?

Simulating physical systems at the microscopic level (such as tracking millions of individual spins in an Ising model) is incredibly accurate but computationally crushing. To scale up, researchers use "coarse-graining" to smooth microscopic details into a mesoscopic description on a much smaller grid, enabling simulations of systems orders of magnitude larger.

However, traditional mesoscopic models rely on deterministic partial differential equations (PDEs), like the Allen–Cahn equation. These models suffer from two major flaws:

  1. Too many assumptions: They rely on rigid, human-guessed functional forms that lack quantitative accuracy.
  2. No noise: They ignore stochastic fluctuations. At the mesoscopic scale, these fluctuations are vital—without them, a model cannot capture rare events like metastable transitions or spontaneous magnetization flips.

The authors tackle this challenge by developing a framework that learns accurate mesoscopic dynamics directly from microscopic data without sacrificing physical principles.

Methods

The authors introduce OnsagerFlow, a framework that models mesoscopic dynamics using a Stochastic PDE constrained by the Fluctuation-Dissipation Theorem (FDT). The FDT ensures that the system's drift (deterministic trend) and noise (stochastic fluctuations) are fundamentally coupled through a shared mobility operator $K(m)$, preserving thermodynamic consistency.

Instead of guessing the physical terms, OnsagerFlow learns them from microscopic simulation data using a multi-step pipeline:

  1. Coarse-Graining: Microscopic spin data is block-averaged into a mesoscopic magnetization field.
  2. Drift Learning: A Convolutional Neural Network (CNN) learns the deterministic drift $\mu(m)$.
  3. Noise Analysis: By analyzing the residual variance between the true data and the learned drift, the framework extracts the mobility operator $K(m)$ directly via the FDT relation ($K \propto \text{Var}$).
  4. Inversion Step: Using the learned mobility and drift, the model inverts the system ($\frac{\delta \mathcal{F}}{\delta m} = -K^{-1}\mu$) to isolate the free energy gradient.
  5. Physical Parameterization: Neural networks are trained to parameterize the true free energy derivative $s'(m)$ and the non-local interaction kernel $\mathcal{J}$.
Fig. 1: Full-width architecture of the OnsagerFlow pipeline, illustrating the path from raw data to learned physical components.

Datasets

The framework was validated using synthetic data generated from a 2D Ising model with Kac-type interactions. The authors also note that the framework extends to data from atomistic spin dynamics (ASD) and Mumax3 micromagnetic simulations.

Key Insights and Ideas

  • Physics as a Constraint, Data for the Details: The core breakthrough is not using a black-box neural network to predict everything. Instead, physics dictates the overarching mathematical structure (gradient flow + FDT), while neural networks are only used to fill in the complex, system-specific functions ($K(m)$, $s'(m)$, and $\mathcal{J}$).
  • Noise is Information: Instead of treating noise as a nuisance to be smoothed away, OnsagerFlow uses the noise variance to directly calculate the mobility operator $K(m)$, turning stochastic fluctuations into a key piece of the learning puzzle.

Key Results

  • High Accuracy: OnsagerFlow successfully and accurately recovered the true mobility and non-local interaction kernels from the 2D Ising model data.
  • Principled vs. Assumed: Unlike traditional methods (like the Allen–Cahn or Landau–Lifshitz–Gilbert equations) which fail to be quantitatively accurate due to rigid assumptions, OnsagerFlow provides a data-driven approach that remains physically consistent.
  • Scale Bridging: The framework effectively bridges the scale gap between experimental observations ($\sim 20\,\mu\text{m}$) and traditional microscopic simulation limits ($\sim 400\,\text{nm}$).

Limitations and Future Work

As this is a short conference extended abstract, specific computational bottlenecks—such as the scalability of the matrix inversion step ($\frac{\delta \mathcal{F}}{\delta m} = -K^{-1}\mu$) for very large grids—are not discussed in detail. Future work points toward broader application across atomistic spin dynamics and scaling up to match macroscopic experimental conditions.

Summary updated

BibTeX
@inproceedings{zhao2026onsagerflow,
  author = {Yue Zhao and Shiqi Wu and Qianxiao Li},
  title = {{OnsagerFlow: Learning mesoscopic dynamics from microscopic simulation}},
  booktitle = {AI4X-AC 2026 Poster},
  year = {2026},
  url = {https://openreview.net/forum?id=FF0nLgm8Vc},
}
Figure