VARSHAP: Addressing Global Dependency Problems in Explainable AI with Variance-Based Local Feature Attribution

Mateusz Gajewski, Mikołaj Morzy, Adam Karczmarz, Piotr Sankowski · 2025

Read VARSHAP: Addressing Global Dependency Problems in Explainable AI with Variance-Based Local Feature Attribution by Mateusz Gajewski, Mikołaj Morzy, Adam Karczmarz, Piotr Sankowski (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2506-07229.txt.

Introduction

Mateusz Gajewski, Mikołaj Morzy, Adam Karczmarz, and Piotr Sankowski wrote a 2025 paper on explaining why a machine learning model made a call. Popular tools credit each input feature with part of the output. A leading tool, SHAP, can be swayed by the overall data spread, so its local answers may not reflect what the model did on one case.

Their method, VARSHAP, scores a feature by how much it cuts the spread of possible outputs. It keeps the fairness rules that make the older tool attractive, since both rest on the same game-theory base. Unlike the older tool, it holds up when the data as a whole shifts. Tests on made-up and real data showed clearer and more accurate answers than rival methods.

Catalog record

CREATORMateusz Gajewski, Mikołaj Morzy, Adam Karczmarz, Piotr Sankowski
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE56 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2506-07229

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

VARSHAP: Addressing Global Dependency Problems in Explainable AI with Variance-Based Local Feature Attribution Mateusz Gajewski, Mikołaj Morzy, Adam Karczmarz, Piotr Sankowski Abstract Existing feature attribution methods like SHAP often suffer from global dependence, failing to capture true local model behavior. This paper introduces VARSHAP, a novel model-agnostic local feature attribution method which uses the reduction of prediction variance as the key importance metric of features. Building upon Shapley value framework, VARSHAP satisfies the key Shapley axioms, but, unlike SHAP, is resilient to global data distribution shifts. Experiments on synthetic and real-world datasets demonstrate that VARSHAP outperforms popular methods such as KernelSHAP or LIME, both quantitatively and qualitatively. 1 Introduction Feature attribution Explainable Artificial Intelligence (XAI) has become increasingly crucial as machine learning models are deployed in high-stakes domains such as healthcare, finance, or criminal justice. In these sensitive areas, the transparency and interpretability of model decisions are paramount for ensuring fairness, accountability, and trust. Among the diverse approaches developed to provide explanations about the inner workings of complex models, feature attribution methods have emerged as particularly valuable tools ( holzinger2020explainable ) . These methods aim to quantify the contribution of each input feature to a model’s prediction. By providing insights into the decision-making process, feature attribution techniques facilitate model debugging, bias detection, and the overall validation of model behavior against domain knowledge. Feature attribution methods can be broadly categorized into two main types: global feature importance and local feature importance. Global methods aim to provide a single attribution value for each feature used by the model, offering a high-level overview of which features are, on average, most influential in the model’s decision-making process. This aggregated perspective is useful for understanding the general behavior and key drivers of the model. In contrast, local feature attribution methods produce a feature attribution for a specific model output, meaning they explain why the model made a particular prediction for an individual instance. Local attributions can therefore offer insights into which attributes were most significant in making a prediction for a particular instance, revealing the nuances of the model’s behavior that might be obscured by global approaches ( guidotti2018survey ; murdoch2019definitions ) . This instance-specific granularity is particularly valuable in contexts where understanding individual predictions is critical. Shapley values and global dependency Shapley value theory shapley1953value , originating from cooperative game theory, provides a principled method of allocating payout among players. In vstrumbelj2011general authors suggested that the input features in machine learning models can be treated as players and the model output can be seen as a payout, providing a way to use Shapley value in feature attribution. The strong mathematical underpinnings of Shapley values, characterized by desirable axioms like efficiency, symmetry, null-player, and additivity, have made this framework a popular choice for generating feature attributions li2024shapley . Among these, SHAP (SHapley Additive exPlanations) lundberg2017unified is a prominent unified method. SHAP assigns each feature an importance value for a particular instance, quantifying its contribution to shifting the model’s output from a baseline to its current value. A key strength of the SHAP framework is its model-agnostic nature, allowing it to be applied to any machine learning model without requiring access to its internal structure or specific assumptions. Despite their advantages, SHAP-based methods struggle to fully capture local model behavior due to their inherent global dependence. This issue arises because, when calculating a feature’s importance for a specific instance, these methods typically simulate feature absence by sampling from that feature’s global distribution across the entire dataset. While this maintains properties like additivity, it can produce explanations that fail to accurately reflect the model’s behavior specifically around the point of interest. This limitation was formalized by ( bilodeau2024impossibility ) , who showed that for piecewise linear models, methods like SHAP and Integrated Gradients ( sundararajan2017axiomatic ) can produce arbitrarily different attributions for models that behave identically in a local neighborhood by manipulating the model outside that neighborhood. Consequently, the generated attributions may represent average feature effects rather than the precise local sensitivities that drive predictions for particular inputs, potentially misleading analysis for subgroups (e.g., patients affected differently by factors than the general population). 1.1 Our contribution In this paper, we address the outlined shortcomings of features attribution methods. • We introduce an instance-centered perturbation mechanism as an approach to handle out-of-coalition features, focusing exclusively on local model behavior. • We theoretically justify the use of variance as the only function satisfying desirable and intuitive axioms for feature attribution in a local context. • We introduce VARSHAP (VARiance-based SHapley Additive exPlanations) , a novel framework for generating local feature attributions, combining the above theoretical insights to avoid pitfalls stemming from global dependence. • We evaluate VARSHAP against two popular model-agnostic methods – LIME and SHAP – across multiple attribution metrics and model architectures, demonstrating its advantages. 2 VARSHAP: VARiance-based SHapley Additive exPlanations 2.1 Variance as the basis for feature attributions Traditional SHAP lundberg2017unified calculates feature importance by measuring how each feature affects the expected model output. Specifically, for a feature j and a subset of features S not containing j , SHAP computes the expected model output \mathbb{E}[\Omega(x_{S},X_{-S})] where features in S are fixed to their values from the instance being explained, and out-of-coalition features ( X_{-S} ) are treated as random variables sampled from a global background distribution. The difference in expected output when adding feature j to coalition S represents its marginal contribution, which is then weighted by the Shapley kernel across all possible coalitions. The core methodological innovation of VARSHAP is to redefine local feature importance by quantifying how much the knowledge of a specific feature’s value reduces the uncertainty in the model’s output within the local vicinity of the instance being explained. The key insight of VARSHAP is to measure feature importance through the lens of variance reduction. Intuitively, when a feature’s value is known and fixed (conceptually, when it is added to a coalition of features whose values are already known for the instance in question), the range of possible model outputs, and thus its variance, should decrease if that feature is influential for the prediction at that specific point. The more a feature contributes to reducing this local output variance, the more important it is considered for that particular prediction. Specifically, for each possible subset of features S that does not contain the feature of interest, j , VARSHAP compares two scenarios. First, it considers the variance of the model’s output when the features in subset S are fixed to their values from the instance being explained, while all other features (including feature j and those not in S\cup\{j\} ) are perturbed locally around the instance. Second, it considers the variance of the model’s output when the features in S and feature j are fixed to their values from the instance, and only the remaining features (those not in S\cup\{j\} ) are subjected to local perturbation. The difference between these two variances, which represents the reduction in output variance attributable to fixing feature j given the context of known features S , is then weighted according to the standard Shapley kernel. Summing these weighted variance reductions across all possible coalitions S provides the VARSHAP attribution value for feature j . This approach

Read the complete text