Skip to main content
QUICK REVIEW

[论文解读] shapiq: Shapley Interactions for Machine Learning

Maximilian Muschalik, Hubert Baniecki|arXiv (Cornell University)|Oct 2, 2024
Software Engineering ResearchComputer Science被引用 5
一句话总结

介绍 shapiq,这是一个开源的 Python 库,统一并基准各种方法以计算 Shapley Values (SVs) 和任意阶 Shapley Interactions (SIs) 用于机器学习,具有应用无关界面和跨多个领域的基准套件。

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.

研究动机与目标

  • 提供一个应用无关的框架,用于在 ML 中计算 SVs 和任意阶 SI。
  • 将最先进的 SI 近似算法统一到一个接口下。
  • 提供解释 API,以解释和可视化模型预测中的交互。
  • 提供横跨领域的带有预计算 ground-truth SI 值的基准套件以指导研究人员。
  • 促进超过标准特征归因的特征交互的研究与可视化。

提出的方法

  • 实现跨多种交互指标和阶数的 SI 算法近似接口。
  • 包含一个 ExactComputer,用于 18 个交互指标和 MI 表示的精确计算。
  • 提供 CoalitionSampler 接口,通过边界技巧和配对技巧等采样方法改进近似。
  • 提供一套含有 11 个基准游戏的集合,覆盖真实世界 ML 领域,并带有预计算的 SI ground-truth 以用于评估。
  • 公布 Explainer API,以生成和可视化预测的任意阶特征交互。
  • 与 TreeSHAP-IQ 集成,可对树模型提供高效解释,并支持常见 ML 库。

实验结果

研究问题

  • RQ1如何在 ML 模型中高效计算任意阶交互的 Shapley Interactions?
  • RQ2一个统一的 API 能否在不同模型类型和数据域中支持多种 SI 指标与近似方法?
  • RQ3在实际资源约束下,SI 近似器在多大程度上接近 ground-truth 的 SI 值?
  • RQ4研究人员如何在真实世界数据集和模型上对高阶交互进行基准测试与可视化?

主要发现

  • shapiq 提供一个开源库,统一最先进的 SI 算法与小型博弈的精确计算。
  • 它覆盖 18 个交互指标和博弈论概念,包含 Möbius Interactions 作为最高阶表示。
  • 包含一个含有 11 个基准游戏的基准套件,跨多个真实世界 ML 领域,在 2,042 个配置中提供预计算的 SI ground-truths。
  • 它能够对诸如视觉变换器、语言模型、XGBoost、LightGBM(TreeSHAP-IQ)的模型实现任意阶特征交互的解释与可视化。
  • shapiq 将基于 Shapley 的解释扩展到超越特征归因,支持在 ML 博弈论与 SI 应用方面的研究。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。