Evaluating Decision Optimality of Autonomous Driving via Metamorphic Testing

Mingfei Cheng, Yuan Zhou, Xiaofei Xie, Junjie Wang, Guozhu Meng, Kairui Yang

Abstract

Autonomous Driving System (ADS) testing is crucial in ADS development, with the current primary focus being on safety. However, the evaluation of non-safety-critical performance, particularly the ADS's ability to make optimal decisions and produce optimal paths for autonomous vehicles (AVs), is also vital to ensure the intelligence and reduce risks of AVs. Currently, there is little work dedicated to assessing the robustness of ADSs' path-planning decisions (PPDs), i.e., whether an ADS can maintain the optimal PPD after an insignificant change in the environment. The key challenges include the lack of clear oracles for assessing PPD optimality and the difficulty in searching for scenarios that lead to non-optimal PPDs. To fill this gap, in this paper, we focus on evaluating the robustness of ADSs' PPDs and propose the first method, Decictor, for generating non-optimal decision scenarios (NoDSs), where the ADS does not plan optimal paths for AVs. Decictor comprises three main components: Non-invasive Mutation, Consistency Check, and Feedback. To overcome the oracle challenge, Non-invasive Mutation is devised to implement conservative modifications, ensuring the preservation of the original optimal path in the mutated scenarios. Subsequently, the Consistency Check is applied to determine the presence of non-optimal PPDs by comparing the driving paths in the original and mutated scenarios. To deal with the challenge of large environment space, we design Feedback metrics that integrate spatial and temporal dimensions of the AV's movement. These metrics are crucial for effectively steering the generation of NoDSs. We evaluate Decictor on Baidu Apollo, an open-source and production-grade ADS. The experimental results validate the effectiveness of Decictor in detecting non-optimal PPDs of ADSs.

Introduction

Current testing for Autonomous Driving Systems (ADSs) is heavily biased toward safety-critical events, such as preventing collisions or traffic violations. However, a "safe" car isn't necessarily an "intelligent" or "efficient" one. An ADS might be perfectly safe but extremely "timid," choosing a long, inefficient detour because of a distant traffic cone that doesn't actually block its path. This gap between safety and optimality is what we define as a Non-optimal Decision Scenario (NoDS).

Examples of non-optimal decision scenarios (NoDSs) where minor environmental changes lead to inefficient paths.

Testing for decision optimality presents three major challenges:

  1. The Oracle Challenge: Defining what the "optimal" path should be in a new, generated scenario without a human driver reference.
  2. The Search Space Challenge: Finding specific minor perturbations that trigger a suboptimal decision in an infinitely variable environment.
  3. The Consistency Challenge: Distinguishing between minor path variations and fundamentally suboptimal decisions.

The Decictor Framework

To address these challenges, we developed Decictor, a testing framework that evaluates the optimality and robustness of path-planning decisions (PPDs) through metamorphic testing.

The Decictor framework architecture, featuring Non-invasive Mutation, Consistency Check, and Feedback loops.

Decictor consists of three core components:

  • Non-invasive Mutation ($\delta$): To solve the oracle problem, Decictor modifies an existing "Optimal Decision Scenario" (ODS) by adding, removing, or changing participants (like NPC vehicles or traffic cones). These changes are restricted to "safe zones" calculated using kinematic models, ensuring the original optimal path remains physically possible and logically optimal.
  • Consistency Check ($\epsilon$): Instead of direct point-by-point comparison, Decictor uses an abstraction-based method. It maps driving paths onto a grid and calculates the Jaccard similarity of the occupied cells. If similarity drops below a threshold (e.g., 0.6), a potential non-optimal decision is flagged.
  • Feedback-guided Search ($D$): To navigate the massive search space, Decictor uses a fitness function to evolve scenarios, prioritizing those that maximize discrepancies in both spatial paths and temporal behaviors (velocity, acceleration, heading).

Evaluation and Results

We evaluated Decictor using Baidu Apollo 7.0 in the SimControl environment across six representative initial scenarios (e.g., U-Turns, intersections).

Key Findings: * Superior Detection: Decictor generated an average of 63.9 NoDSs, significantly outperforming baseline methods like Random Mutation (35.4). * High Mutation Validity: The "Non-invasive Mutation" strategy achieved a 97.9% success rate in maintaining the feasibility of the original optimal path, ensuring detected failures were due to ADS logic. * Root Cause Analysis: We identified six unique root causes for suboptimal decisions, such as "inaccurate prediction of vehicle status" and "excessive attention to surrounding obstacles." Existing safety-testing tools failed to identify two of these categories entirely.

Conclusion

Decictor demonstrates that ADSs often fail by being "overly cautious," incorrectly perceiving target lanes as impassable or canceling safe maneuvers. By ensuring mutations are "non-invasive," we provide a robust way to test optimality without complex pre-defined models. Future work will focus on better aligning consistency checks with human intuition and addressing the "sim-to-real" gap.

Summary updated

Abstract

Autonomous Driving System (ADS) testing is crucial in ADS development, with the current primary focus being on safety. However, the evaluation of non-safety-critical performance, particularly the ADS's ability to make optimal decisions and produce optimal paths for autonomous vehicles (AVs), is also vital to ensure the intelligence and reduce risks of AVs. Currently, there is little work dedicated to assessing the robustness of ADSs' path-planning decisions (PPDs), i.e., whether an ADS can maintain the optimal PPD after an insignificant change in the environment. The key challenges include the lack of clear oracles for assessing PPD optimality and the difficulty in searching for scenarios that lead to non-optimal PPDs. To fill this gap, in this paper, we focus on evaluating the robustness of ADSs' PPDs and propose the first method, Decictor, for generating non-optimal decision scenarios (NoDSs), where the ADS does not plan optimal paths for AVs. Decictor comprises three main components: Non-invasive Mutation, Consistency Check, and Feedback. To overcome the oracle challenge, Non-invasive Mutation is devised to implement conservative modifications, ensuring the preservation of the original optimal path in the mutated scenarios. Subsequently, the Consistency Check is applied to determine the presence of non-optimal PPDs by comparing the driving paths in the original and mutated scenarios. To deal with the challenge of large environment space, we design Feedback metrics that integrate spatial and temporal dimensions of the AV's movement. These metrics are crucial for effectively steering the generation of NoDSs. We evaluate Decictor on Baidu Apollo, an open-source and production-grade ADS. The experimental results validate the effectiveness of Decictor in detecting non-optimal PPDs of ADSs.
BibTeX
@inproceedings{cheng2025evaluating,
  author = {Mingfei Cheng and Yuan Zhou and Xiaofei Xie and Junjie Wang and Guozhu Meng and Kairui Yang},
  title = {{Evaluating Decision Optimality of Autonomous Driving via Metamorphic Testing}},
  booktitle = {ICSE},
  year = {2025},
  doi = {10.1109/icse55347.2025.00114},
}
Figure