Safety-Critical Scenario Generation Via Reinforcement Learning Based Editing

Haolan Liu, Liangjun Zhang, Siva Kumar Sastry Hari, Jishen Zhao

Abstract

Generating safety-critical scenarios is essential for testing and verifying the safety of autonomous vehicles. Traditional optimization techniques suffer from the curse of dimensionality and limit the search space to fixed parameter spaces. To address these challenges, we propose a deep reinforcement learning approach that generates scenarios by sequential editing, such as adding new agents or modifying the trajectories of the existing agents. Our framework employs a reward function consisting of both risk and plausibility objectives. The plausibility objective leverages generative models, such as a variational autoencoder, to learn the likelihood of the generated parameters from the training datasets; It penalizes the generation of unlikely scenarios. Our approach overcomes the dimensionality challenge and explores a wide range of safety-critical scenarios. Our evaluation demonstrates that the proposed method generates safety-critical scenarios of higher quality compared with previous approaches.

Introduction

The "long-tail problem" remains a significant barrier to the widespread deployment of autonomous vehicles (AVs). While current AV systems perform reliably in standard driving conditions, they often struggle with rare, high-risk "corner cases"—such as sudden lane cuts or stalled vehicles in intersections. Since these events are infrequent in real-world datasets, synthetic generation is required for robust safety validation.

Existing generation methods typically frame this as a "black-box" optimization problem, tweaking a fixed set of parameters to induce collisions. However, these methods often fall victim to the curse of dimensionality and are restricted to static agent counts. Furthermore, the resulting scenarios frequently lack physical plausibility, rendering them ineffective for meaningful testing.

Methodology

We propose a Reinforcement Learning (RL)-based editing framework that constructs safety-critical scenarios through a sequence of discrete modifications rather than a single joint optimization.

The RL-based editing framework architecture, showing the iterative optimization loop between the policy network, simulator, and generative model.

Sequential Editing Actions

A Deep Reinforcement Learning (DRL) agent, trained using Proximal Policy Optimization (PPO), learns to modify scenarios via four primary actions:

  • PerturbAgent: Adjusts the trajectory of an existing vehicle.
  • AddAgent: Introduces a new vehicle into the environment.
  • Reconfigure: Resamples the entire trajectory for a traffic participant.
  • Undrivable: Places static obstacles, such as construction zones or parked buses.
Illustration of the various editing actions available to the RL agent, including perturbing paths, adding agents, and reconfiguring trajectories.

Reward Function: Risk and Plausibility

To ensure scenarios are both challenging and realistic, we employ a dual-objective reward function:

  1. Risk Model (Anchor Approach): Instead of simple distance metrics, we discretize the AV’s potential paths into "anchors." Risk is quantified by the number of safe anchors eliminated by the edits. A high-quality scenario is one that significantly restricts the AV's escape routes without being inherently unsolvable.
  2. Plausibility Control: A Conditional Variational Autoencoder (CVAE), trained on the Argoverse Motion Forecasting Dataset, provides a likelihood score for proposed edits. This penalizes unrealistic behaviors (e.g., lateral sliding), ensuring the generated agents behave like human drivers.

Results

The framework was evaluated using the Argoverse dataset and the highway-env simulator, comparing it against Bayesian Optimization (BO) and STRIVE (the previous state-of-the-art).

  • Effectiveness: The proposed method achieved a collision rate of 7.8%, an 80% improvement over STRIVE’s 4.3%.
  • Fidelity: Despite increased risk, the scenarios remained highly realistic. The L2 deviation from human-like trajectories was 1.72, significantly lower than STRIVE (1.93) and BO (9.81).
  • Compliance: Traffic rule violations were minimal (1.6%), indicating that the adversarial agents behaved like reckless humans rather than simulation artifacts.

Conclusion and Future Work

By framing scenario generation as a sequential editing task, we effectively bypass the dimensionality constraints of traditional methods. Our approach produces diverse, high-risk, and plausible corner cases that significantly outperform existing baselines. Future research will focus on expanding the agent library to include pedestrians and cyclists, as well as integrating the framework into high-fidelity simulators like CARLA to further validate AV safety in complex urban environments.

Summary updated

Abstract

Generating safety-critical scenarios is essential for testing and verifying the safety of autonomous vehicles. Traditional optimization techniques suffer from the curse of dimensionality and limit the search space to fixed parameter spaces. To address these challenges, we propose a deep reinforcement learning approach that generates scenarios by sequential editing, such as adding new agents or modifying the trajectories of the existing agents. Our framework employs a reward function consisting of both risk and plausibility objectives. The plausibility objective leverages generative models, such as a variational autoencoder, to learn the likelihood of the generated parameters from the training datasets; It penalizes the generation of unlikely scenarios. Our approach overcomes the dimensionality challenge and explores a wide range of safety-critical scenarios. Our evaluation demonstrates that the proposed method generates safety-critical scenarios of higher quality compared with previous approaches.
BibTeX
@inproceedings{liu2024safety,
  author = {Haolan Liu and Liangjun Zhang and Siva Kumar Sastry Hari and Jishen Zhao},
  title = {{Safety-Critical Scenario Generation Via Reinforcement Learning Based Editing}},
  booktitle = {IEEE International Conference on Robotics and Automation},
  year = {2024},
  url = {https://openreview.net/forum?id=gE3QBPaWNw},
}
Figure