Introduction
Welcome to the twelfth module of our course. In the previous module, we concluded our deep dive into the architecture of the Discrete-token Autoregressive Planner (DAP). We saw how it can generate a trajectory by treating driving as a sequence modeling problem and then refine that output for smoothness using post-tuning. The underlying assumption was that the model learns to generate "good" trajectories by pre-training on a large dataset of human driving.
This brings us to a critical question: what is the quality of that training data? What happens if the human "experts" are not always perfect drivers?
This lesson kicks off our exploration of safety alignment. Our learning outcome is to explain why imitation learning on human driving data can replicate unsafe behaviors like speeding. Understanding this fundamental problem is the key to appreciating why more advanced alignment techniques, like the Group Relative Policy Optimization (GRPO) at the heart of this course, are necessary. We will explore the subtle but dangerous ways that simply trying to "clone" human behavior can go wrong.
Part 1: The Flaw in the Foundation: Imperfect Experts
Imitation Learning (IL), also known as Behavior Cloning (BC), is a powerful and intuitive paradigm. The goal is to train a policy, , that maps states (sensor inputs, map data) to actions (steering, acceleration) by simply minimizing the difference between the model's actions and the actions of an expert (a human driver) in the same state.
This approach is appealing because it bypasses the need to manually engineer complex rules for every possible driving scenario. Let's start with a video that introduces the core concepts of imitation learning and its application to autonomous driving.
Core Concepts: Imitation Learning
This video from Sanjiban Choudhury provides an excellent overview of imitation learning, explaining why it's so useful for complex human-like tasks such as driving.
Please watch the first part of the video, from the beginning until timestamp 03:27. Focus on why it's so difficult to program explicit driving rules and how imitation learning offers a way to learn these rules implicitly from data.
The video makes a compelling case for IL. If humans can navigate complex traffic, the optimal behavior must be implicit in our driving data. However, this relies on a crucial assumption: that the human demonstrations are, in fact, optimal.
Let's examine the reality of this assumption by looking at the Plan-R1 paper, which is a central model in our course.
[PDF] PLAN-R1: SAFE AND FEASIBLE TRAJECTORY PLAN - OpenReview
The introduction of the Plan-R1 paper directly addresses the problem of relying on expert demonstrations.
Please read Section 1, 'INTRODUCTION'. Pay close attention to the two key limitations of relying on expert demonstrations that the authors identify. Note the specific statistic they provide about speeding in the nuPlan dataset.
As the paper highlights, real-world "expert" data is not perfect. The authors found that over 10% of scenes in the nuPlan training data exhibit speeding. This is a concrete example of the problem: if our training data contains undesirable behaviors, an imitation learning model trained on this data will learn to replicate them. The model, aiming to minimize the error between its output and the human's, will learn that speeding is sometimes the "correct" action because that's what the expert did.
This direct replication of bad habits is the most obvious failure mode of imitation learning, but the problem runs much deeper.
Part 2: Causal Confusion and Compounding Errors
A more subtle and dangerous issue arises when the model learns the wrong cause-and-effect relationships from the data. This is known as causal confusion. The model might identify a spurious correlation in the data and treat it as a causal link, leading to brittle and illogical behavior.
The same video we watched earlier provides a perfect illustration of this phenomenon, which it calls the "inertia problem."
Core Concepts: Imitation Learning
Let's return to the 'Core Concepts' video to see a clear example of causal confusion in action.
Please watch the segment from 03:27 to 08:30. This part details a famous example where a model learns to stop at a green light. Focus on how adding the 'previous action' as a feature creates a spurious correlation that leads to a dangerous feedback loop.
In the video's example, the model learns the rule: "If my previous action was 'stop', my next action should be 'stop'." This is a strong correlation in the training data because humans drive smoothly. However, it's not the true causal reason for stopping. The true cause is the state of the traffic light or the presence of a pedestrian.

