Papers
Topics
Authors
Recent
Search
2000 character limit reached

Sampling KernelSHAP: A Statistical Overview

Updated 8 July 2026
  • Sampling KernelSHAP is a model-agnostic method that approximates Shapley value attributions by replacing exact coalition regression with a finite sample of random coalitions.
  • It significantly reduces the exponential cost of evaluating all feature subsets while introducing challenges like instability, sensitivity to sampling distribution, and dependency on feature imputation.
  • Recent enhancements include paired sampling, leverage score techniques, and domain-specific adaptations that improve computational efficiency and ranking stability.

Searching arXiv for recent and foundational papers on Sampling KernelSHAP and related theoretical developments. Sampling KernelSHAP denotes the sampled-coalition form of KernelSHAP, a model-agnostic approximation scheme for Shapley-value attribution in which the exact regression over all feature coalitions is replaced by regression on a finite random sample of coalitions. In recent terminology, it is one of the two popular sampling approximations used to compute Shapley values for many different predictions. Its practical importance follows from the fact that exact Shapley computation generally requires an exponential number of model evaluations, whereas sampling KernelSHAP estimates the same attribution object from a tractable number of perturbed evaluations. At the same time, the method inherits nontrivial statistical issues—instability under repeated runs, sensitivity to the coalition-sampling distribution, and dependence on how “missing” features are simulated—which have motivated a substantial literature on guarantees, variance reduction, ranking stability, and domain-specific adaptations (Mayer et al., 18 Aug 2025, Musco et al., 2024, Goldwasser et al., 2024).

1. Regression formulation and sampled estimator

KernelSHAP is commonly described as a weighted least-squares estimator for Shapley values. In the formulation used in recent theoretical work, the exact problem is written as

argminϕRq EZp[(ν(Z)Zϕ)2]subject to 1ϕ=ν(1),\underset{\phi \in \mathbb{R}^q}{\arg\min}\ \mathbb{E}_{Z\sim p}\left[(\nu(Z) - Z^\top \phi)^2\right] \quad \text{subject to } 1^\top \phi = \nu(1),

where ZZ is a binary coalition indicator vector, pp is a normalized weight function over non-trivial coalitions, and ν\nu is the value function. Sampling KernelSHAP replaces the expectation by an empirical objective based on nn random coalitions Z1,,ZnZ_1,\ldots,Z_n drawn i.i.d. from pp, yielding an estimator of the form

ϕ^n=(ZZ)1ZY,\widehat{\phi}_n = (\mathfrak{Z}^\top \mathfrak{Z})^{-1}\mathfrak{Z}^\top Y,

with Z\mathfrak{Z} the sampled design matrix and YY the corresponding responses (Mayer et al., 18 Aug 2025).

A parallel description, used in algorithmic analyses of KernelSHAP, treats Shapley estimation as a constrained least-squares regression in which each row of the design matrix represents a subset of features and each response is the model prediction for that subset. In this view, KernelSHAP samples subsets non-uniformly, with a weighting

ZZ0

which favors subset sizes near ZZ1 or ZZ2. This regression perspective is central to later developments such as leverage-score sampling, sketching analyses, and higher-order polynomial extensions (Musco et al., 2024, Chen et al., 5 Jun 2025, Fumagalli et al., 26 Jan 2026).

2. Coalition sampling, masking semantics, and the value function

The operational meaning of a sampled coalition in KernelSHAP depends on how absent features are imputed. In the tabular setting summarized in work on robotic manipulation, KernelSHAP marginalizes out “missing” features by replacing them with values sampled from the dataset distribution, or background data. For a subset ZZ3, the characteristic function is defined through an expectation in which the present features are fixed to the explicand while the missing features are sampled from their marginal distributions. The corresponding practical assumption is that excluded and included features are treated as independent (Remman et al., 2021).

