Inferring the Langevin Equation with Uncertainty via Bayesian Neural Networks

Youngkyoung Bae, Seungwoong Ha, Hawoong Jeong

TL;DR

Researchers have introduced Langevin Bayesian Networks (LBN), a framework that uses Bayesian deep learning to uncover the hidden equations governing noisy, stochastic systems. Unlike traditional methods, LBN provides a built-in "confidence meter," quantifying prediction uncertainty to prevent erroneous conclusions in complex fields like biophysics and climate modeling.

What Problem Does This Paper Address?

From the erratic dance of molecules to the fluctuations of financial markets, many complex systems are modeled using the Langevin equation. This equation splits dynamics into two parts: a deterministic "drift" (the trend) and a stochastic "diffusion" (the noise).

Inferring these components from raw, noisy trajectories is notoriously difficult. Standard techniques often require researchers to guess the mathematical form of the forces beforehand or rely on "binning" data into grids, which fails miserably in high-dimensional spaces. Furthermore, most existing tools provide a single "best guess" without telling you how much to trust it. In critical applications—like predicting a neuron's firing threshold or a microscopic engine's efficiency—an overconfident but wrong prediction can lead to a fundamental misunderstanding of the physics.

Methods

The authors propose a dual-network architecture called Langevin Bayesian Networks (LBN).

  1. Bayesian Neural Networks (BNNs): Instead of learning fixed weights, LBN learns a distribution of weights. This allows the model to output a distribution of possible drift and diffusion values for any given state. The spread of this distribution represents the uncertainty.
  2. Separate Estimators: The framework uses two distinct BNNs—one to estimate the drift vector $\Phi$ and another for the diffusion matrix $D$.
  3. Unbiased ULE Estimators: A major contribution is how the authors handle underdamped systems (where inertia matters). In experiments, we usually only measure position, not velocity. Estimating velocity from position data introduces mathematical biases (for example, the friction coefficient can be off by a factor of 3/2). The authors derived a new set of unbiased estimators that correct these leading-order errors.
  4. Automatic Differentiation: Because the model is a neural network, researchers can easily calculate the gradient of the learned diffusion matrix. This is essential for identifying "spurious drift" in systems where the noise level changes depending on the particle's position.
Schematic of the LBN framework showing how trajectories are processed to yield drift, diffusion, and thermodynamic quantities.

Datasets

The LBN framework was validated on several sophisticated synthetic datasets representing classic challenges in stochastic physics:

  • Nonlinear Force Fields: A 2D system navigating a Gaussian-shaped obstacle.
  • Inhomogeneous Diffusion: Systems where the "thickness" of the noise varies across space.
  • Hodgkin-Huxley (HH) Model: A 4D model of biological neuron spikes, characterized by extreme nonlinearity.
  • Van der Pol Oscillator: A classic nonlinear oscillator used to test underdamped dynamics.
  • Brownian Carnot Engine: A non-stationary microscopic heat engine with time-varying temperature and stiffness protocols.

Key Insights and Ideas

  • Uncertainty as a Safety Signal: The authors proved that the network's internal uncertainty is a reliable proxy for actual prediction error. If the LBN shows high uncertainty in a specific region of the state space, it’s a warning that the model lacks sufficient data there.
  • Learning the "Why," Not Just the "What": In the Hodgkin-Huxley neuron example, the LBN was trained only on a resting neuron. Remarkably, it was able to accurately predict the Hopf bifurcation—the exact point where the neuron starts spiking—when external current was added, even though it hadn't seen spiking data during training.
  • Data Augmentation: LBN can act as a "proxy" for the real system. By generating thousands of synthetic trajectories from the learned Langevin equation, researchers can uncover thermodynamic patterns (like Clapeyron diagrams) that were completely obscured by noise in the original small dataset.
LBN accurately captures the spiking dynamics and entropy production of the Hodgkin-Huxley neuron model.

Key Results

  • Superior Accuracy: LBN consistently outperformed Stochastic Force Inference (SFI), a well-established baseline, especially as the dimensionality of the system increased.
  • High Correlation: The model achieved high $r^2$ values (often $>0.98$) for both drift and diffusion inference across various nonlinear scenarios.
  • Thermodynamic Precision: For the Brownian Carnot engine, LBN accurately reproduced complex distributions of work, heat, and efficiency, matching the theoretical power-law tails of the efficiency distribution.
Comparison of LBN and SFI performance across increasing dimensions, showing LBN's robustness.

Limitations and Future Work

While powerful, the authors note a few areas for growth:

  • Gaussian Assumption: The current framework assumes noise is "white" and Gaussian. Many biological systems exhibit "anomalous diffusion" with power-law noise, which LBN cannot currently model.
  • Memory Effects: The model assumes the system is Markovian (the future depends only on the present). Extending this to non-Markovian systems with "memory" is a significant next step.
  • Sampling Rates: The math assumes a constant sampling rate. Handling missing data or variable time-steps remains a practical challenge for experimental data.

Summary updated

Abstract

Pervasive across diverse domains, stochastic systems exhibit fluctuations in processes ranging from molecular dynamics to climate phenomena. The Langevin equation has served as a common mathematical model for studying such systems, enabling predictions of their temporal evolution and analyses of thermodynamic quantities, including absorbed heat, work done on the system, and entropy production. However, inferring the Langevin equation from observed trajectories is a challenging problem, and assessing the uncertainty associated with the inferred equation has yet to be accomplished. In this study, we present a comprehensive framework that employs Bayesian neural networks for inferring Langevin equations in both overdamped and underdamped regimes. Our framework first provides the drift force and diffusion matrix separately and then combines them to construct the Langevin equation. By providing a distribution of predictions instead of a single value, our approach allows us to assess prediction uncertainties, which can help prevent potential misunderstandings and erroneous decisions about the system. We demonstrate the effectiveness of our framework in inferring Langevin equations for various scenarios including a neuron model and microscopic engine, highlighting its versatility and potential impact.
BibTeX
@inproceedings{bae2025inferring,
  author = {Youngkyoung Bae and Seungwoong Ha and Hawoong Jeong},
  title = {{Inferring the Langevin Equation with Uncertainty via Bayesian Neural Networks}},
  booktitle = {Chaos},
  year = {2025},
  doi = {10.1016/j.chaos.2025.116440},
}
Figure