---
title: Shapley-Based Localization Methods
url: https://www.emergentmind.com/topics/shapley-based-localization
type: topic
---

# Shapley-Based Localization Methods

Searching arXiv for the cited works to ground the article in current preprints.
Shapley-based localization denotes a family of explanation methods that use Shapley-style credit assignment to localize predictive responsibility within a structured domain. In this literature, the localized object is not fixed: it may be a pixel-wise or image-space saliency map over SAR imagery, a set of spatial positions in a target-layer representation, an anomalous sensor observation, an edge in a node’s computational graph, a joint geographic location player, a connected subset of structured features, or a causal link in a directed acyclic graph. The common thread is that a prediction is written as a cooperative game, a value function is defined on subsets or histories, and the resulting allocations are interpreted as localized evidence, responsibility, or flow rather than only as undifferentiated feature importance [2401.03128] [2501.06261] [2507.21023] [2507.20460] [2312.03675] [2010.14592].

## 1. Meanings of localization across domains

The phrase has no single domain-specific meaning. In SAR recognition, the output is a **spatial explanatory localization map** over SAR images that highlights target parts, shadows, and scattering regions that most influence a classifier’s decision; the work is explicitly framed as an **attribution method that supports localization** rather than a dedicated localization algorithm. In anomaly localization for sensor data systems, the localized object is whether a specific sensor observation is anomalous or attacked. In node-classification GNNs, localization means identifying which **edges in that node’s computational graph** are most helpful, least helpful, or even harmful to the prediction. In geospatial tabular models, localization means attributing a prediction to **location itself** and to **interaction between location and other features**. In CAM-style visual explanation, localization is a heatmap over **spatial positions** of a target-layer representation. In graph-structured or causal settings, localization extends to connected feature subsets, graph edges, and causal pathways [2401.03128] [2507.21023] [2507.20460] [2501.06261] [2312.03675] [1808.02610] [2010.14592].

| Domain | Localized object | Representative work |
|---|---|---|
| SAR recognition | Pixel-wise or image-space saliency map | [2401.03128] |
| Sensor anomaly localization | Whether sensor \(i\) is attacked or anomalous | [2507.21023] |
| GNN explanation and pruning | Edge \((v_i,v_j)\) in \(G_c(v)\) | [2507.20460] |
| Geospatial ML | \(GEO\) and \(\phi_{(GEO,j)}\) | [2312.03675] |
| CAM-style visual explanation | Spatial player \(j\) in a target-layer feature grid | [2501.06261] |
| Causal DAG explanation | Edge/path credit flow | [2010.14592] |

This diversity suggests that “localization” in the Shapley literature is best treated as a structural notion. The salient question is not only *which feature matters*, but *which structured unit is declared to be a player*. A pixel, a latent coordinate, a sensor observation, a graph edge, and a joint location descriptor all induce different games and therefore different localization semantics.

## 2. Cooperative-game formulations and value functions

The common starting point is the classical Shapley value
\[
\phi_i(v)=\sum_{S\subseteq N\setminus\{i\}} \frac{|S|!(|N|-|S|-1)!}{|N|!}\big(v(S\cup\{i\})-v(S)\big),
\]
with \(N\) the player set, \(S\) a coalition, and \(v\) a coalition value. What changes across localization methods is the definition of the players and of \(v\). In conditional-expectation formulations for local explanation, the value of a subset is based on \(E(f(X)\mid X_u)\) or \(E(f(X)\mid X_u=x_u)\). In tree-based work, this is the central computational difficulty because the conditional distribution of the missing features is unknown and feature dependence matters. In WeightedSHAP, the same conditional coalition semantics are kept, but the aggregation over coalition cardinalities is changed from the uniform Shapley average to a learned weighted average \(\phi_\mathbf{w}(x_i)=\sum_{j=1}^{d} w_j \Delta_j(x_i)\) [2207.05214] [2106.03820] [2209.13429].

In localization problems built from nominal probabilistic models, \(v\) can be analytic rather than model-opaque. For anomaly localization in sensor data systems, the paper defines
\[
v(\tilde x_1,\dots,\tilde x_L)=\ln\!\left(\frac{1}{f(\tilde x_1,\dots,\tilde x_L)}\right),
\]
the negative log-likelihood of the observed subset under the nominal distribution. For the later statistical analysis with optimum classifiers, the coalition value is the log-likelihood ratio
\[
v(S)=\ln\frac{f(x_S\mid C_1)}{f(x_S\mid C_0)}.
\]
These choices make the localization game interpretable: a coalition is anomalous to the extent that its observation is improbable under normal operation or gives evidence for the anomalous class [2507.21023] [2606.00867].

