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

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

Introduction

Testing autonomous vehicles (AVs) in real-world environments is inherently risky, particularly when evaluating performance in "long-tail" or safety-critical events. While simulation offers a safer alternative, existing tools often struggle with a "trilemma" of realism, controllability, and closed-loop interaction. Many simulators rely on rigid, hand-coded rules or "open-loop" trajectories where background agents fail to react to the AV's maneuvers.

Safe-Sim addresses these challenges by utilizing guided diffusion models to generate realistic, reactive, and controllable adversarial traffic scenarios. This framework enables "closed-loop" testing where adversarial agents dynamically respond to the AV's actions, allowing for a rigorous stress-test of planning algorithms.

Overview of the Safe-Sim framework, showing the closed-loop interaction between the ego planner and controllable adversarial agents.

Methodology: Guided Trajectory Diffusion

Safe-Sim leverages Trajectory Diffusion Models, trained on extensive real-world driving datasets (nuScenes and nuPlan), to capture the distribution of realistic human driving behavior. The core innovation lies in steering the denoising process of these models using specific guidance functions.

Adversarial and Regularization Guidance

During the trajectory generation phase, the model is guided by a composite cost function $J(\tau)$ that balances two opposing forces:

  • Adversarial Term ($J_{adv}$): Encourages the agent to collide with the AV planner by optimizing for specific relative speeds and "time-to-collision" metrics.
  • Regularization Term ($J_{reg}$): Ensures the agent stays on the road, follows traffic rules, and avoids colliding with non-adversarial vehicles using a novel Gaussian distance penalty that accounts for vehicle heading.
The Adv. Car Guided Diffusion process, illustrating how guidance functions steer the denoising steps to produce realistic adversarial trajectories.

Partial Diffusion for Scenario Control

To provide "director-level" control over collision types (e.g., front, side, or rear), Safe-Sim employs Partial Diffusion. Instead of starting from pure noise, the process begins with a rule-based "proposal" path. Controlled noise is added and then refined by the diffusion model, preserving the intended collision type while ensuring the final execution remains realistic and smooth.

Key Insights and Results

Safe-Sim was evaluated against state-of-the-art AV planners on the nuScenes and nuPlan datasets. Key findings include:

  • Enhanced Rigor: Closed-loop adversaries proved significantly harder for planners to avoid compared to traditional open-loop models, which smart planners can easily dodge.
  • Superior Performance: On nuScenes, Safe-Sim achieved a 43.2% collision rate, outperforming baselines like STRIVE and DiffScene while maintaining significantly higher realism scores.
  • Robust Generalization: Models trained on nuScenes demonstrated zero-shot generalization to the nuPlan dataset, indicating the robustness of the learned driving logic across different cities.
  • Precise Control: The framework successfully generated specific failure modes, providing developers with a diverse library of test cases to analyze and improve planner resilience.

Conclusion

Safe-Sim represents a significant step forward in safety-critical AV simulation by combining the realism of diffusion models with fine-grained adversarial control. By providing a reactive environment that "pushes back," it offers a powerful tool for identifying the limits of current AV planners. Future research will focus on using Safe-Sim for adversarial training to develop more resilient autonomous systems.

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