BehAVExplor: Behavior Diversity Guided Testing for Autonomous Driving Systems

Mingfei Cheng, Yuan Zhou, Xiaofei Xie · DOI

Abstract

Testing Autonomous Driving Systems (ADS) effectively requires navigating an infinite search space of traffic scenarios to find safety-critical edge cases. Traditional fuzzing methods often converge on redundant violations, wasting computational resources. This paper presents BehAVExplor, a behavior-guided fuzzing framework that prioritizes behavioral diversity to discover a wider range of unique safety violations. By employing an unsupervised learning pipeline to cluster vehicle maneuvers into abstract states, BehAVExplor balances the exploration of novel behaviors with the exploitation of high-risk scenarios. Experimental results on the Baidu Apollo 6.0 platform demonstrate that BehAVExplor identifies 61.8% more total violations and significantly more unique failure patterns compared to state-of-the-art baselines.

Introduction

The validation of Autonomous Driving Systems (ADS) is a critical bottleneck in their deployment. While high-fidelity simulators like LGSVL and CARLA enable large-scale virtual testing, the primary challenge lies in scenario generation. Existing testing tools, such as AVFuzzer and SAMOTA, typically optimize for a single objective: maximizing a "fitness" score related to safety violations (e.g., minimizing distance to an obstacle).

However, this objective-driven approach often leads to "local optima" in the scenario space. A fuzzer might find hundreds of variations of a simple rear-end collision while failing to explore complex intersection deadlocks or subtle perception errors. This redundancy limits the utility of testing for engineers who need to diagnose diverse software bugs. BehAVExplor addresses this by introducing behavior diversity as a guiding metric, ensuring the fuzzer explores the full breadth of possible vehicle interactions.

Methodology: The BehAVExplor Framework

BehAVExplor is designed as a closed-loop fuzzing system that integrates behavior mining with adaptive mutation strategies. The framework consists of three core modules: BehaviorMiner, Diversity & Violation Feedback, and an Energy-based Mutation mechanism.

The architecture of BehAVExplor, showing the loop between the Input Corpus, Seed Selection/Mutation, Virtual Testing, and BehaviorMiner feedback.

BehaviorMiner

To quantify "behavior," BehAVExplor uses an unsupervised pipeline called BehaviorMiner. It processes the raw telemetry of the "ego" vehicle through three stages:

  1. State Interpolation: Sparse simulator data is smoothed into uniform time steps to ensure consistency across different simulation runs.
  2. State Merging: A sliding window captures temporal features, such as acceleration and turning rates, allowing the system to distinguish between different driving intents (e.g., braking for a pedestrian vs. stopping at a red light).
  3. State Abstraction: Using K-Means clustering, these temporal features are mapped to "abstract states." A full driving trace is thus reduced to a sequence of state IDs, which can be compared using metrics like Hamming distance.

Diversity and Violation Feedback

The system maintains a seed corpus and evaluates new test cases based on two criteria:

  • Diversity Score: The distance between the current test's abstract trace and existing traces in the corpus.
  • Violation Degree: A fitness score representing how close the vehicle came to a safety violation (e.g., minimum distance to NPCs).

Energy Mechanism and Adaptive Mutation

A key insight of the authors is the negative correlation between behavior diversity and violation fitness (Pearson coefficient ~ -0.25). To manage this conflict, BehAVExplor uses an "energy" mechanism.

  • Low-energy seeds (diverse but far from crashing) receive Route Mutation, which drastically alters NPC paths to explore new scenario structures.
  • High-energy seeds (near-misses) receive Waypoint Mutation, fine-tuning NPC speeds and positions to trigger a specific violation.

Experimental Evaluation

The framework was evaluated using the production-grade Baidu Apollo 6.0 stack within the LGSVL 2021.3 simulator. The researchers tested four representative scenarios (S1-S4) involving intersections, lane following, and lane changes. BehAVExplor was compared against three baselines: Random testing, AVFuzzer, and SAMOTA.

Key Results

BehAVExplor significantly outperformed all baselines in both the quantity and quality of discovered violations.

Comparison of BehAVExplor against baselines across four scenarios (S1-S4), showing total and unique violations for different safety requirements (R1-R3).

As shown in the results table, BehAVExplor found an average of 61.8% more total violations than AVFuzzer. More importantly, it identified 16 unique violation patterns, including complex failures like "Wrong motion prediction of low-speed vehicles," which were entirely missed by the baseline tools. Despite the overhead of behavior mining, the system's execution efficiency remained competitive with SAMOTA, which utilizes computationally expensive surrogate models.

Conclusion and Future Work

BehAVExplor demonstrates that guiding ADS testing with behavioral diversity is a highly effective strategy for uncovering rare and unique safety edge cases. By abstracting driving maneuvers into a searchable state space, the framework avoids the redundancy common in traditional fuzzers.

Future research will focus on extending this approach to more complex multi-agent urban environments and evaluating its effectiveness on end-to-end deep learning-based driving models. Additionally, addressing simulator-induced latencies in perception modules remains a priority to further reduce false-positive violation reports.

Summary updated

BibTeX
@inproceedings{cheng2023behavexplor,
  author = {Mingfei Cheng and Yuan Zhou and Xiaofei Xie},
  title = {{BehAVExplor: Behavior Diversity Guided Testing for Autonomous Driving Systems}},
  booktitle = {ISSTA},
  year = {2023},
  doi = {10.1145/3597926.3598072},
}
Figure