WorksComputer Science
Causal Analysis of Failures of Cyber-Physical Systems with Continuous Inputs
Abstract
Modern autonomous Cyber-Physical Systems (CPSs), such as self-driving cars, operate in increasingly complex environments while expected to maintain high reliability. The black-box nature of many of these systems makes it impossible to fully verify their behavior prior to deployment. When a failure occurs, it is important to analyze it to guide improvements to system robustness. A recent work introduced the novel concept of leveraging the framework of actual causality for CPS failure explanation. However, that work considered only a discrete, binary causal model that cannot capture continuous changes in system inputs. In this paper, we address these limitations by extending the actual causality framework with the notion of distance to account for the continuous characteristics of the system. Specifically, we introduce the novel concepts of distance-weighted actual cause and distance-weighted degree of responsibility, enabling causal influence to account for the magnitude of changes required to avoid a failure, rather than only its cardinality. While motivated by the continuous nature of CPSs, this constitutes a general extension of the theory of actual causality and enables more fine-grained analysis of continuous inputs in any causal model. Building on these notions, we present an efficient, practical, system-agnostic explanation-derivation algorithm that uses distance-weighted responsibility to guide the explanation search. We experimentally evaluate our approach across a number of environments from two autonomous-driving simulators with black-box neural controllers. The results show that the proposed extension provides more effective guidance than the current discrete approach.
Introduction
Autonomous robots and Cyber-Physical Systems (CPSs) are becoming increasingly prevalent in modern life. Such systems leverage digital components to control physical machines that operate in and interact with the real world. To operate safely and reliably, these systems must be robust, i.e., resist failures and maintain performance under a wide range of circumstances [1, 2]. However, due to the complexity of modern systems and the intractability of real-world scenarios, verifying their robustness prior to deployment is unrealistic. This is especially true for systems built on “black-box” neural components, such as controllers and perception units, which typically can only be verified empirically.
When a failure occurs, it is important to analyze it to help ensure that similar scenarios do not repeat in the future, or at least to ensure the user is better prepared to mitigate them if they do. Perhaps the most useful output of this analysis is an explanation, identifying the elements in the potentially rich scenario that led to a failure.
While the usefulness of causal analysis has been demonstrated for discrete systems, there is little work to connect it to CPS, which have challenging properties such as continuous input variables and temporally extended operations. A recent work [3] was the first to leverage the framework of actual causality to explain CPS failures. We note that, unlike the more common framework of general causality [4], which derives forward-looking, probabilistic causal models, actual causality [5] is backward-looking, using causal models to explain specific past events. The work in [3] took the first step toward bridging the gap between CPS and actual causality, providing guidelines for integrating a system-testing model with a causal model to ensure correct failure explanations. Since the standard search for such explanations quickly becomes intractable, it also introduced an efficient heuristic-guided explanation-derivation algorithm based on causal degree of responsibility [6, 5]—a quantification of the causal influence of an input variable.
While serving as a stepping stone, that work made significant assumptions. Most importantly, it did not allow for continuous variability of the testing-model inputs. This is a critical limitation, as explanation derivation requires examining modified scenarios and reasoning about their effect on system behavior. Yet, the causal-model inputs accepted only binary valuations: elements could either exist or not exist, but could not vary continuously. This assumption clashes with the continuous nature of CPSs and potentially limits the utility and accuracy of explanations that can be derived. Moreover, this limitation carries over to responsibility, the key heuristic guiding the explanation search. When evaluating modified scenarios to compute an element’s responsibility, the approach cannot distinguish between small and large modifications, as all modifications are treated equally. Consequently, the responsibility measure loses much of its nuance, providing less effective guidance for the search.
In this work, we address these limitations by extending actual causality to account for the continuous characteristics of CPSs and exploiting this extension to effectively derive causal explanations of system failures. In particular, we extend actual causality with the notion of distance, enabling a more fine-grained analysis of continuous inputs. While motivated by the continuous nature of CPSs, this extension constitutes a novel contribution to the theory of actual causality in general, allowing causal influence to account for the magnitude of interventions (i.e., changes to input variables) rather than only their presence. We then leverage this extension and propose an improved responsibility-guided search approach for failure explanations.
Specifically, we make the following contributions: (1) We extend the framework for CPS failure explanation presented in [3] to support continuous causal models. (2) We extend the framework of actual causality itself with the notions of distance-weighted actual cause and distance-weighted responsibility, allowing causal analysis to account for the magnitude of interventions. (3) Building on these notions, we present an improved and more efficient explanation-derivation algorithm for black-box CPSs that uses distance-weighted responsibility to guide the explanation search. (4) We experimentally evaluate our approach against prior work on autonomous-driving systems, demonstrating that it provides more effective and scalable guidance for explanation search. We further evaluate distance-weighted responsibility by assessing how well it prioritizes the elements involved across multiple possible explanations for a failure, providing further evidence of its effectiveness.
The paper is organized as follows. Sec. II provides preliminaries on the CPS testing model and the actual causality framework and formulates our objectives. Sec. III describes the extension of the actual causality framework with the notion of distance. Sec. IV presents the distance-responsibility-guided failure explanation generation algorithm. The experimental evaluation is covered in Sec. V, and Sec. VI concludes the paper.
Related Work. Actual causality [5], [7] is well-suited for explaining events that have already occurred and has been extensively applied in explainable AI (XAI), including image, audio and medical classification [7], [8], [9], [10]. The XAI tool REX approximates causal responsibility to efficiently derive causal explanations [11]. These approaches, like ours, treat the AI model as a black box. Notably, [8] also uses causal responsibility [6] for guiding explanation generation, but is specifically designed for image classification.
In the context of CPSs, the most relevant work to this paper is [3], which uses actual causality to explain failures. Its algorithm is based on causal responsibility, however, it treats all variables as binary, hence cannot capture or manipulate continuous dependencies between inputs and outcomes. Counterfactual reasoning has recently been used for CPS failure analysis [12]. Actual causality extends and generalizes counterfactual reasoning, allowing to capture more subtle dependencies [5].
Sensitivity analysis, described in [13], perturbs the position of obstacles in failure-causing scenes to analyze CPSs. This analysis can identify parts of the environment associated with the failure, but does not generate explanations. [14] uses a debugger to generate explanations of instrumented CPS failures, an approach whose feasibility depends strongly on the model. In contrast, our method treats the system as a black box. [15] learns a Bayesian model from simulation data and uses it to generate explanations, a fundamentally different approach from actual causality. [16] and [17] construct ontology-based representations that integrate sensor and environment information with higher-level knowledge for robotic reasoning. Unlike our approach, these methods rely on explicit knowledge representations and reasoning mechanisms tailored to the robotic system. [18] compares system input/output traces using a state-machine encoding of the CPS rather than performing causal analysis; such a state machine may be unavailable or too complex to explain.
Preliminaries
Testing Cyber-Physical Systems
To facilitate the explanation of failures in autonomous CPSs, we adopt the formalism introduced in [20] and later extended in [3]. We consider a CPS operating in an environment , which encodes the external factors affecting the system’s operation and specifies the variables describing its surroundings. The environment can be observed by the system and potentially changed by it. We assume that environment variability is the only source of variability in the system’s execution, with no other external sources of uncertainty. We use to denote the system state at time , and to denote the resulting time-parameterized trajectory from start to finish. While a system execution is generally determined by both the environment and the initial state , throughout this paper we assume that the initial state is fixed and therefore consider only the environment as input.
We assume that the CPS controller is designed to complete a specific task while remaining robust to environmental variations. The outcome of an execution is determined by whether the resulting trajectory satisfies this task. Following [3], we distinguish not only between successful and failed executions but also between different types of failures. We capture this using a status predicate:
where indicates successful task completion, while each negative value indicates a different type of user-defined failure.
Illustration: an autonomous car
While the ideas presented here apply to any CPS, we use an autonomous car operating on an obstructed track as a running example, as depicted in Figure 1. Autonomous vehicles are a representative example of CPSs, as their computational controllers process information from the physical environment and control the vehicle’s behavior accordingly. In this example, variables define the track shape and the locations of circular obstacles. For simplicity, we assume the track shape is fixed and focus only on the obstacles. Each obstacle is represented by a vector , specified relative to the track: indicates its lateral position between the right and left shoulders, while indicates its longitudinal position from the starting line to the endzone. The state consists of the car’s position , heading , steering angle , and speed , all in time . The black-box controller is trained to steer the car to the end of the track while avoiding collisions, regardless of the track curvature and obstacle placement. We distinguish between failure types according to the location of the obstacle the car collides with. That is, the status predicate returns 1 if the car successfully reaches the end of the track without a collision, and if it crashes on or close to the -th obstacle.

