Abstract
This paper presents a novel framework for instance analysis in regression models by decomposing residuals using Shapley values. While traditional Explainable AI (XAI) focuses on feature importance, this approach quantifies the influence of individual training instances on the model's error across the dataset. By treating the residual as a value to be distributed among data points, the authors introduce metrics for "Contribution" and "Composition," alongside a visualization tool called Contribution-Composition (CC) plots. The framework is evaluated on several benchmarks, demonstrating its utility in outlier detection, data valuation, and understanding model-specific behaviors.
Introduction
In the field of Explainable AI (XAI), the dominant paradigm focuses on feature importance—explaining model predictions through inputs like age, income, or chemical properties. However, there is a significant gap in tools designed to understand the "instance space." When a model produces an erroneous prediction, researchers often lack a unified, model-agnostic method to determine which training instances are responsible for that specific failure.
While techniques like Cook’s Distance or traditional outlier detection exist, they are often fragmented or task-specific. This paper addresses this gap by proposing a framework that treats a model's residual (the error) as a "value" to be distributed among the data instances themselves. This allows for a granular analysis of how specific data points help or hinder the model's performance on every other point in the dataset.
The Residual Decomposition Framework
The core of the proposed method is the application of Shapley values—a concept from cooperative game theory—to the decomposition of the residual $e_i$ of a specific instance $i$. This decomposition yields two primary metrics:
- Contribution ($\phi^c_{i,j}$): This measures the specific influence of instance $j$ on the model-predicted outcome (and thus the error) of instance $i$. A high contribution indicates that instance $j$ is a primary driver of the error observed at instance $i$.
- Composition: This describes the aggregate effect, showing how the total residual of a single instance is "composed" of the collective influences of all other instances in the training set.
To make these high-dimensional relationships interpretable, the authors introduce Contribution-Composition (CC) Plots. By plotting the mean contribution against the mean composition in a 2D space, researchers can visually identify clusters of "abnormal" instances that deviate from the general population's behavior.
Computational Methodology
Calculating exact Shapley values is computationally intensive. The authors explore several estimation strategies:
- Monte Carlo Sampling: Provides the highest accuracy and satisfies the additivity principle (where the sum of parts equals the total residual) but is extremely slow, taking upwards of 14 hours for small datasets on complex models like Random Forests.
- Influence Functions: These are significantly faster and scale better but often fail to satisfy the additivity principle, leading to potential inaccuracies in the decomposition.
- KernelSHAP: Offers a middle-ground approximation for faster computation.
Experimental Evaluation
The framework was tested across several regression benchmarks, including the Boston Housing, Aquatic Toxicity, Compressive Concrete, and Graphene Oxide Bulk datasets.
Key Findings
- Behavior vs. Properties: The research distinguishes between "property" outliers (points with rare feature values) and "behavioral" outliers (points that negatively impact the model's overall error). A point may be an outlier in feature space but have a negligible effect on the model's predictive accuracy for others.
- Model-Specific "Personalities": CC plots reveal how different architectures perceive the same data. For example, Random Forests exhibit stronger regularization effects than Ridge Regression, effectively "pulling" outlying instances toward the mean behavior of the dataset.
- Anomaly Detection: In the Boston Housing dataset, the framework successfully isolated instances where median house values were truncated at $50k. These points were clearly separated in the CC plots, confirming they were processed differently during data collection.
- Granular Data Valuation: Unlike standard Data Shapley values that provide a single score for a point's worth, this framework shows exactly which other points an instance is helping or hurting, providing a more nuanced view of data quality.
Limitations and Future Directions
Despite its theoretical strengths, the framework faces challenges regarding scalability. The $O(n^2)$ or $O(n^3)$ complexity makes analyzing large-scale datasets difficult without significant approximation, which can introduce noise. Furthermore, the current implementation is restricted to regression. Extending this to classification is complex because classification lacks a straightforward, distance-based residual that maps cleanly to Shapley decomposition. Future work will focus on developing faster, more theoretically sound approximation algorithms to bridge the gap between speed and accuracy.
Summary updated