STFlow: Data-Coupled Flow Matching for Geometric Trajectory Simulation

Kiet Bennema ten Brinke, Koen Minartz, Vlado Menkovski

Simulating the trajectories of dynamical systems—whether they are interacting molecules, celestial bodies, or moving pedestrians—is a notoriously difficult challenge. These systems are often chaotic, meaning that microscopic perturbations in initial conditions can lead to wildly divergent outcomes (bifurcations). While deep generative models like Diffusion and Flow Matching have emerged as powerful tools for modeling this uncertainty, they traditionally start the generation process from a "blank slate" of random Gaussian noise.

The authors of this paper argue that this uninformed starting point is highly inefficient. If a model is conditioned on the first several frames of a trajectory, forcing it to denoise from a random cloud of points creates a high "transport cost." The model must learn complex, winding paths to map the noise to realistic physical dynamics, resulting in slow simulations that require hundreds or thousands of integration steps.

The STFlow Solution: Informed Priors

To address this inefficiency, the authors introduce STFlow (Spatio-Temporal Flow). The core innovation of STFlow is Data-Coupled Flow Matching.

Instead of initializing from standard Gaussian noise, STFlow constructs an informed prior. By analyzing the observed initial frames, the model calculates the average velocity and variance to project a "random walk" into the future. This random walk serves as the starting point for the generative process. Because this prior already respects basic physical properties like continuity and inertia, the "flow" the model needs to learn is significantly straighter and shorter. In the context of Flow Matching—which aims to learn a vector field pushing points from a prior to a data distribution—this data-coupled prior effectively moves the starting line much closer to the finish line.

Architecture: Spatio-Temporal Modeling

STFlow supports this informed prior with a dual-layer Spatio-Temporal Architecture designed to scale efficiently:

  1. Spatial Message Passing (SMP): Utilizing Equivariant Graph Convolutional Layers (EGCL), the model captures interactions between particles while strictly respecting physical symmetries (e.g., rotational and translational equivariance).
  2. Temporal Mixing (TM): A 1D UNet (or Transformer) is employed to capture long-term dependencies and multi-scale patterns across the time dimension.

By enforcing permutation and time-shift equivariance, the architecture avoids "re-learning" the laws of physics for every new particle or time step. This allows the model to scale linearly with both the number of particles ($N$) and the trajectory length ($T$).

Experimental Results and Benchmarks

The researchers evaluated STFlow across three distinct domains: synthetic N-body physics simulations (Gravity, Charged Particles, Springs), molecular dynamics (the MD17 dataset), and real-world human movement (NBA player and ball trajectories).

  • State-of-the-Art Accuracy: STFlow achieved the lowest prediction errors across benchmarks. Notably, on the N-body Gravity task, it reduced the Final Displacement Error (FDE) by over 50% compared to previous leading models like GeoTDM and LaM-SLidE.
  • Massive Speedup: Thanks to the straight-line advantage of the informed prior, STFlow produces high-quality trajectories in as few as 5 integration steps, compared to the 1000 steps often required by older models. This translates to 200x fewer function evaluations than GeoTDM.
  • Computational Efficiency: Scaling experiments demonstrated that STFlow requires significantly less GPU memory and training time per step than its competitors, even as trajectory lengths scale up to 4000 frames.

Limitations and Future Directions

While highly effective, the informed prior acts as a strong inductive bias. This can sometimes lead to a trade-off between fidelity and diversity, where the model prioritizes the "most likely" path over generating a wide variety of possible futures.

Additionally, the random walk prior assumes a degree of smoothness; it may struggle with systems featuring high-frequency periodicity or hard physical constraints (like wall collisions). Finally, STFlow is currently designed for fixed-length trajectories rather than infinite autoregressive generation, though the authors note that extending the framework for continuous generation, inpainting (filling in trajectory gaps), and super-resolution are promising avenues for future work.

Summary updated

BibTeX
@inproceedings{brinke2026stflow,
  author = {Kiet Bennema ten Brinke and Koen Minartz and Vlado Menkovski},
  title = {{STFlow: Data-Coupled Flow Matching for Geometric Trajectory Simulation}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=Wiwfiew7Y4},
}
Figure