Figure 1. The running example of an autonomous car, taken from the LiteRacer simulator [19]. The car is controlled by a black-box neural network trained to navigate an obstructed track, avoiding collisions and reaching the end of the track.
Actual causality
In this section we provide a brief and somewhat simplified overview of actual causality. The reader is referred to [21], [5] for the full exposition.
Actual causality [21], [5] provides a formal framework for reasoning about the causes of observed outcomes. The framework describes the world in terms of variables and their values. A causal model consists of a set of variables and a set of structural equations capturing the dependencies between these variables. Some (salient) features of causal models can be represented by a causal network: a directed acyclic graph, with the nodes being the variables of and the directed edges capturing the existence and direction of causal dependence.
A context is an assignment to the variables of that do not have incoming edges in the causal network (that is, their values do not depend on the values of other variables). determines, through the equations of , the values of all variables in . Together, a causal model and a context , which specifies the particular situation being analyzed, form a causal setting . We write if a Boolean formula holds in the causal setting .
Causal analysis is performed through interventions. An intervention assigns values to a subset , replacing their equations with these assignments. We write if holds after this intervention. Interventions therefore allow us to reason about how changing selected variables affects an observed outcome.
We adapt the definitions from [3] and restate them here as a basis for our extension in § 3. Given a black-box CPS controller and a failure scenario , we define a binary causal model as follows. The set of variables consists of one binary variable for each obstacle in and a binary outcome variable . Essentially, is a Boolean mask that indicates which obstacles are present and which are removed, allowing us to intervene on parts of . The outcome variable indicates whether the outcome of an execution under this masking matches that of the original scene. That is,
where is the environment induced by the (possibly intervened) causal setting, and is its resulting trajectory. This results in a depth-2 causal model, where each obstacle is (causally) independent of the others.
Given the causal model , let be the context that assigns 1 to all variables in , and let be the context that assigns 0 to all these variables, where 1 means the obstacle is present at its original location, and 0 means the obstacle is removed. In other words, matches the original crash scenario, and matches the empty track. Following [3], we define an explanation as follows.
Definition 1 (Sufficient Explanation [3]): A subset of is a sufficient explanation of the outcome if the following conditions hold:
EX1. , where stands for assigning 1 to all variables in .
EX2. is minimal; there is no strict subset of that satisfies EX1, where is the restriction of to the variables in .
Since each variable in corresponds to an obstacle in scenario , a sufficient explanation is one-to-one mapped to a subset of obstacles that are sufficient to reproduce the original failure. In other words, an explanation is a minimal subset of obstacles in a given scenario that is sufficient for the failure.
Importantly, there can be more than one minimal explanation [11]. The minimality condition in EX2 applies to each explanation locally (with respect to subset inclusion). Consequently, distinct subsets of obstacles may each be sufficient to reproduce the same failure, while no strict subset of either is sufficient.
The precise computation of explanations is intractable [8]. Consequently, existing explanation-generation approaches use heuristic search strategies [8, 3, 9]. These strategies are based on the notion of the degree of responsibility [6], which quantifies causal influence. Formally, the degree of responsibility introduced in [6] quantifies the notion of an actual cause. Thus, we first introduce the definition of an actual cause and then the degree of responsibility.
Definition 2 (Actual Cause [22]). A subset and its values is an actual cause of in if the following conditions hold:
AC1. . In other words, in the context , indeed and holds.
AC2. There exists an assignment such that . That is, changing the values of to alone is sufficient to change the value of the outcome, if all other variables remain unchanged.
AC3. is minimal; there is no strict subset of that satisfies AC2.
As in [22], we refer to parts of actual causes as causes.
Definition 3 (Responsibility [6]). The degree of responsibility of for is defined as , where is a smallest actual cause for that contains . If there is no actual cause containing , its degree of responsibility is defined as 0.
We note that the degree of responsibility is defined with respect to the necessary condition, that is, subsets of obstacles whose removal changes the outcome. This is in contrast to the sufficient explanation, which is a subset of obstacles that by itself is sufficient for the outcome. The reason we choose the necessary condition for responsibility is mostly practical: the algorithm we later present approximates it from a set of simulations in which crashes are rare.
Extending Actual Causality with Distance
In this section, we extend actual causality by incorporating a distance measure into the framework. This extension is general and can be applied to any causal model, including the binary model described in Sec. II-C. However, when restricted to binary variables, the use of a distance function becomes degenerate. Therefore, to properly account for the continuous characteristics of the examined CPS, we introduce a new causal model that reflects its underlying continuous structure.
A graphical representation of the updated CPS model is shown in Figure 2. Like the binary model described in Sec. II-C, this is a depth-2 causal model with a similar overall structure. The key difference lies in the set of variables, , which now represent the obstacle locations, with separate variables for their coordinates. To align with previous definitions, we explicitly add the valuation for and , to indicate the absence of the respective obstacle—i.e., “” corresponds to the value “0” in the binary model (Def. 1). As in the binary model, we denote a setting in which all obstacles are absent as . The output variable remains unchanged and indicates the outcome of executing the CPS controller under the given obstacle configuration.
Figure 2. A graphical representation of the causal model used to explain failures of our exemplary autonomous-car system. Unlike [3], here the test inputs, i.e., obstacle placements, are modeled as continuous location variables, rather than binary present/absent indicators. The outcome variable indicates whether the outcome of some execution under the intervention, , matches that of the original .
The definition of sufficient explanation (Def. 1) carries over unchanged to the revised causal model. In particular, a sufficient explanation reproduces the original locations of obstacles in it, as it explains the crash in terms of what actually occurred in the failure scenario.
We now present updated definitions of actual cause and responsibility by incorporating information about how far an intervention deviates from the original . Intuitively, rather than considering only the number of variables that cause an outcome, we can also account for the magnitude of the required change, as measured by a predefined distance metric. This allows us to prefer explanations that achieve the desired outcome with smaller deviations from the original state, thereby capturing a notion of proximity-based minimality. We first define a distance-weighted notion of actual cause, and then introduce a corresponding quantitative measure of a distance-weighted responsibility.
Definition 4 (Distance-Weighted Actual Cause). Given some predefined distance metric and scenario , a subset and its values is a distance-weighted actual cause of the outcome in if the following conditions hold:
DAC1. . In other words, in the context , indeed and holds.
DAC2. There exists an assignment such that . That is, changing the values of to alone is sufficient to change the value of the outcome, if all other variables remain unchanged.
DAC3. and are minimal with respect to ; that is, there is no subset of that satisfies DAC2 with an assignment such that , where:
is the assignment to induced by ,
is viewed as the assignment of to and the rest of the variables in according to , and
is viewed as the assignment of to and the rest of the variables in according to .
Definition 5 (Distance-Weighted Responsibility). Given some predefined distance metric , the distance-weighted degree of responsibility of for the outcome is defined as , where is the original outcome, is the closest (according to ) distance-weighted actual cause for that contains , is the assignment of that satisfies Def. 4, and is the assignment of in the original scenario. If there is no distance-weighted actual cause that contains , its degree of responsibility is defined as 0.
Observation 1. Def. 2 and Def. 3 are special cases of Def. 4 and Def. 5, respectively, obtained when the distance function simply counts the number of variables in (cardinality of the actual cause). Also, assuming non-negativity of the distance function, the new definition preserves the original responsibility value range of , where 1 represents the highest possible importance, and 0 the lowest.
Motivating example: We illustrate the advantages of distance-weighted responsibility using the example shown in Figure 3. It depicts a crash scene with a single explanation consisting of obstacles 7, 8, and 9. The discrete formulation of responsibility considers only obstacle presence/absence. Consequently, several obstacles may receive the same responsibility value, resulting in a coarse ranking that provides limited guidance toward the obstacles in the explanation. In this example, obstacles 0, 5, 7, 8, and 9 all have the responsibility 1, reflecting the fact that it is sufficient to remove any one of them to avoid the crash. Thus, they cannot be distinguished by the discrete ranking. In contrast, distance-weighted responsibility accounts for how much the obstacle configuration must change to alter the outcome, producing a more fine-grained ranking. Our distance-weighted approximation with Euclidean distance, based on 200 samples, assigns responsibility values of 0.36, 0.38, 0.55, 0.90, and 0.66 to obstacles 0, 5, 7, 8, and 9, respectively, thereby prioritizing the three obstacles comprising an explanation.

