Learning to Explain While Planning: Rule-Aligned Diffusion Planning for Autonomous Driving
Organizations: Beijing Institute of Technology
Abstract
Diffusion planners exhibit strong capabilities in generating multimodal trajectories. However, existing methods primarily rely on expert demonstrations to fit trajectory distributions, learning statistical correlations among scenes, behaviors, and trajectories without explicitly modeling driving rules. In long-tail scenarios where expert data are scarce, the lack of behaviors to imitate may lead to trajectories that violate safety or compliance requirements. Moreover, their generation process lacks rule-level explanations, making it difficult to determine which rules drive trajectory adjustments, when they take effect, and how strongly they act, thereby limiting failure diagnosis, safety validation, and targeted improvement. To address these limitations, we propose the Rule-Aligned Diffusion Planner (RADP), which incorporates differentiable driving rules into the diffusion objective during training, turning rule knowledge into intrinsic behavioral principles beyond finite demonstrations. We further introduce Rule-Pressure Attribution (RPA), which constructs supervision signals from gradients of rule losses with respect to predicted trajectories and employs a lightweight attribution head to estimate the optimization pressure exerted by each rule online. To assess the closed-loop behavioral relevance of these attributions, we propose a temporal risk-alignment protocol that evaluates whether current rule pressures reflect corresponding risks during subsequent closed-loop execution. Experiments on nuPlan show that RADP improves closed-loop planning in challenging safety-critical scenarios, while RPA exhibits consistent temporal alignment with subsequent rule-specific risks, validating both intrinsic rule learning and rule-level interpretability.
Figures & tables
| Rule channel | Violation signal | Purpose |
|---|---|---|
| Collision | Insufficient ego–agent clearance | Avoid imminent collisions |
| Lane | Route-corridor boundary violation | Maintain lane and route compliance |
| Speed | Speed above the legal limit | Enforce speed-limit compliance |
| Kinematics | Excess acceleration, braking, or steering | Ensure dynamic feasibility |
| Comfort | Excess jerk or control variation | Encourage smooth motion |
| Goal | Insufficient route progress | Preserve planning efficiency |
| Split | Planner | Score | Collision | TTC | Drivable | Progress | Speed | Comfort |
|---|---|---|---|---|---|---|---|---|
| val14 | Diffusion Planner | 82.70 | 92.98 | 87.84 | 97.85 | 96.60 | 98.29 | 89.45 |
| RADP(ours) | 81.37 | 94.01 | 89.53 | 98.03 | 94.90 | 98.87 | 89.27 | |
| test14-random | Diffusion Planner | 82.82 | 94.06 | 89.66 | 98.08 | 97.70 | 97.07 | 85.44 |
| RADP(ours) | 84.48 | 96.36 | 91.95 | 98.08 | 96.93 | 97.98 | 87.36 | |
| test14-hard | Diffusion Planner | 68.94 | 86.95 | 79.78 | 94.85 | 92.65 | 97.39 | 85.29 |
| RADP(ours) | 70.62 | 92.10 | 83.46 | 95.59 | 90.07 | 98.29 | 85.29 |
| Type | Planner | Val14-R | Hard-R | Random-R |
|---|---|---|---|---|
| Expert | Log-replay | 80.32 | 68.80 | 75.86 |
| Learned | PDM-Open | 54.24 | 35.83 | 57.23 |
| UrbanDriver | 64.11 | 49.95 | 67.15 | |
| GameFormer | 8.69 | 6.69 | 9.31 | |
| PlanTF | 76.95 | 61.61 | 79.58 | |
| PLUTO | 78.11 | 59.74 | 78.62 |
| Reactive split | Head–Teacher fidelity | Future-risk alignment | |||
|---|---|---|---|---|---|
| Macro Spearman | MAE | Top-1 | Teacher | Head | |
| val14 | 0.536 | 0.216 | 70.6% | 0.235 | 0.207 |
| test14-random | 0.570 | 0.200 | 71.7% | 0.199 | 0.177 |
| test14-hard | 0.554 | 0.238 | 71.9% | 0.221 | 0.192 |
| Channel | Risk endpoint | Pos. rate | AUPRC | Lift@10% | Temporal | Shuffled | ||||
|---|---|---|---|---|---|---|---|---|---|---|
| Teacher | Head | Teacher | Head | Teacher | Head | Teacher | Head | |||
| Collision | Physical collision | 2.37% | 0.540 | 0.514 | 1.823 | 1.598 | 0.234 | 0.160 | 0.001 | |
| TTC risk (aux.) | 4.11% | 0.555 | 0.489 | 1.926 | 1.610 | 0.237 | 0.158 | |||
| Lane | Lane-boundary risk | 49.31% | 0.911 | 0.840 | 1.518 | 1.340 | 0.314 | 0.234 | 0.001 | 0.000 |
| Speed | Overspeed risk | 6.87% | 0.779 | 0.761 | 1.890 | 1.895 | 0.303 | 0.297 | ||
| Kinematics | Kinematic risk | 0.013% | 0.167 | 0.250 | 0.000 | 0.000 | 0.112 | 0.159 | 0.000 | |
| Method | Latency (ms) | Overhead |
| Planner only | 251.05 | — |
| Planner + Head | 245.50 | |
| Planner + exact Teacher | 465.29 | |
| Planner + gradient guidance | 571.10 | |
| Exact Teacher on cached states | 62.51 | |
| Head on cached states | 8.18 | faster |
| Setting | Score | Collision | TTC | Drivable | Progress | Speed | Comfort |
|---|---|---|---|---|---|---|---|
| Collision-Guided Diffusion Planner | 59.92 | 76.65 | 68.75 | 90.44 | 95.96 | 96.00 | 60.66 |
| FFN-LoRA (no rules) | 69.20 | 88.42 | 81.62 | 95.96 | 90.44 | 98.37 | 86.03 |
| No normalization | 67.78 | 85.11 | 77.57 | 93.75 | 93.38 | 95.93 | 84.56 |
| RADP | 70.62 | 92.10 | 83.46 | 95.59 | 90.07 | 98.29 | 85.29 |
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| Rule | Threshold | Physical scale | Weight | Other constants |
|---|---|---|---|---|
| Collision | m, s, m/s 2 | m | Active distance m, risk TTC s, softmax | |
| Lane | Ego-body boundary crossing | m | Centerline weight , center scale m | |
| Speed | m/s | Time steps without a valid speed limit are masked out | ||
| Kinematics | , , , | — | ||
| Comfort | , | — | ||
| Goal progress | Reachable/expert progress deficit | m | Lateral weight , monotonicity weight , stopping buffer m |
| Split | Diffusion Planner | RADP |
|---|---|---|
| val14 | 89.65 | 88.72 |
| test14-random | 88.88 | 89.46 |
| test14-hard | 75.01 | 74.80 |
| Method | Latency (ms) | Overhead |
|---|---|---|
| Planner only | — | |
| Planner + Head | ||
| Planner + exact Teacher | ||
| Planner + gradient guidance | ||
| Exact Teacher on cached states | ||
| Head on cached states | faster |
| Reactive split | Head–Teacher fidelity 95% CI | Future-risk alignment 95% CI | |||
|---|---|---|---|---|---|
| Macro Spearman | MAE | Top-1 | Teacher | Head | |
| val14 | [0.525, 0.547] | [0.209, 0.222] | [69.4, 71.8]% | [0.213, 0.256] | [0.183, 0.229] |
| test14-random | [0.552, 0.588] | [0.188, 0.212] | [69.5, 73.9]% | [0.133, 0.258] | [0.119, 0.233] |
| test14-hard | [0.537, 0.571] | [0.224, 0.251] | [69.7, 74.0]% | [0.184, 0.255] | [0.151, 0.231] |
| Attribution channel | Risk endpoint | Teacher AUPRC | Head AUPRC | Teacher Lift@10% | Head Lift@10% | Teacher | Head |
|---|---|---|---|---|---|---|---|
| Collision | Physical collision | [0.481,0.604] | [0.452,0.578] | [1.388,2.257] | [1.184,2.019] | [0.158,0.302] | [0.077,0.252] |
| Collision | TTC risk | [0.516,0.598] | [0.450,0.527] | [1.640,2.212] | [1.334,1.896] | [0.196,0.274] | [0.115,0.198] |
| Lane | Lane-boundary risk | [0.894,0.928] | [0.815,0.864] | [1.422,1.617] | [1.260,1.428] | [0.283,0.345] | [0.206,0.265] |
| Speed | Overspeed risk | [0.725,0.829] | [0.701,0.816] | [1.553,2.254] | [1.556,2.285] | [0.198,0.402] | [0.200,0.388] |
| Kinematics | Kinematic risk | [0.167,0.167] | [0.250,0.250] | [0.000,0.000] | [0.000,0.000] | [0.079,0.143] | [0.123,0.194] |
| Comfort | Comfort risk | [0.162,0.679] | [0.156,0.598] | [0.000,4.375] | [0.000,3.500] | [0.072,0.133] | [0.089,0.155] |