These tools and metrics are designed to help AI actors develop and use trustworthy AI systems and applications that respect human rights and are fair, transparent, explainable, robust, secure and safe.
InterpretML
In the beginning machines learned in darkness, and data scientists struggled in the void to explain them.
Let there be light.
InterpretML is an open-source package that incorporates state-of-the-art machine-learning interpretability techniques under one roof. With this package, you can train interpretable glass box models and explain black box systems. InterpretML helps you understand your model’s global behavior, or understand the reasons behind individual predictions.
Interpretability is essential for:
- Model debugging – Why did my model make this mistake?
- Feature Engineering – How can I improve my model?
- Detecting fairness issues – Does my model discriminate?
- Human-AI cooperation – How can I understand and trust the model’s decisions?
- Regulatory compliance – Does my model satisfy legal requirements?
- High-risk applications – Healthcare, finance, judicial, …
Installation
Python 3.6+ | Linux, Mac, Windows
pip install interpret
Introducing the Explainable Boosting Machine (EBM)
EBM is an interpretable model developed at Microsoft Research*. It uses modern machine learning techniques like bagging, gradient boosting, and automatic interaction detection to breathe new life into traditional GAMs (Generalized Additive Models). This makes EBMs as accurate as state-of-the-art techniques like random forests and gradient-boosted trees. However, unlike these black box models, EBMs produce exact explanations and are editable by domain experts.
Dataset/AUROC | Domain | Logistic Regression | Random Forest | XGBoost | Explainable Boosting Machine |
---|---|---|---|---|---|
Adult Income | Finance | .907±.003 | .903±.002 | .927±.001 | .928±.002 |
Heart Disease | Medical | .895±.030 | .890±.008 | .851±.018 | .898±.013 |
Breast Cancer | Medical | .995±.005 | .992±.009 | .992±.010 | .995±.006 |
Telecom Churn | Business | .849±.005 | .824±.004 | .828±.010 | .852±.006 |
Credit Fraud | Security | .979±.002 | .950±.007 | .981±.003 | .981±.003 |
Notebook for reproducing table
Supported Techniques
Interpretability Technique | Type |
---|---|
Explainable Boosting | glassbox model |
Decision Tree | glassbox model |
Decision Rule List | glassbox model |
Linear/Logistic Regression | glassbox model |
SHAP Kernel Explainer | blackbox explainer |
LIME | blackbox explainer |
Morris Sensitivity Analysis | blackbox explainer |
Partial Dependence | blackbox explainer |
Train a glass box model
Let’s fit an Explainable Boosting Machine
from interpret.glassbox import ExplainableBoostingClassifier
ebm = ExplainableBoostingClassifier()
ebm.fit(X_train, y_train)
# or substitute with LogisticRegression, DecisionTreeClassifier, RuleListClassifier, ...
# EBM supports pandas dataframes, numpy arrays, and handles "string" data natively.
Understand the model
from interpret import show
ebm_global = ebm.explain_global()
show(ebm_global)
Understand individual predictions
ebm_local = ebm.explain_local(X_test, y_test)
show(ebm_local)
And if you have multiple model explanations, compare them
show([logistic_regression_global, decision_tree_global])
If you need to keep your data private, use Differentially Private EBMs (see DP-EBMs)
from interpret.privacy import DPExplainableBoostingClassifier, DPExplainableBoostingRegressor
dp_ebm = DPExplainableBoostingClassifier(epsilon=1, delta=1e-5) # Specify privacy parameters
dp_ebm.fit(X_train, y_train)
show(dp_ebm.explain_global()) # Identical function calls to standard EBMs
For more information, see the documentation.
Acknowledgements
InterpretML was originally created by (equal contributions): Samuel Jenkins, Harsha Nori, Paul Koch, and Rich Caruana
EBMs are fast derivative of GA2M, invented by: Yin Lou, Rich Caruana, Johannes Gehrke, and Giles Hooker
Many people have supported us along the way. Check out ACKNOWLEDGEMENTS.md!
We also build on top of many great packages. Please check them out!
plotly | dash | scikit-learn | lime | shap | salib | skope-rules | treeinterpreter | gevent | joblib | pytest | jupyter
Citations
InterpretML
“InterpretML: A Unified Framework for Machine Learning Interpretability” (H. Nori, S. Jenkins, P. Koch, and R. Caruana 2019)
@article{nori2019interpretml, title={InterpretML: A Unified Framework for Machine Learning Interpretability}, author={Nori, Harsha and Jenkins, Samuel and Koch, Paul and Caruana, Rich}, journal={arXiv preprint arXiv:1909.09223}, year={2019} }
Explainable Boosting
Differential Privacy
LIME
SHAP
Sensitivity Analysis
Partial Dependence
Open Source Software
Videos
- The Science Behind InterpretML: Explainable Boosting Machine
- How to Explain Models with InterpretML Deep Dive
- Black-Box and Glass-Box Explanation in Machine Learning
- Explainable AI explained! By-design interpretable models with Microsofts InterpretML
- Interpreting Machine Learning Models with InterpretML
External links
- Interpretable or Accurate? Why Not Both?
- The Explainable Boosting Machine. As accurate as gradient boosting, as interpretable as linear regression.
- Performance And Explainability With EBM
- InterpretML: Another Way to Explain Your Model
- A gentle introduction to GA2Ms, a white box model
- Model Interpretation with Microsoft’s Interpret ML
- Explaining Model Pipelines With InterpretML
- Explain Your Model with Microsoft’s InterpretML
- On Model Explainability: From LIME, SHAP, to Explainable Boosting
- Dealing with Imbalanced Data (Mortgage loans defaults)
- The right way to compute your Shapley Values
- The Art of Sprezzatura for Machine Learning
- Mixing Art into the Science of Model Explainability
Papers that use or compare EBMs
- Federated Boosted Decision Trees with Differential Privacy
- Pest Presence Prediction Using Interpretable Machine Learning – preprint
- GAM(E) CHANGER OR NOT? AN EVALUATION OF INTERPRETABLE MACHINE LEARNING MODELS
- Revealing the Galaxy-Halo Connection Through Machine Learning
- Explainable Artificial Intelligence for COVID-19 Diagnosis Through Blood Test Variables
- Using Explainable Boosting Machines (EBMs) to Detect Common Flaws in Data
- Explainable Boosting Machines for Slope Failure Spatial Predictive Modeling
- Micromodels for Efficient, Explainable, and Reusable Systems: A Case Study on Mental Health
- Identifying main and interaction effects of risk factors to predict intensive care admission in patients hospitalized with COVID-19
- Comparing the interpretability of machine learning classifiers for brain tumour survival prediction
- Using Interpretable Machine Learning to Predict Maternal and Fetal Outcomes
- Calibrate: Interactive Analysis of Probabilistic Model Output
- Neural Additive Models: Interpretable Machine Learning with Neural Nets
- NODE-GAM: Neural Generalized Additive Model for Interpretable Deep Learning
- Scalable Interpretability via Polynomials
- Neural Basis Models for Interpretability
- ILMART: Interpretable Ranking with Constrained LambdaMART
- Integrating Co-Clustering and Interpretable Machine Learning for the Prediction of Intravenous Immunoglobulin Resistance in Kawasaki Disease
- GAMI-Net: An Explainable Neural Network based on Generalized Additive Models with Structured Interactions
- A Concept and Argumentation based Interpretable Model in High Risk Domains
- Analyzing the Differences between Professional and Amateur Esports through Win Probability
- Explainable machine learning with pairwise interactions for the classifcation of Parkinson’s disease and SWEDD from clinical and imaging features
- Interpretable Prediction of Goals in Soccer
- Extending the Tsetlin Machine with Integer-Weighted Clauses for Increased Interpretability
- In Pursuit of Interpretable, Fair and Accurate Machine Learning for Criminal Recidivism Prediction
- From Shapley Values to Generalized Additive Models and back
- An Explainable Machine Learning Approach to Visual-Interactive Labeling: A Case Study on Non-communicable Disease Data
- Development and Validation of an Interpretable 3-day Intensive Care Unit Readmission Prediction Model Using Explainable Boosting Machines
- Death by Round Numbers and Sharp Thresholds: How to Avoid Dangerous AI EHR Recommendations
- Building a predictive model to identify clinical indicators for COVID-19 using machine learning method
- Using Innovative Machine Learning Methods to Screen and Identify Predictors of Congenital Heart Diseases
- Explainable Boosting Machine for Predicting Alzheimer’s Disease from MRI Hippocampal Subfields
- Impact of Accuracy on Model Interpretations
Books that discuss EBMs
- Interpretable Machine Learning with Python
- Explainable Artificial Intelligence: An Introduction to Interpretable Machine Learning
- Machine Learning for High-Risk Applications
External tools
Contact us
There are multiple ways to get in touch:
- Email us at interpret@microsoft.com
- Or, feel free to raise a GitHub issue
About the tool
You can click on the links to see the associated tools
Developing organisation(s):
Tool type(s):
Objective(s):
Type of approach:
Usage rights:
License:
Programming languages:
Github stars:
- 4641
Github forks:
- 586
Use Cases
Would you like to submit a use case for this tool?
If you have used this tool, we would love to know more about your experience.
Add use case