Figure 3. Motivating example for distance-weighted responsibility: a failure scenario (left) and its sufficient explanation (right).
Responsibility-Guided Explanation-Derivation Algorithm
In this section, we present an algorithm for deriving sufficient explanations of a CPS failure, in the context of our running example, based on the extended definitions and causal model introduced in § 3. We begin with a given crash scene , for which we seek a sufficient explanation. In our setting, the causal model has depth two and is therefore relatively simple. Consequently, there is no need to explicitly construct it. Instead, the algorithm implicitly complies with the model through its search procedure.
As mentioned, the precise computation of explanations is intractable [8]. Thus we propose to derive explanations by ranking obstacles according to their approximate degree of distance-weighted responsibility, prioritizing those with higher responsibility in the search process. This ranking serves as a heuristic that guides explanation discovery toward candidates that are more likely to be relevant. As a result, the algorithm is expected to reduce the number of simulation runs required to obtain an explanation.
Previous work [3] that applied actual causality to CPSs used a responsibility-guided algorithm over a binary causal model, using Def. 3 and restricting interventions to obstacle removal as the only allowed type. This approximation is quite coarse and may result in rankings that are unhelpful for guiding the explanation search (see motivating example in Figure 3). Here we propose a more fine-grained approach that approximates the distance-weighted responsibility over the continuous causal model we introduce in § 3. Later, in § 5, we demonstrate that this approach indeed reduces the overall effort required to compute explanations.
The responsibility approximation algorithm is presented in Alg. 1. It creates a dataset of random interventions over
| Algorithm 1 Distance-Weighted Responsibility Approximation |
| Input: Crash scene , element set elements, a distance function , samples budget |
| 1: for every in elements |
| 2: |
| 3: |
| 4: |
| 5: |
| 6: |
| 7: for in do |
| 8: |
| 9: if then DAC2 (Def. 4) |
| 10: |
| 11: if such that then DAC3 (Def. 4) |
| 12: |
| 13: for in do Responsibility (as in Def. 5) |
| 14: |
| 15: return |
Table 1.
the original crash scene and considers them in increasing order of distance (lines 5–6). Following Def. 4, interventions that change the original outcome (DAC2) and satisfy the minimality condition (DAC3) are identified as causes. The responsibility of their elements is then updated according to Def. 5 in the loop in line 13.
The distance-weighted responsibility-guided explanation search algorithm is presented in Alg. 2. It ranks obstacles according to their approximate responsibility computed using Alg. 1 and incrementally evaluates prefixes of this ordering until the original failure is reproduced. This subset serves as a candidate explanation. The algorithm then searches its powerset for a smaller explanation (lines 11–16).
Alg. 2 is guaranteed to return a valid explanation, regardless of the quality of the responsibility approximation. The responsibility ranking is used only as a heuristic to determine the order in which obstacles are considered. In the worst case, the incremental search eventually considers all obstacles, thereby reproducing the original outcome. The subsequent minimization step then removes redundant obstacles until a minimal outcome-preserving subset remains, thereby satisfying both conditions of Def. 1. Thus, the responsibility approximation affects the efficiency of the search but not the validity of the resulting explanation. In the following section, we empirically demonstrate that the proposed distance-weighted responsibility improves the efficiency of finding both single and multiple explanations.
Experimental Evaluation
In this section, we quantitatively evaluate our approach to generating explanations for CPS failures. To evaluate the useAlgorithm 2 Distance-weighted responsibility-guided explanation search algorithm
Input: Crash scene , responsibility distance function , samples budget
1: 2: Responsibility-guided ranking of elements (Alg. 1) 3: 4: 5: for in do Expl. candidates evaluation 6: First ranked obstacles 7: on by retaining only obstacles in 8: 9: if then 10: 11: for do Explanation minimization 12: on by retaining only obstacles in 13: 14: if then 15: if then 16: 17: break 18: return
fulness of our extensions to distance-weighted actual cause and responsibility, we use them to guide the explanation search, which serves as a proxy for measuring the quality of our approach. Since the algorithm is guaranteed to find a valid explanation, our evaluation focuses on efficiency, particularly the computational effort required to find one or multiple explanations when the search is guided by a distance-weighted responsibility ranking.
Experimental Setup. We evaluated our approach using two autonomous-driving simulators: LiteRacer [19], an open-source Python engine for simulating an autonomous vehicle on an obstructed track (see Figure 1), and MetaDrive [23], an open-source driving simulator for AI and autonomy research (see Figure 4). We used each simulator’s default neural network-based vehicle controller. To evaluate generalizability across environments, we considered several track geometries and configurations. In LiteRacer, we defined three geometries: (1) Sinusoidal, following a sine-wave shape; (2) Segmented, combining straight and curved segments; and (3) Lane Shift, consisting primarily of straight segments connected by turns resembling lane shifts. We evaluated each geometry under four configurations combining short/long tracks and narrow/wide widths. In MetaDrive, we defined three geometries: (1) Curve, (2) Straight, and (3) Mixed, combining straight and curved segments. Visualizations of all evaluated tracks are provided at [24].

