A Language for Autonomous Vehicles Testing Oracles

Ana Nora Evans, Mary Lou Soffa, Sebastian G. ElbaumarXiv 2020

Abstract

Testing autonomous vehicles (AVs) requires complex oracles to determine if the AVs behavior conforms with specifications and humans' expectations. Available open source oracles are tightly embedded in the AV simulation software and are developed and implemented in an ad hoc way. We propose a domain specific language that enables defining oracles independent of the AV solutions and the simulator. A testing analyst can encode safety, liveness, timeliness and temporal properties in our language. To show the expressiveness of our language we implement three different types of available oracles. We find that the same AV solutions may be ranked significantly differently across existing oracles, thus existing oracles do not evaluate AVs in a consistent manner.

Introduction

In software testing, an oracle is the mechanism that determines whether a program's output is correct. For autonomous vehicles (AVs), building an oracle is incredibly difficult. Unlike a calculator where $2+2$ must equal $4$, an AV's "output" is a complex trace of steering, braking, and acceleration commands over time.

Currently, most AV oracles are "hardcoded" into specific simulators (like CARLA or Apollo) in an ad-hoc way. This makes it nearly impossible to compare how different AV systems perform using the same criteria. If one simulator says a car passed and another says it failed, it is unclear if the car is the problem or the oracle itself. This research introduces the Oracle Definition Language (ODL), a domain-specific language designed to decouple the test oracle from the simulator and the AV software, allowing for standardized evaluation across different platforms.

The ODL Framework

The authors propose ODL to treat an oracle as a program that processes an execution trace and outputs a numeric score. The framework consists of several key abstractions:

  • Scoring Functions: These map specific behaviors in a trace to a number (e.g., subtracting points for every collision).
  • Summarizing Functions: These aggregate multiple scores into a final result.
  • Oracle Definition (OD): The combination of scoring and summarizing functions that defines a specific testing standard.
  • Scoring Oracle (SO): An interpreter that takes a raw execution trace and an OD to produce a final score.
The ODL workflow: defining an oracle, processing a trace, and generating a score.

The language is designed to support four critical types of properties: Safety (ensuring bad things don't happen), Liveness (ensuring good things eventually happen), Timeliness (measuring duration-based failures), and Temporal (checking sequences of events).

Experimental Evaluation

To validate ODL, the researchers used 474 open-source student solutions from the Udacity Self-Driving Car Engineer Nanodegree path planning project. They used a modified version of the Udacity simulator to generate execution traces and encoded the grading rubrics from three major sources into ODL:

  1. The Udacity path planning rubric.
  2. The CARLA Challenge (CVPR 2019).
  3. The Apollo (Baidu) open-source framework.

Key Insights and Results

The most striking finding is the Inconsistency Gap. When the authors ranked the 474 solutions using the three different oracles, they found that a solution ranked highly by one might be ranked poorly by another. Using the Spearman rank-order coefficient, they found that while one pair of oracles showed a strong correlation, the other two pairs had only a moderate correlation. This quantitative divergence proves that the "definition of success" varies wildly across the industry.

By separating the oracle from the simulator, ODL allows for "plug-and-play" testing. Researchers can take an oracle defined for the CARLA challenge and apply it to a trace generated in a different simulator or even from a real-world drive. Furthermore, ODL's focus on numeric ranking rather than binary pass/fail allows developers to see incremental improvements in behavior.

Limitations and Future Work

As a foundational step, ODL currently has some limitations. The exact schema required for a trace to be "ODL-compatible" needs further detailing to handle various simulator complexities. While the framework is theoretically compatible with real-world drive traces, the current evaluation was limited to simulated path-planning tasks. Future work suggests using ODL to guide the discovery of new edge cases by generating realistic execution traces that challenge specific oracle definitions.

Summary updated

BibTeX
@misc{evans2020language,
  author = {Ana Nora Evans and Mary Lou Soffa and Sebastian G. Elbaum},
  title = {{A Language for Autonomous Vehicles Testing Oracles}},
  year = {2020},
  eprint = {2006.10177},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.10177},
}
Figure