CFGs: Causality Constrained Counterfactual Explanations using goal-directed ASP

2405.15956

YC

0

Reddit

0

Published 5/28/2024 by Sopam Dasgupta, Joaqu'in Arias, Elmer Salazar, Gopal Gupta
CFGs: Causality Constrained Counterfactual Explanations using goal-directed ASP

Abstract

Machine learning models that automate decision-making are increasingly used in consequential areas such as loan approvals, pretrial bail approval, and hiring. Unfortunately, most of these models are black boxes, i.e., they are unable to reveal how they reach these prediction decisions. A need for transparency demands justification for such predictions. An affected individual might also desire explanations to understand why a decision was made. Ethical and legal considerations require informing the individual of changes in the input attribute (s) that could be made to produce a desirable outcome. Our work focuses on the latter problem of generating counterfactual explanations by considering the causal dependencies between features. In this paper, we present the framework CFGs, CounterFactual Generation with s(CASP), which utilizes the goal-directed Answer Set Programming (ASP) system s(CASP) to automatically generate counterfactual explanations from models generated by rule-based machine learning algorithms in particular. We benchmark CFGs with the FOLD-SE model. Reaching the counterfactual state from the initial state is planned and achieved using a series of interventions. To validate our proposal, we show how counterfactual explanations are computed and justified by imagining worlds where some or all factual assumptions are altered/changed. More importantly, we show how CFGs navigates between these worlds, namely, go from our initial state where we obtain an undesired outcome to the imagined goal state where we obtain the desired decision, taking into account the causal relationships among features.

Create account to get full access

or

If you already have an account, we'll log you in

Overview

  • This paper proposes a framework called CFGs (Causality Constrained Counterfactual Explanations using goal-directed ASP) for generating causality-constrained counterfactual explanations for black-box machine learning models.
  • The key idea is to use Answer Set Programming (ASP) to efficiently explore the space of feasible counterfactual examples while respecting causal constraints.
  • The framework aims to generate counterfactual explanations that are more actionable and aligned with the causal structure of the problem, compared to prior approaches.

Plain English Explanation

The paper introduces a new method called CFGs (Causality Constrained Counterfactual Explanations using goal-directed ASP) for explaining the decisions made by complex machine learning models. When a model makes a prediction, it can be helpful to understand what changes to the input would have resulted in a different outcome. These types of "counterfactual" explanations can provide valuable insights, but they need to be carefully constrained to ensure they are feasible and aligned with the underlying causal structure of the problem.

The key innovation in CFGs is the use of Answer Set Programming (ASP), a powerful tool for efficiently exploring the space of possible counterfactual examples while respecting causal constraints. Rather than just searching for any counterfactual that changes the model's output, CFGs generates counterfactuals that are actually achievable and align with the true causal relationships in the problem domain.

For example, imagine a model that predicts whether a loan applicant will default. A naive counterfactual might suggest changing the applicant's income to a much higher level, but this may not be a realistic or actionable change. In contrast, CFGs would generate counterfactuals that respect factors like the applicant's education level, work history, and other causally relevant variables, resulting in more meaningful and useful explanations.

By incorporating causal knowledge into the counterfactual search process, the CFGs framework aims to produce explanations that are not only accurate, but also more intuitive and actionable for users. This can be particularly valuable in high-stakes domains like healthcare, finance, and criminal justice, where it's critical to understand the true drivers of a model's predictions.

Technical Explanation

The CFGs framework leverages Answer Set Programming (ASP), a declarative logic programming paradigm, to efficiently explore the space of feasible counterfactual examples while respecting causal constraints. The key components of the framework include:

  1. Causal Model Representation: The causal structure of the problem is captured using a Structural Causal Model (SCM), which encodes the causal relationships between variables.

  2. Counterfactual Generation: ASP is used to generate candidate counterfactual examples that satisfy the causal constraints defined in the SCM. This is done through a goal-directed search process that aims to find the "closest" counterfactual to the original input.

  3. Diversity and Sparsity: The framework incorporates diversity and sparsity constraints to ensure that the generated counterfactuals are distinct and minimally different from the original input, making them more actionable for users.

  4. Interpretability: The use of ASP allows the framework to generate explanations that are inherently interpretable, as the generated counterfactuals can be traced back to the underlying causal model and constraints.

