Abstract
The field of Autonomous Driving (AD) has witnessed significant progress in recent years. Among the various challenges faced, the safety evaluation of autonomous vehicles (AVs) stands out as a critical concern. Traditional evaluation methods are both costly and inefficient, often requiring extensive driving mileage in order to encounter rare safety-critical scenarios, which are distributed on the long tail of the complex real-world driving landscape. In this paper, we propose a unified approach, Diffusion-Based Safety-Critical Scenario Generation (DiffScene), to generate high-quality safety-critical scenarios which are both realistic and safety-critical for efficient AV evaluation. In particular, we propose a diffusion-based generation framework, leveraging the power of approximating the distribution of low-density spaces for diffusion models. We design several adversarial optimization objectives to guide the diffusion generation under predefined adversarial budgets. These objectives, such as safety-based objective, functionality-based objective, and constraint-based objective, ensure the generation of safety-critical scenarios while adhering to specific constraints. Extensive experimentation has been conducted to validate the efficacy of our approach. Compared with 6 SOTA baselines, DiffScene generates scenarios that are (1) more safety-critical under 3 metrics, (2) more realistic under 5 distance functions, and (3) more transferable to different AV algorithms. In addition, we demonstrate that training AV algorithms with scenarios generated by DiffScene leads to significantly higher performance in terms of the safety-critical metrics compared to baselines. These findings highlight the potential of DiffScene in addressing the challenges of AV safety evaluation, paving the way for safer AV development.
Introduction: The Challenge of the "Long Tail"
Safety evaluation remains the "holy grail" of autonomous driving. While modern AVs perform admirably in standard traffic conditions, their reliability in rare, high-risk situations—the "long tail" of the driving distribution—is much harder to verify. Scenarios such as a vehicle running a red light or an unexpected high-speed cut-in are infrequent in real-world data but represent the most significant threats to passenger safety.
Currently, the industry relies on massive real-world mileage or simulation-based testing. However, real-world testing is prohibitively expensive and inefficient; one might drive 100,000 miles before encountering a single near-miss. Conversely, existing simulation tools often produce "unnatural" behaviors. Rule-based generators are too rigid to capture the complexity of real driving, while traditional generative models like GANs or VAEs often struggle to balance realism with the specific goal of generating controlled, safety-critical events.
The DiffScene Framework
To address these limitations, we introduce DiffScene, a framework that treats safety-critical scenario generation as a guided denoising process. By leveraging the strengths of diffusion models, DiffScene can approximate the distribution of low-density spaces, effectively "sampling" from the rare events that traditional methods miss.
Diffusion Foundation
The core of DiffScene is a diffusion model trained on a large dataset of "benign" (normal) driving trajectories. This training allows the model to learn the underlying manifold of realistic driving behavior. By starting with random noise and gradually denoising it, the model can generate trajectories that are physically plausible and consistent with traffic norms.
Guided Adversarial Optimization
The innovation of DiffScene lies in its ability to "steer" this denoising process. During each step of the denoising sequence, the framework applies adversarial guidance. It calculates the gradient of a specific objective function and uses it to nudge the evolving trajectory toward a safety-critical outcome.
The guidance is governed by a triple-objective function:
- Safety-based Objective: Encourages the surrounding vehicle (SV) to move into a position that leads to a collision or near-miss with the "ego" vehicle (the AV being tested).
- Functionality-based Objective: Aims to disrupt the AV's primary goals, such as preventing it from completing its planned route.
- Constraint-based Objective: Acts as a regularizer, ensuring the SV adheres to physical laws (e.g., maximum acceleration) and traffic rules, preventing "teleporting" or other unrealistic artifacts.
Experimental Setup
We evaluated DiffScene using the CARLA Simulator, a high-fidelity environment for autonomous driving research. Our training data consisted of nearly 7,000 benign trajectories collected from Reinforcement Learning (RL) agents. We focused on three high-stakes pre-crash templates defined by the National Highway Traffic Safety Administration (NHTSA):
- S1 (Crossing Negotiation): Vehicles meeting at an intersection.
- S2 (Red-light Running): A vehicle violating traffic signals.
- S3 (Right-turn): Conflicts during turning maneuvers.
To demonstrate the framework's versatility, we also successfully applied it to aircraft scenarios using NASA’s GUAM Simulator.
Key Results and Discussion
DiffScene significantly outperforms six state-of-the-art baselines across multiple dimensions.
Effectiveness in Generating Critical Scenarios
As shown in the experimental results, DiffScene achieves substantially higher collision rates (CR) than competing methods. For the "Red-light Running" (S2) scenario, DiffScene achieved an 87% collision rate, compared to 73% for the strongest baseline (ST).
Naturalness and Realism
A critical advantage of DiffScene is its ability to maintain realism while being adversarial. Using metrics such as Frechet Distance and Dynamic Time Warping (DTW), we found that DiffScene's trajectories were much closer to real-world benign data than those generated by adversarial RL or rule-based methods. This "naturalness" ensures that the discovered vulnerabilities are relevant to real-world driving.
Transferability and Downstream Utility
Scenarios generated by DiffScene exhibit high transferability. An attack designed for one AV algorithm (e.g., SAC) often successfully causes failures in others (e.g., PPO or TD3), indicating that DiffScene identifies fundamental safety weaknesses. Furthermore, we demonstrated that training AV agents on data generated by DiffScene leads to significantly more robust models, highlighting its value for both testing and improvement.
Conclusion and Future Work
DiffScene represents a significant step forward in AV safety evaluation. By combining the generative power of diffusion models with targeted adversarial guidance, it provides a scalable way to explore the "long tail" of driving risks.
Future work will focus on the inherent trade-off between safety-criticality and naturalness, as pushing for higher collision rates can sometimes lead to less realistic behaviors. Additionally, we aim to scale the framework to more complex multi-agent environments involving pedestrians, cyclists, and dense urban traffic.
Summary updated