Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
AIX360 — 数据和机器学习模型的可解释性与可说明性 | Kitploit
工具/GitHubGitHub/trusted-ai/aix360
机器学习论文与研究学习与教育AI 安全
GitHubtrusted-ai/aix360

AIX360

数据和机器学习模型的可解释性与可说明性

查看仓库网站
1.8k32515天前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

AI Explainability 360 (v0.3.0)

Build Documentation Status PyPI version

✨新动态: IBM Research 推出了新的 In-Context Explainability 360 (ICX360) 工具包,将可解释性扩展到了 LLM,特别是针对提供给 LLM 的输入。欢迎查看! 🚀✨

AI Explainability 360 工具包是一个开源库,支持数据集和机器学习模型的可解释性与可解释分析。AI Explainability 360 Python 包包含一套全面的算法,涵盖了解释的不同维度以及代理解释性度量。AI Explainability 360 工具包支持表格、文本、图像和时间序列数据。

AI Explainability 360 交互式体验 通过演示不同消费者角色的示例用例,温和地介绍了相关概念和功能。教程和示例 notebook 提供了更深入的、面向数据科学家的介绍。完整的 API 也可用。

没有一种万能的解释性方法。解释的方式有很多种:数据与模型、直接可解释与事后解释、局部与全局等。因此,为特定用例确定最合适的算法可能会令人困惑。为此,我们创建了一些指导材料和一棵分类树可供查阅。

我们在开发该包时考虑了可扩展性。这个库仍在开发中。我们鼓励您贡献自己的解释性算法、度量和用例。要成为贡献者,请先通过此处申请邀请加入 AI Explainability 360 Slack 社区。请查阅 此处 关于贡献代码和 Python notebook 的说明。

支持的可解释性算法

数据解释

  • ProtoDash (Gurumoorthy et al., 2019)
  • Disentangled Inferred Prior VAE (Kumar et al., 2018)

局部事后解释

  • ProtoDash (Gurumoorthy et al., 2019)
  • Contrastive Explanations Method (Dhurandhar et al., 2018)
  • Contrastive Explanations Method with Monotonic Attribute Functions (Luss et al., 2019)
  • Exemplar based Contrastive Explanations Method
  • Grouped Conditional Expectation (Adaptation of Individual Conditional Expectation Plots by Goldstein et al. to higher dimension )
  • LIME (Ribeiro et al. 2016, Github)
  • SHAP (Lundberg, et al. 2017, Github)

时间序列局部事后解释

  • Time Series Saliency Maps using Integrated Gradients (Inspired by Sundararajan et al. )
  • Time Series LIME (Time series adaptation of the classic paper by Ribeiro et al. 2016 )
  • Time Series Individual Conditional Expectation (Time series adaptation of Individual Conditional Expectation Plots Goldstein et al. )

局部直接解释

  • Teaching AI to Explain its Decisions (Hind et al., 2019)
  • Order Constraints in Optimal Transport (Lim et al.,2022, Github)

认证局部解释

  • Trust Regions for Explanations via Black-Box Probabilistic Certification (Ecertify) (Dhurandhar et al., 2024)

全局直接解释

  • Interpretable Model Differencing (IMD) (Haldar et al., 2023)
  • CoFrNets (Continued Fraction Nets) (Puri et al., 2021)
  • Boolean Decision Rules via Column Generation (Light Edition) (Dash et al., 2018)
  • Generalized Linear Rule Models (Wei et al., 2019)
  • Fast Effective Rule Induction (Ripper) (William W Cohen, 1995)

全局事后解释

  • ProfWeight (Dhurandhar et al., 2018)

支持的可解释性度量

  • Faithfulness (Alvarez-Melis and Jaakkola, 2018)
  • Monotonicity (Luss et al., 2019)

设置

支持的配置:

(可选)创建虚拟环境

AI Explainability 360 需要许多 Python 包的特定版本,这些版本可能与您系统上的其他项目冲突。强烈建议使用虚拟环境管理器,以确保可以安全地安装依赖。如果您在安装工具包时遇到问题,请先尝试此方法。

Conda

对于所有配置,推荐使用 Conda,不过 Virtualenv 通常也符合我们的需求。Miniconda 就足够了(如果您好奇,可以查看 Anaconda 和 Miniconda 之间的区别)。如果您还没有安装,可以从这里安装。

然后,根据您希望使用的解释性算法,参考上方表格创建新的 Python 环境。例如,对于 Python 3.10,使用以下命令:

root@kitploit:~
conda create --name aix360 python=3.10
conda activate aix360

此时 shell 应该显示为 (aix360) $。要停用环境,请运行:

root@kitploit:~
(aix360)$ conda deactivate

提示符将返回到 $ 或 (base)$。

注意:旧版本的 conda 可能使用 source activate aix360 和 source deactivate(在 Windows 上为 activate aix360 和 deactivate)。

安装

克隆此仓库的最新版本:

root@kitploit:~
(aix360)$ git clone https://github.com/Trusted-AI/AIX360

如果您想运行示例和教程 notebook,请按照 aix360/data/README.md 中的说明下载数据集,并将它们放在各自的文件夹中。

然后,导航到包含 setup.py 文件的项目根目录并运行:

root@kitploit:~
(aix360)$ pip install -e .[<algo1>,<algo2>, ...]

上述命令会安装特定算法所需的包。这里的 <algo> 指的是上方表格中的安装关键字。例如,要安装 BRCG、DIPVAE 和 TSICE 算法所需的包,可以使用:

root@kitploit:~
(aix360)$ pip install -e .[rbm,dipvae,tsice]

