Abstract
Shapley values are model-agnostic methods for explaining model predictions. Many commonly used methods of computing Shapley values, known as off-manifold methods, rely on model evaluations on out-of-distribution input samples. Consequently, explanations obtained are sensitive to model behaviour outside the data distribution, which may be irrelevant for all practical purposes. While on-manifold methods have been proposed which do not suffer from this problem, we show that such methods are overly dependent on the input data distribution, and therefore result in unintuitive and misleading explanations. To circumvent these problems, we propose ManifoldShap, which respects the model’s domain of validity by restricting model evaluations to the data manifold. We show, theoretically and empirically, that ManifoldShap is robust to off-manifold perturbations of the model and leads to more accurate and intuitive explanations than existing state-of-the-art Shapley methods.
Introduction
Explainable AI (XAI) often relies on Shapley values to determine which features most influence a model's prediction. However, traditional calculation methods face a significant dilemma between "off-manifold" and "on-manifold" approaches.
Off-manifold methods (e.g., Interventional Shapley) evaluate the model on "impossible" data points—feature combinations that never occur in reality. This makes them vulnerable to adversarial attacks where a model is intentionally modified in these "empty" regions to hide biases. Conversely, on-manifold methods (e.g., Conditional Expectation Shapley) only consider real data but struggle with feature correlations. If two features are highly correlated, these methods often "smear" importance across both, failing to capture the true causal contribution of a specific feature.
This paper introduces ManifoldShap, a novel feature attribution method that bridges this gap. By restricting model evaluations to the data manifold while maintaining an interventional (causal) perspective, it provides explanations that are both robust to adversarial manipulation and more causally accurate.
Methodology: Manifold Restricted Interventional Values
The core innovation is the Manifold Restricted Interventional value function. Instead of taking a global expectation, ManifoldShap calculates the expected model output given an intervention (setting certain features to specific values) but restricts that expectation to a set $Z$, representing the data manifold.
To implement this, the authors:
- Define the Manifold: They use density-based definitions (like the $\epsilon$-density manifold) to identify regions where data actually exists.
- Estimate the Manifold: They employ techniques like Variational Auto-Encoders (VAEs) or Kernel Density Estimation (KDE) to learn the shape of the data distribution.
- Efficient Computation: They provide two practical algorithms: a supervised approach that trains a surrogate model to estimate the value function, and a rejection sampling method for high-dimensional spaces.
Empirical Evaluation
The authors evaluated ManifoldShap using both synthetic and high-stakes real-world datasets, including a 2D Structural Causal Model (SCM), the COMPAS recidivism dataset, and the Communities and Crime (CC) dataset.
Synthetic Experiments
In tests with highly correlated features ($x_1$ and $x_2$), ManifoldShap correctly identified the single causal feature in over 90% of cases. In contrast, Conditional Expectation Shapley (CES) and other baselines often attributed significant importance to the non-causal correlated feature.
Real-World Bias Detection
On the COMPAS and CC datasets, the authors built a "biased" model that only used a sensitive feature (e.g., "race"). They then perturbed the model off-manifold to try and hide this bias.
- Interventional Shapley was successfully "fooled," showing synthetic "unrelated" features as the most important.
- CES was also fooled due to correlations between the synthetic features and the sensitive attribute.
- ManifoldShap successfully identified the sensitive attribute as the top feature for the majority of data points, effectively unmasking the hidden bias.
Discussion and Insights
ManifoldShap highlights a tunable Robustness-Accuracy Trade-off. As the manifold $Z$ grows to cover the whole space, the method converges to pure Interventional Shapley (causally accurate but fragile). As it shrinks, it behaves more like Conditional Shapley (robust but biased by correlations).
Furthermore, ManifoldShap demonstrates superior Causal Integrity. Unlike CES, it prevents feature correlations from "leaking" importance. If a model doesn't use a feature, ManifoldShap is much more likely to give it zero importance, even if it's highly correlated with a feature the model does use.
Limitations
The quality of the explanation depends heavily on the quality of the manifold estimation. If the learned manifold is too sparse or low-dimensional, ManifoldShap can lose causal accuracy. Additionally, calculating Shapley values remains computationally intensive for very high-dimensional models. Future work will explore automated ways to choose the optimal manifold size ($\epsilon$) to balance robustness and causal accuracy.
Summary updated