shapiq: Shapley Interactions for Machine Learning

Maximilian Muschalik, Hubert Baniecki, Fabian Fumagalli, Patrick Kolpaczki, Barbara Hammer +1 more
2/3/2026

No official code found. Best implementation: mmschlk/shapiq (760 stars, MIT, last commit 2026-04-25).

Abstract

Originally rooted in game theory, the Shapley Value (SV) has recently become an important tool in machine learning research. Perhaps most notably, it is used for feature attribution and data valuation in explainable artificial intelligence. Shapley Interactions (SIs) naturally extend the SV and address its limitations by assigning joint contributions to groups of entities, which enhance understanding of black box machine learning models. Due to the exponential complexity of computing SVs and SIs, various methods have been proposed that exploit structural assumptions or yield probabilistic estimates given limited resources. In this work, we introduce shapiq, an open-source Python package that unifies state-of-the-art algorithms to efficiently compute SVs and any-order SIs in an application-agnostic framework. Moreover, it includes a benchmarking suite containing 11 machine learning applications of SIs with pre-computed games and ground-truth values to systematically assess computational performance across domains. For practitioners, shapiq is able to explain and visualize any-order feature interactions in predictions of models, including vision transformers, language models, as well as XGBoost and LightGBM with TreeSHAP-IQ. With shapiq, we extend shap beyond feature attributions and consolidate the application of SVs and SIs in machine learning that facilitates future research. The source code and documentation are available at https://github.com/mmschlk/shapiq.

View on arXivView PDF

Code Implementations(1)

mmschlk/shapiqCommunity100%
MIT

Shapley Interactions and Shapley Values for Machine Learning

76068C++, PythonOct 17, 20235 months agoMIT
banzhaf-indexexplainabilityexplainable-aifeature-attributionfeature-importance+10 more

Similar Papers

Cite this paper

@article{muschalik2026shapiq,
  title  = {shapiq: Shapley Interactions for Machine Learning},
  author = {Maximilian Muschalik and Hubert Baniecki and Fabian Fumagalli and Patrick Kolpaczki and Barbara Hammer and Eyke Hüllermeier},
  year   = {2026},
  eprint = {2410.01649},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2410.01649},
  url    = {https://arxiv.org/abs/2410.01649},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.01649.svg)](https://codeofpaper.com/paper/2410.01649)

Discussion