An LLM-enhanced Multi-objective Evolutionary Search for Autonomous Driving Test Scenario Generation

Haoxiang Tian, Xingshuo Han, Guoquan Wu, Yuan Zhou, Shuo Li, Jun Wei, Dan Ye, Wei Wang, Tianwei Zhang

Abstract

Safety testing serves as the fundamental pillar for the development of autonomous driving systems (ADSs). To ensure the safety of ADSs, it is paramount to generate a diverse range of safety-critical test scenarios. While existing ADS practitioners primarily focus on reproducing real-world traffic accidents in simulation environments, many of these accidents do not directly result in safety violations for ADSs due to the differences between human driving and autonomous driving. More importantly, we observe that some accident-free real-world scenarios can lead to misbehaviors in ADSs. We introduce LEADE, a novel methodology that automatically generates abstract and concrete scenarios from real-traffic videos and optimizes them to search for safety violations in semantically consistent scenarios where human-driving worked safely. LEADE leverages Large Multimodal Models (LMMs) to accurately construct scenarios via multi-modal few-shot Chain of Thought (CoT) and assesses behavior differences between the ego vehicle and human drivers. We evaluate LEADE on the industrial-grade Level-4 ADS, Apollo, discovering 10 distinct types of safety violations.

Introduction: The Gap in ADS Testing

Testing Autonomous Driving Systems (ADSs) is a high-stakes challenge. Currently, most practitioners rely on reproducing real-world traffic accidents in simulators. However, this approach has two major flaws. First, there are misaligned failure modes: many human accidents are caused by factors like fatigue or intoxication—issues an AI doesn't have. Conversely, an AI might fail in a "boring" routine scenario where a human driver excels. Second, there is data scarcity: accidents are rare events. Limiting testing to accident databases ignores the vast "goldmine" of routine traffic data that might contain edge cases specific to machine perception and logic.

Figure 1: Conceptual overview of generating safety-critical test scenarios from non-accident real-world traffic.

The authors address the gap in generating safety-critical scenarios from non-accident videos, ensuring that ADSs are tested against the subtle complexities of everyday driving that might trip up an algorithm even if they are easy for a human.

The LEADE Methodology

The authors introduce LEADE, a methodology that bridges the gap between raw video pixels and executable simulation code. It consists of two main phases:

1. Traffic Video-based Scenario Understanding and Generation

Since current LMMs (like GPT-4V) struggle with long video files and temporal consistency, LEADE uses a motion change-based keyframe extraction technique. It employs optical flow analysis and linear interpolation to identify frames where significant motion changes occur (e.g., a car starting to turn).

These keyframes are fed into an LMM with a multi-modal few-shot Chain-of-Thought (CoT) prompt. This guides the LMM to construct an Abstract Scenario (a high-level semantic description) and generate a Concrete Scenario Program (executable code for simulators like SVL that defines specific coordinates, speeds, and trajectories).

2. Dual-Layer Search for Safety Violations

Once a base scenario is generated, LEADE optimizes it to find "breaking points" through a dual-layer optimization strategy:

  • Outer-Layer Optimization: This layer searches for scenarios that maximize the behavioral difference (measured via Levenshtein Distance) between the ADS and the original human driver. If a human drove smoothly but the ADS struggles, a potential bug is found.
  • Inner-Layer Optimization: Once a violation is found, this layer varies the trajectories of other participants to see if the violation is a "fluke" or a universal deficiency in the ADS's logic.
Figure 2: The LEADE framework architecture for scenario generation and optimization.

Evaluation and Key Insights

The framework was evaluated using the HRI Driving Dataset (HDD), which contains 104 hours of real-world, safe human driving in San Francisco, and tested against Baidu Apollo 7.0, an industrial-grade Level-4 ADS.

Key Results

  • High Accuracy: LEADE achieved 97% accuracy in understanding road types and 92.1% in identifying participant behaviors from video, significantly outperforming baselines like M-CPS.
  • Violation Discovery: LEADE discovered 10 distinct types of safety violations in Baidu Apollo.
  • Novelty: 7 of these violations were entirely new and had never been discovered by state-of-the-art testing tools. Examples included misidentifying the speed of vehicles driving in a convoy and failing to respond to large vehicle dimensions during turns.
  • Efficiency: Compared to random search or mutation-based methods, LEADE found more violations using fewer source videos.

Insights

  • Routine is Dangerous: "Safe" human driving videos are actually a rich source of ADS failures. The AI's "worldview" is different enough from a human's that scenarios we find trivial can be catastrophic for the software.
  • LMMs as Translators: LMMs are excellent at translating visual semantics into structured code when provided with temporal anchors (keyframes) and a logical reasoning path (CoT).
  • Intent over Geometry: Instead of just looking at trajectory deviations, LEADE looks at behavioral sequences (intent), making the search for bugs more robust and semantically meaningful.

Conclusion and Future Work

LEADE demonstrates that routine traffic data is a powerful resource for uncovering ADS vulnerabilities. While challenges like LMM hallucinations and the "sim-to-real" gap remain, the ability to automatically generate complex, safety-critical tests from everyday driving videos marks a significant step forward in autonomous vehicle validation. Future work will focus on improving the efficiency of the dual-layer search and refining the scenario inspection modules to further reduce hallucinations.

Summary updated

BibTeX
@misc{tian2024llm,
  author = {Haoxiang Tian and Xingshuo Han and Guoquan Wu and Yuan Zhou and Shuo Li and Jun Wei and Dan Ye and Wei Wang and Tianwei Zhang},
  title = {{An LLM-enhanced Multi-objective Evolutionary Search for Autonomous Driving Test Scenario Generation}},
  year = {2024},
  eprint = {2406.10857},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.10857},
}
Figure