FlowDrive: moderated flow matching with data balancing for trajectory planning

Lingguang Wang, Ömer Sahin Tas, Marlon Steiner, Christoph Stiller · DOI

Abstract

FlowDrive is a novel trajectory planner that leverages flow matching to generate safe and diverse driving paths more efficiently than traditional diffusion models. By combining a cluster-based data balancing strategy to tackle the "long-tail" problem of rare driving scenarios with an "in-the-loop" moderated guidance mechanism, it achieves state-of-the-art performance on the nuPlan and interPlan benchmarks.

Introduction

Learning-based planners for autonomous vehicles often suffer from two major issues: data imbalance and computational inefficiency. Most driving datasets are dominated by "boring" maneuvers—like sitting at a red light or following a lane at a constant speed. Rare but critical events, such as sudden cut-ins or complex unprotected turns, are sparse. This "long-tail" distribution causes models to overfit to common behaviors, making them indecisive or unsafe in corner cases.

Furthermore, while generative models like Diffusion have shown promise in modeling multi-modal behaviors (e.g., deciding whether to pass on the left or right), they are computationally expensive, often requiring dozens of iterative denoising steps. FlowDrive aims to provide the expressive power of generative modeling with significantly lower latency and better robustness to rare scenarios.

Methods

The authors introduce FlowDrive, which shifts the generative paradigm from Diffusion to Flow Matching. The architecture utilizes a scene encoder to process environmental context and a decoder to generate trajectories via a velocity field.

The FlowDrive architecture, featuring a scene encoder that processes neighbor history, static objects, and lane information, followed by a flow-matching decoder.

1. Conditional Rectified Flow

Instead of the iterative denoising used in diffusion, FlowDrive learns a "velocity field" that maps simple Gaussian noise directly to a trajectory distribution. Because rectified flows tend to follow straight probability paths, the model can generate high-quality trajectories in just a few steps (typically 8), making it faster than most diffusion-based planners.

2. Cluster-Based Data Balancing

To fix dataset bias, the authors compared two strategies. While "scenario-based" sampling (using human-provided labels) helped slightly, "cluster-based" sampling was more effective. They used K-means to group ground-truth trajectories by their actual geometric shapes. By upweighting rare clusters—such as sharp turns or rapid accelerations—they forced the model to learn these critical maneuvers as effectively as standard lane-following.

Visualization of sampled trajectories and their corresponding cluster centers used for data balancing.

3. Moderated In-the-Loop Guidance

To increase trajectory diversity (e.g., exploring different ways to overtake a slow lead vehicle), the authors inject small perturbations during the flow integration process. Unlike "post-hoc" methods that shift a finished trajectory and might cause it to collide, this "in-the-loop" approach allows the model to "reconcile" the perturbation with the scene context in subsequent steps, ensuring the final path remains feasible and scene-consistent.

Key Insights and Ideas

  • Geometry over Labels: The most effective way to balance a driving dataset isn't to look at semantic labels (like "turning"), but at the actual spatial-temporal "vocabulary" of the trajectories. Clustering the paths themselves provides a much finer-grained way to identify and boost rare behaviors.
  • The "In-the-Loop" Advantage: Traditional planners often generate one path and then apply rule-based offsets. FlowDrive’s moderated guidance is superior because the neural network stays "in the loop." If a trajectory is nudged to the left to overtake, the model’s learned physics and scene-understanding help it naturally curve back into the lane later.
  • Efficiency via Straight Paths: By using rectified flows, the "curviness" of the transformation from noise to data is minimized. This allows FlowDrive to achieve high performance with only 8 inference steps, whereas diffusion models often struggle with fewer than 20.

Key Results

  • State-of-the-Art (SOTA): FlowDrive outperformed all previous purely learning-based planners on nuPlan. When combined with light post-processing (FlowDrive*), it surpassed strong hybrid baselines like PDM-Planner and PLUTO across nearly all benchmark splits.
  • Benchmark Scores: On the nuPlan Val14 (Reactive) split, FlowDrive achieved a score of 85.37, significantly higher than the unweighted version (81.91).
  • Speed: The model achieves an inference runtime of approximately 40ms on a single NVIDIA RTX 2080 Ti, making it viable for real-time applications. For comparison, the popular Diffusion Planner takes about 50ms for 10 steps.

Limitations and Future Work

The authors acknowledge that "raw" trajectories from FlowDrive can sometimes be "jerky" or lack perfect smoothness. While their FlowDrive* variant addresses this with a light post-processing smoothing pass, they aim to integrate these smoothness constraints directly into the flow-matching training process in the future. Additionally, they plan to explore Reinforcement Learning (RL) fine-tuning to further shift the model's velocity field toward regions that produce even higher efficiency and passenger comfort.

Summary updated

BibTeX
@misc{wang2025flowdrive,
  author = {Lingguang Wang and Ömer Sahin Tas and Marlon Steiner and Christoph Stiller},
  title = {{FlowDrive: moderated flow matching with data balancing for trajectory planning}},
  year = {2025},
  eprint = {2509.21961},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.21961},
}
Figure