Create and explore imaginative 3D worlds with our new product Dreamfield (opens in a new tab)
Papers
Topics
Authors
Recent
Search
2000 character limit reached

Derivative-Based Shapley Value (DerSHAP)

Updated 7 June 2026
  • DerSHAP is a global feature attribution method that integrates gradient-based sensitivity analysis with Shapley fairness axioms to assess both main effects and interactions.
  • It achieves O(Nd) scalability by leveraging analytic gradients or efficient finite-difference estimators, making it practical for high-dimensional uncertainty and explainability tasks.
  • By incorporating Riemannian gradient adjustments for dependent inputs, DerSHAP accurately captures correlations and variable interactions without incurring exponential computational cost.

The derivative-based Shapley value (DerSHAP) is a global feature importance and explainability measure that fuses the fairness axioms of the Shapley value with the computational and interpretative power of gradient-based (derivative-based) sensitivity analysis. Unlike classical Shapley approaches that rely on evaluating exponentially many model subsets, DerSHAP achieves O(Nd) scalability by leveraging either analytic or numerical partial derivatives, making it viable for high-dimensional uncertainty quantification and explainability tasks in both independent and dependent input settings. DerSHAP rigorously incorporates not only main effects but also second-order variable interactions via mixed partials, and when generalized with the correct Riemannian (manifold) geometry, it retains both fidelity and fairness for non-independent features (Lamboni et al., 7 Jan 2026, Duan et al., 2023).

1. Mathematical Formulation and Theoretical Foundation

Let f:Rd→Rf: \mathbb{R}^d \rightarrow \mathbb{R} be a square-integrable function defined on X=(X1,...,Xd)X = (X_1, ..., X_d), with D={1,...,d}D = \{1, ..., d\} the input index set. The Shapley value for variable j∈Dj \in D, denoted Φj\Phi_j, satisfies the efficiency, null-player, and symmetry axioms. In the classical framework, Shapley value is obtained via

Φj=∑u⊆D∖{j}∣u∣!(d−∣u∣−1)!d![η(u∪{j})−η(u)]\Phi_j = \sum_{u \subseteq D \setminus \{j\}} \frac{|u|! (d - |u| - 1)!}{d!} [\eta(u \cup \{j\}) - \eta(u)]

where η(u)\eta(u) quantifies the total contribution of subset uu.

Derivative-based Shapley value construction:

For independent XX, the uu-coalition value is set to

X=(X1,...,Xd)X = (X_1, ..., X_d)0

This yields the closed-form variable attributions

X=(X1,...,Xd)X = (X_1, ..., X_d)1

This construction recovers the Shapley axioms, so X=(X1,...,Xd)X = (X_1, ..., X_d)2. For dependent inputs, the gradient is replaced with the Riemannian (manifold) gradient X=(X1,...,Xd)X = (X_1, ..., X_d)3 defined via the input metric, leading to the same analytic form but with all gradients interpreted accordingly (Lamboni et al., 7 Jan 2026, Duan et al., 2023).

2. Extension to Dependent Inputs

For input variables X=(X1,...,Xd)X = (X_1, ..., X_d)4 with arbitrary dependence structure, a dependency model X=(X1,...,Xd)X = (X_1, ..., X_d)5 (with independent X=(X1,...,Xd)X = (X_1, ..., X_d)6) enables computation of a pointwise Jacobian X=(X1,...,Xd)X = (X_1, ..., X_d)7 and induced metric X=(X1,...,Xd)X = (X_1, ..., X_d)8. The Riemannian gradient is computed as

X=(X1,...,Xd)X = (X_1, ..., X_d)9

In the Gaussian case D={1,...,d}D = \{1, ..., d\}0, the metric and corresponding operators are available in closed form, and all expectations are taken with respect to the joint law of D={1,...,d}D = \{1, ..., d\}1. This ensures that correlations between inputs are correctly accounted for both in main effect and interaction terms. For each D={1,...,d}D = \{1, ..., d\}2,

D={1,...,d}D = \{1, ..., d\}3

This approach unifies gradient-based attribution and probabilistic dependence in a principled manner (Lamboni et al., 7 Jan 2026).

3. Algorithmic Computation and Scalability

DerSHAP is computed without explicit enumeration over D={1,...,d}D = \{1, ..., d\}4 subsets. For analytic gradients, the method proceeds by drawing D={1,...,d}D = \{1, ..., d\}5 samples D={1,...,d}D = \{1, ..., d\}6 from the input distribution and computing D={1,...,d}D = \{1, ..., d\}7 (or D={1,...,d}D = \{1, ..., d\}8 under dependence), accumulating the empirical second-moment matrix

