Abstract
In dynamic robotic environments, the ability to both predict the movement of others and plan one's own path is critical. While Diffusion Models have emerged as a powerful tool for generating high-quality, multimodal trajectories, their iterative nature often makes them too slow for real-time applications. This paper presents Trajectory Conditional Flow Matching (T-CFM), a framework that leverages Flow Matching to learn a direct, "straight-line" vector field from noise to data. T-CFM achieves up to a 100x speedup over traditional diffusion models while improving predictive accuracy by 35%, providing a unified and efficient solution for trajectory forecasting and long-horizon planning.
Introduction
Autonomous systems operating in complex environments—ranging from busy urban streets to crowded airspace—must constantly solve two intertwined problems: forecasting and generation. Forecasting involves predicting the future states of external agents based on historical observations, while generation (or planning) involves determining a safe and efficient path for the robot to reach a goal.
Recently, Diffusion Models have set new benchmarks in these tasks due to their ability to capture complex, multimodal distributions. However, the computational cost of diffusion is high; generating a single trajectory requires dozens of sequential denoising steps. For robots operating in high-stakes, fast-moving scenarios, this latency is unacceptable. Alternatives like Variational Autoencoders (VAEs) or Generative Adversarial Networks (GANs) offer speed but often struggle with the diversity and physical consistency of the generated paths.
Methodology: Trajectory Conditional Flow Matching
The proposed T-CFM framework addresses these limitations by replacing the iterative denoising process with Flow Matching. Instead of learning to remove noise, the model learns a time-varying vector field that defines a probability flow between a simple noise distribution and the target data distribution.
Vector Fields and Straight Flows
The core innovation lies in the use of linear interpolation to define "straight" probability paths. In latent space, the path from a noisy prior to a valid trajectory is encouraged to be a straight line. This geometric simplicity allows the model to find solutions in significantly fewer steps—often just a single step ($N=1$)—without the "meandering" paths typical of diffusion sampling.
Architecture and Conditioning
T-CFM utilizes a 1D Convolutional Temporal U-Net architecture. By processing the entire trajectory in parallel, the model avoids the error accumulation issues common in autoregressive models. To handle diverse contexts, the model uses Feature-Wise Linear Modulation (FiLM) layers. These layers "steer" the generated flow based on conditioning variables ($c$), such as the past history of an aircraft or the specific goal coordinates for a navigating robot.
Training and Sampling Dynamics
The training process involves learning the vector field $v_\theta(t, \tau, c)$ that matches the target flow. During sampling, the model starts with a trajectory drawn from Gaussian noise and follows the learned vector field using an Ordinary Differential Equation (ODE) solver, such as Euler integration.
Because the learned flow is deterministic and nearly linear, the sampling process is highly efficient. As shown in the figure above, the model can transition from an intermediate noisy state to a post-sampling step with high precision, maintaining physical consistency even at low sampling counts.
Experimental Evaluation
The authors evaluated T-CFM across three challenging domains to demonstrate its versatility:
- Adversarial Tracking: Using datasets like Prison Escape, the model predicted evader paths under sparse observations ("fog-of-war").
- Real-World Aircraft Forecasting: Utilizing two years of Cessna flight data from the OpenSky database, T-CFM was tested on complex, non-linear flight maneuvers.
- Long-Horizon Planning: In the Maze2D benchmark, the model planned paths through U-Maze, Medium, and Large environments.
Key Results
- Efficiency: T-CFM demonstrated a 100x speedup over traditional diffusion baselines.
- Accuracy: In aircraft forecasting, T-CFM outperformed FlightBERT (a transformer-based model) by 35.4% in MAE and RMSE.
- Planning Robustness: In Maze2D, T-CFM achieved a 142% improvement in planning scores over diffusion models when restricted to a single sampling step. While diffusion performance collapses at $N=1$, T-CFM remains robust.
Discussion and Future Work
T-CFM establishes that prediction and planning can be unified under a single conditional generation framework. By learning "shortcuts" through the data space, it provides the high-quality multimodality of diffusion with the inference speed required for real-time robotics.
Future research directions include explicitly modeling multi-agent interactions (social navigation) and exploring stochastic bridge matching to better capture highly unpredictable, non-deterministic behaviors. Additionally, testing in "closed-loop" dynamic environments will be essential to validate the model's performance in reactive, real-time scenarios.
Summary updated