While popular explanation models like SHAP and LIME are widely considered "local" interpretability tools, they often rely on global population data to calculate feature importance. This reliance can mask true local behavior, leading to misleading explanations. To address this, researchers have introduced Neighbourhood SHAP and Smoothed SHAP—methods that restrict reference distributions to the immediate vicinity of a data point, providing more precise, robust, and "on-manifold" explanations.
The Problem with "Global" Local Explanations
In machine learning, local explanation models aim to tell us why a specific prediction was made for a particular instance. Methods like LIME and SHAP achieve this by simulating the "absence" of features and observing how the prediction changes.
However, there is a catch: to simulate a missing feature, these models typically replace it with values drawn from the entire dataset (the global population). Using a global reference distribution makes these models less "local" than their names suggest, leading to three primary issues:
- Misleading Attributions: A feature might be globally important but locally irrelevant, or vice versa.
- Off-Manifold Evaluations: The model is tested on unrealistic "Frankenstein" data points—combinations of features that would never exist in reality. This makes the resulting explanations unreliable.
- Vulnerability to Adversaries: Malicious actors can exploit these "off-manifold" regions to create biased models that appear fair to standard SHAP or LIME evaluators.
Restricting the Neighborhood
To solve these issues, the authors propose two primary extensions to the SHAP framework:
Neighbourhood SHAP: Instead of comparing a test instance to the whole world, Neighbourhood SHAP compares it only to its immediate "neighbors." The authors define a local neighborhood distribution using a distance-based kernel (such as an exponential kernel).
They prove that this localized sampling can be implemented efficiently using self-normalised importance sampling, drawing a direct mathematical connection to the well-known Nadaraya-Watson estimator from statistics. Because it uses importance sampling, researchers can compute explanations for many different "neighborhood sizes" (bandwidths) without needing to re-run the expensive black-box model multiple times.
Smoothed SHAP: This method addresses explanation instability. If a black-box model is highly non-linear or "jittery," the explanation for one point might be wildly different from a point right next to it. Smoothed SHAP locally averages the SHAP values of neighboring points, providing a more stable and Lipschitz-continuous explanation.
Key Insights and Results
The researchers evaluated their methods across several standard tabular benchmarks (Adult, Bike Sharing, Boston Housing), image data (MNIST), and fairness datasets (COMPAS).
The "Sign Flip" Phenomenon
One of the most striking findings is that local importance can completely contradict global importance. For example, in the Bike Sharing dataset, "Temperature" generally has a globally positive attribution (warmer weather equals more rentals). However, Neighbourhood SHAP reveals that at extremely high temperatures, the attribution flips to negative—a crucial local nuance that standard SHAP misses entirely.
Staying "On-Manifold"
By sampling locally, the synthetic data points used to generate the explanation are much more likely to resemble real data. This makes the explanations significantly more "faithful" to how the model actually operates in the real world, improving local accuracy (measured by lower Mean Squared Error within a small radius of the test point).
Adversarial Robustness
Adversaries often hide model bias in regions where data doesn't normally exist (off-manifold), easily fooling standard SHAP. Because Neighbourhood SHAP stays close to real data, it successfully identifies these hidden biases. In experiments using the COMPAS dataset, Neighbourhood SHAP was far less affected by adversarial attacks than KernelSHAP.
Improved Feature Relevance
When applied to MNIST, Neighbourhood SHAP produced cleaner, sparser heatmaps that focused on the actual strokes of the digits, whereas standard SHAP produced blurrier results. Furthermore, using the "Removability of Attributions" (ROAR) framework, removing features identified by Neighbourhood SHAP led to a higher drop in model accuracy, suggesting its feature importance rankings are more accurate.
Limitations and Future Work
While Neighbourhood SHAP offers significant improvements, it is not without challenges:
- Bandwidth Selection: Like many kernel-based methods, choosing the optimal "neighborhood size" ($\sigma$) is critical and remains a practical challenge, though the paper provides diagnostic tools to help visualize it.
- The Curse of Dimensionality: Defining a meaningful "neighborhood" using Euclidean distance becomes difficult in very high-dimensional spaces. While more sophisticated metrics (like those derived from Random Forests) can help, they add complexity.
- Model Fit: The quality of the explanation is ultimately tethered to how well the surrogate model fits the black box. If the underlying model is extremely non-linear even at a microscopic scale, any linear explanation will struggle.
Summary updated