D={1,...,d}D = \{1, ..., d\}9

where j∈Dj \in D0. Shapley attributions are

j∈Dj \in D1

If analytic gradients are unavailable, an optimal randomized finite-difference estimator (using j∈Dj \in D2 spherical samples per input and leveraging the metric j∈Dj \in D3) yields unbiased, dimension-free bias control and j∈Dj \in D4 mean square error rates (Lamboni et al., 7 Jan 2026). In either computation mode, the complexity is j∈Dj \in D5, allowing efficient application even in high dimensions (Duan et al., 2023).

Step Operation Cost
Sampling Draw j∈Dj \in D6 samples j∈Dj \in D7 j∈Dj \in D8
Gradient Estimation Compute (finite-difference or analytic) grad j∈Dj \in D9
Cross-moment Accumulation Form matrix Φj\Phi_j0 Φj\Phi_j1
Shapley Attribution Aggregate main and mixed effects Φj\Phi_j2

A recommended choice is Φj\Phi_j3 to ensure Φj\Phi_j4 gradient mean squared error.

4. Comparison to Other Sensitivity and Explainability Methods

DerSHAP integrates gradient information in a Shapley framework, distinguishing it from both activity scores and classical Shapley solutions:

  • Activity scores aggregate only diagonal entries of the expected gradient covariance or leading eigenmodes, missing the importance from cross-derivatives and thus interactions.
  • Variance-based (Owen–Prieur) Shapley relies on conditional variances and still requires Φj\Phi_j5 model evaluations or appropriate (still combinatorially expensive) approximations.
  • KernelSHAP/TreeSHAP fit surrogate models over feature masks, with complexity exponential in Φj\Phi_j6 or specialized to particular model classes.
  • DerSHAP uniquely (i) scales as Φj\Phi_j7, (ii) is model-agnostic except for gradient access, and (iii) exactly accounts for both main effect and pairwise interaction contributions via the form Φj\Phi_j8 (Duan et al., 2023).

Practically, DerSHAP has been numerically benchmarked in global sensitivity settings (e.g., SEIR and ODE infectious disease models) and ML explainability scenarios (Amazon stocks, Boston housing). In these studies, DerSHAP demonstrated identical or superior ranking to SHAP in linear cases, and for models with substantial interaction, it provided nontrivial importance to variables that activity scores and variance-based attributions miss (Duan et al., 2023).

5. Theoretical Properties and Statistical Guarantees

DerSHAP attributions rigorously satisfy the four fundamental Shapley axioms:

  • Efficiency: Φj\Phi_j9.
  • Null player: if a variable is not present in any Φj=∑u⊆D∖{j}∣u∣!(d−∣u∣−1)!d![η(u∪{j})−η(u)]\Phi_j = \sum_{u \subseteq D \setminus \{j\}} \frac{|u|! (d - |u| - 1)!}{d!} [\eta(u \cup \{j\}) - \eta(u)]0, its attribution is zero.
  • Symmetry: variables entering Φj=∑u⊆D∖{j}∣u∣!(d−∣u∣−1)!d![η(u∪{j})−η(u)]\Phi_j = \sum_{u \subseteq D \setminus \{j\}} \frac{|u|! (d - |u| - 1)!}{d!} [\eta(u \cup \{j\}) - \eta(u)]1 in the same manner receive equal weight.
  • Additivity: attributions are linear across composed models.

