TracingFlow: A Simulation-Free Trajectory Inference Framework Based on Second-Order Dynamics

Yuhao Sun, Zekun Wu, Zixun Huang, Peijie ZhouNeurIPS 2026

TL;DR

Reconstructing continuous biological processes—like cells differentiating—from static, destructive snapshots is traditionally done using first-order physics, which assumes cells have no "momentum" and forces trajectories to never cross. TracingFlow upgrades generative Flow Matching to second-order dynamics by learning underlying acceleration fields instead of just velocities, doing so without expensive ODE simulations during training. The result is a fast, mathematically principled way to capture high-curvature, intersecting cellular journeys that stay faithful to real biological lineages.

What Problem Does This Paper Address?

Imagine trying to figure out the rules of traffic by looking at a few satellite photos taken hours apart, where none of the cars have license plates. In single-cell biology, this is Trajectory Inference (TI): sequencing a cell destroys it, leaving us with disconnected temporal snapshots of a population rather than continuous movies of individual cells.

To connect the dots, researchers use Optimal Transport (OT) and Flow Matching—techniques that find the "least costly" way to morph one distribution of points into another via a learned velocity field ($\dot{\boldsymbol{x}} = \boldsymbol{v}(\boldsymbol{x}, t)$).

Here’s the catch: standard Flow Matching relies on first-order dynamics. Because velocity depends strictly on current position and time, two cells at the exact same state must move in the exact same direction. Trajectories cannot cross. In reality, biological systems have regulatory momentum and time-delayed responses (chromatin opening up before proteins are made). Two cells might look identical right now in gene-expression space, yet be headed toward completely different fates. Existing second-order attempts require slow, iterative retraining and rely on guesswork to estimate initial velocities.

Methods

TracingFlow generalizes simulation-free Flow Matching to second-order dynamics ($\dot{\boldsymbol{x}} = \boldsymbol{v}, \dot{\boldsymbol{v}} = \boldsymbol{a}$), lifting the problem into an augmented phase space of both position and velocity ($\mathcal{X} \times \mathcal{V}$).

Figure 1: Visual overview of TracingFlow
  • Dynamical Optimal Acceleration Transport (DOAT): Instead of minimizing velocity, TracingFlow minimizes total acceleration cost ($\frac{1}{2}\|\boldsymbol{a}\|^2$). For a single particle with known boundary states, the calculus of variations neatly proves the optimal path is a simple cubic spline.
  • Inferring Missing Velocities (VM-DOAT): Real scRNA-seq snapshots give us positions (gene expression), not velocities. To bridge this gap, the authors introduce an iterative alternating scheme: first, solve static optimal couplings between snapshots using the Sinkhorn algorithm (scaled up via minibatches); second, compute optimal velocities along those paths by solving a fast $\mathcal{O}(K)$ tridiagonal linear system.
Figure 2: Illustration figure of VM-DOAT problem
  • Simulation-Free Regression: Once initial velocities and couplings are pinned down, TracingFlow uses standard Flow Matching tricks—regressing a neural network directly onto conditional acceleration fields ($\mathcal{L}_{\text{CAFM}}$) and another network onto initial velocities, completely avoiding expensive ODE integration during training.
  • Biological Priors: When clonal barcodes (lineage tracing) are available, TracingFlow multiplies the transport cost matrix by a penalty factor whenever two cells have mismatched barcodes, softly discouraging impossible cross-lineage jumps.

Datasets

The authors evaluate TracingFlow across synthetic and real-world benchmarks:

  • Synthetic Datasets: A 2D Simulation dataset (designed to test crossing trajectories) and a 3D Simulation Lineage dataset (with synthetic barcode classes).
  • Single-Cell Omics: Cite-seq (evaluated in 5D and 100D) for high-dimensional distribution transport; Embryoid Body (EB 5D) across 5 time points for holding out intermediate/final snapshots; and Hematopoiesis, a real-world scRNA-seq dataset equipped with clonal lineage barcodes. (Note: An oceanography dataset, Mexico Gulf, is also referenced as evaluated in the appendix).