The authors evaluate the CFGs framework on several benchmark datasets and show that it outperforms existing counterfactual explanation methods in terms of the quality, diversity, and sparsity of the generated counterfactuals. The framework's ability to incorporate causal knowledge is particularly beneficial in domains where causal relationships are well-understood, such as healthcare and finance.

Critical Analysis

One of the key strengths of the CFGs framework is its ability to generate counterfactual explanations that are aligned with the causal structure of the problem, making them more intuitive and actionable for users. However, the framework's performance is heavily dependent on the accuracy and completeness of the underlying causal model, which may be challenging to obtain in practice.

The authors acknowledge that the causal model used in their experiments was manually specified, and they suggest that future work should explore methods for automatically learning the causal structure from data. Additionally, the framework's reliance on ASP may limit its scalability to large-scale or highly complex machine learning models, as the ASP solving process can be computationally intensive.

Another potential limitation is the framework's focus on generating a single "closest" counterfactual, which may not capture the full range of plausible explanations. In some cases, users may benefit from seeing a diverse set of counterfactuals that explore different causal pathways to the desired outcome.

Despite these caveats, the CFGs framework represents an important step towards developing more robust and interpretable counterfactual explanations for black-box machine learning models. By incorporating causal knowledge into the explanation process, the framework has the potential to improve the transparency and trustworthiness of these models, particularly in high-stakes domains.

Conclusion

The CFGs framework proposed in this paper offers a novel approach to generating counterfactual explanations for black-box machine learning models. By leveraging Answer Set Programming to efficiently explore the space of feasible counterfactuals while respecting causal constraints, the framework is able to produce explanations that are more aligned with the true causal structure of the problem and, consequently, more intuitive and actionable for users.

The framework's ability to incorporate causal knowledge is a key strength, as it allows for the generation of counterfactuals that are not only accurate but also meaningful and trustworthy. This is particularly important in high-stakes domains where the interpretability and transparency of AI systems is of paramount concern.

While the framework has some limitations, such as its dependence on the accuracy of the underlying causal model and potential scalability issues, the authors have made an important contribution to the field of explainable AI. The CFGs framework represents a significant step forward in the development of counterfactual explanation methods that are both technically sophisticated and grounded in real-world causal relationships.



This summary was produced with help from an AI and may contain inaccuracies - check out the links to read the original source documents!

Related Papers

A Framework for Feasible Counterfactual Exploration incorporating Causality, Sparsity and Density

A Framework for Feasible Counterfactual Exploration incorporating Causality, Sparsity and Density

Kleopatra Markou, Dimitrios Tomaras, Vana Kalogeraki, Dimitrios Gunopulos

YC

0

Reddit

0

The imminent need to interpret the output of a Machine Learning model with counterfactual (CF) explanations - via small perturbations to the input - has been notable in the research community. Although the variety of CF examples is important, the aspect of them being feasible at the same time, does not necessarily apply in their entirety. This work uses different benchmark datasets to examine through the preservation of the logical causal relations of their attributes, whether CF examples can be generated after a small amount of changes to the original input, be feasible and actually useful to the end-user in a real-world case. To achieve this, we used a black box model as a classifier, to distinguish the desired from the input class and a Variational Autoencoder (VAE) to generate feasible CF examples. As an extension, we also extracted two-dimensional manifolds (one for each dataset) that located the majority of the feasible examples, a representation that adequately distinguished them from infeasible ones. For our experimentation we used three commonly used datasets and we managed to generate feasible and at the same time sparse, CF examples that satisfy all possible predefined causal constraints, by confirming their importance with the attributes in a dataset.

Read more

4/23/2024

Unifying Perspectives: Plausible Counterfactual Explanations on Global, Group-wise, and Local Levels

Unifying Perspectives: Plausible Counterfactual Explanations on Global, Group-wise, and Local Levels

