Manuscript Offprint

arXiv:2609.31469

LandscapeSHAP: Which Persistent Homology Class Gets the Credit?

Nikola Milićević

Abstract

Shapley values, a solution concept from cooperative game theory, have recently become a standard tool for feature credit allocation in machine learning. They provide an axiomatically justified method to fairly distribute a model's prediction among the features of data. To the best of our knowledge, they have not yet been applied to explain machine learning models trained on features from topological data analysis. We develop what we believe is the first such approach, focusing on the persistence landscape featurization of persistence diagrams. Because each landscape coordinate is a rank statistic (the k-th largest tent-function value across all diagram points at a given filtration threshold), crediting a model's prediction back to individual persistent homology classes (persistence diagram points) is nontrivial. In particular, the naive coalition sampling estimators do not respect the rank based structure as near duplicate topological features would receive a winner-take-all credit instead of sharing.

We introduce LandscapeSHAP, a method for fair credit allocation to persistence diagram points based on a model's prediction. Our method represents each landscape coordinate as an integral over a parametrized family of cooperative games and solving each with a pivotal player type argument. For linear models on persistence landscapes, LandscapeSHAP has a closed form expression that gives the exact Shapley value of every persistence diagram point. In particular, there is no coalition sampling required. We further prove that the four Shapley "fairness" axioms (Efficiency, Symmetry, Linearity and Null Player) uniquely characterize this credit allocation for any model, not only linear ones. For a general nonlinear model, this unique value can only be calculated exactly from its defining coalition averaging formula, which requires considering all 2N2^{N} many coalitions, where N is the number of points in the persistence diagram. This is computationally intractable for persistence diagrams of realistic size. For now, we complement the exact linear model result with an efficient Monte Carlo sampling of persistence diagram coalitions. We give convergence rates in terms of number of samples needed to approximate to a desired degree of accuracy. We also prove stability results for the LandscapeSHAP credit allocation, for any model. Finally, we showcase the usefulness and explainability LandscapeSHAP brings to topological data analysis with a regression and classification task.

1 Introduction

Persistent homology is a central tool of topological data analysis (TDA). It is a tool that captures how the homology of a filtered space changes with respect to the filtration parameter.

In applications this information is encoded in a persistence diagram. Persistence diagrams are a multiset of points {(bi,di)}i=1N\{(b_i, d_i)\}_{i=1}^N in the halfspace Ry≥x2={(x,y)∣y≥x}\mathbb{R}_{y \geq x}^2 = \{(x, y) \mid y \geq x\}, where the first coordinate represents the birth of a homology class and the second coordinate represents the time of death. Persistence diagrams have several metrics associated with them which allows for clustering analysis and hypothesis testing with data [20]. Unfortunately persistence diagrams are not vectors (or elements of a Hilbert space) [32] so any more serious tools from statistical analysis such as averages, expectations, correlations, and machine learning algorithms are not readily available. Additionally, there are no coarse (let alone isometric) embeddings of persistence diagrams into a Hilbert space [9].

Persistence landscapes are a featurization of persistence diagrams, based on the underlying rank function, introduced by Bubenik [7]. They are particularly nice because they live in a separable Banach space and they satisfy a Strong Law of Large Numbers and a Central Limit Theorem [7, Theorems 9 and 10]. There are many other featurizations besides landscapes, e.g., persistence images [1], betti curves [45], tropical coordinates [25]. The featurization of persistence diagrams allowed for a plethora of applications where TDA can now be combined with machine learning algorithms, such as classification and regression analysis on real world datasets [21].

Despite all of that, a large problem with machine learning methods is their inherent high dimensionality of learned parameters which obscures insight into how a model is making its decision [39, 27]. This is important for interpretability and hypothesis generation and testing. Persistent homology features are often high dimensional themselves. For example a persistence landscape with 20 layers and 100 grid point discretization is a vector in a 2000-dimensional space. Therefore it is very hard to interpret how a trained model is making its predictions. Even if one understood how every coordinate of a persistence landscape affects a model's prediction, pulling back this information to the persistent homology classes themselves, i.e., the points in the persistence diagram, in some principled way is for the most part unexplored territory.

The Shapley value, a solution concept from cooperative game theory, is a method for fairly distributing the worth of a game among a group of players who have collaborated [41]. Thinking of a model as a cooperative game, where the features of the data are the players, it is possible to use Shapley values for fair credit allocation to features in machine learning [28] (Figure 1).

Credit allocation to

persistence diagram points

(not explored)

Figure

Figure 1: The TDA to machine learning pipeline. Explainable AI methods based on Shapley values are well established for attributing model predictions back to featurization coordinates (blue brace), but pulling this credit back further to the individual points of the persistence diagram (red dashed arrow) has not been addressed.

In the last decade the machine learning community has embraced this approach and now Shapley values, or some extension based on them, are the most popular method in Explainable AI [26]. However, this methodology has not yet been integrated with the TDA pipeline (Figure 1). We present the first such approach by introducing LandscapeSHAP, a method that fairly allocates credit to points in a persistence diagram by viewing persistence landscapes as a collection of order-statistic cooperative games.

References (80)