Figure 4. The MetaDrive simulation [23]. The vehicle is tasked with navigating an obstructed track.
For each track type, we created 100 failing examples. To assess how our method performs as environment complexity grows, we increased the number of obstacles from 10 to 14, with 20 examples for each level. To ensure that additional obstacles made the explanation task more complex, we focused solely on examples where the vehicle observed all obstacles during execution. This ensured that each obstacle could affect the vehicle’s behavior and potentially be included in an explanation. Experiments were conducted on an Intel(R) Xeon(R) Platinum 8468 with 64GB RAM.
Implementation Details. For the intervention sampling, we implemented a process in which, for each sample, each obstacle is selected for intervention independently with some predefined probability. Each selected obstacle is perturbed by adding standard normal Gaussian noise centered at its original location. Full details can be found at [24]. To demonstrate generality, we evaluated the approach using two distance functions. The first is the standard Euclidean distance between obstacle locations in the two simulations. The second is the Chamfer distance [25], which measures the distance between two point sets by averaging the distance from each point in one set to its nearest point in the other set, symmetrized over both directions. These metrics capture different similarity notions: one based on correspondence between individual obstacles and the other on the geometry of the obstacle sets, illustrating that the framework can accommodate user-defined distance functions based on the characteristics of the CPS.
Comparison. To assess our contribution, we compared our approach with the discrete responsibility mechanism proposed in prior work [3], which uses a binary causal model similar to the one outlined in Sec. II-C. In this model, each obstacle is represented by a binary variable indicating its presence or absence; thus, interventions are restricted to obstacle removal, and responsibility is defined according to Def. 3. For both approaches, we approximated responsibility using sample budgets of 50 and 100. As a baseline, we also report the simulation runs required by the exhaustive approach discussed in [3], which exhaustively searches all subsets. The complete code for the evaluations and the implementation of Alg. 2 are publicly available at [24].
To measure the computational effort required in each method, we calculated the overall number of simulation runs it required, as this constitutes the dominant factor that determines the computational cost in practice. All other components (e.g., distance calculations, algorithm logic) are negligible in comparison and do not materially affect the overall runtime. We empirically validate this observation in an additional analysis provided at [24].
Results. Figure 5 reports the mean number of simulation runs required to find an explanation using the exhaustive approach, the discrete responsibility ranking, and our distance-weighted responsibility ranking with the Euclidean distance. Due to space limitations and to keep the presentation focused, we report the corresponding results for the Chamfer distance at [24], where the advantage of the distance-weighted approach is largely preserved. Across the different environments, the responsibility-guided approaches generally require fewer simulation runs than the exhaustive search, with the difference becoming more pronounced as the number of obstacles increases. More importantly, the distance-weighted ranking consistently outperforms the discrete ranking, often substantially, demonstrating that accounting for the magnitude of interventions provides more effective guidance for the explanation search. Increasing the sampling budget from 50 to 100 further improves the distance-weighted approach in most settings, with the additional cost of responsibility estimation remaining small relative to the resulting reduction in search effort.

