Multimodal Safety-Critical Scenarios Generation for Decision-Making Algorithms Evaluation

Wenhao Ding, Baiming Chen, Bo Li, Kim Ji Eun, Ding Zhao

Abstract

Autonomous vehicles (AVs) rely heavily on neural network-based decision-making, which has been shown to be vulnerable to adversarial conditions. Evaluating the robustness of these systems is challenging because safety-critical events are rare in real-world data and often follow multimodal distributions. We propose a flow-based generative framework that creates diverse, physically plausible, and high-risk traffic scenarios. By integrating weighted likelihood maximization with a gradient-based adaptive sampling procedure, our model efficiently identifies multiple distinct failure modes for a given task algorithm. Experiments in the CARLA simulator demonstrate that our approach significantly outperforms uniform sampling in testing efficiency and reveals critical robustness gaps between different reinforcement learning (RL) algorithms.

Introduction

The safety of autonomous systems is a "long-tail" problem. While AVs perform well in standard traffic, rare, high-risk events—such as a cyclist suddenly darting into an intersection—are where they often fail. Collecting sufficient data for these events in the real world is prohibitively expensive and dangerous. Furthermore, traditional adversarial attacks often focus on finding a single "worst-case" scenario, ignoring the fact that risk is inherently multimodal; an AI might learn to avoid a threat from the left while remaining completely vulnerable to one from the right.

The Proposed Framework

To address these challenges, we developed a framework that generates a distribution of scenarios that are both high-risk and physically plausible.

The proposed framework for generating safety-critical scenarios using a flow-based generative model and an adaptive sampler.

The framework consists of three core components:

  1. Pre-trained Prior Model: We utilize RealNVP, a type of normalizing flow, trained on the InD dataset (naturalistic road user trajectories recorded by drones). This ensures that generated trajectories, such as those of cyclists, adhere to realistic movement patterns.
  2. Weighted Maximum Likelihood Estimation (WMLE): Rather than simply maximizing data likelihood, we weight the objective function by a risk metric. This directs the generator's probability mass toward scenarios where collisions or near-misses are likely.
  3. Adaptive Sampler (NES): To explore the scenario space efficiently in a "black-box" setting (where the simulator's internal math is unknown), we employ the Natural Evolution Strategy (NES). This gradient-based approach steers the search toward unexplored, high-risk regions, preventing the model from getting stuck on a single type of accident.

Experimental Results

We evaluated our generator by testing six popular Reinforcement Learning (RL) algorithms—DQN, A2C, PPO, DDPG, SAC, and Model-Based RL (MBRL)—within the CARLA simulator.

Efficiency and Multimodality

Our adaptive method achieved a 100% collision rate (successfully finding failure cases) in just 3,000 queries, whereas a uniform sampler required 100,000 queries to reach a mere 9% collision rate. Crucially, our method avoids "mode collapse," a common failure in risk-search algorithms where the model only identifies one specific type of failure.

Comparison of sampling strategies: Our method successfully captures multiple risk modes without collapsing into a single worst-case scenario.

Algorithm Robustness

The results revealed significant disparities in robustness that were invisible under standard uniform testing:

  • Model-Based RL (MBRL) emerged as the most robust. By learning a model of the environment's physics, it generalized better to avoid risky scenarios even if they were not encountered during training.
  • On-policy methods (PPO and A2C) were the least robust, showing high instability and failing to handle the diverse modes of risk generated by our framework.

Conclusion

Generating multimodal safety-critical scenarios is essential for a comprehensive evaluation of autonomous systems. Our flow-based generative model provides a scalable way to stress-test decision-making algorithms, revealing vulnerabilities that standard testing misses. Future work will explore using these generated scenarios for adversarial training to improve the inherent safety of autonomous agents from the outset.

Summary updated

Abstract

Existing neural network-based autonomous systems are shown to be vulnerable against adversarial attacks, therefore sophisticated evaluation on their robustness is of great importance. However, evaluating the robustness only under the worst-case scenarios based on known attacks is not comprehensive, not to mention that some of them even rarely occur in the real world. In addition, the distribution of safety-critical data is usually multimodal, while most traditional attacks and evaluation methods focus on a single modality. To solve the above challenges, we propose a flow-based multimodal safety-critical scenario generator for evaluating decisionmaking algorithms. The proposed generative model is optimized with weighted likelihood maximization and a gradient-based sampling procedure is integrated to improve the sampling efficiency. The safety-critical scenarios are generated by querying the task algorithms and the log-likelihood of the generated scenarios is in proportion to the risk level. Experiments on a self-driving task demonstrate our advantages in terms of testing efficiency and multimodal modeling capability. We evaluate six Reinforcement Learning algorithms with our generated traffic scenarios and provide empirical conclusions about their robustness.
BibTeX
@article{ding2021multimodal,
  author = {Wenhao Ding and Baiming Chen and Bo Li and Kim Ji Eun and Ding Zhao},
  title = {{Multimodal Safety-Critical Scenarios Generation for Decision-Making Algorithms Evaluation}},
  journal = {IEEE Robotics Autom. Lett.},
  year = {2021},
  url = {https://openreview.net/forum?id=u0aevZwXZu},
}
Figure