SLISEMAP: Combining Supervised Dimensionality Reduction with Local Explanations

Anton Björklund, Jarmo Mäkelä, Kai Puolamäki

Abstract

SLISEMAP is an open-source Python library that integrates manifold visualization with local explanations for black-box models. By simultaneously learning a low-dimensional embedding and local interpretable surrogate models, SLISEMAP provides a unified global view of how a complex model's decision-making logic varies across a dataset. This paper outlines the SLISEMAP methodology, its PyTorch-based implementation, and demonstrates its utility using the AutoMPG dataset.

Introduction

In Explainable AI (XAI), researchers often use local, model-agnostic explanations (like LIME or SHAP) to interpret individual predictions. Separately, dimensionality reduction tools (like t-SNE or UMAP) are used to visualize high-dimensional data clusters. However, a gap exists between these two approaches: visual clusters do not necessarily correspond to shared decision logic. SLISEMAP addresses this by creating a 2D embedding where proximity indicates that data points share similar local "white box" explanations, offering a global perspective on local model behavior.

Methodology

The SLISEMAP algorithm takes a data matrix and the predictions from a pre-trained black-box model as inputs. It performs a simultaneous optimization of a low-dimensional embedding and a set of local surrogate models (e.g., linear regression).

The core mechanism involves a "push and pull" logic: if two data points require significantly different local models to explain the black box's behavior, they are pushed apart in the embedding. Conversely, points explained by the same local model are clustered together. This distance-weighted optimization ensures that the visual space directly reflects the logic of the surrogate models.

Key parameters and default values for the SLISEMAP algorithm.

As shown in the parameter table above, the library allows for fine-tuning of embedding spread (radius) and regularization (lasso/ridge). Built in Python using PyTorch, SLISEMAP supports automatic differentiation and GPU acceleration, interfacing seamlessly with the broader scientific Python ecosystem.

Case Study: AutoMPG Dataset

To demonstrate the library's capabilities, the authors applied SLISEMAP to a random forest regressor trained on the AutoMPG dataset to predict fuel consumption.

SLISEMAP embedding and local model coefficients for the AutoMPG dataset.

The resulting visualization (left) and coefficient analysis (right) reveal distinct clusters of decision logic. For instance, Cluster 0 (blue) identifies a group of heavy, US-made cars where 'weight' is the primary negative predictor of fuel economy. In contrast, Cluster 2 (green) represents lighter, non-US cars where 'model year' and 'horsepower' are the dominant factors. This macro-level view allows users to identify how the black box's logic shifts across different subpopulations of the data.

Conclusion

SLISEMAP provides a powerful framework for bridging the gap between local explanations and global data visualization. Beyond static analysis, the library includes features for projecting new data items to detect concept drift or find alternative explanations. While the simultaneous optimization of embeddings and local models is computationally demanding, the library's support for subsampling ensures it remains practical for real-world datasets. SLISEMAP is available as an open-source package under the MIT license.

Summary updated

Abstract

We introduce a Python library, called slisemap, that contains a supervised dimensionality reduction method that can be used for global explanation of black box regression or classification models. slisemap takes a data matrix and predictions from a black box model as input, and outputs a (typically) two-dimensional embedding, such that the black box model can be approximated, to a good fidelity, by the same interpretable white box model for points with similar embeddings. The library includes basic visualisation tools and extensive documentation, making it easy to get started and obtain useful insights. The slisemap library is published on GitHub and PyPI under an open source license.
BibTeX
@inproceedings{bjorklund2022slisemap,
  author = {Anton Björklund and Jarmo Mäkelä and Kai Puolamäki},
  title = {{SLISEMAP: Combining Supervised Dimensionality Reduction with Local Explanations}},
  booktitle = {ECML/PKDD},
  year = {2022},
  doi = {10.1007/978-3-031-26422-1\_41},
}
Figure