Figure 5. Efficiency of explanation generation algorithms as a function of the number of obstacles (10–14), measured by the number of simulation runs (lower is better).
Multiple explanation evaluation. We further evaluated the quality of the responsibility ranking across multiple explanations. For each failure scenario, we computed all explanations and measured their coverage as obstacles are incrementally added in order of their responsibility ranking. At each point in the ranking, coverage is defined as the fraction of explanations fully contained in the set of obstacles considered so far. We summarize this behavior using the area under the coverage curve (AUC), with higher values indicating a more effective ranking.
Figure 6 and Table I (PDF p. 7) compare the discrete and Euclidean distance-weighted responsibility rankings in prioritizing obstacles across multiple explanations. Figure 6 visualizes the ranking curves for selected settings. The distance-weighted ranking generally achieves higher explanation coverage earlier in the ranking, indicating that obstacles relevant to multiple explanations tend to receive higher priority. Table I (PDF p. 7) summarizes the results of all evaluated settings using AUC.
| Env. | 10 Disc. | 10 Dist. | 11 Disc. | 11 Dist. | 12 Disc. | 12 Dist. | 13 Disc. | 13 Dist. | 14 Disc. | 14 Dist. |
| Sin-SN | 0.21 | 0.29 | 0.15 | 0.35 | 0.10 | 0.45 | 0.19 | 0.40 | 0.14 | 0.30 |
| Sin-SW | 0.19 | 0.35 | 0.17 | 0.32 | 0.12 | 0.29 | 0.12 | 0.24 | 0.13 | 0.31 |
| Sin-LN | 0.21 | 0.36 | 0.17 | 0.31 | 0.20 | 0.35 | 0.18 | 0.32 | 0.08 | 0.30 |
| Sin-LW | 0.13 | 0.35 | 0.15 | 0.35 | 0.14 | 0.32 | 0.10 | 0.23 | 0.17 | 0.33 |
| Seg-SN | 0.19 | 0.40 | 0.20 | 0.33 | 0.13 | 0.42 | 0.19 | 0.40 | 0.17 | 0.38 |
| Seg-SW | 0.21 | 0.34 | 0.18 | 0.34 | 0.15 | 0.29 | 0.14 | 0.28 | 0.11 | 0.29 |
| Seg-LN | 0.22 | 0.43 | 0.20 | 0.34 | 0.19 | 0.38 | 0.12 | 0.39 | 0.11 | 0.34 |
| Seg-LW | 0.13 | 0.28 | 0.16 | 0.29 | 0.11 | 0.26 | 0.12 | 0.24 | 0.09 | 0.25 |
| LS-SN | 0.23 | 0.40 | 0.19 | 0.40 | 0.14 | 0.46 | 0.12 | 0.28 | 0.17 | 0.37 |
| LS-SW | 0.18 | 0.20 | 0.11 | 0.19 | 0.13 | 0.34 | 0.11 | 0.29 | 0.12 | 0.26 |
| LS-LN | 0.19 | 0.37 | 0.17 | 0.33 | 0.17 | 0.40 | 0.20 | 0.38 | 0.20 | 0.39 |
| LS-LW | 0.15 | 0.31 | 0.12 | 0.31 | 0.15 | 0.28 | 0.13 | 0.33 | 0.16 | 0.39 |
| Curve | 0.34 | 0.38 | 0.28 | 0.46 | 0.20 | 0.39 | 0.15 | 0.33 | 0.21 | 0.44 |
| Straight | 0.41 | 0.41 | 0.28 | 0.33 | 0.22 | 0.33 | 0.20 | 0.36 | 0.25 | 0.30 |
| Mixed | 0.32 | 0.33 | 0.25 | 0.35 | 0.20 | 0.41 | 0.16 | 0.36 | 0.22 | 0.33 |
Table I (PDF p. 7). AUC of explanation coverage for the discrete and distance-weighted responsibility rankings (higher is better).

