A Call to Lagrangian Action: Learning Population Mechanics from Temporal Snapshots

Vincent Guan, Lazar Atanackovic, Kirill Neklyudov

Introduction

In fields ranging from biology to physics, researchers frequently observe complex systems as a series of "temporal snapshots." For example, biologists might measure the gene expression of thousands of cells at Day 1, Day 5, and Day 10. The fundamental challenge is to deduce the underlying "forces" driving the transitions between these observed states.

Over the past decade, Wasserstein gradient flows have served as the gold standard for modeling these population dynamics. This approach assumes that a population simply "rolls down a hill" to minimize its free energy. While mathematically elegant, gradient flows suffer from a major limitation: they only describe dissipative, aperiodic motion. They inherently fail to capture momentum, oscillations, or complex agentic behaviors, such as a flock of birds turning in unison. Furthermore, many state-of-the-art methods rely on a "reference process"—a prior guess at the underlying physics—which is often unavailable for complex biological systems.

To overcome these limitations, researchers have introduced Wasserstein Lagrangian Mechanics (WLM). By shifting from first-order gradient flows to second-order mechanics, WLM learns the underlying acceleration and potential energy directly from temporal snapshots, enabling accurate interpolation of missing data and robust forecasting of future behaviors.

The Wasserstein Lagrangian Mechanics Framework

The WLM framework proposes a fundamental shift in how we model probability distributions over time, moving from energy minimization to the Principle of Least Action.

1. Principle of Least Action and Hamiltonian Mechanics

Instead of minimizing energy at every step, WLM assumes the population follows a path that minimizes "action"—the integral of kinetic minus potential energy over time. The authors derive the Hamiltonian equations of motion for this system, effectively establishing a "Generalized Newton's Law" for probability distributions. This allows the model to capture both "velocity" and "acceleration" in the space of distributions.

Remarkably, WLM acts as a unifying "superset" framework. The authors demonstrate mathematically that by adjusting a single damping parameter ($\gamma$), WLM encompasses classical Newtonian mechanics, quantum mechanics (via the Schrödinger equation), and standard gradient flows.

2. The WLM Algorithm

To operationalize this theory, the authors parameterize the population-level potential energy using a neural network. Crucially, they employ an attention-based architecture to capture interactions between individuals. This allows the model to learn how the position of one agent affects the force felt by another—an essential feature for modeling social animals or interacting cells.

The model is trained by "rolling out" the dynamics from an initial state using a Leapfrog integrator, a highly stable numerical method for solving physics equations. The resulting simulated distribution is then compared to the observed temporal snapshots using Sinkhorn divergence, a robust distance metric for probability distributions. Unlike Flow Matching or Schrödinger Bridge methods, WLM learns these mechanics directly from the snapshots without requiring a predefined reference path.

Experimental Validation

The researchers evaluated WLM across a diverse set of synthetic and real-world challenges, demonstrating its superiority in both interpolation and forecasting.

  • Emergent Flocking (Boids): In a benchmark based on Craig Reynolds' classic flocking model, agents follow simple rules (separation, alignment, cohesion) to create complex group behavior. While baseline gradient flow methods simply "blurred out" the population like a diffusing gas, WLM successfully learned the underlying flocking rules. It accurately forecasted the group's cohesive, swirling motion up to 50 frames into the future.
  • Ocean Currents: Using real-world velocity measurements from the Gulf of Mexico (HYCOM), WLM was tested on its ability to capture "curling" or spiraling dynamics. It was the only method capable of accurately forecasting the spiraling path of a vortex without a predefined "curly" reference process, achieving a forecasting error of 0.065 (compared to 0.473 for the next best reference-free method).
  • Cell Biology: On the "Embryoid Body" scRNA dataset, which tracks human stem cell differentiation over 27 days, WLM achieved the lowest $W_1$ distance error in "leave-one-out" interpolation tasks, outperforming specialized biological trajectory tools.
  • Potential-driven SDEs: On a synthetic benchmark of five different energy landscapes, WLM successfully recovered standard gradient flows, proving its backward compatibility with simpler dissipative systems.

Limitations and Future Directions

While WLM represents a significant leap forward in modeling population dynamics, it comes with certain trade-offs:

  • Computational Cost: WLM utilizes a "Discretize-Then-Optimize" approach, meaning it must simulate the entire trajectory during every training step. This makes it computationally heavier than "simulation-free" methods like Flow Matching.
  • Identifiability: Multiple different mechanical laws could potentially explain the same set of sparse snapshots. While WLM guarantees finding a valid set of mechanics, it may not always isolate the unique physical truth without higher-resolution data.

Looking ahead, the authors suggest exploring "simulation-free" training techniques to accelerate the model. Additionally, expanding the framework to encompass even more complex physical systems, such as the Navier-Stokes equations for fluid dynamics, presents an exciting frontier for Wasserstein Lagrangian Mechanics.

Summary updated

BibTeX
@inproceedings{guan2026call,
  author = {Vincent Guan and Lazar Atanackovic and Kirill Neklyudov},
  title = {{A Call to Lagrangian Action: Learning Population Mechanics from Temporal Snapshots}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=MjPv4kRu3H},
}
Figure