Manuscript Offprint

arXiv:2609.39995

Learning to Explain While Planning: Rule-Aligned Diffusion Planning for Autonomous Driving

Jiaxi Ye

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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.

1 INTRODUCTION

Diffusion models provide expressive representations of multimodal trajectory distributions and have achieved strong closed-loop planning performance. However, existing diffusion planners learn driving behavior mainly by imitating expert trajectories. Requirements such as collision avoidance, lane compliance, and speed-limit compliance are typically implicit in the data distribution rather than explicit training objectives. When expert demonstrations do not adequately cover complex interactions and long-tail states, a planner may learn superficial behavior patterns without acquiring transferable rule constraints. Although rewards or costs can guide diffusion sampling at inference time, such rules remain external optimization signals and do not directly shape the learned generative policy. Consequently, rule compliance remains decoupled from the model's learned generative capability, potentially leading to inconsistent behavior under distribution shifts and safety-critical situations insufficiently represented in the training data.

Diffusion planners also lack faithful rule-level explanations of their planning decisions. Existing interpretability techniques, including attention visualization and saliency mapping, are predominantly post-hoc: they analyze a decision after it has been produced and identify influential input features or internal activations. However, feature importance does not directly reveal the semantic objectives that drive trajectory optimization, nor does it quantify when and how strongly a particular driving rule acts on the generated trajectory. Such post-hoc explanations are therefore weakly connected to the planner's actual optimization mechanism and cannot naturally provide rule-level explanations together with trajectory generation. In safety-critical autonomous driving, this limitation makes it

∗^{*}Corresponding author.

difficult to determine why a behavior was selected, localize the causes of planning failures, validate safety properties, and perform targeted model improvement.

We therefore propose the Rule-Aligned Diffusion Planner (RADP), which jointly optimizes the diffusion objective and differentiable driving rules during training. The rules directly participate in learning the trajectory distribution, without requiring additional rule guidance or trajectory optimization at inference. Building on RADP, we introduce Rule-Pressure Attribution (RPA): the gradient magnitude of each rule cost with respect to the predicted trajectory represents its local optimization pressure and supervises a lightweight attribution head. The planner can thus produce a trajectory and its rule-level explanation within the same planning cycle.

To evaluate whether rule attributions reflect closed-loop driving conditions, we introduce a temporal risk-alignment protocol that associates each rule's current attribution with its corresponding risk over a future rollout window starting at the same planning frame. The protocol measures whether higher rule-specific risks are accompanied by higher attribution pressures. Experiments on nuPlan show that RADP maintains broadly comparable overall planning performance while improving collision and TTC metrics in challenging safety-critical scenarios. The attribution head approximates the gradient teacher, and its outputs exhibit stable temporal correspondence with subsequent rule-specific risks.

Our contributions are summarized as follows:

• We propose a rule-aligned diffusion planning framework that integrates differentiable driving rules into training, enabling rule-consistent planning without inference-time rule-based refinement.

• We introduce online rule-pressure attribution, which distills trajectory-gradient-based rule pressures into a lightweight head, providing efficient rule-aware explanations alongside trajectory generation.

• We develop a temporal risk-alignment protocol that relates rule pressures to corresponding future risks in closed-loop rollouts, providing empirical validation of the effectiveness and behavioral relevance of our attributions.

References (54)