Figure 6. Multiple explanations coverage as a function of the fraction of obstacles considered, ordered by the discrete and distance-weighted responsibility rankings (higher is better).
The distance-weighted ranking achieves a higher AUC in almost all settings, often by a substantial margin, further demonstrating that incorporating distance provides more effective guidance not only for finding a single explanation but also for identifying multiple explanations. This advantage is consistent across the evaluated numbers of obstacles and is particularly pronounced in the LiteRacer environments. Results using the Chamfer distance, and visualization of the ranking curves for all settings, are provided at [24] and show the same overall advantage of the distance-weighted ranking.
Conclusion
We extended the theoretical framework of actual causality with the notion of distance-weighted actual cause and distance-weighted responsibility, enabling it to account for continuous inputs. While motivated by the continuous nature of CPSs, these definitions constitute a novel extension of the theory of actual causality in general, allowing causal influence to account for the magnitude of interventions rather than only their cardinality. We further introduced a system-agnostic (black-box) explanation algorithm that leverages distance-weighted responsibility to guide the explanation search. Our experimental evaluation across environments from two autonomous-driving simulators demonstrated that the distance-weighted responsibility provides more effective guidance than discrete responsibility, substantially reducing the computational effort required to find explanations.
References
Appendix I: Evaluated Tracks Visualization
Figs. 7 to 21 show all types of evaluated tracks. We note that the visualizations of the MetaDrive environments Figure 19 to Figure 21 include lanes in both directions. Hence, the vehicle only drives on the right side of the road.

Figure 19. MetaDrive Curve

Figure 21. MetaDrive Mixed

Figure 7. Sinusoidal short narrow

Figure 8. Sinusoidal short wide

Figure 9. Sinusoidal long narrow

