Introduction
As Autonomous Driving Systems (ADS) transition from controlled testing to public roads, the complexity of their failure modes has become a significant challenge for safety engineers. When an ADS-equipped vehicle is involved in a collision, determining the root cause is often a Herculean task. These systems are quintessential Cyber-Physical Systems (CPS), where the software logic (the cyber component) interacts dynamically with a messy, unpredictable environment (the physical component).
Traditional root cause analysis tools, often adapted from simpler robotics or pure software environments, struggle to account for this interplay. A crash might not be the result of a simple code bug, but rather a specific environmental trigger—such as a uniquely placed billboard or a specific weather condition—that exposes a latent misconfiguration in the software. This paper introduces ROCAS, a framework designed to perform post-accident "autopsies" by systematically bridging the gap between physical triggers and cyber misconfigurations.
The ROCAS Framework
ROCAS utilizes a technique termed cyber-physical co-mutation. The core philosophy is that to understand why a system failed, one must find the minimal changes in both the environment and the software configuration that would have prevented the failure. The framework operates in four distinct phases:
1. Accident Replay
The process begins by reconstructing the accident within a high-fidelity simulator, such as CARLA or LGSVL. By using recorded GPS data, sensor logs, and telemetry, ROCAS ensures the simulated environment faithfully replicates the conditions of the real-world collision.
2. Physical Mutation
In this phase, ROCAS systematically alters elements of the physical environment—removing a nearby vehicle, changing the lighting, or adjusting the road surface—to identify the "triggering entity." The goal is to find the smallest environmental change that allows the ADS to navigate the scenario safely without any software modifications. This "safe" execution serves as a critical reference point for the next steps.
3. Initial Deviating Module Identification
To pinpoint where the software logic first diverged, ROCAS models the ADS as a Channel Module Graph (CMG), mapping the communication flow between modules like Perception, Prediction, and Planning. By comparing the "accident" run to the "safe" reference run, ROCAS employs a new metric called the Message Difference Ratio (MDR).
Because ADS messages are complex, nested data structures, the MDR treats them as trees to calculate a difference score. Using the PELT (Pruned Exact Linear Time) algorithm for change-point detection, ROCAS identifies exactly which module first produced a message that significantly deviated from the safe baseline. This step is crucial for efficiency, as it narrows the focus from the entire system to a single faulty component.
4. Cyber Mutation
Once the deviating module is identified, ROCAS performs a targeted search within that module’s configuration parameters. For example, if the Planning module is at fault, ROCAS might test variations of the brake_threshold or obstacle_lateral_buffer. The goal is to find the specific parameter setting that, if applied during the original accident scenario, would have avoided the crash.
Evaluation and Key Insights
The researchers evaluated ROCAS using two major ADS platforms: Baidu Apollo 7.0 (an industry-grade modular system) and LAV (a state-of-the-art research ADS). The study analyzed 144 accident cases across 12 distinct categories, ranging from perception errors caused by roadside objects to incorrect predictions of moving vehicles.
Efficiency through Search Space Reduction
Modern ADS platforms are incredibly complex; Baidu Apollo, for instance, has over 1,100 configurable parameters. A brute-force search for the faulty configuration is computationally impossible within a reasonable timeframe. By identifying the deviating module first, ROCAS reduced the search space for configurations by an average of 85.8%. This allowed the system to complete analyses that were otherwise impossible within a 12-hour budget.
Precision and Real-World Utility
ROCAS demonstrated high precision in identifying both the physical triggers and the cyber misconfigurations. In one case study, the framework uncovered a subtle logic error where a planning module used a truck's "tangent to the path" rather than its "actual heading" to calculate a bounding box. This error only manifested as a collision under specific rainy conditions, illustrating how ROCAS can unmask "ghosts in the machine" that traditional testing might miss.
Limitations and Future Directions
While ROCAS represents a significant step forward, it has limitations. It is currently optimized for modular ADS where internal messages between components are transparent. It cannot yet pinpoint internal misconfigurations in "end-to-end" deep learning models, which function as black boxes. Furthermore, ROCAS is designed to find misconfigurations; if an accident is caused by a total absence of a feature (e.g., the car lacks the code to handle a specific side-swipe scenario), the system identifies it as "unfixable" via configuration.
Future work aims to evolve ROCAS from a diagnostic tool into a proactive one. The authors suggest that the insights gained from co-mutation could eventually power automated repair systems, generating code or configuration patches that prevent similar accidents from ever occurring again.
Summary updated