Abstract
Explainable Artificial Intelligence (XAI) techniques hold significant potential for enhancing the causal discovery process, which is crucial for understanding complex systems in areas like healthcare, economics, and artificial intelligence. However, no causal discovery methods currently incorporate explainability into their models to derive the causal graphs. Thus, in this paper we explore this innovative approach, as it offers substantial potential and represents a promising new direction worth investigating. Specifically, we introduce ReX, a causal discovery method that leverages machine learning (ML) models coupled with explainability techniques, specifically Shapley values, to identify and interpret significant causal relationships among variables. Comparative evaluations on synthetic datasets comprising continuous tabular data reveal that ReX outperforms state-of-the-art causal discovery methods across diverse data generation processes, including non-linear and additive noise models. Moreover, ReX was tested on the Sachs single-cell protein-signaling dataset, achieving a precision of 0.952 and recovering key causal relationships with no incorrect edges. Taking together, these results showcase ReX's effectiveness in accurately recovering true causal structures while minimizing false positive predictions, its robustness across diverse datasets, and its applicability to real-world problems. By combining ML and explainability techniques with causal discovery, ReX bridges the gap between predictive modeling and causal inference, offering an effective tool for understanding complex causal structures.
Introduction
Causal discovery—the process of identifying cause-and-effect relationships from observational data—is a fundamental challenge across disciplines such as healthcare, economics, and artificial intelligence. Traditional approaches, including constraint-based and score-based algorithms, often rely on rigid statistical assumptions that struggle to capture the complex, non-linear dynamics inherent in real-world systems.
While modern machine learning (ML) models excel at modeling these non-linearities, they are frequently criticized as "black boxes." Explainable AI (XAI) tools, particularly Shapley Additive exPlanations (SHAP), have emerged to provide transparency into these models. However, the integration of XAI directly into the causal discovery pipeline has remained largely unexplored. This paper introduces REX (Robust EXplainable causal discovery), a novel framework that leverages ML models and SHAP values to accurately reconstruct causal structures.
The REX Methodology
REX operates through a multi-stage pipeline designed to transform predictive insights into a structural causal model. The process begins by training flexible regressors, such as Deep Feed-forward Networks (DFNs) and Gradient Boosting Trees (GBTs), to predict each variable based on all others.
As shown in the framework above, the core steps of the REX algorithm are as follows:
- Predictive Modeling: Training DFNs and GBTs to capture complex relationships.
- SHAP-based Parent Selection: Computing SHAP values to identify feature importance. The authors demonstrate that SHAP values serve as a robust proxy for conditional dependence. A clustering algorithm (DBSCAN) is applied to these values to distinguish true causal parents from noise.
- Bootstrapping: To ensure the stability of the discovered edges, the parent selection process is repeated over multiple data subsamples.
- Edge Orientation: Using Additive Noise Models (ANMs) and the Hilbert-Schmidt Independence Criterion (HSIC), the algorithm determines the direction of causality.
- Cycle Resolution via SHAP Discrepancy: To ensure the final graph is a Directed Acyclic Graph (DAG), REX introduces "SHAP discrepancy"—a metric that identifies edges with the weakest alignment between SHAP values and target variance, allowing for the principled removal of cycles.
Experimental Evaluation
The performance of REX was validated against six state-of-the-art baselines (including PC, NOTEARS, and GES) across synthetic and real-world datasets.
Synthetic Benchmarks
Evaluation on 200 synthetic datasets covering various causal mechanisms (Linear, Polynomial, Gaussian Additive, etc.) showed that REX consistently achieved higher F1 scores and lower Structural Hamming Distance (SHD) than traditional methods.
Real-World and Complex Data
- Sachs Dataset: On this benchmark protein-signaling network, REX achieved a precision of 0.952 and an F1 score of 0.629, significantly outperforming the next best method, FCI (F1: 0.516).
- Financial Dataset: In a credit risk scenario with 12,000 samples, REX maintained high accuracy with an F1 score of 0.850, compared to 0.610 for the runner-up.
Discussion and Key Insights
The success of REX stems from several key innovations:
- SHAP as a Causal Proxy: By aggregating over all possible feature subsets, SHAP captures broader predictive relevance than standard conditional independence tests, making it more resilient to complex dependencies.
- Handling Collinearity: Interventional SHAP explainers allow REX to remain stable even in the presence of highly correlated variables, a common failure point for statistical methods.
- Principled Cycle Breaking: The use of "SHAP discrepancy" provides a data-driven way to resolve loops in the causal graph by identifying the least reliable edges.
Conclusion and Future Work
REX bridges the gap between predictive machine learning and causal inference, offering a robust tool for understanding complex systems. While the current implementation faces computational challenges—scaling polynomially with the number of variables—future work will focus on optimizing performance through faster sparse models and GPU acceleration. Additionally, the authors aim to extend REX to handle distributional shifts and more advanced graph-theoretic cycle resolution.
Summary updated