Other domains modify the player set rather than the value semantics. In GNN sparsification, the players are **edges** in the target node’s local computational graph, and the local explanation score \(\phi_v^t(i,j)\) is an edge’s contribution to node \(v\)’s prediction for class \(t\). In GeoShapley, the location feature set \(GEO\) is treated as a **single joint player**, and the decomposition
\[
\hat{y} = \phi_0 + \phi_{GEO} + \sum_j \phi_j + \sum_j \phi_{(GEO,j)}
\]
separates intrinsic location effect, non-spatial feature effects, and location-feature interaction effects. In the Content Reserved Game-theoretic framework for CAMs, the players are **spatial coordinates** \(j\) of a target-layer representation, and a CAM heatmap becomes an allocation of target-class utility over locations [2507.20460] [2312.03675] [2501.06261].

A central lesson follows directly from these formulations: Shapley-based localization depends critically on the explanatory basis. Several papers argue that the decisive question is not only how to compute Shapley values, but **on what feature space** they should be computed. That point recurs in SAR imagery, tree models with dependence, structured data on graphs, and causal DAGs [2401.03128] [2207.05214] [1808.02610] [2010.14592].

## 3. Spatial and visual localization

The SAR literature provides a direct example of Shapley-based spatial localization. "Manifold-based Shapley for SAR Recognization Network Explanation" treats pixel-level Shapley explanation as a **manifold-aware attribution problem**. The method first learns a bidirectional mapping \(I \Leftrightarrow U\) with StyleGAN2 and Image2StyleGAN, computes Shapley values in latent manifold space using
\[
v(S_U)=E\!\left[f(g(U)) \mid U_S = U_S'\right],
\]
and then redistributes latent attributions back to image space with generator gradients to obtain a manifold-based saliency map. The final Fusion-Shap map
\[
M_{\text{fusion}}=\alpha M_{\text{manifold}}+(1-\alpha)M_{\text{traditional}}
\]
combines manifold-respecting and traditional SHAP saliency maps, with \(\alpha\) chosen by minimizing average confidence drop after masking. The method yields a **pixel-wise or image-space saliency map**, not bounding boxes or segmentation masks, but it localizes the **full set of discriminative scattering-related regions** rather than only the target center [2401.03128].

The CAM literature reinterprets visual localization even more explicitly as a Shapley problem. "CAMs as Shapley Value-based Explainers" models a target-layer representation as a cooperative game over spatial positions, defines the \(j\)-th player as the collection of activations \(\{A_j^i\}_{i=1}^N\) across channels, and shows that first-order Taylor approximation makes HiResCAM a **Type-I CRG Explainer** and GradCAM a **Type-II CRG Explainer**. The paper then introduces ShapleyCAM through the second-order approximation
\[
W = U'(X_D)-\frac{1}{2}X_D^\top H_D,
\]
so that ShapleyCAM and ShapleyCAM-H become second-order approximations to spatial Shapley values. The proposed ReST utility
\[
U_{\text{ReST}}= y^c + \ln(\operatorname{softmax}(y)^c)
\]
is designed to address the limitations of pre-softmax and post-softmax scores. In this line of work, localization is not raw-pixel SHAP but **feature-space spatial attribution** over a target-layer grid [2501.06261].

Structured-data approximations translate the same idea to text and images by exploiting locality. L-Shapley restricts coalitions to a \(k\)-hop neighborhood \(\mathcal N_k(i)\), while C-Shapley restricts them further to **connected subsets**. For text on a line graph, connected subsets are contiguous \(n\)-grams; for images on a grid, connected regions replace arbitrary scattered coalitions. The paper’s masking-based evaluation shows that graph-aware connected coalitions often produce more interpretable and more effective localizations than generic Shapley approximations under the same model-evaluation budget [1808.02610].

Shapley Explanation Networks move the localization mechanism inside the model. The Shapley transform
\[
[\Omega(x,f)]_{i,j}=\phi_i(x,f_j)
\]
produces a tensor indexed by explainable dimensions \(D\), so images retain their spatial indexing. Shallow ShapNets compute exact Shapley values of the shallow model, while Deep ShapNets preserve **local accuracy** and **missingness**. Because explanations become latent representations, the framework supports **layer-wise explanations**, explanation regularization during training, and fast explanation computation at test time. For localization-style use, the important consequence is that attribution is available at every layer on the same spatial lattice [2104.02297].

## 4. Graph, geographic, and causal localization

In GNN inference, Shapley-based localization is applied to graph structure itself. The local object is the **computational graph** \(G_c(v)\) of a target node \(v\), and GNNShap assigns a local importance score \(\phi_v^t(i,j)\) to edge \((v_i,v_j)\). Because Shapley values can be positive or negative, the method distinguishes edges that increase the model’s prediction probability or confidence from edges that decrease it. Local edge scores are aggregated into a global sparsification score
\[
S(e)=\frac{1}{|V_e|}\sum_{v\in V_e} S_v(e),
\]
after which edges are ranked and pruned under a sparsification threshold \(\tau\). The paper reports that GNNShap is especially effective at aggressive pruning because negatively attributed edges can be removed instead of preserved as merely “important” by unsigned explainers [2507.20460].

GeoShapley carries localization into geographic space. The central move is to conceptualize **location as a player** in the prediction game, with the location feature set \(GEO\) treated as a joint player rather than as separate latitude and longitude players. The location main effect \(\phi_{GEO}\) measures the marginal contribution from all location features while holding other features constant, and the interaction term \(\phi_{(GEO,j)}\) measures the interaction effect between location and feature \(j\). The decomposition into \(\phi_{GEO}\), \(\phi_j\), and \(\phi_{(GEO,j)}\) is linked directly to **spatially varying coefficient models** and additive models. In this usage, Shapley-based localization means geographic localization of prediction drivers rather than object localization or saliency mapping [2312.03675].

Shapley Flow generalizes localization further by assigning credit to **edges of a causal DAG**. Instead of localizing only to variables, it localizes predictive responsibility to the **causal links and paths** by which variables influence the prediction. The method is defined over explanation boundaries and boundary-consistent histories, satisfies generalized efficiency, linearity, dummy-player, and **boundary consistency** conditions, and is presented as the unique solution to these axioms on a DAG. Edge attribution is obtained by summing path attributions over all paths containing the edge, and the resulting credits satisfy a conservation law: the sum of attributions on a node’s incoming edges equals the sum on its outgoing edges. This makes the localized quantity a genuine flow of explanatory mass through the graph [2010.14592].

Taken together, these works extend Shapley-based localization beyond saliency maps. The localized object can be an edge in a local message-passing graph, a geographic effect, or a causal pathway. This suggests that the unifying concept is not “where in an image,” but “where in the structured system” predictive responsibility is allocated.

## 5. Fidelity, computation, and critiques of the classical Shapley rule

A recurrent theme is that classical Shapley localization becomes unreliable or wasteful when the game is badly specified. In SAR, the targeted failure mode is the independence assumption behind standard pixel-space SHAP: many coalitions are **off-manifold**, and the resulting Shapley values become unreliable or even meaningless. In tree models, conditional expectations must be computed correctly under dependence, and encoded categorical variables must be treated as **coalitions** rather than by summing dummy-level Shapley values. In surrogate model-based trees, the entire methodological contribution is to approximate \(E(f(X)\mid X_u)\) by modeling path probabilities and local conditional expectations, thereby unifying local SHAP and global Shapley in one framework. These papers jointly treat feature dependence, conditioning, and representation choice as first-order issues for localization fidelity [2401.03128] [2106.03820] [2207.05214].

The literature also questions whether the classical Shapley aggregation rule is always the right one for localizing predictive responsibility. WeightedSHAP holds the coalition function fixed but replaces the uniform average over coalition cardinalities by a learned weight vector \(\mathbf w\), chosen to optimize a localization objective such as prediction recovery. The paper’s explicit criticism is that standard SHAP gives equal average weight to marginal contributions from all coalition sizes, even though larger or smaller coalitions may be more informative for ranking the features that best recapitulate the model’s prediction. WeightedSHAP therefore keeps linearity, null-player, and symmetry through the semivalue family, but relaxes **efficiency** [2209.13429].

An even stronger critique appears in sensor anomaly localization. "On Using the Shapley Value for Anomaly Localization: A Statistical Investigation" shows that under an additive log-likelihood formulation and independent sensor observations, thresholding the full Shapley score \(\phi(x_i)\) is exactly equivalent to thresholding the singleton score \(v(x_i)\). The later statistical analysis with optimum classifiers proves the same equivalence for independent observations and then shows that, in some popular dependent two-sensor cases, the Shapley test and the single-term test are fundamentally different. In strongly positively correlated Gaussian cases, the Shapley test can be strictly superior; in strongly negatively correlated Gaussian cases, it can be strictly inferior. These results make the usefulness of Shapley-based localization depend on whether the coalition value function contains genuine interaction information and on the sign and structure of dependence [2507.21023] [2606.00867].

A further conceptual critique concerns the meaning of locality itself. Accurate conditional Shapley values for trees can still assign nonzero credit to features that are not used in the realized local branch, because Shapley averaging is taken over hypothetical coalitions rather than over the single executed mechanism. This suggests that even exact computation does not resolve every interpretive ambiguity. Several papers therefore distinguish between faithful computation of the intended Shapley game and the stronger claim that the resulting explanation is the realized local mechanism [2106.03820] [2010.14592].

## 6. Evaluation regimes, limitations, and open problems

Evaluation practice is heterogeneous because the localized object changes across domains. In SAR, explanations are assessed by visual inspection, subjective scoring, axiomatic validation, and the quantitative metrics **infidelity** and **sensitivity**. The paper reports SHAP with \(\mathrm{INFD}=0.0009\) and \(\mathrm{SEN}=3.4156\), and F-SHAP with \(\mathrm{INFD}=7.1\times 10^{-5}\) and \(\mathrm{SEN}=2.1285\), together with a subjective score of 5.95 for F-SHAP versus 5.70 for SHAP. In CAM evaluation, the preferred metrics are **Average Drop**, **Coherency**, **Complexity**, **ADCC**, **Increase in Confidence**, and **Average Drop in Deletion**, explicitly because the paper treats localization ability and explainability as separable. In graph sparsification, the operational metric is preservation of **test accuracy** under edge pruning; examples include pruning **80% of edges** on Cora and PubMed with **less than 2% accuracy drop** in several GCN and GAT settings [2401.03128] [2501.06261] [2507.20460].

Other domains use still different criteria. GeoShapley validates against known spatial data-generating processes and then relies on maps, summary plots, and cross-model comparisons; in the Seattle case study, the direct location contribution \(\phi_{GEO}\) ranges from about **-43% to +123%** relative to the base value. WeightedSHAP evaluates localization by prediction recovery, using **AUP**, **inclusion MSE**, and **inclusion AUC**. L-Shapley and C-Shapley use deletion or masking-based log-odds tests. Sensor anomaly localization is judged by minimum **probability of error** for the binary per-sensor decision problem. This suggests that “better localization” is not a single metric property but a task-dependent relation between an attribution map and a downstream perturbation, ranking, or decision objective [2312.03675] [2209.13429] [1808.02610] [2507.21023].

The limitations are correspondingly domain-specific. Manifold-based SAR attribution depends on learning a reliable SAR data manifold and on a good inverse mapping; if the generator fails, latent-space coalitions may still be unrealistic. GeoShapley inherits the interventional interpretation and background-dataset dependence of Kernel SHAP, and lacks a formal inferential framework. GNNShap depends on model quality, sampled coalitions, surrogate fidelity, and computational budget. ShapleyCAM is not exact Shapley localization but a second-order Taylor approximation around the full coalition, and its performance depends on target-layer choice. Causal graph methods require a known or estimated DAG, and misspecification of the graph changes the localization result itself [2401.03128] [2312.03675] [2507.20460] [2501.06261] [2010.14592].

A plausible implication is that Shapley-based localization is best viewed as a design space rather than a single method. The literature contains exact games, semivalue generalizations, graph-restricted approximations, manifold-aware variants, surrogate conditional-expectation schemes, intrinsic explanation networks, and causal flow formulations. What unifies them is the attempt to allocate predictive responsibility in a way that is localized to a structured explanatory object and grounded in cooperative-game reasoning. What divides them is the choice of players, the value function, the treatment of dependence, and the criterion used to decide whether the resulting localization is faithful, useful, or necessary.

Source: https://www.emergentmind.com/topics/shapley-based-localization