Computation via Monte Carlo or randomized finite-differences achieves error control:

  • With Φj=∑u⊆D∖{j}∣u∣!(d−∣u∣−1)!d![η(u∪{j})−η(u)]\Phi_j = \sum_{u \subseteq D \setminus \{j\}} \frac{|u|! (d - |u| - 1)!}{d!} [\eta(u \cup \{j\}) - \eta(u)]2 (second-order Hölder), the bias and variance of the moment estimator scale as Φj=∑u⊆D∖{j}∣u∣!(d−∣u∣−1)!d![η(u∪{j})−η(u)]\Phi_j = \sum_{u \subseteq D \setminus \{j\}} \frac{|u|! (d - |u| - 1)!}{d!} [\eta(u \cup \{j\}) - \eta(u)]3 for the bias and Φj=∑u⊆D∖{j}∣u∣!(d−∣u∣−1)!d![η(u∪{j})−η(u)]\Phi_j = \sum_{u \subseteq D \setminus \{j\}} \frac{|u|! (d - |u| - 1)!}{d!} [\eta(u \cup \{j\}) - \eta(u)]4 for the trace MSE, with optimal Φj=∑u⊆D∖{j}∣u∣!(d−∣u∣−1)!d![η(u∪{j})−η(u)]\Phi_j = \sum_{u \subseteq D \setminus \{j\}} \frac{|u|! (d - |u| - 1)!}{d!} [\eta(u \cup \{j\}) - \eta(u)]5.
  • For empirical cross-moment matrices Φj=∑u⊆D∖{j}∣u∣!(d−∣u∣−1)!d![η(u∪{j})−η(u)]\Phi_j = \sum_{u \subseteq D \setminus \{j\}} \frac{|u|! (d - |u| - 1)!}{d!} [\eta(u \cup \{j\}) - \eta(u)]6, if the (absolute) eigen-spectrum decays rapidly, the error in the Shapley vector from truncation is bounded as Φj=∑u⊆D∖{j}∣u∣!(d−∣u∣−1)!d![η(u∪{j})−η(u)]\Phi_j = \sum_{u \subseteq D \setminus \{j\}} \frac{|u|! (d - |u| - 1)!}{d!} [\eta(u \cup \{j\}) - \eta(u)]7 (with Φj=∑u⊆D∖{j}∣u∣!(d−∣u∣−1)!d![η(u∪{j})−η(u)]\Phi_j = \sum_{u \subseteq D \setminus \{j\}} \frac{|u|! (d - |u| - 1)!}{d!} [\eta(u \cup \{j\}) - \eta(u)]8 retained eigenmodes and spectral gap at Φj=∑u⊆D∖{j}∣u∣!(d−∣u∣−1)!d![η(u∪{j})−η(u)]\Phi_j = \sum_{u \subseteq D \setminus \{j\}} \frac{|u|! (d - |u| - 1)!}{d!} [\eta(u \cup \{j\}) - \eta(u)]9), enabling principled model order reduction (Duan et al., 2023).

6. Comparative Interpretation and Illustrative Example

DerSHAP naturally interpolates between gradient-based and variance-based sensitivity measures depending on the input dependency structure and model smoothness. For pure additive functions, gradient methods may fail to identify low-rank subspaces, whereas variance-based approaches (such as sensitivity-based active subspaces, SBAS) recover all Sobol' total indices. Conversely, for functions with pronounced directional variation, DerSHAP (and derivative-based active subspaces) yield lower approximation error and provide interpretable attributions even with highly correlated inputs (Lamboni et al., 7 Jan 2026).

In an explicit two-dimensional example, η(u)\eta(u)0 under η(u)\eta(u)1 with covariance η(u)\eta(u)2,

  • The ordinary gradient is η(u)\eta(u)3, insensitive to η(u)\eta(u)4.
  • The manifold gradient rotates with η(u)\eta(u)5, yielding continuous DerSHAP attributions: as η(u)\eta(u)6 increases, the measure distributes smoothly from η(u)\eta(u)7 to η(u)\eta(u)8, in line with the variance-based Shapley. The independence-based formula fails to account for this, remaining at η(u)\eta(u)9 for all uu0 (Lamboni et al., 7 Jan 2026).

This property generalizes: DerSHAP is sensitive to interactions and correlations, such that the relative attributions reflect true shared importance, complementing both variance- and sensitivity-based approaches.

7. Applications and Empirical Insights

DerSHAP has been used in a variety of global sensitivity and machine learning explainability settings.

  • In epidemiological models with up to 27 parameters, DerSHAP identified influential parameters neglected by activity scores due to pairwise couplings, providing guidance for model reduction (Duan et al., 2023).
  • In machine learning regression settings, for both SVR and gradient-boosted regressors on benchmark datasets, DerSHAP returned feature rankings consistent with SHAP in independent and correlated settings, but at a fraction of the runtime. It also proved more robust to input dependence without the need for modification (Duan et al., 2023).
  • Simulation studies demonstrate that the relative performance of DerSHAP and SBAS varies with function class: for clustered eigenvalue quadratic forms, DerSHAP yields lower error, while for specific U-product functions, SBAS may outperform (Lamboni et al., 7 Jan 2026).

DerSHAP thus provides a theoretically grounded, computationally scalable, and practically interpretable framework for sensitivity analysis and feature importance attribution in models with arbitrary dependence structure.

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 Derivative-based Shapley Value (DerSHAP).