arXiv:2610.29724cs.ROOct 2026

Manuscript Offprint

arXiv:2610.29724

Sufficient and Necessary Causal Explanations for the Analysis of Autonomous Systems

Tom Yaacov, Khen Elimelech, Hana Chockler, Moshe Y. Vardi

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Tom Yaacov ∗^{*}, 1^{1}, Khen Elimelech 1^{1}, Hana Chockler 1^{1}, and Moshe Y. Vardi 2^{2}

Abstract—Understanding failures of autonomous systems is challenging, particularly when their behavior depends on black-box components such as neural networks. In this work, we make a distinction between two objectives of failure analysis: reproduction, which seeks to identify conditions sufficient to reproduce an observed failure, and avoidance, which seeks to identify the changes required to prevent it. Previous work on causal explanations of system failures is based on the concept of sufficient explanations and naturally supports reproduction. Nevertheless, we observe that it does not address the problem of avoiding the failure. In this paper, we introduce and formalize the concept of necessary explanations for system analysis as the correct formalism for failure avoidance. We place necessary explanations in the framework of actual causality and show that, together with sufficient explanations, they provide a unified causal framework for addressing both objectives of failure analysis. We present an efficient approximation algorithm for generating necessary explanations based on the notion of causal responsibility. We evaluate the efficiency of our approach across multiple environments. We demonstrate the practical utility of necessary explanations for failure avoidance through counterfactual generation and show that it outperforms existing methods.

I. INTRODUCTION

Autonomous systems rely on algorithms and digital computation to control real-world machines and achieve complex objectives autonomously [1]. As these objectives become increasingly challenging, modern systems have come to rely heavily on black-box components, such as neural networks [2], [3]. The opacity of these components, combined with the complexity of systems and the variability of their operating environments, makes it difficult to interpret system behavior and gain insight into how decisions were made. This difficulty has motivated the rapidly growing interest in Explainable Artificial Intelligence (XAI), which is widely regarded as crucial for the widespread adoption of autonomous systems [4], [5].

Explainability becomes even more vital when failures happen. Understanding failures, known as failure analysis, is crucial for the development and debugging of systems, and it is especially challenging when systems rely on black-box components, often provided by a third party. An explanation should help us gain insight into what affected the system behavior that led to the failure outcome. Addressing this goal requires answering two questions: (1) what counts as an explanation? (2) how to generate the right one? Post-hoc XAI, where explanations are based on the analysis of the outcome rather than the process, is a suitable paradigm for analyzing black-box systems, as it does not require any changes or even access to the internals of the system, and it is the one we follow in this paper.

To position this work clearly, we first mention the underlying conceptual contribution of this paper (which we discuss in detail in Sec. IV), with which we identify the two complementary explanation objectives: outcome avoidance, and outcome reproduction. In the first case, our concern is changing the outcome (with minimal effort), e.g., when we wish to repair the failure; the explanation should hence provide insight on which elements in the scenario should be changed (and how), in order to change the (failing) outcome. In the second case, our concern is generating additional scenarios, in which the same (failing) outcome is maintained, e.g., as part of a debugging process; the explanation should hence provide insight on which elements in the scenario are sufficient to recreate the outcome, regardless of the rest. The two forms of explanation are complementary, but one cannot be deduced from the other.

A recent work [6] suggested using the framework of “actual causality” [7], [8] to formally define and generate causal failure explanations (for CPSs). According to our categorization, that work addressed the objective of failure reproduction, by focusing on the generation of “sufficient explanations” (an established concept in actual causality). Roughly speaking, a sufficient explanation is a subset of elements of the failure execution that is, by itself, sufficient to result in a failure, even if all other elements are changed or removed. Such explanations are not suitable for failure avoidance, as removing or changing such a sufficient subset does not guarantee that the failure is avoided. Intuitively, this is because multiple sufficient subsets may exist.

This work seeks to extend the foundations laid in [6] to address the objective of failure avoidance by introducing and applying the concept of “necessary explanations”. Roughly speaking, a necessary explanation is a subset of elements of the failure execution such that removing them avoids the failure. Together, this provides, for the first time, a unified (causal) formal framework for failure analysis, allowing to address both objectives. As exact computation of such causal explanations quickly becomes intractable when the number of inputs increases [9], we also develop a practical, scalable algorithm for generating necessary explanations based on the notion of causal degree of responsibility [10].

The paper contributions: (i) We suggest a conceptual

1^{1} King's College London, {firstname.lastname}@kcl.ac.uk

2^{2} Rice University, vardi@rice.edu

  • Corresponding Author.

** This work was partially supported by the Causality in Healthcare AI (CHAI) Hub [UKRI AI and EPSRC grant EP/Y028856/1].

Figure

Fig. 1: The autonomous car in the LiteRacer simulator [11].

categorization of the objectives of failure explanation—avoidance and reproduction—providing a basis for understanding, comparing, and advancing work in this field. (ii) We introduce the notion of necessary explanations for autonomous system failures and discuss its application to failure avoidance. (iii) We develop a practical, scalable algorithm for generating necessary explanations and provide an experimental evaluation demonstrating its efficiency across multiple environments. Finally, to demonstrate the superiority of this framework for explanation for failure avoidance, (iv) we provide a study comparing with prior work on failure avoidance not based on causal reasoning. We show that our approach achieves a higher success rate, lower computation time, and better quality. For clarity, the paper is presented (and contributions (iii) and (iv) are evaluated) using a setup of an autonomous car with a black-box neural controller, trained to avoid collisions (as in Fig. 1). In our evaluation, we use two autonomous driving simulators, of both high and low fidelity, showing that the benefits of our approach are simulator- and system-independent.

The rest of the paper is structured as follows. After overviewing the related work, Sec. II provides preliminaries on the autonomous system testing model and introduces the running example. Sec. III gives a brief overview of actual causality and introduces our setup. Sec. IV introduces the conceptual framework of failure analysis. Sec. V presents our theoretical contributions, extending the framework with necessary explanations. Sec. VI presents the approximation algorithm for computing necessary explanations. The experimental performance evaluation is presented in Sec. VII. Sec. VIII demonstrates the practical utility of necessary explanations for failure avoidance, comparing it with existing work. Sec. IX concludes the paper.

Related Work: In explainable AI, actual causality has been used in various domains, such as images [9], audio [12], and process mining [13]. Since computing actual causes is generally hard, these approaches introduce efficient approximations [14]. Similarly to us, they treat the AI model as a black box.

Existing explainability approaches for failure reproduction include sensitivity analysis [15], [16], which examines neighborhoods around falsifying traces, identifying regions where a property is violated. As mentioned, actual causality has also been proposed for failure reproduction, providing a more structured, high-level alternative by identifying minimal subsets of elements that reproduce the observed failure [6].

Failure avoidance methods focus on modifications to a failing scenario that change its outcome. Existing approaches for failure avoidance primarily generate counterfactuals, passing examples similar to the original [17], [18]. While counterfactuals can provide valuable insight into the observed behavior, they focus on input-output changes rather than the underlying causal mechanisms, potentially attributing importance to downstream effects and including modifications that are not necessary for avoiding the failure. Autonomous systems work on explainability also use counterfactual attribution for root-cause analysis [19]. This approach relies on causal discovery, which infers causal relationships from data, a fundamentally different approach from the one we adopt in this paper, which allows reasoning within an abstract model.

References (24)