Key Insights and Ideas

  • Phase space untangles knots: By lifting positions into $(\boldsymbol{x}, \boldsymbol{v})$ space, paths that collide and cross in 2D gene-expression space pass cleanly over and under each other in 4D phase space without violating mathematical optimality.
  • Initial velocity shouldn't be a heuristic: Unlike prior momentum-based models that guess initial velocities locally, TracingFlow treats missing velocities as part of the global optimal control problem—and reduces finding them along a trajectory to solving a sparse, tridiagonal matrix in linear time.
  • Lineage priors belong in the geometry: Embedding clonal barcode penalties directly into the Static Optimal Acceleration Transport (SOAT) cost matrix shapes the conditional paths before the neural network ever sees a gradient, naturally aligning learned force fields with true cellular ancestry.

Key Results

TracingFlow consistently outperforms both first-order baselines (OT-CFM, $\text{SF}^2\text{M}$) and recent second-order methods (3MSBM, MMFM, HRF, CAF), measured via 1-Wasserstein ($\mathcal{W}_1$) and 2-Wasserstein ($\mathcal{W}_2$) distances (lower is better):

Table 1: Average W1 and W2 distances between the generated and ground truth distributions at various time points on the 2D Simulation , Cite 5D, and Cite 100D datasets for different algorithms.
  • Superior High-Dimensional Transport: On Cite 100D, TracingFlow achieves a $\mathcal{W}_1$ of 8.0700, comfortably beating the strongest second-order baseline HRF (10.1532) and first-order OT-CFM (10.5498). Qualitatively, on 2D data, it cleanly recovers intersecting paths where OT-CFM bends and fails.
  • Better Interpolation/Extrapolation: In hold-one-out tests on EB 5D, TracingFlow achieves the lowest error ($\mathcal{W}_1 = \mathbf{4.4974}$, $\mathcal{W}_2 = \mathbf{4.7859}$), showing second-order splines handle high-curvature dynamics better than linear interpolants.
  • Faithful Lineage Recovery: On 3D Sim-Lineage, adding the barcode prior drops TracingFlow's lineage-weighted $\mathcal{W}_1$ from 1.5292 down to 0.4538 (compared to 2.2383 for OT-CFM). It similarly leads on real Hematopoiesis data ($\mathcal{W}_1 = \mathbf{14.0470}$).

Limitations and Future Work

  • Pre-calculation Overhead: Iteratively solving Static Optimal Acceleration Transport (SOAT) plans before training the network is computationally heavy, though the authors mitigate this using minibatch-OT.
  • Deterministic Velocity Approximation: Theoretically, a single position could have a full distribution of velocities. Because modeling that requires an extra generative model, TracingFlow approximates each point's velocity using its deterministic mean expectation.
  • Physical Interpretation: Minimizing squared acceleration ($\int \frac{1}{2}\|\boldsymbol{a}\|^2 dt$) produces smooth cubic splines, but lacks a direct classical mechanics analog (where standard Lagrangians depend on position and velocity, not acceleration). Future work aims to ground these higher-order dynamics more deeply into multi-modal biological kinetics.

Summary updated

Abstract

Inferring continuous system evolution from sparse temporal snapshots is a key challenge in generative modeling and single-cell omics. While Optimal Transport (OT) is popular, existing frameworks are largely restricted to first-order dynamics, assuming memoryless velocity fields. This limits expressiveness, as first-order systems fail to account for regulatory momentum and time-delayed responses inherent in processes like cell differentiation. Here, we introduce TracingFlow, a simulation-free Flow Matching framework generalizing to second-order dynamics. By using neural networks to regress the acceleration field, TracingFlow provides an exact, efficient solution to the Dynamical Optimal Acceleration Transport (DOAT) problem. Unlike first-order methods yielding over-smoothed trajectories, our second-order formulation captures high-curvature transitions and nonlinear evolutions by learning the underlying force fields. Evaluated on complex synthetic and large-scale scRNA-seq datasets, TracingFlow achieves superior accuracy in distributional reconstruction and trajectory faithfulness. Moreover, by integrating lineage tracing priors, it recovers dynamical structures that are both mathematically optimal and biologically plausible.
BibTeX
@inproceedings{sun2026tracingflow,
  author = {Yuhao Sun and Zekun Wu and Zixun Huang and Peijie Zhou},
  title = {{TracingFlow: A Simulation-Free Trajectory Inference Framework Based on Second-Order Dynamics}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=WETDhvImnp},
}
Figure