Introduction
In the realm of Explainable AI (XAI), research has predominantly focused on feature attribution—identifying which variables, such as age or income, drive a model's prediction. However, the instance space is frequently overlooked. We often lack a clear understanding of which specific training examples are responsible for a model's errors, or how one data point influences the prediction of another.
Currently, instance analysis is fragmented across sub-fields like outlier detection, influence functions, and data valuation, lacking a unifying framework to understand how instances interact to produce a model's final residuals. To address this, this paper introduces a novel framework that decomposes regression residuals into the contributions of individual data instances using Shapley values. By shifting the focus from "which features matter" to "which data points matter," the authors provide a unified tool for identifying outliers, influential instances, and complex data-model interactions.
The Residual Decomposition Framework
The authors propose Residual Decomposition, applying the game-theoretic concept of Shapley values to regression residuals ($e_i = f(x_i) - y_i$).
Instead of dividing a prediction among features, this framework divides the total residual of a data point among all instances in the dataset. This satisfies the "additivity" property: the sum of all instance contributions to a specific point equals that point's actual residual.
The framework introduces two key metrics:
- Contribution: Quantifies how much instance $i$ affects the residuals of all other instances. A high contribution suggests a "high leverage" point that significantly shifts the model's behavior.
- Composition: Measures how much the residuals of instance $i$ are shaped by all other instances in the dataset.
Computational Efficiency
Calculating exact Shapley values is computationally expensive ($O(2^n)$). To make the framework practical, the authors test several approximations:
- Monte Carlo Permutation Sampling: The gold standard, but computationally prohibitive.
- KernelSHAP: A weighted linear regression approach adapted for instances.
- Influence Functions (All-S-Influence): Uses second-order derivatives to estimate how removing a point changes the model. This is significantly faster for models like Ridge Regression.
The Contribution-Composition (CC) Plot
The most significant practical contribution of this work is the Contribution-Composition (CC) Plot. By plotting the mean contribution against the mean composition, researchers obtain a "global map" of the dataset.
- Behavior over Properties: Traditional outlier detection examines data properties (e.g., anomalous feature values). The CC plot examines behavior (e.g., does this point distort the model?). This is highly valuable for researchers optimizing model performance rather than just analyzing data geometry.
- Visualizing Anomalies: Instances that drift away from the main cluster on the CC plot are immediate candidates for outliers or data errors.
- Model Diagnostics: The CC plot reveals how different models handle the same data. For instance, while a Random Forest might try to "correct" for anomalies more aggressively than Ridge Regression, the CC plot exposes that the underlying data remains inherently problematic. Furthermore, in a well-fitted model with Gaussian noise, the CC plot should be symmetric. Asymmetry acts as a "check engine light" indicating poor model-data fit.
Experimental Results
The authors evaluated their framework on several regression datasets, including Boston Housing, Aquatic Toxicity, Compressive Concrete, Graphene Oxide Bulk, and synthetic 2D datasets. Key findings include:
- Anomaly Detection: The framework successfully identified the well-known "50k cap" anomalies in the Boston Housing dataset, demonstrating that these points possessed significantly different "behavioral signatures" compared to the rest of the data.
- Speed vs. Accuracy: The All-S-Influence method proved to be orders of magnitude faster than Monte Carlo sampling (e.g., 0.14s vs. 371s for a small dataset) while maintaining sufficient accuracy to produce reliable CC plots. This makes the method viable for real-world applications.
- Data Valuation: The authors demonstrated that their "Contribution" metric correlates with Data Shapley values, indicating that this framework can also be used to determine the "worth" of a specific training instance to the model's overall performance.
Limitations and Future Directions
While promising, the framework has a few notable limitations:
- Scalability: Even with approximation techniques, calculating $n^2$ interactions for very large datasets (millions of rows) remains a significant computational hurdle.
- Regression Only: The current methodology is strictly designed for regression tasks. Extending this to classification is challenging because there is no straightforward "residual" or "distance" metric that behaves equivalently.
- Model Complexity: Although theoretically model-agnostic, the most efficient approximation methods (like influence functions) require models with closed-form derivatives. This limits applicability for complex architectures like deep neural networks without further adaptation.
Summary updated