开源工具包shapiq,高效计算特征交互贡献,提升模型可解释性。
shapiq: Shapley Interactions for Machine Learning
- 统一多种算法,支持任意阶特征交互的快速计算
- 涵盖11个真实场景,提供预计算博弈和真值用于性能评估
- 适配视觉、语言模型及树模型,助力可解释性研究与实践
源自博弈论的谢林值(Shapley Value, SV)在机器学习中广泛用于特征归因与数据估值。谢林交互(Shapley Interactions, SIs)自然扩展了SV,通过分配多实体联合贡献来增强对黑箱模型的理解。由于计算复杂度呈指数级增长,现有方法依赖结构假设或有限资源下的概率估计。本文提出shapiq,一个开源的Python工具包,统一最先进的算法,在无特定应用场景限制的框架下高效计算SV与任意阶SIs。它还包含由11个机器学习应用组成的基准测试套件,提供预计算博弈与真值,系统评估跨领域的计算性能。该工具支持对视觉变换器、语言模型及XGBoost、LightGBM等树模型进行任意阶特征交互的解释与可视化,将Shap能力拓展至特征交互分析,推动了SV与SIs在机器学习中的整合应用。代码与文档见https://github.com/mmschlk/shapiq。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。