Skip to content

v1.5.0 (2026-05-29)

Choose a tag to compare

@mmschlk mmschlk released this 29 May 10:16
· 126 commits to main since this release
c66e168

v1.5.0 (2026-05-29)

Highlights of new Features

  • adds ProxySHAP approximator in shapiq.approximator.proxy for proxy-model-accelerated interaction estimation
  • adds RegressionMSR approximator in shapiq.approximator.proxy for proxy-model accelerated value estimation
  • refactors shapiq.tree into submodules: conversion/, linear/, interventional/ with speedup through a C++ backend
  • adds LinearTreeSHAP in shapiq.tree.linear for fast first-order Shapley value computation
  • adds InterventionalTreeExplainer in shapiq.tree.interventional
  • adds KNNExplainer, WeightedKNNExplainer and ThresholdNNExplainer for nearest neighbor models
  • changes the default for all user-facing Explainer classes to index="SV", max_order=1 (Shapley values) — see Breaking Changes below
  • adds shapiq.scatter_plot for SHAP-style scatter (dependence) plots of interaction values, supporting both first-order and higher-order interactions #516

Introducing ProxySHAP #501, Preprint

Adds ProxySHAP as a new approximator that accelerates Shapley interaction estimation by fitting a lightweight proxy tree model (XGBoost by default) on sampled coalitions, computing exact interactions for the proxy via the InterventionalTreeExplainer, and then optionally correcting for the approximation error on the true model.
Adds RegressionMSR as a new approximator that accelerates Shapley value estimation by fitting a lightweight proxy tree model (XGBoost by default) on sampled coalitions, computing exact interactions for the proxy via the InterventionalTreeExplainer, and then optionally correcting for the approximation error on the true model.

An overview of ProxySHAP:

image

Sample-efficiency of ProxySHAP:

image

Introducing Explainers for Nearest Neighbor Models

Adds three new explainers, namely KNNExplainer, WeightedKNNExplainer and ThresholdNNExplainer, which efficiently compute explanations for nearest neighbor models from the scikit-learn library.
One application of these explainers is Data Valuation, i.e. the task of evaluating the usefulness of training data points for training models.

Python Version #497

  • adds support for Python 3.14 making the package compatible with the latest Python version.
  • drops support for Python 3.10 and 3.11. The minimum supported Python version is now 3.12.
  • drops support for Intel (x86_64) macOS. No pre-built wheels are shipped for Intel-based Macs because numba and llvmlite (transitive dependencies via galois) no longer publish x86_64 macOS wheels. Apple Silicon (arm64) macOS, Linux, and Windows are unaffected.

Removed Deprecated Features

  • removes path_to_values parameter from shapiq.Game, which was previously deprecated. Use shapiq.Game.load() instead. #496
  • removes pickle support from shapiq.InteractionValues. JSON is now the only supported file format. Use InteractionValues.save() and InteractionValues.load() with JSON files. #496

Breaking Changes

  • Explainer default changed to Shapley values. Explainer,
    TabularExplainer, TabPFNExplainer, AgnosticExplainer, and TreeExplainer
    now default to index="SV", max_order=1. Previously they defaulted to
    index="k-SII", max_order=2. Users relying on the previous default must
    pass these arguments explicitly. NN explainers and ProductKernelExplainer
    are unaffected — they already defaulted to "SV". Approximators and
    computers also retain their existing defaults.

Extending shapiq-games #476

  • adds standard SHAP datasets for benchmarking in shapiq_games.benchmark.local_xai.
  • adds all TabArena datasets for benchmarking in shapiq_games.benchmark.local_xai.

Four adjustment strategies are supported:

  • "none": use proxy interactions directly (fastest, least accurate)
  • "msr" / "svarm" / "kernel": unbiased adjustments via established estimators

This implementation relies on C-extension routines (compute_interactions_sparse) for high-throughput coalition evaluation.

Introducing LinearTreeSHAP #501

Adds LinearTreeSHAP — an efficient implementation of the Linear TreeSHAP algorithm (Yu et al., 2022) for computing first-order Shapley values on tree-based models.
Unlike TreeSHAPIQ, which supports any-order interactions, LinearTreeSHAP is optimized exclusively for Shapley values (index="SV") and achieves higher throughput by using a dedicated C++ extension (linear_tree_shap_iterative).
It is exported from shapiq.tree.LinearTreeSHAP. For further details we refer to the paper: Yu, S., Zheng, S., Chen, H., & Li, J. (2022). Linear TreeSHAP. NeurIPS 2022.

Complete Refactor of the shapiq.tree Module #501

The internal tree infrastructure has been fully reorganized into a clean subpackage layout:

shapiq/tree/
├── base.py              — TreeModel and EdgeTree data structures
├── treeshapiq.py        — TreeSHAP-IQ: any-order interactions via Chebyshev interpolation
├── explainer.py         — TreeExplainer (main user-facing API, unchanged interface)
├── validation.py        — validate_tree_model() for sklearn / XGBoost / LightGBM
├── utils.py             — helper utilities
├── conversion/          — tree-to-internal-format converters (sklearn, XGBoost, LightGBM)
├── linear/              — LinearTreeSHAP implementation
└── interventional/      — InterventionalTreeExplainer and InterventionalGame

The conversion of the tree methods has been moved to C++ giving at least 2x up to 6x times speeup over shap tree conversion.

Documentation and Examples

  • removes all Jupyter notebooks from the library and moves the examples to a Sphinx-Gallery so they are built and tested as part of the documentation. #509

Performance

  • speeds up the baseline imputer by removing a Python for loop from its hot path. #498

Refactoring of spex module

  • moves ProxySPEX from shapiq.approximator.sparse to shapiq.approximator.proxy. Imports from shapiq.approximator (i.e. from shapiq.approximator import ProxySPEX) are unchanged.
  • removes the "proxyspex" option from Sparse.decoder_type; it now accepts only "soft" or "hard" (default "soft").
  • moves sparse-transform and galois out of the core dependencies. Install with pip install shapiq[sparse] to use SPEX / Sparse.
  • adds a sparse extra (sparse-transform, galois) required by shapiq.approximator.sparse.
  • adds a proxy extra (xgboost, lightgbm) required by shapiq.approximator.proxy (ProxySHAP, ProxySPEX, RegressionMSR).

Bugfix

  • fixes a bug in tree conversion, such that tree models with no splits are still correctly parsed. #370
  • fixes min_order in TreeExplainer so that it now actually restricts the returned InteractionValues to interactions of order min_order..max_order (min_order=0 continues to include the empty interaction at the baseline value); invalid values now raise a clear ValueError. #325
  • fixes tree conversion breaking when the LC_NUMERIC locale is not set to the standard "C" value. #515
  • fixes a segfault in the ProxySHAP C++ extension code. #506
  • fixes a Out Of Memory (OOM) when values is an dictionary and n_players is large. #531

All PRs:

New Contributors

Full Changelog: v1.4.1...v1.5.0