BehAVExplor:Behavior Diversity Guided Testing for Autonomous Driving Systems

Authors: Mingfei Cheng, Yuan Zhou and Xiaofei Xie

Workflow of BehAVExplor

Figure 1. Overview of BehAVExplor workflow

Figure 1 is the overview of BehAVExplor workflow. Like a general fuzzer, BehAVExplor maintains a seed input corpus that stores "interesting" seed inputs that are helpful in identifying failed or diverse test cases. At each iteration, BehAVExplor adopts an Energy mechanism to select a seed with higher energy from the input corpus. The energy of a seed quantifies how well it can generate failed test cases. Then an adaptive mutation strategy is proposed to generate new test cases by mutating the selected seed. 

To search for diverse and critical test cases, BehAVExplor defines the behavior diversity and scenario criticality as the fuzzing feedback to select "interesting" test cases that can increase the diversity or violation degree. Specifically, the new mutants will be fed into the target ADS that generates observation traces. BehAVExplor characterizes the behavior of each mutant through BehaviorMiner. The diversity is measured based on the difference between the behavior of the new input and the behaviors of existing seeds in the seed corpus. Moreover, the general violation functions (e.g., collision, hitting illegal lines) regarding AV failures are defined to evaluate the criticality of the mutant. The mutants with new behaviors or better violation degrees will be added to the input corpus.

Statistical Measures in BehaviorMiner

In BehaviorMiner, we obtain a merged state from a state sequence by using eight different statistical measures, which is represented as eq (6) in our paper. Given a time sequence x, details of these eight statistical measures are explained as follows:

Four Functional Scenarios

We run BehavAVExplor on the following four functional scenarios related to intersections and roads in the real world:

The illustration of these four functional scenarios are shown in below figures. During test in this scenarios, the start and destination of Ego (Red route line) are not changed, and the trace of each NPC vehicle is not fixed.

S1 Go straight through an intersection

S3 Follow a lane at a straight road

S2 Turn left at an intersection

S4 Change lanes at a straight road

Violations Discovered by BehAVExplor

This picture shows abstract violation patterns discovered by BehAVExplor. The red vehicle is the ego, and the black vehicles are NPC. The explanation of each abstract violation can be found at our paper.

Examples of Each Violation Pattern

R1: Collision Avoidance

R1-1 No Prediction of Partially Occluded Vehicles

R1-3 Collision with a temporary stopping vehicle

R1-5 Collisions in aggressive lane-changing behavior

R1-7 Rear-end collision with large vehicles

R1-2 No motion prediction of low-speed vehicles

R1-4 Collision with a suddenly changed vehicle

R1-6 Rear-end collisions during lane changing

R1-8 Wrong motion prediction of NPC vehicles

R2: Not Hitting Illegal Lines

R2-1 Overtaking with slow heading recovery

R2-3 Wrong overtaking direction

R2-2 Aggressive overtaking 

R2-4 Sharp turning

R3: Reaching Destination

R3-1 No overtaking action

R3-3 Late lane changing

R3-2 Wrong overtaking decision

R3-4 Deadlock with NPC vehicles

Project

Customed LGSVL: Google Driver

Source Code of BehAVExplor: Github