TeraSim: Uncovering Unknown Unsafe Events for Autonomous Vehicles through Generative Simulation
Haowei Sun, Xintao Yan, Zhijie Qiao, Haojie Zhu, Yihao Sun, Jiawei Wang, Shengyin Shen, Darian Hogue, Rajanikant Ananta, Derek Johnson, Greg Stevens, Greg McGuire, Yifan Wei, Wei Zheng, Yong Sun, Yasuo Fukai, Henry X. Liu
TL;DR
TeraSim addresses the insufficiency of existing AV simulators to reliably uncover unknown unsafe events and to provide scalable, statistically sound crash-rate estimates. It combines a Naturalistic Driving Environment (NDE) with a Naturalistic and Adversarial Driving Environment (NADE) in an API-driven co-simulation framework, enabling realistic long-horizon traffic while adversarially amplifying rare but critical events. The framework demonstrates the ability to reveal hidden failure modes and to produce quantitative crash-rate metrics, validated through large-scale demonstrations with CARLA and Autoware in a real-world testing facility. By being open-source and integration-friendly, TeraSim aims to become a practical tool for researchers, developers, and policymakers to strengthen AV safety evaluation and standardization efforts.
Abstract
Traffic simulation is essential for autonomous vehicle (AV) development, enabling comprehensive safety evaluation across diverse driving conditions. However, traditional rule-based simulators struggle to capture complex human interactions, while data-driven approaches often fail to maintain long-term behavioral realism or generate diverse safety-critical events. To address these challenges, we propose TeraSim, an open-source, high-fidelity traffic simulation platform designed to uncover unknown unsafe events and efficiently estimate AV statistical performance metrics, such as crash rates. TeraSim is designed for seamless integration with third-party physics simulators and standalone AV stacks, to construct a complete AV simulation system. Experimental results demonstrate its effectiveness in generating diverse safety-critical events involving both static and dynamic agents, identifying hidden deficiencies in AV systems, and enabling statistical performance evaluation. These findings highlight TeraSim's potential as a practical tool for AV safety assessment, benefiting researchers, developers, and policymakers. The code is available at https://github.com/mcity/TeraSim.
