Testing the Safety of Self-driving Vehicles by Simulating Perception and Prediction

Kelvin Wong, Qiang Zhang, Ming Liang, Bin Yang, Renjie Liao, Abbas Sadat, Raquel Urtasun

Abstract

We present a novel method for testing the safety of self-driving vehicles in simulation. We propose an alternative to sensor simulation, as sensor simulation is expensive and has large domain gaps. Instead, we directly simulate the outputs of the self-driving vehicle’s perception and prediction system, enabling realistic motion planning testing. Specifically, we use paired data in the form of ground truth labels and real perception and prediction outputs to train a model that predicts what the online system will produce. Importantly, the inputs to our system consists of high definition maps, bounding boxes, and trajectories, which can be easily sketched by a test engineer in a matter of minutes. This makes our approach a much more scalable solution. Quantitative results on two large-scale datasets demonstrate that we can realistically test motion planning using our simulations.

Introduction

Ensuring the safety of self-driving vehicles (SDVs) requires rigorous testing of the motion planner—the module responsible for deciding where to drive. Traditionally, simulation testing relies on either "perfect" ground-truth data or full sensor simulation. Perfect perception is unrealistic because real-world sensors are noisy and prone to misdetections, while sensor simulation (e.g., simulating raw LiDAR or camera data) is computationally expensive and suffers from a significant "domain gap" where simulated data doesn't perfectly match real-world inputs.

The proposed simulation stack (bottom) bypasses raw sensor simulation by directly modeling the outputs of the perception and prediction (P&P) modules.

This paper introduces ContextNoise, a method that bridges this gap by directly simulating the noisy outputs of perception and prediction (P&P) systems. By modeling the system's output rather than raw sensor data, engineers can test motion planners against realistic, imperfect data without the overhead of sensor simulation.

Methods

The authors evaluate a hierarchy of noise models, starting from simple baselines like GaussianNoise (random jitters) and MultimodalNoise to more sophisticated state-based models like ActorNoise. However, these models often fail to capture systemic errors caused by environmental geometry.

The core contribution, ContextNoise, is a deep learning model designed to capture environmental context. It utilizes a shared CNN backbone that processes several key input representations:

  • Occupancy Masks: Historical and future actor positions.
  • Occlusion Maps: Areas hidden from the SDV's sensors, calculated via ray-casting to identify blind spots.
  • HD Maps: Structural information like lane boundaries and drivable areas.
The ContextNoise architecture uses a CNN backbone and specialized heads to simulate perception (bounding boxes) and prediction (trajectories) based on contextual input.

The architecture employs a dense perception head to predict bounding boxes—including false positives and negatives—and a prediction head to generate the future trajectories the online system would likely produce for those objects. This allows the model to simulate complex errors like mislocalization and misclassification that simple jitter models miss.

Key Results

The models were trained and evaluated on two massive, real-world datasets: nuScenes and ATG4D. The results highlight several key insights:

  • Fidelity: On the nuScenes dataset, ContextNoise achieved a 72.2% Average Precision (AP) in simulating the perception system's detections, significantly outperforming simpler noise models.
  • Motion Planning Realism: When testing a learnable motion planner, ContextNoise reduced the error ($\ell_2$ distance) between simulated and real-world trajectories by 41.1% compared to using "perfect" ground-truth data.
  • Safety Metrics: ContextNoise was far more accurate at predicting when a motion planner would cause a collision in the real world, achieving a 65.1% IoU on collision scenarios, whereas "perfect" perception only managed 52.9%.

Conclusion

The results demonstrate that perception errors are systemic rather than random. Contextual factors like occlusion are critical; for instance, a pedestrian is much more likely to be missed if they are behind a parked truck. By capturing these nuances, ContextNoise allows for more realistic stress-testing of SDV planners. While the model currently treats the P&P system as a black box, it represents a major step toward scalable safety certification, potentially allowing for the generation of thousands of "near-miss" scenarios to test planners before they hit public roads.

Summary updated

Abstract

We present a novel method for testing the safety of self-driving vehicles in simulation. We propose an alternative to sensor simulation, as sensor simulation is expensive and has large domain gaps. Instead, we directly simulate the outputs of the self-driving vehicle’s perception and prediction system, enabling realistic motion planning testing. Specifically, we use paired data in the form of ground truth labels and real perception and prediction outputs to train a model that predicts what the online system will produce. Importantly, the inputs to our system consists of high definition maps, bounding boxes, and trajectories, which can be easily sketched by a test engineer in a matter of minutes. This makes our approach a much more scalable solution. Quantitative results on two large-scale datasets demonstrate that we can realistically test motion planning using our simulations.
BibTeX
@inproceedings{wong2020testing,
  author = {Kelvin Wong and Qiang Zhang and Ming Liang and Bin Yang and Renjie Liao and Abbas Sadat and Raquel Urtasun},
  title = {{Testing the Safety of Self-driving Vehicles by Simulating Perception and Prediction}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  url = {https://openreview.net/forum?id=BGdydRHQCxu},
}
Figure