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.