Figure 10. Sinusoidal long wide

Figure 11. Segmented short narrow

Figure 12. Segmented short wide

Figure 13. Segmented long narrow

Figure 14. Segmented long wide

Figure 15. Lane Shift short narrow

Figure 16. Lane Shift short wide

Figure 17. Lane Shift long narrow

Figure 18. Lane Shift long wide

Figure 20. MetaDrive Straight
Appendix II: Execution Time Analysis
Figure 22 shows the execution time in seconds as a function of the number of simulation runs. The measurements were taken for the scripts used in the evaluation presented in Sec. V, covering the exhaustive and responsibility-guided approaches in the sinusoidal short narrow environment. Importantly, these results demonstrate that the cost of all additional computation in the responsibility-guided approach is negligible relative to the number of simulation runs and therefore does not materially affect the overall runtime. We observe a small runtime overhead for the distance-based approaches, likely due to the distance function computations. However, this gap remains small and does not increase with the number of simulation runs and obstacles. Thus, the analysis in Sec. V focuses on the number of simulation runs.

Figure 22. Execution time as a function of the number of simulation runs.
Appendix III: Evaluation Results with Chamfer Distance
Figure 23, Table II, and Figure 24 report the evaluation results for the Chamfer distance.
| Env. | 10 Disc. | 10 Dist. | 11 Disc. | 11 Dist. | 12 Disc. | 12 Dist. | 13 Disc. | 13 Dist. | 14 Disc. | 14 Dist. |
| LiteRacer: Sin-SN | 0.21 | 0.29 | 0.15 | 0.35 | 0.10 | 0.45 | 0.19 | 0.41 | 0.14 | 0.30 |
| LiteRacer: Sin-SW | 0.19 | 0.35 | 0.17 | 0.31 | 0.12 | 0.32 | 0.12 | 0.26 | 0.13 | 0.32 |
| LiteRacer: Sin-LN | 0.21 | 0.36 | 0.17 | 0.33 | 0.20 | 0.38 | 0.18 | 0.33 | 0.08 | 0.30 |
| LiteRacer: Sin-LW | 0.13 | 0.34 | 0.15 | 0.38 | 0.14 | 0.35 | 0.10 | 0.24 | 0.17 | 0.36 |
| LiteRacer: Seg-SN | 0.19 | 0.39 | 0.20 | 0.34 | 0.13 | 0.44 | 0.19 | 0.40 | 0.17 | 0.37 |
| LiteRacer: Seg-SW | 0.21 | 0.35 | 0.18 | 0.33 | 0.15 | 0.30 | 0.14 | 0.29 | 0.11 | 0.30 |
| LiteRacer: Seg-LN | 0.22 | 0.44 | 0.20 | 0.34 | 0.19 | 0.37 | 0.12 | 0.39 | 0.11 | 0.35 |
| LiteRacer: Seg-LW | 0.13 | 0.32 | 0.16 | 0.30 | 0.11 | 0.29 | 0.12 | 0.26 | 0.10 | 0.24 |
| LiteRacer: LS-SN | 0.23 | 0.41 | 0.19 | 0.40 | 0.14 | 0.46 | 0.12 | 0.28 | 0.17 | 0.36 |
| LiteRacer: LS-SW | 0.18 | 0.22 | 0.11 | 0.19 | 0.13 | 0.34 | 0.11 | 0.29 | 0.12 | 0.27 |
| LiteRacer: LS-LN | 0.19 | 0.39 | 0.17 | 0.36 | 0.17 | 0.41 | 0.20 | 0.39 | 0.20 | 0.39 |
| LiteRacer: LS-LW | 0.15 | 0.37 | 0.12 | 0.33 | 0.15 | 0.29 | 0.13 | 0.33 | 0.16 | 0.41 |
| MetaDr.: Curve | 0.34 | 0.43 | 0.28 | 0.48 | 0.20 | 0.42 | 0.15 | 0.34 | 0.16 | 0.56 |
| MetaDr.: Straight | 0.41 | 0.40 | 0.28 | 0.31 | 0.22 | 0.35 | 0.20 | 0.36 | 0.25 | 0.32 |
| MetaDr.: Mixed | 0.32 | 0.40 | 0.25 | 0.36 | 0.20 | 0.41 | 0.16 | 0.37 | 0.22 | 0.39 |
Table II. TABLE II: AUC results for the discrete and distance-based rankings across different environments and numbers of obstacles.

Figure 23. Efficiency of explanation generation algorithms as a function of the number of obstacles (10–14), measured by the number of simulation runs (lower is better).

Figure 24. Comparison of the discrete and distance-based rankings for different environments and numbers of obstacles.
Multiple Explanation Evaluation Euclidean Distance
Figure 25 reports the ranking curves of all settings for the Euclidean distance-weighted responsibility.