Patryk Wielopolski, Oleksii Furman, Jerzy Stefanowski, Maciej Zik{e}ba

YC

0

Reddit

0

Growing regulatory and societal pressures demand increased transparency in AI, particularly in understanding the decisions made by complex machine learning models. Counterfactual Explanations (CFs) have emerged as a promising technique within Explainable AI (xAI), offering insights into individual model predictions. However, to understand the systemic biases and disparate impacts of AI models, it is crucial to move beyond local CFs and embrace global explanations, which offer a~holistic view across diverse scenarios and populations. Unfortunately, generating Global Counterfactual Explanations (GCEs) faces challenges in computational complexity, defining the scope of global, and ensuring the explanations are both globally representative and locally plausible. We introduce a novel unified approach for generating Local, Group-wise, and Global Counterfactual Explanations for differentiable classification models via gradient-based optimization to address these challenges. This framework aims to bridge the gap between individual and systemic insights, enabling a deeper understanding of model decisions and their potential impact on diverse populations. Our approach further innovates by incorporating a probabilistic plausibility criterion, enhancing actionability and trustworthiness. By offering a cohesive solution to the optimization and plausibility challenges in GCEs, our work significantly advances the interpretability and accountability of AI models, marking a step forward in the pursuit of transparent AI.

Read more

5/29/2024

🔮

Counterfactual Explanations of Black-box Machine Learning Models using Causal Discovery with Applications to Credit Rating

Daisuke Takahashi, Shohei Shimizu, Takuma Tanaka

YC

0

Reddit

0

Explainable artificial intelligence (XAI) has helped elucidate the internal mechanisms of machine learning algorithms, bolstering their reliability by demonstrating the basis of their predictions. Several XAI models consider causal relationships to explain models by examining the input-output relationships of prediction models and the dependencies between features. The majority of these models have been based their explanations on counterfactual probabilities, assuming that the causal graph is known. However, this assumption complicates the application of such models to real data, given that the causal relationships between features are unknown in most cases. Thus, this study proposed a novel XAI framework that relaxed the constraint that the causal graph is known. This framework leveraged counterfactual probabilities and additional prior information on causal structure, facilitating the integration of a causal graph estimated through causal discovery methods and a black-box classification model. Furthermore, explanatory scores were estimated based on counterfactual probabilities. Numerical experiments conducted employing artificial data confirmed the possibility of estimating the explanatory score more accurately than in the absence of a causal graph. Finally, as an application to real data, we constructed a classification model of credit ratings assigned by Shiga Bank, Shiga prefecture, Japan. We demonstrated the effectiveness of the proposed method in cases where the causal graph is unknown.

Read more

4/30/2024

GLANCE: Global Actions in a Nutshell for Counterfactual Explainability

GLANCE: Global Actions in a Nutshell for Counterfactual Explainability

Ioannis Emiris, Dimitris Fotakis, Giorgos Giannopoulos, Dimitrios Gunopulos, Loukas Kavouras, Kleopatra Markou, Eleni Psaroudaki, Dimitrios Rontogiannis, Dimitris Sacharidis, Nikolaos Theologitis, Dimitrios Tomaras, Konstantinos Tsopelas

YC

0

Reddit

0

Counterfactual explanations have emerged as an important tool to understand, debug, and audit complex machine learning models. To offer global counterfactual explainability, state-of-the-art methods construct summaries of local explanations, offering a trade-off among conciseness, counterfactual effectiveness, and counterfactual cost or burden imposed on instances. In this work, we provide a concise formulation of the problem of identifying global counterfactuals and establish principled criteria for comparing solutions, drawing inspiration from Pareto dominance. We introduce innovative algorithms designed to address the challenge of finding global counterfactuals for either the entire input space or specific partitions, employing clustering and decision trees as key components. Additionally, we conduct a comprehensive experimental evaluation, considering various instances of the problem and comparing our proposed algorithms with state-of-the-art methods. The results highlight the consistent capability of our algorithms to generate meaningful and interpretable global counterfactual explanations.

Read more

5/30/2024