CAT: Closed-loop Adversarial Training for Safe End-to-End Driving

Linrui Zhang, Zhenghao Peng, Quanyi Li, Bolei Zhou

Abstract

Driving safety is a top priority for autonomous vehicles. Orthogonal to prior work handling accident-prone traffic events by algorithm designs at the policy level, we investigate a Closed-loop Adversarial Training (CAT) framework for safe end-to-end driving in this paper through the lens of environment augmentation. CAT aims to continuously improve the safety of driving agents by training the agent on safety-critical scenarios that are dynamically generated over time. A novel resampling technique is developed to turn log-replay real-world driving scenarios into safety-critical ones via probabilistic factorization, where the adversarial traffic generation is modeled as the multiplication of standard motion prediction sub-problems. Consequently, CAT can launch more efficient physical attacks compared to existing safety-critical scenario generation methods and yields a significantly less computational cost in the iterative learning pipeline. We incorporate CAT into the MetaDrive simulator and validate our approach on hundreds of driving scenarios imported from real-world driving datasets. Experimental results demonstrate that CAT can effectively generate adversarial scenarios countering the agent being trained. After training, the agent can achieve superior driving safety in both log-replay and safety-critical traffic scenarios on the held-out test set.

Introduction

End-to-end autonomous driving (AD) models often perform well in standard traffic but struggle with "long-tail" events—rare, dangerous situations like a car suddenly swerving into your lane. These events are hard to find in real-world datasets because most driving is safe. To address this, researchers often augment training with simulated crashes. However, existing methods face a "trilemma" of generalizability (scaling issues), model dependency (requiring differentiable simulators), and efficiency (slow generation times).

CAT (Closed-loop Adversarial Training) addresses these challenges by dynamically generating "worst-case" traffic scenarios during the training process. By using a clever probabilistic factorization technique, CAT can create realistic, high-risk interactions thousands of times faster than previous methods, allowing for truly continuous safety-critical learning.

Methods

The core innovation of CAT is Factorized Safety-Critical Resampling. Instead of treating scenario generation as a massive optimization problem, the framework decomposes the probability of a crash into three manageable parts: a Traffic Prior (ensuring realistic behavior using pre-trained motion forecasters), Ego Estimation (predicting the current agent's trajectory), and Collision Likelihood (geometric path intersection checks).

Overview of the Closed-loop Adversarial Training (CAT) framework, illustrating the cycle from scenario pool to safe AD policy.

By multiplying these factors, CAT can quickly resample existing real-world logs from datasets like Waymo to find the most "effective" attack—one that is both realistic and highly likely to cause a collision for the specific agent being trained. This closed-loop approach ensures the agent is constantly challenged by its current weaknesses rather than overfitting to a fixed set of scenarios.

Experimental Results

The researchers validated CAT using 500 complex real-world traffic scenarios from the Waymo Open Motion Dataset (WOMD) within the MetaDrive simulator.

Efficiency and Attack Success

CAT generates adversarial scenarios in about 3.3 seconds, compared to 153 seconds for the state-of-the-art STRIVE method. This 45x speedup makes it viable for real-time training. Furthermore, CAT achieved a 91% attack success rate against a replay agent, significantly outperforming previous methods.

Safety Gains and Realism

Agents trained with CAT reduced their crash rate by 15.18% in safety-critical test scenarios compared to vanilla RL training, while maintaining a high route completion rate. Qualitative results show the model generates diverse, human-like "attacks" across various maneuvers.

Qualitative examples of nine different traffic scenarios, comparing raw logs (Raw) with adversarial versions (Adv) generated by CAT.

Conclusion and Future Work

CAT provides a scalable, efficient framework for improving AD safety through environment augmentation. While effective, the authors acknowledge that future work should include a wider diversity of adversarial participants, such as pedestrians and cyclists, and test the framework across a broader range of global driving conditions and policy types beyond reinforcement learning.

Summary updated

BibTeX
@inproceedings{zhang2023cat,
  author = {Linrui Zhang and Zhenghao Peng and Quanyi Li and Bolei Zhou},
  title = {{CAT: Closed-loop Adversarial Training for Safe End-to-End Driving}},
  booktitle = {Conference on Robot Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=VtJqMs9ig20},
}
Figure