Source-linked AI summary
Explaining Black-Box Algorithms Using Probabilistic Contrastive Counterfactuals
Sainyam Galhotra, Romila Pradhan, Babak Salimi
TL;DR
Opacity in consequential algorithmic decisions can harm stakeholders, prompting renewed interest in XAI to provide human-understandable explanations of decisions or processes. LEWIS uses probabilistic contrastive counterfactuals and necessity and sufficiency scores to explain causal influences and find minimal high-sufficiency interventions for recourse. LEWIS’s real-data evaluation reports intuitive and actionable explanations, and the paper describes an end-to-end evaluation on real and synthetic data.
Problem
Opacity in consequential algorithmic decisions can harm stakeholders, prompting renewed interest in XAI to provide human-understandable explanations of decisions or processes.
Source: §1 · p. 1Method
LEWIS uses probabilistic contrastive counterfactuals and necessity and sufficiency scores to explain causal influences and find minimal high-sufficiency interventions for recourse.
Source: §1 · pp. 2–3, §4.2 · p. 10Results
LEWIS’s real-data evaluation reports intuitive and actionable explanations, and the paper describes an end-to-end evaluation on real and synthetic data.
Source: §1 · p. 3Takeaways & Limitations
LEWIS is designed to provide causal insights into decisions at local, global, and contextual levels and recourse translatable into real-world interventions.
Source: §1 · p. 2LEWIS assumes representative population data and knowledge of the causal diagram; without user background knowledge, it assumes no-confounding and monotonicity.
Source: §6 · p. 18
Abstract
from arXiv · showhide
There has been a recent resurgence of interest in explainable artificial intelligence (XAI) that aims to reduce the opaqueness of AI-based decision-making systems, allowing humans to scrutinize and trust them. Prior work in this context has focused on the attribution of responsibility for an algorithm's decisions to its inputs wherein responsibility is typically approached as a purely associational concept. In this paper, we propose a principled causality-based approach for explaining black-box decision-making systems that addresses limitations of existing methods in XAI. At the core of our framework lies probabilistic contrastive counterfactuals, a concept that can be traced back to philosophical, cognitive, and social foundations of theories on how humans generate and select explanations. We show how such counterfactuals can quantify the direct and indirect influences of a variable on decisions made by an algorithm, and provide actionable recourse for individuals negatively affected by the algorithm's decision. Unlike prior work, our system, LEWIS: (1)can compute provably effective explanations and recourse at local, global and contextual levels (2)is designed to work with users with varying levels of background knowledge of the underlying causal model and (3)makes no assumptions about the internals of an algorithmic system except for the availability of its input-output data. We empirically evaluate LEWIS on three real-world datasets and show that it generates human-understandable explanations that improve upon state-of-the-art approaches in XAI, including the popular LIME and SHAP. Experiments on synthetic data further demonstrate the correctness of LEWIS's explanations and the scalability of its recourse algorithm.
1 Introduction
Opacity in consequential algorithmic decisions has renewed interest in XAI, but many post-hoc methods rely on associations or counterfactual perturbations that do not translate into real-world interventions. LEWIS proposes a causal, model-agnostic framework for explaining black-box decisions and generating actionable recourse.
1 Introduction
- The introduction situates LEWIS in a resurgence of XAI motivated by concerns about opacity in consequential decisions.Examples include lending, job applications, parole, and medication prescriptions.Source: §1 · p. 1
- Effective explanations should support normative evaluation of decision rules and offer users actionable recourse for future outcomes.The paper cites these as two purposes of explanations.Source: §1 · p. 1
1 INTRODUCTION 2
- LEWIS distinguishes local explanations for individuals, global explanations across attributes, and contextual explanations for sub-populations.The overview uses a loan-approval algorithm built on the UCI German credit dataset.Source: Figure 1 · p. 2
- Existing attribution and surrogate methods can mislead by relying on correlations, while input perturbations may not correspond to actionable real-world interventions.The paper frames its approach as post hoc and model agnostic, requiring only a black-box algorithm.Source: §1 · p. 2
- LEWIS uses probabilistic contrastive counterfactuals to explain causal influences and generate recourse for black-box decisions.It aims to provide local, global, and contextual explanations as well as interventions translatable into real-world actions.Source: §1 · p. 2
1 INTRODUCTION 3
The introduction presents probabilistic contrastive counterfactuals as a basis for causal explanation and recourse, with necessity and sufficiency scores supporting explanations at multiple levels. It also outlines estimation and optimization approaches and reports evaluation on real and synthetic data.
1 INTRODUCTION 3
- Contrastive counterfactuals have philosophical, cognitive, and social foundations, but few XAI methods operationalize their causal form.The paper presents this as a gap motivating LEWIS.Source: §1 · p. 3
- For rejected applicants, LEWIS uses sufficiency to measure an attribute’s responsibility; for approved applicants, it uses necessity.The introduction illustrates these scores with loan-purpose and credit-history examples.Source: §1 · p. 3
- The scores rely on ordinal importance of attribute values, which LEWIS can infer from algorithm outputs when ordering is unknown.The paper gives higher savings as an example of a naturally ordered attribute.Source: §1 · p. 3
- Necessity and sufficiency scores quantify whether an attribute is necessary for a decision and its tendency to produce a desired outcome.The paper describes the measures as complementary tools for algorithmic explanations.Source: §1 · p. 3
- LEWIS generates local, global, and user-defined sub-population explanations of attributes that influence algorithmic decisions.Its contextual explanations can be generated at global or local levels.Source: §1 · p. 3
- Recourse is formulated as a search for minimal interventions on pre-specified actionable variables with high sufficiency for a desired outcome.The intervention is selected to produce the algorithm’s desired future outcome.Source: §1 · p. 3
- LEWIS uses historical-data bounds and integer programming to estimate counterfactuals and generate recourse under partial causal-model knowledge.The paper says these methods support reliable recourse under partial background knowledge.Source: §1 · p. 3
- The paper reports an end-to-end evaluation on real and synthetic data, with intuitive and actionable explanations on real datasets.The supplied passage states the evaluation scope and real-data finding.Source: §1 · p. 3
2 PRELIMINARIES 4
The supplied material reports LEWIS’s comparative and synthetic-data evaluation findings and identifies a notation table for the paper.
2 PRELIMINARIES 4
- Table 1 summarizes the notation used in the paper.Source: Table 1 · p. 4
- LEWIS’s explanations are reported to surpass state-of-the-art XAI methods and accord with existing literature.The passage also reports synthetic-data evidence for the accuracy and correctness of explanation scores and actionable recourse.Source: §2 · p. 4
- Synthetic-data experiments demonstrate the accuracy and correctness of LEWIS’s explanation scores and actionable recourse.The passage separately reports that explanations are consistent with existing literature and surpass state-of-the-art methods.Source: §2 · p. 4
2 Preliminaries
The preliminaries introduce notation and probabilistic causal models, then define interventions, potential outcomes, and counterfactual queries. They also outline a three-step procedure for answering such queries.
2 Preliminaries
- The paper uses uppercase letters for variables, lowercase letters for values, and boldface for sets; domains are discrete and finite, with continuous domains assumed binned.Joint probability notation Pr(x) represents Pr(X = x).Source: §2 · p. 4
- A probabilistic causal model combines a causal model of observable and background variables with a probability distribution over background-variable values.The causal model contains structural equations and can be represented as a directed causal diagram.Source: §2 · p. 4
- An intervention replaces the structural equations for variables X with a constant x, and the resulting potential outcome is the solution in the modified model.The paper states a consistency rule: when X already equals x, intervention X ← x leaves the outcome invariant.Source: §2 · p. 4
- A counterfactual query asks for the probability of an outcome after an intervention, conditional on a context such as specified attributes.The distribution over background variables induces distributions over endogenous variables and potential outcomes.Source: §2 · p. 4
- Pearl’s procedure answers counterfactual queries by updating context beliefs, modifying the model for the intervention, and evaluating the outcome.The passage notes that this procedure requires the underlying probabilistic causal model to be fully observed.Source: §2 · p. 4
3 EXPLANATIONS AND RECOURSE USING PROBABILISTIC COUNTERFACTUALS 5
The section distinguishes population-level interventions from counterfactual questions about individuals or subpopulations. It explains when interventions can be estimated from historical data and why that does not generally settle individual counterfactuals.
3 EXPLANATIONS AND RECOURSE USING PROBABILISTIC COUNTERFACTUALS 5
- When a set C satisfies the backdoor criterion relative to X and Y, the intervention probability can be expressed using observed probabilities and estimated from historical data.The section gives Pr(y | do(x)) as a sum over C of conditional outcome probabilities weighted by Pr(c).Source: §3 · p. 5
- A do-query asks about an intervention’s population-level effect, while a counterfactual can ask about its effect on a particular individual or subpopulation.Every interventional query can be expressed as a counterfactual, but not vice versa; some individual counterfactuals cannot be assessed in general when the causal model is not fully observed.Source: §3 · p. 5
- For loan approval, Pr(O = 1 | do(D = 24 months)) concerns all applicants, whereas the counterfactual among applicants denied a loan cannot be expressed using the do-operator.The example states that {G, A} satisfies the backdoor criterion for the population-level query.Source: §3 · p. 5
3 Explanations and Recourse Using Probabilistic Counterfactuals
LEWIS uses probabilistic contrastive counterfactuals to quantify how attribute values influence algorithmic decisions and to generate explanations at different levels of context. Its scores distinguish necessity, sufficiency, and their combined explanatory power.
3.1 Explanation Scores
- The necessity score measures how often a positive decision would become negative under a contrastive attribute value, while the sufficiency score measures the reverse change.The combined necessity-and-sufficiency score measures whether the algorithm responds in both ways and is nonzero iff the attribute causally influences decisions.Source: §3.1 · p. 6
- The scores capture indirect influence through proxies, including sensitive attributes that are not explicit algorithm inputs.The paper connects this capability to fairness auditing and illustrates it with income proxied by distance from competitors’ stores.Source: §3.1 · p. 6
3.2 LEWIS’s Explanations
- LEWIS computes necessity, sufficiency, and combined scores globally, for an individual, or within a user-defined context.The contexts are K = ∅, K = V, or an intermediate user-defined K, respectively; scores can also be calculated for user-defined sets of attributes.Source: §3.2 · p. 6
4 PROPERTIES AND ALGORITHMS 7
LEWIS uses its explanation scores to describe attribute contributions and to formulate recourse as a search for minimal changes to actionable variables. The resulting actions aim to produce a desired decision with high probability.
4 Properties and Algorithms
- For an individual, LEWIS estimates positive and negative contributions of an attribute value by considering counterfactual interventions.For Maeve, low credit amount contributes negatively because increasing it improves approval chances; credit history can contribute in both directions.Source: §4 · p. 7
- Credit history can contribute both positively and negatively: poor history worsens approval chances, while improving it raises the chances of better credit.The paper contrasts this with Maeve’s low credit amount, whose negative contribution reflects the improved approval chances associated with increasing the amount.Source: §4 · p. 7
- For a rejected individual, LEWIS generates minimal interventions on user-specified actionable variables with high sufficiency for producing a positive decision.The resulting explanations can support a challenge to the decision or suggest feasible future actions, such as increasing repayment duration or savings.Source: §4 · p. 7
- LEWIS frames counterfactual recourse as an optimization over actionable variables and their intervention costs.The optimization can be solved using historical data while treating the decision-making algorithm as a black box, producing feasible actions intended to change an individual’s outcome with high probability.Source: §4 · p. 7
4 Properties and Algorithms
The section establishes conditions for estimating or bounding LEWIS’s explanation scores from data, then develops a cost-sensitive optimization for counterfactual recourse. It also extends the scores to ordered multi-class outcomes and regression.
4.1 Computing Explanation Scores
- When the algorithm is monotone relative to two attribute values, the explanation scores can be computed exactly from data.More generally, Proposition 4.1 gives bounds when the relevant interventional queries can be estimated from historical data using the causal diagram.Source: §4.1 · pp. 7–8
- With a causal diagram and a backdoor adjustment set, Proposition 4.2 facilitates bounding and estimating scores from historical data even when the causal model is not fully specified.The stated conditions include algorithm monotonicity and a set C such that C ∪ K satisfies the backdoor criterion relative to X and the algorithm inputs.Source: §4.1 · p. 9
- The combined necessity-and-sufficiency score is bounded by a weighted expression involving the necessity and sufficiency scores; for binary X, the inequality is an equality.The bound uses outcome and attribute probabilities conditional on context k.Source: §4.1 · p. 9
- If X has no causal path to the outcome, its necessity, sufficiency, and combined scores are all zero.This result holds for all attribute-value pairs and contexts under the stated causal diagram.Source: §4.2 · p. 10
4.2 Computing Counterfactual Recourse
- For multi-valued outcomes, LEWIS assumes or uses an ordering of outcomes and redefines scores relative to a threshold value o.The other scores extend similarly, and the propositions can be used to evaluate them from observational data.Source: §4.2 · p. 10
- The recourse integer program minimizes action costs subject to a user-set sufficiency threshold, allowing multiple actionable variables to change together.Its data-based sufficiency constraint assumes that K satisfies the backdoor criterion relative to the outcome and actionable variables; a convex cost can increase linearly or quadratically with deviation from the current value.Source: §4.2 · p. 10
5 EXPERIMENTS 11
LEWIS formulates recourse as an optimization problem that selects actions for variables with non-zero indicator assignments. The experiments also report runtime for the computations in Section 5.3.
5 EXPERIMENTS 11
- Table 2 reports runtime in seconds for the experiments in Section 5.3.Source: Table 2 · p. 11
- A solution selects actions for variables whose indicator variables receive non-zero assignments, producing recourse that can change a negative decision with high probability.This applies to individuals with attributes k for which the algorithm made a negative decision.Source: §5 · p. 11
- The recourse formulation has a number of constraints that grows linearly with the actionable variables, usually a smaller subset of an individual's attributes.Source: §5 · p. 11
5 Experiments
The experiments evaluate LEWIS’s explanations and recourse across benchmark datasets and black-box algorithms, comparing its explanations with existing methods and testing correctness on synthetic data.
5.1 Datasets; 5.2 Setup
- The evaluation used German, Adult, COMPAS, Drug, and synthetic German data, with four black-box algorithms; conditional probabilities were estimated by regression on test-set predictions.The synthetic dataset enabled comparison against ground-truth scores derived from structural equations.Source: §5.1 · p. 11, §5.2 · p. 11
5.3 End-to-End Performance
- For German credit, status and credit history had near-perfect sufficiency, while status interventions were more likely to reverse decisions for older than younger individuals; Adult results also linked age and marital status to outcomes.For one negative Adult case, increasing working hours to more than 42 would yield a high-income prediction.Source: §5.3 · p. 12
- For COMPAS, prior and juvenile crime counts had greater sufficiency for Black than White individuals, while Drug explanations aligned with findings on country and education; past-crime attributes were not actionable for recourse.Higher education contributed toward the negative drug-consumption outcome, while lower education contributed toward the positive outcome.Source: §5.3 · pp. 13–14
- On Adult, LEWIS produced explanations for XGBoost and neural networks, whose attribute rankings differed across classifiers and reflected causal links to highly ranked attributes.The neural network ranked class as most important, and LEWIS also ranked country and sex highly because they affect class.Source: §5.3 · p. 14
5.4 Comparing LEWIS to Other Approaches
- Across global comparisons, LEWIS captured causal relationships missed by SHAP and Feat, including skewed German housing data and COMPAS juvenile-crime history, while SHAP ranked age higher in Adult.On German data, about 10% of instances had housing=own, limiting the value of random permutations.Source: §5.4 · pp. 14–16
- LEWIS’s local rankings captured dependencies absent from SHAP and LIME; on Maeve’s recourse example, LinearIP returned no solution for success thresholds above 0.8.LinearIP depends on linear classifiers and does not account for causal relationships between attributes.Source: §5.4 · p. 15
5.5 Correctness of LEWIS’s explanations
- LEWIS’s average global scores closely matched ground truth, and score errors remained below 5% when monotonicity violation was below 0.25, with attribute rankings matching ground truth.As sample size increased, estimation variance fell and scores converged to ground truth.Source: §5.5 · p. 16
- Across 1,000 negative-outcome instances, LEWIS achieved sufficiency above 0.9 at optimal cost; with 100 variables, runtime rose from 1.65 to 8.35 seconds as actionable variables increased from 5 to 100.The number of constraints grew linearly from 6 to 101.Source: §5.5 · p. 16
6 Related Work and Discussion
The paper situates its work within XAI research on feature-importance measurement and counterfactual explanations.
- The paper identifies quantifying feature importance as one strand of related XAI work.Source: §6 · p. 16
- Counterfactual explanations form another strand of related XAI work.Source: §6 · p. 16
- The discussion frames LEWIS in relation to both feature-importance and counterfactual-explanation research.Source: §6 · p. 16
6 RELATED WORK AND DISCUSSION 17
The discussion contrasts LEWIS with feature-importance, counterfactual, and logic-based XAI approaches. It emphasizes causal measures, recourse, and applicability to black-box systems.
- Shapley-based feature-influence methods lack a causal interpretation in general, while LIME has reported interpretability, perturbation-sensitivity, and adversarial-vulnerability issues.Source: §6 · p. 17
- LEWIS uses necessity and sufficiency scores to capture causal responsibility and indirect influence, with customizable global, contextual, and local explanations using input-output data.Source: §6 · p. 17
- LEWIS defines recourse feasibility through probabilistic contrastive counterfactuals and computes them nonparametrically without assumptions about algorithm internals or causal structural equations.Source: §6 · p. 17
- Logic-based XAI methods represent algorithms logically, and prime implicates or implicants relate to sufficiency and necessary causation in logical-circuit causal models.Source: §6 · p. 17
6 RELATED WORK AND DISCUSSION 18
The discussion connects LEWIS to logic-based XAI and fairness while outlining its assumptions and scope. Its explanation scores require representative data and causal knowledge, with simplified assumptions when users provide none.
- Logic-based methods can be intractable in model-agnostic settings, omit causal interactions among attributes, and do not extend beyond deterministic algorithms.Source: §6 · p. 18
- LEWIS can represent counterfactual fairness for a protected attribute when that attribute has zero necessity and sufficiency scores.Source: §6 · p. 18
- Robustness to strategic manipulation and gaming is left for future work.Source: §6 · p. 18
- LEWIS assumes representative population data and knowledge of the causal diagram; without user background knowledge, it assumes no-confounding and monotonicity.Source: §6 · p. 18
- The resulting local scores can be interpreted causally only under no-confounding and monotonicity; otherwise they measure correlation across similar individuals.Source: §6 · p. 18
- Causal-model background knowledge may be imperfect yet still provide valuable insights, and the authors report robustness to slight assumption violations.Source: §6 · p. 18