That sampling rule has a direct interpretive consequence: KernelSHAP explanations represent only the features’ direct effects on a model’s output, not the indirect effects a feature can have on the output by affecting other features. In the cited robotics study, this distinction is made explicit by contrasting KernelSHAP with causal SHAP, which uses a partial causal ordering to alter KernelSHAP’s sampling procedure and thereby incorporate indirect effects. The comparison is especially consequential in systems with strong causal structure, where marginal sampling can break dependencies that are physically meaningful (Remman et al., 2021).

This dependence on the value-function semantics is also visible in later theoretical work on aggregate feature importance. One paper shows that if KernelSHAP is computed over the extended distribution obtained by independently permuting each feature column, then a small aggregate KernelSHAP value justifies feature removal over the extended support; the result is stated to hold independently of whether KernelSHAP accurately approximates true SHAP values. This establishes that the sampling distribution is not merely a computational detail, but can change what statements about feature relevance are theoretically warranted (Bhattacharjee et al., 29 Mar 2025).

3. Statistical behavior: instability, asymptotic normality, and paired sampling

A recurring theme in the literature is that sampling-based SHAP attributions are statistically unstable when the sample budget is limited. Repeated runs of SHAP and KernelSHAP can yield different feature rankings, and in many practical settings the ranking rather than the raw attribution magnitude is the object of interest. This instability motivated methods that treat feature-importance estimation as a statistical inference problem rather than only an approximation problem (Goldwasser et al., 2024).

A major theoretical advance is the derivation of asymptotic normality for sampling KernelSHAP. Recent work establishes that

ZZ4

with an explicit covariance expression. The same paper derives a paired-sampling central limit theorem,

ZZ5

showing that pairing a sampled coalition with its complement reduces asymptotic variance. The paper further shows that paired-sampling approaches provide exact results when interactions are of maximal order two, while also emphasizing a structural limitation: paired-sampling PermutationSHAP has the additive recovery property, whereas its kernel counterpart does not (Mayer et al., 18 Aug 2025).

The status of paired sampling has been sharpened further by PolySHAP. That work proves that paired sampling outputs exactly the same Shapley value approximations as second-order PolySHAP, without ever fitting a degree-2 polynomial. Within the paper’s framework, this is presented as the first strong theoretical justification for the excellent practical performance of the paired-sampling heuristic. The result reframes paired sampling as an implicit interaction-aware approximation rather than only an antithetic variance-reduction device (Fumagalli et al., 26 Jan 2026).

4. Sampling design and efficiency improvements

A large body of recent work modifies sampling KernelSHAP by changing how coalitions are drawn or weighted. Leverage SHAP is the clearest example. It observes that the Shapley regression problem admits leverage-score sampling, derives the leverage score for each subset ZZ6 as

ZZ7

and concludes that one should first draw a subset size uniformly at random and then select a uniform subset of that size. The paper states that with ZZ8 value-function evaluations, Leverage SHAP returns a solution whose regression objective is within a ZZ9 factor of optimal, and reports runtime pp0 neglecting model-evaluation time (Musco et al., 2024).

Theoretical analysis has also expanded beyond leverage scores. A unified framework for Shapley-value estimation encompasses KernelSHAP, unbiased KernelSHAP, and LeverageSHAP under both with-replacement and without-replacement sampling strategies, and provides what it describes as the first non-asymptotic theoretical guarantees for the original KernelSHAP estimator. In that formulation, KernelSHAP becomes a sketched least-squares method, and the resulting bounds clarify tradeoffs among kernel-weight sampling, leverage-score sampling, and hybrid choices (Chen et al., 5 Jun 2025).

Other refinements target the weighting stage rather than the subset distribution alone. One paper proposes replacing stochastic weights with deterministic ones, introducing variants such as paired average, paired c-kernel, and paired cel-kernel. Its numerical experiments state that the required number of contribution-function evaluations can be reduced by pp1 to pp2 while preserving the same accuracy of the approximated Shapley values, effectively reducing running time by up to pp3 (Olsen et al., 2024). A separate line of work considers sampling without replacement via the Wallenius’ noncentral hypergeometric distribution, combines this with Horvitz–Thompson-style inclusion-probability correction in the regression weights, and introduces the Symmetric bootstrap and Doubled half bootstrap for uncertainty estimation in the finite-population setting (Aanes, 13 Jan 2026).

