AdvDiffuser: Generating Adversarial Safety-Critical Driving Scenarios via Guided Diffusion

Yuting Xie, Xianda Guo, Cong Wang, Kunhua Liu, Long Chen

Abstract

Safety-critical scenarios are infrequent in natural driving environments but hold significant importance for the training and testing of autonomous driving systems. The prevailing approach involves generating safety-critical scenarios automatically in simulation by introducing adversarial adjustments to natural environments. These adjustments are often tailored to specific tested systems, thereby disregarding their transferability across different systems. In this paper, we propose AdvDiffuser, an adversarial framework for generating safety-critical driving scenarios through guided diffusion. By incorporating a diffusion model to capture plausible collective behaviors of background vehicles and a lightweight guide model to effectively handle adversarial scenarios, AdvDiffuser facilitates transferability. Experimental results on the nuScenes dataset demonstrate that AdvDiffuser, trained on offline driving logs, can be applied to various tested systems with minimal warm-up episode data and outperform other existing methods in terms of realism, diversity, and adversarial performance.

Introduction

The development of robust Autonomous Vehicles (AVs) relies heavily on exposure to safety-critical scenarios—rare, "long-tail" events such as near-misses or collisions. Because these events occur infrequently in real-world driving data, researchers turn to simulation to generate adversarial scenarios. However, existing generation methods often struggle with a trade-off between realism and adversariness. Scenarios designed to challenge an AV often result in physically impossible or "robotic" behaviors that do not translate to real-world safety. Furthermore, many generators are overfitted to specific AV planners, losing their effectiveness when the underlying AV software changes.

The AdvDiffuser Framework

AdvDiffuser addresses these challenges by decoupling the generation of realistic driving behavior from the objective of creating adversarial scenarios. The framework utilizes a Guided Diffusion Model consisting of three primary components:

1. The Diffusion Model

Trained on large-scale offline driving data (e.g., the nuScenes dataset), the diffusion model learns the latent space of natural multi-agent interactions. By performing a reverse diffusion process, the model transforms random noise into plausible trajectories for background vehicles. Unlike models that diffuse directly on raw coordinates—which often result in "averaged" or non-diverse behaviors—AdvDiffuser operates in a learned latent space to preserve the richness and diversity of real-world driving.

2. The Reward Guide

To introduce adversariness without compromising realism, AdvDiffuser employs a lightweight "Reward Guide" based on a Deep Q-Network (DQN) architecture. This guide injects a collision-reward gradient into the diffusion process. By nudging the generated trajectories toward adversarial outcomes during the sampling phase, the framework ensures the scenarios remain challenging for the AV under test while staying within the bounds of realistic behavior.

3. Architecture and Feasibility

The system utilizes a Graph Neural Network (GNN) context encoder to model complex vehicle interactions and an autoregressive trajectory decoder. To ensure that the generated paths are physically feasible, the decoder incorporates a kinematic bicycle model, ensuring the output adheres to the constraints of vehicle dynamics.

Experimental Evaluation

The researchers evaluated AdvDiffuser using the nuScenes dataset, utilizing 1,000 driving scenes split into 8-second segments (2 seconds of history to predict 6 seconds of future behavior).

Realism and Diversity

AdvDiffuser achieved significantly lower Jensen-Shannon Divergence (JSD) scores for velocity and acceleration compared to baseline methods. This indicates that the generated traffic behavior closely mirrors real-world data distributions, avoiding the "robotic" artifacts common in other adversarial generators.

Adversarial Performance and Transferability

While maintaining high realism, AdvDiffuser achieved a collision rate of approximately 11% against rule-based planners. A key strength of the framework is its few-shot adaptation capability. AdvDiffuser can adapt to a previously unseen AV planner in fewer than 100 "warm-up" steps, significantly outperforming traditional reinforcement learning methods that require thousands of interactions. In cross-planner tests (e.g., training against a rule-based planner and testing against a neural-network-based SimNet planner), AdvDiffuser maintained stable attack performance, whereas competing methods often saw significant performance degradation.

Efficiency

Unlike optimization-based baselines that require slow, iterative re-planning, AdvDiffuser can generate scenarios at frequencies exceeding 10Hz. This efficiency makes it a viable tool for large-scale, automated AV testing pipelines.

Discussion and Limitations

AdvDiffuser represents a significant step toward scalable and realistic adversarial testing. However, the authors note certain limitations:

  • Environmental Noise: The model occasionally struggles with static objects, such as parked cars, which can lead to misclassified "collisions" with the environment.
  • Likelihood vs. Severity: There remains a conceptual challenge in distinguishing between high-probability hazards and physically impossible ones.
  • Future Work: Future iterations may extend the framework to include more diverse agents, such as pedestrians and cyclists, and explore the use of these scenarios for training more robust AV planners.

Conclusion

By leveraging guided diffusion to separate realism from adversarial intent, AdvDiffuser provides a flexible, efficient, and highly transferable framework for AV safety testing. Its ability to generate diverse, plausible, and challenging scenarios with minimal adaptation data offers a promising path forward for validating autonomous systems in the face of rare but critical edge cases.

Summary updated

Abstract

Safety-critical scenarios are infrequent in natural driving environments but hold significant importance for the training and testing of autonomous driving systems. The prevailing approach involves generating safety-critical scenarios automatically in simulation by introducing adversarial adjustments to natural environments. These adjustments are often tailored to specific tested systems, thereby disregarding their transferability across different systems. In this paper, we propose AdvDiffuser, an adversarial framework for generating safety-critical driving scenarios through guided diffusion. By incorporating a diffusion model to capture plausible collective behaviors of background vehicles and a lightweight guide model to effectively handle adversarial scenarios, AdvDiffuser facilitates transferability. Experimental results on the nuScenes dataset demonstrate that AdvDiffuser, trained on offline driving logs, can be applied to various tested systems with minimal warm-up episode data and outperform other existing methods in terms of realism, diversity, and adversarial performance.
BibTeX
@inproceedings{xie2024advdiffuser,
  author = {Yuting Xie and Xianda Guo and Cong Wang and Kunhua Liu and Long Chen},
  title = {{AdvDiffuser: Generating Adversarial Safety-Critical Driving Scenarios via Guided Diffusion}},
  booktitle = {IEEE/RSJ International Conference on Intelligent Robots and Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=zRp9yuwWLM},
}
Figure