PathFM: Fast Multivariate Trajectory Forecasting with Flow Matching

PathFM uses flow matching to generate complete future trajectories, filling the gap where marginal quantiles cannot capture path dependencies.
PathFM is a class of generative time series foundation models that addresses the limitation of traditional models predicting only marginal quantiles without capturing trajectory dependency structures. It uses flow matching to generate complete future paths, and through step distillation and shared historical attention caching, compresses multi-path sampling cost to approximately one quantile model query. The distilled one-to-two-step sampler enables end-to-end optimization of calibration loss. The team also proposed fps-bench with trajectory-level metrics, where PathFM outperforms all external baselines. In chaotic system experiments, PathFM maintains long-term variability while strong baselines collapse.
Time series foundation models are becoming the mainstream tool for general-purpose forecasting, but a critical issue has long been overlooked: most leading models only predict marginal quantiles, making no assumptions about the dependency structure of future trajectories. In other words, they can tell you the possible range of values at each time point, but they cannot tell you how those points connect into a complete path.
This is a fundamental flaw for quantities that depend on trajectory shape—cumulative demand, peak load, event occurrence times. Point forecasts and marginal quantiles simply cannot reveal this information. PathFM is proposed precisely to solve this problem.

The Blind Spot of Marginal Quantile Forecasting
Traditional time series forecasting models—including the foundation models that have gained popularity in recent years—typically output quantiles at each time step. This approach performs well on single-point evaluation, but ignores a key fact: multiple future time points are correlated with each other.
A straightforward example: if you want to forecast electricity load for the next 24 hours, the marginal distribution at each hour might be predicted accurately, but peak load depends on how those hours jointly occur. Marginal models cannot tell you how high the "worst-case peak" is, because they don't know the dependencies between hours.
This is where PathFM's core insight lies: to answer trajectory-dependent questions, you must generate complete future paths, not just marginal distributions.
Marginal quantiles refer to modeling the quantiles of the conditional distribution at each time step independently—for example, predicting the 10th, 50th, and 90th percentiles for the t-th hour in the future. While several marginal distributions may each be accurate at every time point, they do not specify the joint distribution across those points. Recovering the joint distribution requires a copula or dependency structure, and marginal quantile models make no assumptions about this. Consequently, any statistic that depends on the entire trajectory rather than individual time points—maximum values, cumulative sums, first passage times, path extremes—cannot be directly derived from marginal quantiles. This is the fundamental reason PathFM argues that complete paths must be generated.
Generating Complete Trajectories with Flow Matching
PathFM employs flow matching to generate complete future paths. Compared to diffusion models, flow matching is more efficient in both training and sampling, making it suitable for latency-sensitive scenarios like time series forecasting.
But flow matching alone is not enough. The research team made two key engineering optimizations:
Step distillation: Compressing the sampling steps to one or two, dramatically reducing the computational overhead of generating multiple paths.
Shared historical attention cache: Reusing historical encodings across multiple samplings to avoid redundant computation.
Combined, these two optimizations make PathFM's time to generate multiple paths for a single series roughly equivalent to the time of a single quantile model query. This speed transforms it from "theoretically feasible" to "practically usable."
Flow Matching is a class of generative methods based on continuous normalizing flows (CNF). Its core idea is to learn a time-dependent velocity field that continuously transforms a simple prior distribution (such as Gaussian noise) along a probability path to the target data distribution. Unlike diffusion models, which need to learn a denoising process and integrate stochastic differential equations during inference, flow matching directly regresses the velocity field, resulting in a simpler training objective and smoother sampling trajectories. Given a starting noise, samples can be generated by integrating an ordinary differential equation along the learned velocity field. This deterministic ODE sampling path typically achieves comparable quality with fewer steps, making it more attractive in latency-sensitive scenarios like time series.
Step distillation is a common acceleration technique that compresses a generative model requiring many sampling steps into one that produces samples in just one or two steps. The basic approach is to first train a high-quality but slow-sampling teacher model, then train a student model to directly fit the teacher's output trajectory, thereby skipping intermediate steps. For flow matching and diffusion models, the distilled student network can map from noise to target samples in a single step, at the cost of typically losing some diversity or distributional accuracy. After applying this technique, PathFM significantly reduces the latency of generating multiple future paths, making it economically feasible to sample a large number of paths for the same historical series, and also creating the conditions for directly optimizing calibration losses.
Directly Optimizing Calibration Loss
The distilled sampler has an additional benefit: it makes directly optimizing calibration loss feasible.
In traditional generative models, the sampling process is typically non-differentiable or computationally too expensive, preventing end-to-end optimization of calibration metrics. PathFM's one-to-two-step sampler breaks this bottleneck, allowing the model to directly optimize for calibration quality during training.
This means PathFM not only generates diverse paths but also guarantees probabilistic calibration—which is critical for risk assessment and decision-making scenarios.
Benchmarks: fev-bench, TIME, and fps-bench
PathFM achieves competitive marginal accuracy on the existing fev-bench and TIME benchmarks. But the research team believes that marginal metrics alone are insufficient to evaluate trajectory forecasting models.
To address this, they proposed the Forecast Path Score Bench (fps-bench), which adds energy scores, variogram scores, and downstream metrics on top of the fev-bench tasks. These new metrics directly measure the joint distribution quality of generated paths, rather than just looking at marginal performance at each time point.
On fps-bench, PathFM's comprehensive path score exceeds all evaluated external baselines. This is a meaningful signal: when the evaluation criterion shifts from marginals to overall trajectories, the advantages of generative methods become apparent.
Long-term Stability in Chaotic Systems
The research also includes a set of chaotic system experiments with noteworthy results.
In chaotic systems, PathFM's flow model is able to maintain long-term variability—that is, the trajectories it generates still exhibit reasonable fluctuation and diversity over long time scales. In contrast, strong baseline models quickly collapse, with generated trajectories becoming degenerate.
This comparison reveals a structural advantage of generative methods: when the forecasting target itself has intrinsic chaotic properties, models that attempt to directly regress conditional means or quantiles systematically lose variability, while methods that generate complete paths naturally preserve this diversity.
From Research to Application
PathFM's positioning is clear: making generative time series forecasting both competitive and practical. It is not just an academic proof of concept, but a system that has been engineering-optimized for speed, accuracy, and calibration.
For downstream applications that require trajectory-dependent quantities—such as peak load forecasting in energy dispatch, cumulative demand estimation in supply chains, or path-dependent derivative pricing in finance—PathFM provides a viable path from marginal forecasting to complete trajectory forecasting.
The paper's core contributions can be summarized in three points: generating complete trajectories with flow matching, achieving fast sampling through distillation and caching, and proposing fps-bench to advance trajectory-level evaluation standards. For the time series forecasting field, this represents a paradigm shift from "predicting each point" to "predicting the entire path."
One-line Summary
PathFM uses flow matching to generate complete future trajectories, addressing the inability of marginal quantiles to capture path dependencies.
Paragraph Summary
PathFM is a class of generative time series foundation models whose core goal is to solve the problem that traditional models only predict marginal quantiles and cannot capture the dependency structure of future trajectories. It employs flow matching to generate complete future paths, and through step distillation and shared historical attention caching, reduces the sampling cost of multiple paths to approximately that of a single quantile model query. The distilled one-to-two-step sampler enables the model to directly optimize calibration loss end-to-end, improving probabilistic calibration quality. The research team also proposed the fps-bench benchmark, incorporating trajectory-level metrics such as energy scores and variogram scores, on which PathFM's comprehensive score exceeds all external baselines. In chaotic system experiments, PathFM maintains long-term variability while strong baseline models quickly collapse.
Related articles

Random Pruning of the DPO Computation Graph: 1.4x Training Speedup and Lower Peak Memory
DPO training too slow and memory-hungry? This paper proposes a random pruning framework for the DPO computation graph, sampling independently across position, sequence, and branch dimensions; branch pruning achieves a 1.426x step-time speedup and cuts training time by about 30%, with in-depth attribution of memory and time gains.

Why Does JEPA Underperform MLM in Longitudinal EHR Representation Learning?
New study compares JEPA and MLM for longitudinal EHR representation learning on MIMIC-IV: three JEPA variants train stably without collapse but underperform MLM; target size, not heterogeneity, drives prediction error.

Transfer Learning + Visible Light Communication: A New Approach to Energy-Efficient Indoor Positioning
A study proposes a transfer learning-based visible light communication indoor positioning method, achieving 47% accuracy improvement on the BOSCH factory dataset, 67.5% model efficiency under high noise, and introducing the ME composite metric for energy-efficient positioning in energy-constrained industrial IoT scenarios.