Responsible AI Toolbox is a suite of tools providing model and data exploration and assessment user interfaces and libraries that enable a better understanding of AI systems. These interfaces and libraries empower developers and stakeholders of AI systems to develop and monitor AI more responsibly, and take better data-driven actions.
Перейти к файлу
Gaurav Gupta f3835bef02
Enable flake8-breakpoint and fix errors (#1705)
* Enable flake8-breakpoint and fix errors

Signed-off-by: Gaurav Gupta <gaugup@microsoft.com>

* Move the error

Signed-off-by: Gaurav Gupta <gaugup@microsoft.com>

Signed-off-by: Gaurav Gupta <gaugup@microsoft.com>
2022-09-13 02:53:14 +00:00
.azure-devops remove postbuild branch triggers (#1476) 2022-06-08 20:54:10 -07:00
.eslintrc Add feature metadata to IDataset and JointDataset (#1614) 2022-08-09 18:01:04 +00:00
.github update nlp-feature-extractors readme, dependencies and add a release script (#1666) 2022-08-24 15:27:58 -04:00
.vscode [office-ui upgrade] Move ChoiceGroup & all other remaining dependencies to fluentui (#1501) 2022-06-15 02:55:36 +00:00
Localise Juno: check in to JUNO/hb_a12a4630-4852-4e7d-9cbc-c0e1117da1ab_20220907180147477. (#1694) 2022-09-07 16:44:22 -07:00
apps Vision model overview metrics (#1688) 2022-09-11 01:35:57 -04:00
docs [docs] Add Data Balance README (#1567) 2022-07-28 10:21:04 -04:00
erroranalysis Enable flake8-breakpoint and fix errors (#1705) 2022-09-13 02:53:14 +00:00
img readme changes + filename changes (#1062) 2021-12-06 10:43:04 -05:00
libs Update MetricSelector.tsx (#1698) 2022-09-13 00:41:39 +00:00
nlp_feature_extractors add missing positive negative words csv file to attribute extractors (#1671) 2022-08-26 12:33:23 -04:00
notebooks [Do not merge] Notebook change showing the usage of identity feature (#1627) 2022-08-22 12:35:45 -07:00
rai_core_flask release rai-core-flask 0.5.0 (#1589) 2022-07-29 11:36:21 -04:00
raiutils release raiutils v0.2.0 (#1545) 2022-07-11 17:31:03 -04:00
raiwidgets JSON serialize the endpoint output and add tests (#1679) 2022-09-08 19:11:02 +00:00
responsibleai Enable flake8-breakpoint and fix errors (#1705) 2022-09-13 02:53:14 +00:00
scripts fix e2e UI tests incorrectly running tests with flights when no notebook name specified and reduce number of test jobs (#1577) 2022-07-22 13:39:37 -04:00
tools update nx to v11 (#218) 2020-12-21 14:05:24 -08:00
.editorconfig Xuke/add prettier to ci (#14) 2020-08-08 00:09:23 -07:00
.eslintrc.json [UI refactor] Remove all alert functions and set no-alert rule (#1518) 2022-06-27 23:02:46 +00:00
.gitignore Unify naming between notebooks and test cases (#1505) 2022-06-19 20:15:45 +00:00
.prettierignore sample notebook changes and readme (#282) 2021-01-28 23:37:57 -08:00
.prettierrc Xuke/add prettier to ci (#14) 2020-08-08 00:09:23 -07:00
.yarnrc fix causal and add responsible api package to cd publish (#584) 2021-06-08 23:11:05 -07:00
CHANGES.md update release notes for v0.21.0 raiwidgets and responsibleai post-release (#1661) 2022-08-22 13:06:55 -04:00
CODEOWNERS Update CODEOWNERS (#1696) 2022-09-08 03:37:59 +00:00
CONTRIBUTING.md Split raiwidgets/e2e-notebooks test pipeline in two (#1478) 2022-06-15 21:04:15 -04:00
LICENSE Updating LICENSE to template content 2020-07-07 10:51:29 -07:00
README.md [docs] Add Data Balance README (#1567) 2022-07-28 10:21:04 -04:00
RELEASING.md add releasing doc (#970) 2021-10-30 00:40:00 -07:00
SECURITY.md Xuke/add prettier to ci (#14) 2020-08-08 00:09:23 -07:00
_NOTICE.md [office-ui upgrade] Move ChoiceGroup & all other remaining dependencies to fluentui (#1501) 2022-06-15 02:55:36 +00:00
babel.config.json upgrade nx (#725) 2021-07-29 11:32:40 -07:00
jest.config.js upgrade nx (#725) 2021-07-29 11:32:40 -07:00
jest.preset.js [office-ui upgrade] Move ChoiceGroup & all other remaining dependencies to fluentui (#1501) 2022-06-15 02:55:36 +00:00
nx.json add new interpret-vision library skeleton (#1586) 2022-07-27 15:38:25 -04:00
package.json Bump moment-timezone from 0.5.34 to 0.5.35 (#1677) 2022-08-31 09:39:03 -04:00
requirements-linting.txt Update requirements-linting.txt to add flake8-pytest-style (#1296) 2022-03-29 18:51:11 +00:00
rollup.config.js fix localization build (#500) 2021-05-06 21:55:34 -07:00
setup.cfg Enable flake8-breakpoint and fix errors (#1705) 2022-09-13 02:53:14 +00:00
setupTest.ts add ut for DashboardSettingDeleteButton (#1231) 2022-02-22 10:32:01 -08:00
tsconfig.base.json add new interpret-vision library skeleton (#1586) 2022-07-27 15:38:25 -04:00
version.cfg release raiwidgets and responsibleai 0.21.0 (#1656) 2022-08-22 00:31:09 -04:00
webpack.config.js fix notebook by inline all scripts and data (#129) 2020-11-02 07:59:49 -08:00
workspace.json add new interpret-vision library skeleton (#1586) 2022-07-27 15:38:25 -04:00
yarn.lock Bump moment-timezone from 0.5.34 to 0.5.35 (#1677) 2022-08-31 09:39:03 -04:00

README.md

Responsible AI Widgets Python Build CD MIT license PyPI raiwidgets PyPI rai_core_flask npm fairness npm interpret npm mlchartlib npm core-ui npm dataset-explorer npm causality npm counterfactuals

Responsible AI Toolbox

Responsible AI is an approach to assessing, developing, and deploying AI systems in a safe, trustworthy, and ethical manner, and take responsible decisions and actions.

Responsible AI Toolbox is a suite of tools provides a collection of model and data exploration and assessment user interfaces that enable a better understanding of AI systems. These interfaces empower developers and stakeholders of AI systems to develop and monitor AI more responsibly, and take better data-driven actions.

Model Assessment

The Toolbox consists of four dashboards:

  • Error Analysis dashboard, for identifying model errors and discovering cohorts of data for which the model underperforms.
  • Interpretability dashboard, for understanding model predictions. This dashboard is powered by InterpretML.
  • Fairness dashboard, for understanding models fairness issues using various group-fairness metrics across sensitive features and cohorts. This dashboard is powered by Fairlearn.
  • Responsible AI dashboard, a single pane of glass bringing together several mature Responsible AI tools from the toolbox for a holistic responsible assessment and debugging of models and making informed business decisions. With this dashboard, you can identify model errors, diagnose why those errors are happening, and mitigate them. Moreover, the causal decision-making capabilities provide actionable insights to your stakeholders and customers.

Introducing Responsible AI dashboard

Responsible AI dashboard is a single pane of glass, enabling you to easily flow through different stages of model debugging and decision-making. This customizable experience can be taken in a multitude of directions, from analyzing the model or data holistically, to conducting a deep dive or comparison on cohorts of interest, to explaining and perturbing model predictions for individual instances, and to informing users on business decisions and actions.

Model Assessment

In order to achieve these capabilities, the dashboard integrates together ideas and technologies from several open-source toolkits in the areas of

  • Error Analysis powered by Error Analysis, which identifies cohorts of data with higher error rate than the overall benchmark. These discrepancies might occur when the system or model underperforms for specific demographic groups or infrequently observed input conditions in the training data.

  • Model Interpretability powered by InterpretML, which explains blackbox models, helping users understand their model's global behavior, or the reasons behind individual predictions.

  • Counterfactual Analysis powered by DiCE, which shows feature-perturbed versions of the same datapoint who would have received a different prediction outcome, e.g., Taylor's loan has been rejected by the model. But they would have received the loan if their income was higher by $10,000.

  • Causal Analysis powered by EconML, which focuses on answering What If-style questions to apply data-driven decision-making – how would revenue be affected if a corporation pursues a new pricing strategy? Would a new medication improve a patients condition, all else equal?

  • Data Balance powered by Responsible AI, which helps users gain an overall understanding of their data, identify features receiving the positive outcome more than others, and visualize feature distributions.

Responsible AI dashboard is designed to achieve the following goals:

  • To help further accelerate engineering processes in machine learning by enabling practitioners to design customizable workflows and tailor Responsible AI dashboards that best fit with their model assessment and data-driven decision making scenarios.
  • To help model developers create end to end and fluid debugging experiences and navigate seamlessly through error identification and diagnosis by using interactive visualizations that identify errors, inspect the data, generate global and local explanations models, and potentially inspect problematic examples.
  • To help business stakeholders explore causal relationships in the data and take informed decisions in the real world.

This repository contains the Jupyter notebooks with examples to showcase how to use this widget. Get started here.

Installation

Use the following pip command to install the Responsible AI Toolbox.

If running in jupyter, please make sure to restart the jupyter kernel after installing.

pip install raiwidgets

Responsible AI dashboard Customization

The Responsible AI Toolboxs strength lies in its customizability. It empowers users to design tailored, end-to-end model debugging and decision-making workflows that address their particular needs. Need some inspiration? Here are some examples of how Toolbox components can be put together to analyze scenarios in different ways:  

Responsible AI Dashboard Flow Use Case
Model Overview -> Error Analysis -> Data Explorer To identify model errors and diagnose them by understanding the underlying data distribution
Model Overview -> Error Analysis -> Counterfactuals Analysis and What-If To diagnose errors in individual instances with counterfactual analysis (minimum change to lead to a different model prediction)
Model Overview -> Data Explorer -> Data Balance To understand the root cause of errors and fairness issues introduced via data imbalances or lack of representation of a particular data cohort
Model Overview -> Interpretability To diagnose model errors through understanding how the model has made its predictions
Data Explorer -> Causal Inference To distinguish between correlations and causations in the data or decide the best treatments to apply to see a positive outcome
Interpretability -> Causal Inference To learn whether the factors that model has used for decision making has any causal effect on the real-world outcome.
Data Explorer -> Counterfactuals Analysis and What-If To address customer questions about what they can do next time to get a different outcome from an AI.
Data Explorer -> Data Balance To gain an overall understanding of the data, identify features receiving the positive outcome more than others, and visualize feature distributions

Model Debugging Examples:

Responsible Decision Making Examples:

Supported Models

This Responsible AI Toolbox API supports models that are trained on datasets in Python numpy.ndarray, pandas.DataFrame, iml.datatypes.DenseData, or scipy.sparse.csr_matrix format.

The explanation functions of Interpret-Community accept both models and pipelines as input as long as the model or pipeline implements a predict or predict_proba function that conforms to the Scikit convention. If not compatible, you can wrap your model's prediction function into a wrapper function that transforms the output into the format that is supported (predict or predict_proba of Scikit), and pass that wrapper function to your selected interpretability techniques.

If a pipeline script is provided, the explanation function assumes that the running pipeline script returns a prediction. The repository also supports models trained via PyTorch, TensorFlow, and Keras deep learning frameworks.

Other Use Cases

Tools within the Responsible AI Toolbox can also be used with AI models offered as APIs by providers such as Azure Cognitive Services. To see example use cases, see the folders below:

Maintainers