默认命令 pip install . 仅安装默认依赖。

请注意,您可能无法在同一个环境中安装需要不同 Python 版本的两个算法(例如 contrastive 与 rbm)。

如果您遇到任何问题,请尝试升级 pip 和 setuptools,并在再次执行上述步骤之前卸载任何先前版本的 aix360。

root@kitploit:~
(aix360)$ pip install --upgrade pip setuptools
(aix360)$ pip uninstall aix360

通过 PIP 安装 AI Explainability 360

如果您希望在不显式克隆此仓库的情况下快速开始使用 AI Explainability 360 工具包,可以使用以下任一选项:

  • 通过仓库链接安装 v0.3.0
root@kitploit:~
(your environment)$ pip install -e git+https://github.com/Trusted-AI/AIX360.git#egg=aix360[<algo1>,<algo2>,...]

例如,使用 pip install -e git+https://github.com/Trusted-AI/AIX360.git#egg=aix360[rbm,dipvae,tsice] 来安装 BRCG、DIPVAE 和 TSICE。如果您的环境中尚未安装 cmake,您可能需要使用 conda install cmake 进行安装。

  • 通过 pypi 安装 v0.3.0(或先前版本)
root@kitploit:~
(your environment)$ pip install aix360

如果采用这两种选项中的任何一种,您都需要单独下载 examples 文件夹中提供的 notebook。

处理安装错误

AI Explainability 360 工具包已在 Windows、MacOS 和 Linux 上进行过测试。但是,如果您仍然遇到由于包依赖导致的安装问题,请尝试通过 conda 安装相应的包(例如 conda install package-name),然后按照常规步骤安装工具包。例如,如果在安装过程中遇到与 pygraphviz 相关的问题,请使用 conda install pygraphviz,然后安装工具包。

请根据上方表格使用正确的 Python 环境。

在 Docker 中运行

  • 在 AIX360 目录下,使用 docker build -t aix360_docker . 从 Dockerfile 构建容器镜像。
  • 使用命令 docker run -it -p 8888:8888 aix360_docker:latest bash 启动容器镜像(假设您机器上的 8888 端口可用)。
  • 在容器内,使用命令 jupyter lab --allow-root --ip 0.0.0.0 --port 8888 --no-browser 启动 Jupyter Lab。
  • 在您的机器上使用 URL localhost:8888 访问示例教程。

使用 AI Explainability 360

examples 目录包含多种以不同方式使用 AI Explainability 360 的 Jupyter Notebook 集合。示例和教程 notebook 都展示了使用该工具包的可用代码。教程提供了额外的讨论,引导用户完成 notebook 的各个步骤。有关教程和示例的详细信息,请参见此处。

引用 AI Explainability 360

如果您在工作中使用了 AI Explainability 360,我们鼓励您:

  • 引用以下论文。BibTeX 条目如下:
root@kitploit:~
@misc{aix360-sept-2019,
title = "One Explanation Does Not Fit All: A Toolkit and Taxonomy of AI Explainability Techniques",
author = {Vijay Arya and Rachel K. E. Bellamy and Pin-Yu Chen and Amit Dhurandhar and Michael Hind
and Samuel C. Hoffman and Stephanie Houde and Q. Vera Liao and Ronny Luss and Aleksandra Mojsilovi\'c
and Sami Mourad and Pablo Pedemonte and Ramya Raghavendra and John Richards and Prasanna Sattigeri
and Karthikeyan Shanmugam and Moninder Singh and Kush R. Varshney and Dennis Wei and Yunfeng Zhang},
month = sept,
year = {2019},
url = {https://arxiv.org/abs/1909.03012}
}
  • 为本仓库点亮星标。

  • 在 AI Explainability 360 社区 中与我们和他人分享您的成功案例。

AIX360 视频

  • Vijay Arya 和 Amit Dhurandhar 于 2019 年 9 月 5 日发布的 AI Explainability 360 入门视频(35 分钟)

致谢

AIX360 借助多个开源包构建而成。所有这些包都列在 setup.py 中,其中一些包括:

  • Tensorflow https://www.tensorflow.org/about/bib
  • Pytorch https://github.com/pytorch/pytorch
  • scikit-learn https://scikit-learn.org/stable/about.html

许可证信息

请查看根目录中的 LICENSE 文件以及 补充许可证 文件夹以获取许可证信息。

下载工具
Installation keywordExplainer(s)OSPython version
cofrnetcofrnetmacOS, Ubuntu, Windows3.10
contrastivecem, cem_mafmacOS, Ubuntu, Windows3.7
dipvaedipvaemacOS, Ubuntu, Windows3.10
gcegcemacOS, Ubuntu, Windows3.10
ecertifyecertifymacOS, Ubuntu, Windows3.10
imdimdmacOS, Ubuntu3.10
limelimemacOS, Ubuntu, Windows3.10
matchingmatchingmacOS, Ubuntu, Windows3.10
nncontrastivenncontrastivemacOS, Ubuntu, Windows3.10
profwtprofwtmacOS, Ubuntu, Windows3.6
protodashprotodashmacOS, Ubuntu, Windows3.10
rbmbrcg, glrmmacOS, Ubuntu, Windows3.10
rule_inductionrippermacOS, Ubuntu, Windows3.10
shapshapmacOS, Ubuntu, Windows3.6
tedtedmacOS, Ubuntu, Windows3.10
tsicetsicemacOS, Ubuntu, Windows3.10
tslimetslimemacOS, Ubuntu, Windows3.10
tssaliencytssaliencymacOS, Ubuntu, Windows3.10