5. Ranking guarantees, top-pp4 identification, and retrospective certification

Sampling KernelSHAP is frequently used to identify the most important features rather than to estimate the full attribution vector with uniform precision. One response to this use case is RankSHAP, which sets as its objective the event

pp5

The method performs pairwise tests between the sample best and the runner-up, conducts pp6 such tests for top-pp7 verification, and—under the conditions stated in the paper—controls the family-wise error rate at level pp8 without Bonferroni adjustment. If a test fails, additional samples are allocated only to ambiguous feature pairs. The same work emphasizes a retrospective mode: given any set of local or global importance scores, one can check after the fact whether the top ranks are statistically stable (Goldwasser et al., 2024).

A related but distinct formulation is SHAP@k, which introduces the Top-pp9 Identification Problem and casts it as an Explore-ν\nu0 problem from multi-armed bandits. For KernelSHAP@k, the paper states that only the improved stopping condition can be used, because KernelSHAP evaluates all features together; by contrast, SamplingSHAP@k can exploit both improved stopping and greedy per-feature allocation. The stopping rule is based on confidence-interval overlap, terminating when

ν\nu1

Across four public credit-related datasets, KernelSHAP@k is reported to use ν\nu2 to ν\nu3 fewer function evaluations than KernelSHAP, with runtime reductions of ν\nu4 to ν\nu5 (Kariyappa et al., 2023).

These ranking-oriented methods address a common misconception: reducing attribution variance is not equivalent to certifying rank stability. The significance-testing literature makes the stronger claim that top-ranked features can be verified with explicit error control, whereas the top-ν\nu6 identification literature targets ν\nu7-PAC identification with improved stopping criteria. The two perspectives are complementary rather than interchangeable (Goldwasser et al., 2024, Kariyappa et al., 2023).

6. Domain-specific adaptations, applications, and limitations

Sampling KernelSHAP has been adapted to domains in which the basic coalition game is too costly or too semantically crude. In time-series analysis, VARSHAP replaces the usual local linear surrogate with a local vector autoregressive surrogate and is presented as a generalization of KernelSHAP for temporally structured inputs. The same paper derives closed-form SHAP values for several classical time-series models and introduces Time Consistent Shapley values, which reduce the sample space from ν\nu8 to ν\nu9 in the stated setting (Villani et al., 2022).

In computer vision and medical imaging, the main obstacles are large input dimension and expensive forward passes. A body-part relevance framework for pedestrian detection describes KernelSHAP as inefficient for object detection because each sample requires a computation-heavy forward pass, and proposes a Beta-sampling alternative that is reported to be more robust at lower sample sizes. For patch-based 3D medical image segmentation, an efficient KernelSHAP framework restricts computation to a user-defined region of interest and its receptive-field support, and accelerates evaluation through patch logit caching; the reported computational savings range from nn0 to nn1 (Günder et al., 2023, Brioso et al., 13 Apr 2026).

The same computational pressure has motivated model-specific surrogates that treat KernelSHAP as a fidelity target. ShapPFN integrates Shapley-value regression directly into a foundation-model architecture and is reported to produce explanations in a single forward pass, achieving nn2, cosine nn3, and average explanation time nn4 seconds per batch versus nn5 seconds for KernelSHAP. This comparison is best read as evidence of KernelSHAP’s role as a reference method and of the cost of sampling-based post-hoc explanation in interactive settings (Sena et al., 31 Mar 2026).

Across these variants, the core limitations remain stable. KernelSHAP is model agnostic and theoretically principled, but its accuracy depends on the coalition-sampling budget, its semantics depend on how missing features are sampled, and its computational profile can become prohibitive for high-dimensional or expensive models. Recent theory and methodology do not remove these constraints; they specify when sampling KernelSHAP is statistically reliable, how its variance can be reduced, and which task-specific redesigns preserve useful approximation properties (Remman et al., 2021, Goldwasser et al., 2024, Chen et al., 5 Jun 2025).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Sampling KernelSHAP.