From Particles to Perils: SVGD-Based Hazardous Scenario Generation for Autonomous Driving Systems Testing
Simulation-based testing of autonomous driving systems (ADS) must reveal realistic, diverse failures that arise from dense traffic and complex interactions among heterogeneous dynamic obejcts (vehicles, cyclists, and pedestrians). The effectiveness of ADS testing is highly sensitive to the choice of initial conditions (seeds). However, existing search-based seeding approaches (e.g., genetic algorithms) struggle in the high-dimensional spaces induced by dense and heterogeneous traffic, collapsing into a limited set of modes and leaving many realistic failure scenarios undiscovered.
We present PtoP, a novel framework for testing autonomous driving systems. At its core, PtoP couples adaptive random seed generation—which produces seeds that hit diverse initial failure modes—with Stein Variational Gradient Descent (SVGD) to explore diverse, failure-inducing initial conditions. Each particle represents the initial state of a dynamic object. SVGD jointly leverages gradient-driven attraction toward high-hazard regions and kernel-mediated repulsion to maintain diversity among particles, producing risk-seeking yet well-distributed seeds that span multiple distinct failure modes. Beyond seed generation, PtoP serves as a plug-and-play framework that integrates seamlessly with online testing techniques (e.g., reinforcement learning–based testers) and, by providing principled seeds, boosts their overall testing effectiveness. We evaluate PtoP in CARLA—a state-of-the-art simulator—on two autonomous driving systems: an industry-grade stack (Apollo) and an end-to-end ADS native to CARLA. When combined with state-of-the-art baselines, PtoP substantially increases the safety-violation rate (by up to 27.68%), scenario diversity (by up to 9.6%), and map coverage (by up to 16.78%) over the baselines. Our framework and all associated data are available at https://anonymous.4open.science/r/PtoP-75B3.