Triplot: model agnostic measures and visualisations for variable importance in predictive models that take into account the hierarchical correlation structure

Katarzyna Pekala, Katarzyna Woznica, Przemyslaw BiecekarXiv 2021

Abstract

Explainable AI (XAI) techniques such as SHAP and Permutation Importance typically assume feature independence. In real-world datasets, however, features are often highly correlated, which can lead to misleading interpretations and unstable importance scores. This paper introduces Triplot, a model-agnostic visualization tool that explicitly accounts for feature correlations. Triplot combines individual variable importance, hierarchical clustering, and group-level (aspect) importance into a unified framework. By perturbing groups of correlated features rather than individual ones, the proposed predict_aspects method provides a more faithful representation of feature contributions. We demonstrate the utility of Triplot on the BostonHousing2 and FIFA datasets, highlighting its ability to reveal how importance accumulates across hierarchical feature groups.

Introduction

Most popular Explainable AI (XAI) tools share a common blind spot: they treat features as if they are independent. In practice, features are often highly coupled; for example, in real estate, square footage and room count are strongly correlated. When such features are present, standard methods can "split" importance between redundant variables, making them appear less critical than they are. Furthermore, permuting a single correlated variable creates unrealistic data points that the model never encountered during training, leading to unreliable importance scores. To address this, we propose analyzing variables in "aspects" (groups) based on their underlying correlation structure.

Correlation network of the BostonHousing2 dataset features, illustrating the complex web of dependencies that standard XAI methods often ignore.

Methods

The Triplot framework introduces two primary components: a local explanation method and a unified visualization tool.

  1. predict_aspects (Local Importance): Inspired by LIME, this method explains individual predictions by perturbing groups of correlated features (aspects) rather than individual features. It employs a local linear model to assess how group-level changes impact the prediction. To manage high-dimensional data, Lasso regression is integrated to select the most impactful aspects.
  2. The Triplot Visualization: This core tool consists of three synchronized panels. The left panel shows individual variable importance. The right panel displays a hierarchical clustering tree (dendrogram) based on Spearman’s correlation. The middle panel shows the importance of variable groups as defined by the hierarchy, allowing users to observe how importance accumulates as variables merge into broader aspects.
Local importance scores calculated for feature 'aspects' (groups) using the predict_aspects method.

Key Results

The tool was evaluated using the BostonHousing2 and FIFA datasets. In the FIFA dataset, which contains 37 features for 5,000 players, Triplot handled highly correlated skills effectively.

  • Global Analysis: Analysis revealed that while "reactions" was the most important individual variable, its importance increased significantly when grouped with "composure," yet these two remained relatively independent of other skill groups.
  • Local Analysis: Explaining the value of a specific top-tier player showed that while individual attacking skills had moderate importance, the collective "attacking skills" group was a massive positive driver of the player's predicted value. Conversely, it revealed that "defending" skills had a slight negative impact on that specific player's valuation.

Discussion and Limitations

Triplot provides a more honest assessment of variable importance by acknowledging feature dependencies. However, the predict_aspects method can be unstable with low sample sizes for the local linear model. Currently, the implementation is limited to numerical variables. Future work may explore more stable frameworks for local group importance, such as Break Down or Shapley values.

The Triplot tool is available as an R package at ModelOriented/triplot.

Summary updated

BibTeX
@misc{pekala2021triplot,
  author = {Katarzyna Pekala and Katarzyna Woznica and Przemyslaw Biecek},
  title = {{Triplot: model agnostic measures and visualisations for variable importance in predictive models that take into account the hierarchical correlation structure}},
  year = {2021},
  eprint = {2104.03403},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.03403},
}
Figure