Figure 25. Comparison of the discrete and distance-based rankings for different environments and numbers of obstacles.
References
- [1]L. V. Nguyen, K. A. Hoque, S. Bak, S. Drager, and T. T. Johnson, “Cyber-physical specification mismatches,” ACM Trans. Cyber-Phys. Syst., vol. 2, no. 4, July 2018.
- [2]M. Z. Islam, Y. Lin, V. M. Vokkarane, and V. Venkataramanan, “Cyber-physical cascading failure and resilience of power grid: A comprehensive review,” Frontiers in Energy Research, vol. 11, 2023.DOI
- [3]K. Elimelech, T. Yaacov, D. A. Kelly, H. Chockler, and M. Y. Vardi, “Explaining failures of cyber-physical systems with actual causality,” in 2026 IEEE ICRA, 2026.
- [4]J. Pearl, Causality. Cambridge university press, 2009.
- [5]J. Y. Halpern, Actual Causality. The MIT Press, 2016.
- [6]H. Chockler and J. Y. Halpern, “Responsibility and blame: A structural-model approach,” J. Artif. Intell. Res., vol. 22, pp. 93–115, 2004.
- [7]——, “Explaining image classifiers,” in Proceedings of the 21st International Conference on Principles of Knowledge Representation and Reasoning, KR, 2024.
- [8]H. Chockler, D. A. Kelly, D. Kroening, and Y. Sun, “Causal explanations for image classifiers,” Journal of Artificial Intelligence Research, vol. 86, 2026.DOI
- [9]D. A. Kelly and H. Chockler, “I guess that’s why they call it the blues: Causal analysis for audio classifiers,” arXiv preprint arXiv:2601.16675, 2026.arxiv.org/abs/2601.16675
- [10]N. Blake, D. A. Kelly, S. Kapplani-Mucaj, R. Wang, G. Thomas, and H. Chockler, “Causal responsibility based explainable AI for vibrational spectroscopy applied to oral FTIR and oesophageal Raman diagnostics,” Scientific Reports, 2026.
- [11]H. Chockler, D. A. Kelly, and D. Kroening, “Multiple different explanations for image classifiers,” in ECAI European Conference on Artificial Intelligence, 2025.arxiv.org/abs/2309.14309
- [12]Z. Ghazal, H. Yusuf, and K. Gaaoul, “Towards counterfactual explanation and assertion inference for cps debugging,” in 2026 IEEE International Conference on Software Testing, Verification and Validation (ICST), 2026, pp. 623–634.
- [13]R. D. Diwakaran, S. Sankaranarayanan, and A. Trivedi, “Analyzing neighborhoods of falsifying traces in cyber-physical systems,” in Proceedings of the 8th International Conference on Cyber-Physical Systems, 2017.DOI
- [14]E. Bartocci, N. Manjunath, L. Mariani, C. Mateis, and D. Ničković, “Automatic failure explanation in cps models,” in Proceedings of SEFM. Springer-Verlag, 2019, p. 69–86.arxiv.org/abs/1903.12468
- [15]M. Diehl and K. Ramirez-Amaro, “Why did I fail? A causal-based method to find explanations for robot failures,” IEEE Robotics and Automation Letters, vol. 7, no. 4, pp. 8925–8932, 2022.
- [16]M. Tenorth and M. Beetz, “Knowrob — knowledge processing for autonomous personal robots,” in 2009 IEEE/RSJ International Conference on Intelligent Robots and Systems, 2009, pp. 4261–4266.DOI
- [17]G. H. Lim, I. H. Suh, and H. Suh, “Ontology-based unified robot knowledge for service robots in indoor environments,” IEEE Transactions on Systems, Man, and Cybernetics - Part A: Systems and Humans, vol. 41, no. 3, pp. 492–509, 2011.DOI
- [18]A. Banerjee, I. Ramani, and S. K. Gupta, “FaultEx: Explaining operational changes in terms of design variables in cps control code,” in 2021 4th IEEE International Conference on Industrial Cyber-Physical Systems (ICPS), 2021, pp. 485–490.DOI
- [19]K. Elimelech, M. Lahijanian, L. E. Kavraki, and M. Y. Vardi, “LiteRacer: a lightweight autonomous vehicle simulator for benchmarking and development of formal verification techniques,” in Workshop on Software Challenges in Formal Methods for Robotics (FMR) at ICRA, 2024. [Online]. Available: https://github.com/chen/LiteRacer
- [20]——, “Falsification of autonomous systems in rich environments,” ACM TCPS, 2026, to appear.arxiv.org/abs/2412.17992
- [21]J. Y. Halpern and J. Pearl, “Causes and explanations: a structural-model approach. Part I: causes,” British Journal for Philosophy of Science, vol. 56, no. 4, pp. 843–887, 2005.
- [22]J. Y. Halpern, “A modification of the Halpern–Pearl definition of causality,” in Proceedings of IJCAI. AAAI Press, 2015.DOI
- [23]Q. Li, Z. Peng, L. Feng, Q. Zhang, Z. Xue, and B. Zhou, “Metadrive: Composing diverse driving scenarios for generalizable reinforcement learning,” IEEE Transactions on Pattern Analysis and Machine Intelligence, 2022.DOI
- [24]Anonymized-authors, “Causal analysis of failures of cyber-physical systems with continuous inputs — supplementary material,” https://figshare.com/s/80e32c778e092d2955aa, 2026.
- [25]H. Fan, H. Su, and L. J. Guibas, “A point set generation network for 3d object reconstruction from a single image,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017.
