SAFE-SIM: Safety-Critical Closed-Loop Traffic Simulation with Diffusion-Controllable Adversaries

Wei-Jer Chang, Francesco Pittaluga, Masayoshi Tomizuka, Wei Zhan, Manmohan Chandraker

TL;DR

SAFE-SIM is a novel framework that uses controllable diffusion models to generate realistic, safety-critical traffic simulations for testing autonomous vehicles. By balancing adversarial objectives with behavioral realism in a closed-loop environment, it allows researchers to stress-test driving planners against specific, plausible failure scenarios like targeted collisions.

What Problem Does This Paper Address?

Developing safe autonomous vehicles (AVs) requires testing them in "long-tail" safety-critical scenarios—rare events like near-collisions that are too dangerous to test on public roads. While simulation is the obvious solution, existing methods struggle with a fundamental trade-off:

  • Realism vs. Controllability: Rule-based simulations are controllable but often unrealistic, while data-driven models are realistic but hard to steer toward specific dangerous behaviors.
  • Static vs. Dynamic: Many adversarial generators produce static "snapshots" rather than dynamic, closed-loop environments where agents react to the AV's maneuvers.
  • Lack of Diversity: Previous methods often produce only a single adversarial outcome per scenario, failing to explore the full range of potential risks.

SAFE-SIM bridges these gaps by providing a framework that is simultaneously realistic, controllable, and interactive.

Methods

The core of SAFE-SIM is a trajectory diffusion model that generates agent behaviors by reversing a noising process. The authors introduce two key innovations to make this process controllable:

  1. Guided Diffusion: During the denoising phase, the model's predictions are perturbed using gradients from differentiable cost functions. These functions include:
  2. Adversarial Terms ($J_{adv}$): Encouraging collisions and controlling parameters like relative speed and Time-To-Collision (TTC).
  3. Regularization Terms ($J_{reg}$): Ensuring agents stay on the road (lane margin) and maintain realistic distances from other non-ego agents (Gaussian distance).
  4. Partial Diffusion: To control specific collision types (e.g., a T-bone vs. a rear-end), the authors propose starting the diffusion process not from pure noise, but from a "noisy" version of a rule-based trajectory proposal. By injecting noise at an intermediate step ($k_p$), the diffusion model "refines" a rough manual plan into a realistic, data-driven trajectory that still achieves the desired adversarial goal.
Fig. 2: Guided Diffusion Process for the Adversarial Agent. This process optimizes the adversarial agent’s trajectory using the adversarial cost function Jadv to the ego vehicle. In particular, we introduce Jcontrol to vary the adversarial behavior. Simultaneously, it applies regularization through Jreg for maintaining realism.

Datasets

The authors trained and evaluated their model on two major real-world driving datasets:

  • nuScenes: Used for primary training and validation (5.5 hours of urban driving data).
  • nuPlan: Used to test generalization (1500 hours of data). Notably, the model trained on nuScenes was evaluated on nuPlan without additional fine-tuning, demonstrating robust cross-dataset performance.

Key Insights and Ideas

  • Closed-Loop Interaction is Essential: For a safety evaluation to be valid, adversarial agents must react to the ego vehicle's evasive actions. SAFE-SIM achieves this by re-planning at 2Hz throughout the simulation.
  • The Power of Partial Diffusion: This technique acts as a "bridge" between human intent (the collision proposal) and the model's learned data distribution. It allows for precise control over the geometry of a crash without sacrificing the plausibility of the agent's motion.
  • Multi-Aspect Controllability: Unlike prior work, SAFE-SIM allows users to tune the "aggressiveness" of the simulation by adjusting weights on the TTC cost, shifting scenarios from simple near-misses to unavoidable high-speed impacts.
Comparison of methods showing SAFE-SIM's comprehensive feature set

Key Results

SAFE-SIM significantly outperforms existing baselines like STRIVE and DiffScene across several metrics:

  • Higher Collision Rates: On the nuScenes dataset, SAFE-SIM achieved a 43.2% collision rate compared to STRIVE's 36.4%, while maintaining much better realism.
  • Superior Realism: Realism was measured using the Wasserstein distance between simulated and ground-truth driving profiles. SAFE-SIM scored 0.38, nearly twice as realistic as STRIVE (0.85).
  • Generalization: When tested on the nuPlan dataset, the collision rate jumped to 80%, showcasing the framework's ability to challenge planners in diverse environments.
  • Diverse Failure Modes: The framework successfully generated a wide variety of collision types (front, side, rear) and demonstrated that increasing the TTC cost weight directly leads to more challenging, higher-rate collision scenarios.

Limitations and Future Work

The authors identify a few areas for improvement:

  • Unintended Interactions: Occasionally, an adversarial agent might unrealistically collide with a non-ego vehicle before it can reach the target ego vehicle.
  • Fault Attribution: Some generated scenarios result in collisions where the ego planner is clearly not at fault. The authors aim to focus future work on generating more scenarios where the ego vehicle's specific planning weaknesses are exposed.
  • Policy Training: A promising future direction is using SAFE-SIM's realistic adversarial scenarios as a training ground to improve the robustness of AV planners through reinforcement learning.

Summary updated

BibTeX
@inproceedings{chang2024safe,
  author = {Wei-Jer Chang and Francesco Pittaluga and Masayoshi Tomizuka and Wei Zhan and Manmohan Chandraker},
  title = {{SAFE-SIM: Safety-Critical Closed-Loop Traffic Simulation with Diffusion-Controllable Adversaries}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72664-4\_14},
}
Figure