When the learning agent makes a small mistake (e.g., a slight, unnecessary braking action), this error feeds back into its own input for the next time step. The model sees its own previous action was "stop" and, following its flawed logic, decides to stop again, leading to a catastrophic failure: stopping at a green light.
This compounding of errors is a fundamental challenge in imitation learning. It's formally known as covariate shift:
- The training distribution consists of states visited by the human expert.
- The test distribution consists of states visited by the learning agent itself.
Because the agent is imperfect, it will inevitably drift away from the expert's trajectories and into states it has never seen before. Since it has no training data for these novel states, it doesn't know how to act, is likely to make a larger error, and drifts even further away.
[PDF] Exploring the Limitations of Behavior Cloning for Autonomous Driving
The classic paper 'Exploring the Limitations of Behavior Cloning for Autonomous Driving' formally describes these issues.
Please read Section 3.2, 'Limitations'. Focus on the descriptions of 'Bias in Naturalistic Driving Datasets' and 'Causal Confusion'. This will solidify the concepts we've just discussed.
The Plan-R1 paper provides a stark visualization of this problem in practice.
[PDF] PLAN-R1: SAFE AND FEASIBLE TRAJECTORY PLAN - OpenReview
Let's look back at the Plan-R1 paper to see a real-world example of models replicating speeding behavior.
Please find and examine Figure 2 in Section 4.2 ('Qualitative Results'). This figure shows a case where the expert trajectory (in gray) exceeds the speed limit. Notice how the other imitation learning-based planners (PLUTO and Diffusion Planner) also learn to speed, while Plan-R1 (which we will study next) corrects this behavior.
This case study perfectly demonstrates the learning outcome. The IL models, trained to mimic the expert, faithfully replicate the expert's unsafe speeding.
Part 3: The Social Dilemma: The Rules of Breaking the Rules
Finally, there is a higher-level challenge. Driving is not a solitary activity performed in a vacuum; it's a multi-agent social game. Sometimes, strictly adhering to every rule can make a vehicle ineffective or unpredictable to other drivers.
Deep Reinforcement Learning for Driving Policy
This talk from Mobileye gives a great industry perspective on why simply obeying the law isn't sufficient for real-world driving.
Please watch the two short segments: from 01:21 to 02:02 and from 05:46 to 06:43. These clips explain that driving involves negotiation and understanding the 'rules of breaking the rules'—something a purely rule-based or naive imitation system would struggle with.
This puts imitation learning in a difficult position:
- If trained on data from overly cautious, perfectly rule-abiding drivers, the model may be too timid, getting stuck in merges or at intersections.
- If trained on data from typical, "assertive" human drivers, the model will learn to speed, follow too closely, and make other potentially unsafe maneuvers.
The training data is a mixture of these behaviors, and a simple IL model has no robust way to distinguish the "good" assertiveness from the "bad" recklessness. It simply learns to replicate the average behavior, flaws and all.
Conclusion
In this lesson, we've explored the fundamental reasons why naive imitation learning is insufficient for developing safe autonomous driving systems.
Key Takeaways:
- Imitation Learning (IL) trains a model to mimic expert behavior by learning a mapping from states to actions from a dataset of demonstrations.
- Imperfect Data: Real-world human driving data is not perfect. It often contains undesirable and unsafe behaviors, such as speeding, which IL models will learn to replicate.
- Causal Confusion: Models can learn spurious correlations instead of true causal relationships. This can lead to issues like the "inertia problem," where a car learns to stay stopped because it was previously stopped, not because of the actual traffic situation.
- Covariate Shift: Small errors made by the learning agent can compound over time through a feedback loop. This causes the agent to drift into states it has never seen during training, where its behavior is undefined and likely to be erroneous.
Preview of the Next Lesson:
Now that we have a clear understanding of the problem, we can begin to explore the solution. In our next lesson, we will introduce Plan-R1's two-stage framework. We will see how it uses imitation learning in the first stage to capture human-like driving behavior, and then employs a second stage of reinforcement learning with GRPO to explicitly fine-tune the model and align it with hard-coded safety principles, effectively "unlearning" the bad habits from the initial training data.