Can’t see the forest for the trees? Alibi Explain adds more models for better machine learning understanding

Can’t see the forest for the trees? Alibi Explain adds more models for better machine learning understanding

Machine learning teams in search of model explanations can now give the newly released Alibi Explain 0.5 a shot. 

The newest iteration of the Python library for monitoring and explaining machine learning models mainly adds three additional techniques to let users get behind the why of a model prediction: integrated gradients, accumulated local effects, and tree shapley additive explanations.

Accumulated local effects,  first introduced in 2016, is the oldest of the trio. The method is meant as an improved alternative to partial dependence plots to help users understand the effect certain features have on a prediction. Integrated gradients does something similar by assigning importance scores to input features, but can be used on a wider range of input data (tabular, text, and image data instead of tabular, numeric datasets only).

Tree Shapley Additive Explanations (TreeSHAP) was first introduced at the beginning of this year and helps in understanding the way tree-based models such as decision trees or random forests make their predictions. The method is supposed to be comparatively fast and accurate, thanks to the way it combines local explanations, which tend to be precise, to understand the global structure of a model. It also takes into account how local features interact and therefore influence the outcome. A simple example can be found in the announcement post.

Developers already working with Alibi will be pleased to learn that datasets.fetch_imagenet has been extended to work with any class, while can now ingest a list of strings of column names. There’s also an experimental module containing visualisation functions for IntegratedGradients on image datasets, which is still subject to change but worth checking out nonetheless, if IG is of interest to you anyway.

Although the documentation was slightly improved as well, the roadmap for the coming releases sees documentation as one of the aspects that still need some work in order to make Alibi Explain the go-to library it aims to be. Other elements that are meant to help with that include case studies on interpretability methods, TensorFlow 2.0 support for white-box and counterfactual methods, and explanations for sequential and structured data.

Alibi Explain works with Python 3.6 and 3.7. Support for version 3.5 has been dropped with this release. The project is open source and licensed under the Apache 2.0 license, with development being mostly driven by London-based machine learning tool company Seldon.

With more and more companies looking into how to use their data most effectively, the importance of explainability for machine learning seems to be growing as well. This is mainly down to the fact that being able to illustrate how a decision was made is one of the requirements to use ML and AI tech in areas with potentially far-reaching consequences  such as health or finance. Having appropriate measures in place can also help debug models if necessary.

Criticism is often leveled at the performance degradation anticipated due to the complexity that explainability concepts introduce. However, there are approaches that work around this, such as separating explanations from models, for instance.