shapr: Explaining Machine Learning Models with Conditional Shapley Values in R and Python
Not on the map. Why?
Abstract (arXiv)
This paper introduces the shapr R package, a versatile tool for generating Shapley value-based prediction explanations for machine learning and statistical regression models. Moreover, the shaprpy Python library brings the core capabilities of shapr to the Python ecosystem. Shapley values originate from cooperative game theory in the 1950s, but have over the past few years become a widely used method for quantifying how a model's features/covariates contribute to specific prediction outcomes. The shapr package emphasizes conditional Shapley value estimates, providing a comprehensive range of approaches for accurately capturing feature dependencies -- a crucial aspect for correct model explanation, typically lacking in similar software. In addition to regular tabular data, the shapr R package includes specialized functionality for explaining time series forecasts. The package offers a minimal set of user functions with sensible default values for most use cases while providing extensive flexibility for advanced users to fine-tune computations. Additional features include parallelized computations, iterative estimation with convergence detection, and rich visualization tools. shapr also extends its functionality to compute causal and asymmetric Shapley values when causal information is available. Overall, the shapr and shaprpy packages aim to enhance the interpretability of predictive models within a powerful and user-friendly framework.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 27 of its 65 references that are in the map. First posted on arXiv 2 Apr 2025.
Builds on
27 of 65 references.
References · 27
- 2017A Unified Approach to Interpreting Model Predictionscited by 6,555
- 2017Learning Important Features Through Propagating Activation Differencescited by 1,458
- 2019An Introduction to Variational Autoencoderscited by 1,000
- 2020Captum: A unified and generic model interpretability library for PyTorchcited by 547
- 2019Explaining individual predictions when features are dependent: More accurate approximations to Shapley valuescited by 208
- 2015ranger: A Fast Implementation of Random Forests for High Dimensional Data in C++ and Rcited by 172
- 2020Improving KernelSHAP: Practical Shapley Value Estimation via Linear Regressioncited by 154
- 2020True to the Model or True to the Data?cited by 126
- 2022Algorithms to estimate Shapley value feature attributionscited by 115
- 2019Asymmetric Shapley values: incorporating causal knowledge into model-agnostic explainabilitycited by 114
- 2020Causal Shapley Values: Exploiting Causal Knowledge to Explain Individual Predictions of Complex Modelscited by 107
- 2021Sampling Permutations for Shapley Value Estimationcited by 102
15 more
- 2020Shapley explainability on the data manifoldcited by 88
- 2018Variational Autoencoder with Arbitrary Conditioningcited by 68
- 2020Efficient nonparametric statistical inference on population feature importance using Shapley valuescited by 61
- 2024shapiq: Shapley Interactions for Machine Learningcited by 43
- 2017Converting High-Dimensional Regression to High-Dimensional Conditional Density Estimationcited by 34
- 2018DALEX: explainers for complex predictive modelscited by 28
- 2021Using Shapley Values and Variational Autoencoders to Explain Predictive Models with Dependent Mixed Featurescited by 19
- 2020Explaining predictive models with mixed features using Shapley values and conditional inference treescited by 18
- 2019Do Not Trust Additive Explanationscited by 16
- 2023A Comparative Study of Methods for Estimating Conditional Shapley Values and When to Use Themcited by 15
- 2021Grouped Feature Importance and Combined Features Effect Plotcited by 14
- 2020A Unifying Framework for Parallel and Distributed Processing in R using Futurescited by 9
- 2023Stabilizing Estimates of Shapley Values with Control Variatescited by 9
- 2024Improving the Weighting Strategy in KernelSHAPcited by 5
- 2019Shapley Decomposition of R-Squared in Machine Learning Modelscited by 2
Built on by
Citing papers per year: 2025: 2; 2026: 3.
5 papers.
- 2025Fast approximate estimation of conditional Shapley values when using a linear explainercited by 0
- 2025midr: Learning from Black-Box Models by Maximum Interpretation Decompositioncited by 0
- 2026How important are the genes to explain the outcome - the asymmetric Shapley value as an honest importance metric for high-dimensional featurescited by 0
- 2026qshap: Fast Shapley Decomposition of R2 for Gradient-Boosted Treescited by 0
- 2026Semiparametric Inference for Conditional Shapley Feature Importancecited by 0
- 2026Semiparametric Inference for Conditional Shapley Feature Importance9 Sep 2026
- 2026qshap: Fast Shapley Decomposition of R2 for Gradient-Boosted Trees25 Aug 2026
- 2026How important are the genes to explain the outcome - the asymmetric Shapley value as an honest importance metric for high-dimensional features5 Mar 2026
- 2025midr: Learning from Black-Box Models by Maximum Interpretation Decomposition10 Jun 2025
- 2025Fast approximate estimation of conditional Shapley values when using a linear explainer25 Apr 2025