Learning-based planners are sensitive to the long-tailed distribution of driving data. Common maneuvers dominate datasets, while dangerous or rare scenarios are sparse. This imbalance can bias models toward the frequent cases and degrade performance on critical scenarios. To tackle this problem, we compare balancing strategies for sampling training data and find reweighting by trajectory pattern an effective approach. We then present FlowDrive, a flow-matching trajectory planner that learns a conditional rectified flow to map noise directly to trajectory distributions with few flow-matching steps. We further introduce moderated, in-the-loop guidance that injects small perturbation between flow steps to systematically increase trajectory diversity while remaining scene-consistent. On nuPlan and the interaction-focused interPlan benchmarks, FlowDrive achieves state-of-the-art results among learning-based planners and approaches methods with rule-based refinements. After adding moderated guidance and light post-processing (FlowDrive*), it achieves overall state-of-the-art performance across nearly all benchmark splits. Our code is available at https://github.com/einsteinguang/flow_drive_planner.
Figures & tables
Figure 1: FlowDrive architecture. Left: scene inputs (neighbor history, static objects, lanes/routes with traffic lights and speed limits). Middle: encoder with MLP-Mixer branches and multi-head attention fusion. Right: DiT-based decoder with adaptive layer norm conditioning and cross-attention to context, predicting the velocity field across flow steps.
Figure 2: Precomputed clusters of normalized ego futures used for cluster-based sampling. Colored polylines indicate cluster centers; translucent points show a subset of sampled trajectories per cluster.
Table 1: Closed-loop scores on nuPlan Val14, Test14-hard, and Test14 (Non-Reactive, NR; Reactive, R) and interPlan. Higher is better. Within each category block, best is bold ; second-best is underlined . A dash “–” indicates the result is unavailable or not reproducible due to missing code.
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
Type
Parameter
Value
Data Preprocessing
Num. dynamic objects
32
Num. static objects
5
Num. lane segments
70
Training
Effective batch size
2800
Effective learning rate
5e-4
Learning rate scheduler
cosine
Appendix
Table 2: Training parameters and hyperparameters for FlowDrive.
Figure 4: Sample counts per cluster after applying different training-time sampling strategies. Cluster-based sampling produces the most balanced distributions over the clusters.
Figure 5: Effect of injecting moderated lateral offsets at different flow steps. Black trajectories are with 0 offset, green trajectories are with offsets [−0.5,−0.25,0.25,0.5] .
Lateral offset magnitudes
Tg
{41}
{21}
{43}
[−0.25,0.25]
0.53
1.10
7.30
[−0.5,0.5]
1.20
2.50
15.60
[−1,1]
2.30
4.90
29.00
Appendix
Table 3: Lateral divergency (m) (lateral distance between the final positions of the generated two trajectories vs. lateral offset magnitude [−δlat,δlat] and injection step Tg (scenario as in Figure 5 ).
Figure 6: Runtime vs. score on nuPlan Test14 (R) for FlowDrive - and Diffusion Planner.
Table 4: Ablation studies on nuPlan Val14 (R). Best is bold .
Random sampling
Moderated guidance
Simple scorer
90.37
92.62
PDM scorer
92.37
93.96
Appendix
Table 5: Ablation of post-processing components on nuPlan Test14 (R).
Table 6: Ablations on nuPlan Val14 (R). Top: design choices. Bottom: number of candidates (left) and number of clusters (right) for cluster-based sampling.
Scenario (count)
FlowDrive -
FlowDrive
all (1118)
81.91
85.37
behind_long_vehicle (14)
98.54
97.98
changing_lane (70)
87.16
86.12
following_lane_with_lead (15)
86.32
81.24
high_lateral_acceleration (96)
80.74
87.17
high_magnitude_speed (99)
87.72
90.81
Appendix
Table 7: Per-scenario nuPlan Val14 (R) scores. Best per row in bold .
Figure 7: Training epoch trends for FlowDrive on Val14, Test14 and Test14-hard (R vs. NR).
Figure 8: Qualitative examples of FlowDrive* on nuPlan scenarios (R-mode). Each row represents a different scenario at 0, 3.3, 6.6, and 10 seconds intervals. The red box is the ego vehicle. Green indicates the planned trajectory. The gray boxes are other dynamic agents with an overlapping triangle indicating their driving direction. Red and green circles represent traffic lights (red and green respectively). First row: a right turn at an intersection with pedestrians crossing. Second row: car-following behavior with a final stop. Third row: slowing down for crossing vehicles. Fourth row: navigation through narrow pickup/dropoff area while overtaking slow vehicles on the left lane.
Figure 9: Qualitative examples of FlowDrive* on interPlan scenarios. First row: nudging around a parked vehicle at 4, 8, 12, and 16 seconds. Second row: emergency stop for a suddenly crossing pedestrian at 2, 4, 6, and 8 seconds.
Figure 10: Comparison between FlowDrive and FlowDrive* in challenging scenarios.
Figure 11: Jointly moderated guidance with lateral (same color) and longitudinal offsets (different color). Top left: overtake parked vehicles with different speed and lateral offsets. Top right: car-following with varied longitudinal offsets. Bottom left: longitudinal offsets do not change final speeds, while lateral offsets induce overtaking. Bottom right: on narrow roads, all lateral offsets stay collision-free relative to lane boundaries and parked vehicles.
We present a flow-matching planner for autonomous driving that directly outputs actionable control trajectories defined by acceleration and curvature profiles. The model is conditioned on a bird's-eye-view (BEV) raster of the surrounding scene and generates control sequences in a small number of Ordinary Differential Equations (ODE) integration steps, enabling low-latency inference suitable for real-time closed-loop re-planning. We train exclusively on urban scenarios (real urban city streets, intersections and roundabouts of the city of Parma, Italy) collected from a 2D traffic simulator with reactive agents, and evaluate in closed-loop on both in-distribution and markedly out-of-distribution environments, including multi-lane highways and unseen urban scenarios. Our results show that the model generalizes reliably to these unseen conditions, maintaining stable closed-loop control and successfully completing scenarios that differ substantially from the training distribution. We attribute this to the BEV representation, which provides a geometry-centric view of the scene that is inherently less sensitive to distributional shifts, and to the flow-matching formulation, which learns a smooth vector field that degrades gracefully under distribution shift. We provide video demonstrations of closed-loop behavior at https://marcelloceresini.github.io/DirectControlFlowMatching.
Marcello Ceresini, Federico Pirazzoli, Andrea Bertogalli +5
1Università degli Studi di Parma · 2Alma Mater Studiorum - Università di Bologna · 3VisLab (an Ambarella Inc. company)
Generative planners based on diffusion/flow matching can learn to synthesize long-horizon trajectories from demonstrations. However, real-world deployment requires (i) enforcing safety constraints during execution and (ii) tight online replanning at fast execution rates. Prior safe diffusion/flow planners generate the agent's full trajectory at once, while repeatedly perturbing intermediate states to satisfy safety constraints. This approach is not only computationally intensive, but also introduces distribution shift since the learned sampling dynamics is distinct from the system's execution dynamics. We propose SafeStreamingFlow, a goal-conditioned planner that aligns flow sampling dynamics with execution dynamics by sequentially integrating a learned state vector field with hierarchical state prediction. Importantly, we need to enforce safety constraints only for the executed step via high order control barrier functions. Across navigation, racing, and locomotion benchmarks, SafeStreamingFlow reduces planning latency and improves safety compared to existing methods, while maintaining competitive goal-reaching success.
Seunghwan Jang, Jeongyong Yang, Siddharth Ancha +1
Nanyang Technological University Singapore · KAIST Daejeon, Republic of Korea · University of Washington Seattle, WA, USA +1
We present DriveAnchor, a three-stage framework for autonomous driving planning that achieves behavioral diversity, controllability, and safety in a composable pipeline. Demonstration Flow Pretraining replaces the unstructured Gaussian prior with a vocabulary of 2,398 trajectory shapes constructed by farthest-point sampling, structurally grounding behavioral diversity in vocabulary coverage. Guided Flow Post-training jointly post-trains an Energy Field module with flow matching (FM), conditioning the Energy Field on static road geometry alone, to relocate anchors toward user-specified corridor polygons before flow generation, adding controllability without differentiable guidance; after Stage 2, new corridor presets require only Energy Field updates, not FM retraining. Reward-Refined Flow Fine-tuning applies zeroth-order reinforcement learning to align each anchor's output with collision-avoidance objectives: because the flow-matching model is a deterministic feedforward network in single-step mode, each anchor uniquely determines the output trajectory, reducing reward optimization to a direction search in anchor space without log-likelihood computation or ODE-to-SDE conversion. Evaluated on approximately 2 million held-out driving scenarios, DriveAnchor reduces near-range collision rates by 89% and improves mean reward by 32% without degradation in imitation accuracy, with 2.06 ms inference on NVIDIA Drive Orin. DriveAnchor has been validated through real-world vehicle testing, confirming its practicality for production deployment.
Limin Yan, Haoyun Tang, Yutao Qiu +2
Meituan Autonomous Driving · Xi’an Jiaotong University · Beijing Institute of Technology