5 Explainable AI (XAI) Frameworks
By: Chetan Ambi
Tags: Data Science, Machine Learning, Artificial Intelligence

What is Explainable AI?

Explainable AI (XAI) is one of the hot topics in AI-ML. It refers to the tools and techniques that can be used to make black-box machine learning be be understood by human experts.

Why Explainable AI is Important?

Let’s try to understand why explainable AI is important. Consider you are working for a housing finance or bank client. You are tasked with building a machine learning model to predict loan defaults. So, you built the model and successfully implemented it in production. Now, this model is being used by the end-users and they just tried for one customer and the model prediction comes out as ‘default’. So far so good. This prediction might be 100% correct but how will you explain which features are contributing to making this prediction as ‘default’? This is where explainable AI frameworks help us.

The below diagram give us the complete picture how Explainable AI frameworks useful for everyone from Data Scientists to Consumers.

Model interpretability is critical for the business. We generally tend to focus on model building and deployment but in reality, the focus should be on model interpretability and understanding how machine learning models arrive at their decisions as well. We can see that there has been a lot of research and development going on in the field. So, it is good to see more and more XAI frameworks coming that can help us build trust in the models.

Explainable AI is used in all the industries: finance, health care, banking, medicine, etc. In this article, I highlight 5 explainable AI frameworks that you can start using in your machine learning project.

Explainable AI Frameworks

SHAP stands for SHapley Additive exPlanations. It is based on is a game-theoretic approach to explain the output of any machine learning model and can help us to interpret and explain any machine learning model. It is considered as a unified framework for interpreting the predictions as it helps users to interpret predictions of complex models and also explain how these models are related & when one method is preferred over another.

It works by computing SHAP values and uses different algorithms such as TreeExplainer, DeepExplainer, GradientExplaine, LinearExplainer, and KernelExplainer. For more detailss, refer to these papers. The official tutorials on how to use SHAP can be found here.

Github: https://github.com/slundberg/shap

Stars: 10600

LIME stands for Local Interpretable Model-Agnostic Explanations. It is developed by researchers at the University Of Washington. LIME supports both regression and classification tasks and works with text, tabular, image data, etc. You can find the official tutorials here.

Here is a link to the promo video:

Github: https://github.com/marcotcr/lime

Stars: 8000

Skater is another framework used for model interpretation to better explain machine learning predictions. You can find the official tutorials here.

Algorithms supported by Skater for explaining the model predictions:

Github: https://github.com/oracle/Skater

Stars: 942

AIX360 stands for AI Explainability 360 and is developed by IBM. Personally, I liked the documentation of AIX360. Also, they have provided an interactive demo to provide a gentle introduction to the concepts. You can official tutorials here.

Github: https://github.com/Trusted-AI/AIX360

Stars: 701

What-If-Tool provides an easy to use interface to understand machine learning models. It can be used for both classification and regression tasks covering text, tabular, and image data. It works with most of the platforms — Jupyter Notebooks, Colab Notebooks, Cloud AI Notebooks, etc. One can manually or programmatically modify the data and re-run through the model in order to see the results of the changes. It also provides tools for investigating model performance and fairness over subsets of a dataset.

Do you know what is interesting? All this can be done with absolutely no code required. You can explore the demo on the official page here.

Github: https://github.com/pair-code/what-if-tool

Stars: 365

Conclusion

You just went through the most commonly used Explainable AI Frameworks used in the industry. Now you can start using any of these frameworks in your next machine learning project for model interpretability and explanations.