Urban Driver: Learning to Drive from Real-world Demonstrations Using Policy Gradients

Oliver Scheel, Luca Bergamini, Maciej Wołczyk, Błażej Osiński, Peter Ondruska

TL;DR

Researchers from Woven Planet (Level 5) have introduced Urban Driver, the first offline policy gradient method for learning imitative driving policies in complex urban environments. By building a differentiable, data-driven simulator on top of mid-level vectorized representations, they enable closed-loop training that significantly reduces covariate shift and outperforms existing state-of-the-art imitation learning techniques.

What Problem Does This Paper Address?

Urban driving is a "grand challenge" for autonomous vehicles due to the sheer density of interactions with traffic lights, pedestrians, and other vehicles. Traditional industry approaches rely on manually engineered cost functions for trajectory optimization, which struggle to scale with the complexity of real-world "long-tail" events.

Machine learning offers an alternative: Imitation Learning (IL). However, standard IL (like Behavioral Cloning) suffers from covariate shift. Because the model is trained only on "perfect" expert trajectories, small errors compound during execution, leading the vehicle into states it never saw during training. Previous fixes, like adding noise/perturbations (e.g., ChauffeurNet), require tedious manual tuning of noise models. Reinforcement Learning (RL) could solve this but is notoriously sample-inefficient and dangerous to run directly on real-world roads.

Methods

The core innovation of Urban Driver is the combination of a differentiable data-driven simulator and policy gradient optimization.

  1. Mid-level Vectorized Representation: Instead of processing raw camera pixels, the model uses a "mid-to-mid" approach. It takes perception outputs (detected agents) and high-fidelity HD maps (lanes, crosswalks) as input. These are represented as sets of points processed by a PointNet-like architecture and a global attention mechanism.
  2. Differentiable Simulator: The authors built a simulator that "unrolls" the driving log. If the policy chooses an action different from the expert, the simulator updates the vehicle's pose using a differentiable kinematic model and locally transforms the surrounding map/agents.
  3. Closed-loop Policy Gradients: Because the simulator is differentiable, the team can use Backpropagation Through Time (BPTT). The model is unrolled for $T$ steps, and the gradient of the loss (the distance between the learner and the expert) is propagated back through the entire sequence. This allows the model to "see" the long-term consequences of its actions during training.
Figure 1: Overview of the proposed closed-loop training method for learning driving policies. We leverage large amounts of expert demonstrations and mid-to-mid representations to build a differen- tiable simulator supporting fast policy learning. With this simulator, we can effectively unroll model policies, and thus train the model closed-loop using a policy gradient method.

Datasets

The models were trained and evaluated using the Lyft Motion Prediction Dataset, which contains over 1,000 hours of real-world urban driving data from Palo Alto, California.

  • Training: A 100-hour subset.
  • Testing: A 25-hour subset.
  • Real-world: The policy was also deployed on a physical Ford Fusion SDV at a private test track to validate sim-to-real transfer.

Key Insights and Ideas

  • Differentiability is Key: By making the simulator differentiable, the authors avoid the high variance and sample inefficiency of "black-box" RL algorithms. They can compute exact gradients for how an action at time $t$ affects the loss at time $t+n$.
  • Solving Covariate Shift Naturally: Unlike Behavioral Cloning, which is open-loop, this closed-loop training forces the model to learn how to recover from its own mistakes because it actually experiences those off-track states during the training "unroll."
  • Smart Sampling: The authors found that starting an unroll exactly on the expert path introduces bias. By discarding the first $K$ timesteps of a rollout and only calculating gradients on the remainder, they ensure the model learns to handle the distribution of states it actually creates.
Figure 3: One iteration of policy gradient update. Given a real-world expert trajectory ¯τ we sample a policy state st by unrolling the policy π for T steps. We then compute optimal policy update by backpropagation through time.

Key Results

Urban Driver was benchmarked against Naive Behavioral Cloning (BC), BC with Perturbations (ChauffeurNet style), and Multi-step Prediction.

  • Safety: Urban Driver achieved the lowest I1K (Interventions per 1000 miles), a metric accumulating collisions and off-road events. It scored 260, compared to 567 for the best BC-perturb baseline.
  • Imitation Accuracy: It achieved the lowest L2 distance to expert trajectories (0.42m).
  • Auxiliary Costs: The differentiable framework allows for direct optimization of non-imitation goals. By adding an acceleration penalty to the loss function, the researchers could significantly improve passenger comfort without sacrificing safety.
  • Real-world Success: The model successfully navigated a signaled intersection it had never seen before, stopping for a red light and proceeding when green, demonstrating robust generalization.
Front-camera footage of the planner in the real world

Limitations and Future Work

  • Simulator Approximations: The simulator assumes that other agents (cars, pedestrians) do not react to the SDV's actions (they follow their original logs). In highly interactive scenarios (like aggressive merging), this "non-reactive" assumption might fail.
  • Pose Deviation: The local transformation used in the simulator is an approximation that is only valid if the SDV doesn't stray too far from the original expert path.
  • Future Directions: The authors suggest extending this to millions of hours of data and incorporating more complex, reactive agent models to further improve performance in dense traffic.

Summary updated

BibTeX
@inproceedings{scheel2021urban,
  author = {Oliver Scheel and Luca Bergamini and Maciej Wołczyk and Błażej Osiński and Peter Ondruska},
  title = {{Urban Driver: Learning to Drive from Real-world Demonstrations Using Policy Gradients}},
  booktitle = {CoRL},
  year = {2021},
  url = {https://openreview.net/forum?id=ibktAcINCaj},
}
Figure