CFGs: Causality Constrained Counterfactual Explanations using goal-directed ASP
Sopam Dasgupta, Joaquín Arias, Elmer Salazar, Gopal Gupta
TL;DR
CFGs tackles explainability in automated decisions by generating causality-aware counterfactual explanations. It introduces Counterfactual Generation with s(CASP) (CFGs), a planning-based framework that encodes the problem as state transitions under causal rules and uses the goal-directed ASP system to compute a path from an undesired initial state to a desired goal state. The method enforces plausibility through transitions that respect feature dependencies and immutability, demonstrating model-agnostic recourse on RBML rules derived from FOLD-SE. Experiments on the Adult, German, and Car Evaluation datasets show short, realistic intervention sequences that flip predictions, with proofs of soundness provided in supplementary material. This work offers a general, logic-based approach to generate actionable, causally coherent counterfactuals across domains.
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.
