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.

TL;DR

Testing self-driving car motion planners in simulation usually relies on either computationally expensive sensor rendering or unrealistic "perfect" perception. This paper introduces a scalable alternative: a neural network that directly simulates the realistic, noisy outputs of a perception and prediction system from simple scene sketches. By accurately modeling errors like misdetections and trajectory mispredictions, this approach enables highly realistic and cost-effective safety testing for autonomous vehicles.

Introduction

To safely deploy self-driving vehicles (SDVs), engineers must rigorously test their motion planners in simulation. Currently, there are two main ways to do this, and both have major flaws.

The first is sensor simulation, which involves generating synthetic LiDAR, radar, and camera data to feed into the car's software. This is computationally expensive, requires massive teams of 3D artists to build virtual worlds, and still suffers from a "domain gap" where simulated data doesn't perfectly match real-world physics.

The second, more common approach is to bypass sensors and feed the motion planner "perfect" ground-truth data (e.g., the exact bounding boxes and future paths of all nearby cars). However, this is dangerously unrealistic. Real perception systems make mistakes—they hallucinate objects (false positives), miss occluded pedestrians (false negatives), and misjudge future trajectories. If a simulator assumes perfect perception, it will never test how the SDV reacts to these very real, safety-critical errors. The authors aim to bridge this gap by simulating the flaws of the perception system without the overhead of simulating raw sensors.

Methodology

The authors propose bypassing raw sensor simulation entirely. Instead, they simulate the outputs of the perception and prediction (P&P) stack. This approach allows for a more direct and scalable way to test the motion planner under realistic conditions.

The proposed simulation stack directly simulates perception and prediction outputs, bypassing expensive sensor simulation.

They evaluate several perturbation models, starting from simple Gaussian noise applied to bounding boxes, up to their novel deep learning model called ContextNoise. ContextNoise is a convolutional neural network (CNN) that takes a lightweight, easily sketchable representation of a traffic scenario. Specifically, it ingests Bird's Eye View (BEV) rasterized images containing HD maps, actor occupancy masks, and occlusion masks.

The ContextNoise architecture uses a shared backbone and specialized heads to generate realistic perception and prediction noise.

As shown in the architecture diagram, the model processes these inputs through a shared backbone to extract features, followed by two specialized heads:

  1. Perception Head: Predicts dense bounding boxes and detection scores using a 1x1 convolution layer. This dense parameterization naturally allows the model to simulate false positives and false negatives.
  2. Prediction Head: Uses a multi-layer perceptron (MLP) to forecast future waypoints for the simulated detections.

By training this model on the actual outputs of a real P&P system (Uber's PnPNet), ContextNoise learns to mimic the systemic errors and noise patterns of the real autonomy stack.

Experimental Evaluation

The model was evaluated on two large-scale datasets: nuScenes, a public dataset containing 1,000 traffic scenarios from Boston and Singapore, and ATG4D, a large-scale proprietary dataset from Uber ATG containing 6,500 challenging scenarios across North America.

Key Insights

  • Simple noise is insufficient: Applying basic statistical noise (like Gaussian or Multimodal noise) to ground-truth actors actually performs worse than assuming perfect perception. Real P&P errors are highly dependent on the environment and the actor's state.
  • Context is essential: Incorporating HD maps and occlusion masks drastically improves the realism of the simulated noise. For example, a pedestrian heavily occluded by a parked car is much more likely to be missed by a real perception system. ContextNoise learns these spatial relationships and accurately simulates the resulting false negatives.
  • Realistic noise changes planner behavior: When tested with perfect perception, motion planners often safely navigate scenarios that would actually cause collisions in the real world due to perception delays or errors. By injecting realistic P&P noise, the simulator can successfully trigger and identify these hidden collision scenarios.

Key Results

On the ATG4D dataset, ContextNoise achieved 91.8% Average Precision (AP) for vehicles, significantly outperforming the "NoNoise" perfect-perception baseline (71.7%). Furthermore, it proved superior at identifying collision scenarios, achieving a Collision Simulation IoU of 65.1% for a machine-learning-based planner, compared to just 52.9% for the baseline.

Conclusion

While ContextNoise represents a significant step forward in scalable safety testing, it currently requires training on the outputs of a specific target perception system. If the underlying autonomy stack is updated, the simulation model may need retraining. Future work will focus on making these noise models more generalized and adaptable to rapidly evolving perception architectures.

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},
}

Loading related content...

Figure