DALEX: Explainers for Complex Predictive Models in R

Przemyslaw BiecekJMLR 2018 · OpenReview

TL;DR

This paper introduces DALEX, a unified R package for exploring complex "black box" predictive models. It provides a consistent framework of model-agnostic explainers that help understand model performance, individual predictions, and variable importance, enabling better model validation and debugging.

What Problem Does This Paper Address?

Modern machine learning models, like neural networks and ensembles, offer incredible accuracy and flexibility. However, this power comes at the cost of complexity; their numerous parameters make them difficult for humans to understand. This lack of interpretability is problematic in many domains due to legal requirements (like GDPR's "right to explanation"), the need to ensure fair decisions, and to build trust in model outputs. Existing methods for understanding these models are often scattered and model-specific. The authors aim to address this by providing a unified, model-agnostic approach to explore and understand these complex predictive models.

Methods

The core contribution is the DALEX package, which offers a consistent framework for model exploration. The key idea is "model-agnosticism," meaning the explainers can work with any predictive model regardless of its internal structure. This is achieved by wrapping models and using their prediction functions. DALEX provides a set of "explainers," each designed to illuminate a specific aspect of a model:

  • Prediction Explainers: These focus on understanding individual predictions. Examples include Break Down Plots (approximations of Shapley values) and Ceteris Paribus Profiles (showing how a prediction changes when a single variable is altered for a specific observation).
  • Model Explainers: These provide a broader view of the model's behavior. This includes explainers for model performance (like ROC curves for classification and other metrics for regression) and variable importance (using a permutation-based approach).
  • Unified Grammar: All explainers adhere to a standardized grammar, making them easy to use and extend. A significant feature is the ability to compare multiple models side-by-side, highlighting their strengths and weaknesses.

Datasets

Not discussed in the paper. The focus is on the methodology and the R package, with examples likely using standard R datasets for demonstration purposes.

Key Insights and Ideas

  • Model-Agnosticism is Key: The ability to apply the same explanation tools to vastly different model types (e.g., random forests, neural networks, gradient boosting) is a major step towards democratizing model interpretability.
  • Unified Grammar Simplifies Exploration: Having a single, consistent way to access various explanation techniques reduces the learning curve and makes it easier to compare different aspects of a model.
  • Comparing Models is Crucial for Validation: DALEX's ability to overlay explainers for multiple models on the same chart is a powerful tool for model selection and validation, revealing how different models behave under similar conditions.
  • Local vs. Global Behavior: The paper implicitly highlights that local explanations (for individual predictions) can differ significantly from global explanations (overall model behavior), especially for non-additive models.

Key Results

The paper presents the DALEX package (version 0.2.5) for R, which implements a suite of model-agnostic explainers. It demonstrates how these explainers can be used to:

  • Decompose individual predictions (e.g., Break Down Plots).
  • Visualize how predictions change with variable values for specific observations (e.g., Ceteris Paribus Plots).
  • Assess overall model performance and identify key drivers of predictions (e.g., Variable Importance Plots).
  • Compare the performance and behavior of multiple models simultaneously.

The package is described as tested with CI tools and easy to extend.

Limitations and Future Work

  • Computational Cost: While not explicitly detailed as a limitation, complex models and large datasets can make generating some explanations computationally intensive. The paper mentions that Break Down Plots are "fast approximations" of Shapley values, hinting at performance considerations.
  • Interpretation Nuances: The paper acknowledges that for non-additive models, local behavior can differ from global behavior, implying that interpreting these differences requires careful consideration.
  • Future Work: The authors suggest the framework is easily extendable, implying that new explainers can be integrated into the DALEX ecosystem. The paper also points to an extended version available online, which may contain more detailed discussions or additional examples.

Summary updated

Abstract

Predictive modeling is invaded by elastic, yet complex methods such as neural networks or ensembles (model stacking, boosting or bagging). Such methods are usually described by a large number of parameters or hyper parameters - a price that one needs to pay for elasticity. The very number of parameters makes models hard to understand. This paper describes a consistent collection of explainers for predictive models, a.k.a. black boxes. Each explainer is a technique for exploration of a black box model. Presented approaches are model-agnostic, what means that they extract useful information from any predictive method irrespective of its internal structure. Each explainer is linked with a specific aspect of a model. Some are useful in decomposing predictions, some serve better in understanding performance, while others are useful in understanding importance and conditional responses of a particular variable. Every explainer presented here works for a single model or for a collection of models. In the latter case, models can be compared against each other. Such comparison helps to find strengths and weaknesses of different models and gives additional tools for model validation. Presented explainers are implemented in the DALEX package for R. They are based on a uniform standardized grammar of model exploration which may be easily extended.
BibTeX
@article{biecek2018dalex,
  author = {Przemyslaw Biecek},
  title = {{DALEX: Explainers for Complex Predictive Models in R}},
  journal = {J. Mach. Learn. Res.},
  year = {2018},
  url = {https://openreview.net/forum?id=aP7JAomoKE},
}
Figure