Derivative-Based Shapley Value (DerSHAP)
- 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 be a square-integrable function defined on , with the input index set. The Shapley value for variable , denoted , satisfies the efficiency, null-player, and symmetry axioms. In the classical framework, Shapley value is obtained via
where quantifies the total contribution of subset .
Derivative-based Shapley value construction:
For independent , the -coalition value is set to
0
This yields the closed-form variable attributions
1
This construction recovers the Shapley axioms, so 2. For dependent inputs, the gradient is replaced with the Riemannian (manifold) gradient 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 4 with arbitrary dependence structure, a dependency model 5 (with independent 6) enables computation of a pointwise Jacobian 7 and induced metric 8. The Riemannian gradient is computed as
9
In the Gaussian case 0, the metric and corresponding operators are available in closed form, and all expectations are taken with respect to the joint law of 1. This ensures that correlations between inputs are correctly accounted for both in main effect and interaction terms. For each 2,
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 4 subsets. For analytic gradients, the method proceeds by drawing 5 samples 6 from the input distribution and computing 7 (or 8 under dependence), accumulating the empirical second-moment matrix
9
where 0. Shapley attributions are
1
If analytic gradients are unavailable, an optimal randomized finite-difference estimator (using 2 spherical samples per input and leveraging the metric 3) yields unbiased, dimension-free bias control and 4 mean square error rates (Lamboni et al., 7 Jan 2026). In either computation mode, the complexity is 5, allowing efficient application even in high dimensions (Duan et al., 2023).
| Step | Operation | Cost |
|---|---|---|
| Sampling | Draw 6 samples 7 | 8 |
| Gradient Estimation | Compute (finite-difference or analytic) grad | 9 |
| Cross-moment Accumulation | Form matrix 0 | 1 |
| Shapley Attribution | Aggregate main and mixed effects | 2 |
A recommended choice is 3 to ensure 4 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 5 model evaluations or appropriate (still combinatorially expensive) approximations.
- KernelSHAP/TreeSHAP fit surrogate models over feature masks, with complexity exponential in 6 or specialized to particular model classes.
- DerSHAP uniquely (i) scales as 7, (ii) is model-agnostic except for gradient access, and (iii) exactly accounts for both main effect and pairwise interaction contributions via the form 8 (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: 9.
- Null player: if a variable is not present in any 0, its attribution is zero.
- Symmetry: variables entering 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 2 (second-order Hölder), the bias and variance of the moment estimator scale as 3 for the bias and 4 for the trace MSE, with optimal 5.
- For empirical cross-moment matrices 6, if the (absolute) eigen-spectrum decays rapidly, the error in the Shapley vector from truncation is bounded as 7 (with 8 retained eigenmodes and spectral gap at 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, 0 under 1 with covariance 2,
- The ordinary gradient is 3, insensitive to 4.
- The manifold gradient rotates with 5, yielding continuous DerSHAP attributions: as 6 increases, the measure distributes smoothly from 7 to 8, in line with the variance-based Shapley. The independence-based formula fails to account for this, remaining at 9 for all 0 (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.