Think2Drive: Efficient Reinforcement Learning by Thinking with Latent World Model for Autonomous Driving (in CARLA-V2)

Qifeng Li, Xiaosong Jia, Shaobo Wang, Junchi YanECCV 2024

Introduction

Autonomous driving (AD) faces a significant hurdle in managing "corner cases"—rare but critical scenarios like sudden emergency braking or unexpected road obstructions. While earlier benchmarks like CARLA v1 were largely addressable via rule-based systems, the more recent CARLA v2 benchmark introduces 39 complex, "quasi-realistic" events that have proven difficult for existing models. Previous attempts using model-free reinforcement learning (RL) or imitation learning (IL) have often struggled with data inefficiency or a lack of generalization.

This paper introduces Think2Drive, a model-based RL framework that achieves near-perfect performance on CARLA v2. By training a "neural simulator" or latent world model, the agent can "think" through potential futures in a compact space, reaching expert-level proficiency with remarkable efficiency.

Methodology: The Latent World Model

Think2Drive is built upon the principles of Model-Based Reinforcement Learning (MBRL), specifically extending the DreamerV3 architecture. The core innovation lies in decoupling the agent's training from the computationally expensive CARLA simulator.

The Recurrent State-Space Model (RSSM) is the architectural backbone for learning environment transitions in a latent space.

World Model Learning

The system utilizes a Recurrent State-Space Model (RSSM) to learn the dynamics of the environment. This model predicts future latent states, rewards, and termination conditions (e.g., collisions). By operating in a low-dimensional latent space, the agent can simulate thousands of trajectories in parallel, far exceeding the speed of real-time simulation.

Optimization Techniques

To address specific challenges in AD, several "bricks" were integrated:

  • Reset Technique: Periodically re-initializing the planner's weights prevents the agent from settling into overly conservative "local optima," such as stopping indefinitely to avoid risk.
  • Termination-Priority Replay: This sampling strategy focuses training on the critical moments immediately preceding a failure.
  • Steering Cost Function: A penalty for abrupt steering maneuvers ensures smoother, more stable vehicle heading.
  • Incremental Train Ratio: The training frequency of the planner is gradually increased relative to the world model to optimize convergence speed.

Experiments and Benchmarking

The framework was evaluated on the official CARLA Leaderboard v2 and a custom CornerCaseRepo. The latter includes 1,600 training routes and 390 evaluation routes, each isolating a single scenario type to facilitate granular performance analysis.

Key Results

Think2Drive demonstrates state-of-the-art performance, achieving a 99.6% route completion rate on CornerCaseRepo and 98.6% on official CARLA v2 test routes.

Performance comparison on CARLA v2. Think2Drive (Ours) significantly outperforms the Roach baseline across all key metrics.

As shown in the table above, Think2Drive achieves a Weighted Driving Score (WDS) of 89.0, a substantial improvement over the previous state-of-the-art model-free agent, Roach (54.8). Notably, the model achieved these results in just three days of training on a single A6000 GPU, highlighting its extreme efficiency.

Conclusion

Think2Drive represents a significant step forward in applying MBRL to autonomous driving. By leveraging a latent world model, the system overcomes the data inefficiency of model-free methods and the generalization limits of imitation learning. While currently utilizing privileged information, future iterations aim to integrate raw sensor data and explore the model's potential as a high-quality data generator for other AD systems.

Summary updated

BibTeX
@inproceedings{li2024think,
  author = {Qifeng Li and Xiaosong Jia and Shaobo Wang and Junchi Yan},
  title = {{Think2Drive: Efficient Reinforcement Learning by Thinking with Latent World Model for Autonomous Driving (in CARLA-V2)}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72995-9\_9},
}
Figure