Title: COVER FILTRATION AND STABLE PATHS IN MAPPER

Abstract: The contributions of this paper are two-fold. We define a new filtration called the cover filtration built from a single cover based on a generalized Jaccard distance. We provide stability results for the cover filtration, and show its equivalence to the Čech filtration under certain settings. We then develop a language and theory for stable paths within this filtration, inspired by ideas of persistent homology. This framework can be used to develop new learning representations in applications where an obvious metric may not be defined but a cover is readily available. We demonstrate the utility of our framework as applied to recommendation systems and explainable machine learning. We demonstrate a new perspective for modeling recommendation system data sets that does not require defining a bespoke metric. As an application, we find that stable paths identified by our framework in a movies data set represent sequences of movies constituting a gentle transition and ordering from one genre to another. For explainable machine learning, we present stable paths between subpopulations in the mapper of a model as explanations. Our framework provides an alternative way to build a filtration from a single mapper, and explore stable paths in it. For illustration, we build a mapper from a supervised machine learning model trained on the FashionMNIST data set. Stable paths in the cover filtration provide improved explanations of relationships between subpopulations of images.

1. INTRODUCTION AND MOTIVATION:

The need to rigorously seed a solution with a notion of stability in topological data analysis (TDA) has been addressed primarily using topological persistence (Carlsson, 2009; Ghrist, 2008) . Persistence arises when we work with a sequence of objects built on a data set, a filtration, rather than with a single object. One line of focus of this work has been on estimating the homology of the data set. This typically manifests itself as examining the persistent homology represented as a diagram or barcode, with interpretations of zeroth and first homology as capturing significant clusters and holes, respectively (Adams & Carlsson, 2009; Edelsbrunner et al., 2002; Edelsbrunner & Harer, 2009; Zomorodian, 2005) . In practice it is not always clear how to interpret higher dimensional homology (even holes might not make obvious sense in certain cases). A growing focus is to use persistence diagrams as a form of feature engineering to help compare different data sets rather than interpret individual homology groups (Adams et al., 2017; Chazal et al., 2009; Turner et al., 2014) .

The implicit assumption in most such TDA applications is that the data is endowed with a natural metric, e.g., points exist in a high-dimensional space or pairwise distances are available. In certain applications, it is also not clear how one could assign a meaningful metric. For example, memberships of people in groups of interest is captured simply as sets specifying who belongs in each group. An instance of such data is that of recommendation systems, e.g., as used in Netflix to recommend movies to the customer. Graph based recommendation systems have been an area of recent research. Usually these systems are modeled as a bipartite graph with one set of nodes representing recommendees and the other representing recommendations. In practice, these systems are augmented in bespoke ways to accommodate whichever type of data is available. It is highly desirable to analyze the structure directly using the membership information.

Another distinct TDA approach for structure discovery and visualization of high-dimensional data is based on a construction called Mapper (Singh et al., 2007) . Defined as a dual construction to a cover of the data (see Figure 1 ), Mapper has found increasing use in diverse applications in the past several years (Lum et al., 2013) . Attention has recently focused on interpreting parts of the 1-skeleton of the Mapper, which is a simplicial complex, as significant features of the data. Paths, flares, and cycles have been investigated in this context (Li et al., 2015; Nicolau et al., 2011; Torres et al., 2016) . The framework of persistence has been applied to this construction to define a multi-scale Mapper, which permits one to derive results on stability of such features (Dey et al., 2016) . At the same time, the associated computational framework remains unwieldy and still most applications base their interpretations on a single Mapper object.

Figure 1 : Mapper constructed on a noisy set of points sampled from a circle.

We illustrate the standard Mapper construction in Figure 1 . We start with overlapping intervals covering values of a parameter, e.g., height of the points sampled from a circle. We then cluster the data points falling in each interval, and represent each cluster by a vertex. If two clusters share data points, we add an edge connecting the corresponding vertices. If three clusters share data points, we add the triangle, and so on. The Mapper could present a highly sparse representation of the data set that still captures its structure-the large number of points sampled from the circle is represented by just four vertices and four edges here. More generally, we consider higher dimensional intervals covering a subspace of R d . But in recommendation systems, the cover is just a collection of abstract sets providing membership info (rather than intervals over the range of function values). Could we define a topological construction on such abstract covers that still reveals the topology of the dataset?

We could study paths in this construction, but as the topological constructions are noisy, we would want to define a notion of stability for such paths. With this goal in mind, could we define a filtration from the abstract cover? But unlike in the setting of, e.g., multiscale Mapper (Dey et al., 2016) , we do not have a sequence of covers (called a tower of covers)-we want to work with a single cover. How do we define a filtration on a single abstract cover? Could we prove stability results for such a filtration? Finally, could we demonstrate the usefulness of our construction on real data?

1.1 OUR CONTRIBUTIONS Figure 2 : A cover with 7 elements, and the corresponding nerve (left column). The cyan and green vertices are connected by a single edge. But this edge is generated by a single point in the intersection of the cyan and green cover elements. Removing this point from the data set gives the cover and nerve shown in the right column. The path from cyan to green node now has six edges.

We introduce a new type of filtration defined on a single abstract cover. Termed cover filtration, our construction uses Steinhaus distances between elements of the cover. We generalize the Steinhaus distance between two elements to those of multiple elements in the cover, and define a filtration on a single cover using the generalized Steinhaus distance as the filtration index. Working with a bottleneck distance on covers, we show a stability result on the cover filtration-the cover filtrations of two covers are α/m interleaved, where α is a bound on the bottleneck distance between the covers and m is the cardinality of the smallest element in either cover (see Theorem 3.5). We conjecture that in Euclidean space, the cover filtration is isomorphic to the standard Čech filtration built on the data set. We prove the conjecture holds in dimension 1 and independently that the Vietoris-Rips filtration completely determines the cover filtration in arbitrary dimensions (see Section 4). This filtration is quite general, and enables the computation of persistent homology for data sets without requiring strong assumptions. With real life applications in mind, we study paths in the 1-skeleton of our construction. Paths provide intu-itive explanations of the relationships between the objects that the terminal vertices represent. Our perspective of path analysis is that shortest may not be more descriptive-see Figure 2 for an illustration. Instead, we define a notion of stability of paths in the cover filtration. Under this notion, a stable path is analogous to a highly persistent feature as identified by persistent homology.

We demonstrate the utility of stable paths in cover filtrations on two real life applications: a problem in movie recommendation system and Mapper. We first show how recommendation systems can be modeled using the cover filtration, and then show how stable paths within this filtration suggest a sequence of movies that represent a "smooth" transition from one genre to another (Appendix C.1). We then define an extension of the traditional Mapper (Singh et al., 2007) termed the Steinhaus Mapper Filtration, and show how stable paths within this filtration can provide valuable explanations of populations in the Mapper, focusing on the case of explainable machine learning (Appendix C.2).

1.2. RELATED WORK:

Cavanna & Sheehy (2017) developed theory for a cover filtration, built from a cover of a filtered simplicial complex. But we work from more general covers of arbitrary spaces.

We are inspired by similar goals as those of Dey et al. (2016) and Carrière et al. (2018) , who addressed the question of stability in the Mapper construction. Our goal is to provide some consistency, and thus interpretability, to the Mapper. We incorporate ideas of persistence in a different manner into our construction using a single cover, which considerably reduces the effort to generate results.

While stability of persistence diagrams is a well studied topic (Edelsbrunner & Harer, 2009) , we may not get stability to simplices and cycles that generate the persistence homology classes (Bendich et al., 2019) . In contrast, our definition of path stability (Section 5) aligns exactly with our result on stability for cover filtrations (Section 3). We believe this is a unique feature of our method and its stability result-paths are automatically stable with respect to perturbations of input data.

The multi-scale Mapper defined by Dey et al. ( 2016) builds a filtration on the Mapper by varying the parameters of a cover. This construction yields nice stability properties, but is unwieldy in practice and difficult to interpret. Carrière et al. develop ways based on extended persistence to automatically select a single cover that best captures the topology of the data (Carrière et al., 2018) , producing one final Mapper that is easy to interpret Methods have been developed to track populations within the Mapper by identifying interesting paths (Kalyanaraman et al., 2019) and interesting flares (Kamruzzaman et al., 2018) . Interesting paths maximize an interestingness score, and are manifested in the Mapper as long paths that track particular populations that show trending behavior. Flares capture subpopulations that diverge, i.e., show branching behavior. In our context, we are interested in shorter paths, under the assumption that they provide the most succinct explanations for relationships between subpopulations.

Our work is similar to that of Parthasarathy et al. (2017) in that they use the Jaccard Index of an observed graph to estimate the geodesic distance of the underlying graph. We take an approach more akin to persistence and make fewer assumptions about underlying data. Hence we are unable to make rigorous estimates of distances and instead provide many possible representative paths. S-paths defined by Purvine et al. (2018) are similar to stable paths when we realize that covers can be modeled as hypergraphs, and vice versa. Stable paths incorporate the size of each cover elements (or hyperedges), normalizing the weights by relative size. This perspective allows us to compare different parts of the resulting structure which may have wildly difference sizes of covers. In this context, a large overlap of small elements is considered more meaningful than a proportionally small intersection of large elements.

2. COVER FILTRATIONS:

We introduce the notions of distance on covers required to construct our filtrations and then provide the general definition of the cover filtration.

We begin with the definition of Steinhaus distance, a generalization of the standard Jaccard distance between two sets, and further generalize it to an arbitrary collection of subsets of a cover. These generalizations take a measure µ and assumes that all sets are taken modulo differences by sets of measure 0. We will take µ as arbitrary unless otherwise stated.

Definition 2.1 (Steinhaus Distance (Marczewski & Steinhaus, 1958) ). Given a measure µ, the Steinhaus distance between two sets A, B is

d St (A, B) = 1 - µ(A ∩ B) µ(A ∪ B) = µ(A ∪ B) -µ(A ∩ B) µ(A ∪ B) .

This distance is also bounded on [0, 1], i.e., two sets have Steinhaus distance 0 when they are equal (as sets differing by measure 0 are identified) and distance 1 when they do not intersect.

We extend this distance from an operator on a pair of elements to an operator on a set of elements. Definition 2.2 (Generalized Steinhaus distance). Define the generalized Steinhaus distance of a collection of sets {U i } as

d St ({U i }) = 1 - µ( U i ) µ( U i ) .

Much of our results that consider paths used the standard version of Jaccard distance for finite sets.

But we require the Steinhaus distance for general measures to present equivalence results to Čech and VR filtrations (Section 4). Hence we present all results for the generalized Steinhaus distance.

We make use of this generalized distance to associate birth times to simplices in a nerve. Given a cover, we define the cover filtration as the filtration induced from sublevel sets of the generalized Steinhaus distance function. In other words, consider a cover of the space and the nerve of this cover. For each simplex in the nerve, we assign as birth time the value of its Steinhaus distance. This filtration captures information about similarity of cover elements, and the overall structure of the cover. Definition 2.3 (Nerve). A nerve of a cover U = {U i } i∈C is an abstract simplicial complex defined such that each subset {U j } j∈J ⊆ U , i.e., with J ⊆ C, defines a simplex if j∈J {U j } = ∅. In this construction, each cover element U i ∈ U defines a vertex. Definition 2.4 (Steinhaus Nerve). The Steinhaus nerve of a cover U, denoted Nrv St (U), is defined as the nerve of U with each simplex assigned their generalized Steinhaus distance as weight:

w σ = d St ({U i | i ∈ σ}) ∀ σ ∈ U.

Note that w σ < 1 by definition for every simplex σ ∈ U. We will use Nrv St when the cover U is evident from context. This can be thought of as a weighted nerve, but the weighting scheme satisfies the conditions of a filtration (see Page 14 for the proof).

Theorem 2.5. The Steinhaus nerve of a cover U is a filtered simplicial complex.

Following this result, we refer to the construction as the Steinhaus filtration. The only cover filtrations we use in this paper is Steinhaus filtrations, so we will use the two terms interchangeably.

We could study an adaptation of cover filtration to an analog of the VR complex by building a weighted clique rank filtration from the 1-skeleton of the cover filtration (Petri et al., 2013) . This adaptation drastically reduces the number of intersection and union checks required for the construction. The weight rank clique filtration is a way of generating a flag filtration from a weighted graph (Petri et al., 2013) . We can apply this technique to build a VR analog of the cover filtration.

3. STABILITY:

We consider notions of stability in the cover filtration with respect to changes in the cover. We first modify the standard edit distance to define a bottleneck distance on the space of covers of a finite set that have the same cardinality. Under this setting, we show that the cover filtration is interleaved with respect to this distance. Definition 3.1 (Bottleneck metric on covers). Let U and V be two finite covers of finite set X with same cardinality, and let M(U, V) be the set of all possible matchings between them. Let denote the symmetric difference. Then the bottleneck distance d B (•, •) between two covers is defined as

d B (U, V) = min M ∈M(U ,V) max (U,V )∈M µ(U V ) .

We can verify that d B is indeed a metric (see Page 14 for the proof). Proposition 3.2. Let U, V, and W be finite covers of a finite set X with equal cardinalities, and let d B be the bottleneck distance between any pair of these covers (Definition 3.1). Then d B is a metric.

We now present two somewhat technical lemmas, which we subsequently employ in the proof of the main stability result. See Page 14 for proof of Corollary 3. that we can distribute between decreasing the numerator of a proper fraction and increasing its denominator, the greatest decrease comes from decreasing the numerator by the entire weight.

Proof. We will show that, with the given conditions,

a -c b + d - a -e b + f > 0. a -c b + d - a -e b + f = (a -c)(b + f ) -(a -e)(b + d) (b + d)(b + f ) = (a -c)(b + c + d -e) -(a -e)(b + e + f -c) (b + d)(b + f ) , since f = c + d -e, d = e + f -c. = ab + ac + ad -ae -cb -c 2 -cd + ce -ab -ae -af + ac + eb + e 2 + ef -ce (b + d)(b + f ) = 2ac -2ae + ad -af + be -bc + e 2 -c 2 + ef -cd (b + d)(b + f ) = -2a(e -c) + a(d -f ) + b(e -c) + (e + c)(e -c) + ef -cd (b + d)(b + f ) = -2a(e -c) + a(e -c) + b(e -c) + (e + c)(d -f ) + ef -cd (b + d)(b + f ) , since e -c = d -f. = (-a + b)(e -c) + ed -ef + cd -cf + ef -cd (b + d)(b + f ) = (-a + b)(e -c) + ed -cf (b + d)(b + f ) .

Since c < e, d > f , so ed > cf and e-c > 0. Also, since a/b is proper, a < b, so -a+b > 0. Thus

(-a+b)(e-c)+(ed-cf ) > 0. Since b+d, b+f > 0, we get that (-a + b)(e -c) + ed -cf (b + d)(b + f ) > 0, which in turn shows that a -c b + d > a -e b + f , as desired.

Corollary 3.4. Similar to Lemma 3.3, the greatest increase possible in such a scenario comes from assigning the negative of the total weight to the numerator.

We now present a theorem that provides basic stability guarantees for the constructed filtration, assuming that each element is not too small. Theorem 3.5. Suppose that

U = {U i } and V = {V j } are two covers of X with |U| = |V| such that d B (U, V) ≤ α. Given m = min{min U ∈U µ(U ), min V ∈V µ(V )}, Nrv St (U) and Nrv St (V) are α/m interleaved filtrations.

Proof. Given two covers U = {U i } and V = {V j }, we use the notation that U i and V i , for generic indices i and j, are paired in a matching that minimizes the bottleneck distance between the two covers. We assume that the bottleneck distance is α, a positive integer.

We consider the following question: what is the largest change in generalized Steinhaus distance possible between a collection U I and V J , where index sets I and J are paired elementwise in a matching. To answer this question, we keep U I fixed and consider how large a difference in generalized Steinhaus distance we can achieve by taking the symmetric difference with a set S i with measure up to α for each U i . That is, we want to maximize change in µ(∩U I )/µ(∪U I ). To get the maximum increase in µ(∩U I )/µ(∪U I ), we must increase the numerator and/or decrease the denominator. Likewise, we must decrease the numerator and/or increase the denominator to get maximum decrease.

First, we note that S i can be partitioned into two sets:

s i,1 = U i ∩ S i , and s i,2 = S i \ s i,1 , those not in U i ∩ S i . µ(s i,1 + s i,2 ) = µ(S i ) ≤ α. Replacing U i with U i \ s i,1

cannot increase the size of the intersection or union, but it can decrease the size of the intersection or union by up to µ(s i,1 ).

Likewise, replacing U i with U i ∪ s i,2 cannot decrease the size of the intersection or union, but could increase the size of the intersection or union by up to µ(s i,2 ).

The greatest possible change would occur if it were possible to select an S i for each U i in the cover such that replacing each U i in turn with U i S i increases or decreases the numerator with µ(s i,1 ) or µ(s i,2 ), respectively, and does the opposite to the size of the denominator by µ(s i,2 ) or µ(s i,1 ), again respectively. Since µ(s i,1 + s i,2 ) = µ(S i ) ≤ α, it follows that each change has a weight of at most α which it could throw into increasing or decreasing the size of the intersection and doing the opposite to the size of the union.

Lemma 3.3 and Corollary 3.4 imply that the maximum possible change in those situations will be achieved when all weight is directed toward increasing or decreasing the size of the intersection, since µ(∩U I )/µ(∪U I ) must be between 0 and 1. As we want to bound the possible change in the Steinhaus distance, it will suffice to use the observation that

1 - µ(∩V I ) + Sα µ(∪V I ) ≤ 1 - µ(∩U I ) µ(∪U I ) ≤ 1 - µ(∩V I ) -Sα µ(∪V I )

to obtain bounds on the change of Steinhaus distance between covers with maximum bottleneck distance of α and with S as the cover cardinality.

Then we have

1 - µ(∩V I ) + Sα µ(∪V I ) ≤ 1 - µ(∩U I ) µ(∪U I ) ⇒ 1 - µ(∩V I ) µ(∪V I ) - Sα µ(∪V I ) ≤ d St (U I ) ⇒ 1 - µ(∩V I ) µ(∪V I ) - Sα Sm ≤ d St (U I )

, where m is the size of the smallest set, since

1 - µ(∩V I ) µ(∪V I ) - Sα Sm ≤ 1 - µ(∩V I ) µ(∪V I ) - Sα µ(∪V I ) , ⇒ d St (V I ) - α m ≤ d St (U I ).

Similarly, since

1 - µ(∩V I ) -Sα µ(∪V I ) ≥ 1 - µ(∩U I ) µ(∪U I ) , we get d St (V I ) + α m ≥ d St (U I ). Hence d St (V I ) - α m ≤ d St (U I ) ≤ d St (V I ) + α m

, giving that U and V are α/m interleaved.

Remark 3.6. Consider the case when |U| = |V|. Assume without loss of generality that |U| > |V|. Then there is a vertex v ∈ Nrv St (U) that is not present in Nrv St (V). Hence Nrv St (U) and Nrv St (V) cannot be interleaved in the current setting. We need to first generalize matchings and the bottleneck distance to allow covers with unequal cardinalities.

More precisely, the insertion order of simplices is equivalent between the two cases, and there exists a continuous bijection between insertion times of the Steinhaus Nerve and insertion times of the Čech filtration. We prove this result for n = 1, i.e., when X is drawn from the real line. We also provide experimental evidence for the 1-skeleton equivalence, and prove one direction of this equivalence (that the VR filtration completely determines the cover filtration).

Let Čr (X) be the cover of X by balls of radius r centered on points in X. The Čech complex is nerve of this cover. The Čech filtration is the sequence of simplicial complexes for all values of r.

Conjecture 4.1 ( Čech equivalence). Given a finite data set X ⊂ R n and some radius R > diam(X) the Čech filtration constructed from X is isomorphic to the the cover filtration on X constructed from ČR (X), given the Lebesgue (i.e. volume) measure.

A comprehensive proof for arbitrary order of intersections and arbitrary dimension is incomplete.

We provide the proof for the case of n-skeleton in 1-dimension and provide a mapping from the Čech filtration to cover filtration for the 1-skeleton in arbitrary dimension.

Proof. We will define Č({v i }) as the birth radius of the simplex defined by the set {v i }. This can be computed as

Č({v i }) = (max i (v i ) -min i (v i ))

/2 since in a 1-dimensional space the associated simplex is born precisely when the balls around the two outermost points intersect.

Let {V i } be the set of balls of radius R centered on the set {v i }. Recall that we are using the Steinhaus distance for Lebesgue measure, so µ computes volume here. Then the generalized Steinhaus distance for those balls is given by d St ({V i }) = 1 -min(vi+R)-max(vi-R) max(vi+R)-min(vi-R) , since the mutual intersection of all of the balls in this one dimensional space is the interval bounded by the minimum right endpoint of all the balls and the maximum of all left endpoints of all the balls and the union of all the balls has the minimum left endpoint amongst left endpoints and maximum right endpoint amongst right endpoints.

d St ({V i }) = 1 - min(v i ) -max(v i ) + 2R max(v i ) -min(v i ) + 2R = 1 - -2 Č({v i }) + 2R 2 Č({v i }) + 2R = 1 - R -Č({v i }) R + Č({v i }) .

Solving for Č({v i }), we get Č({v i }) = Rd St ({Vi}) 2-d St ({Vi}) , establishing a bijection between birth times. Now since R is the radius of X and v i ⊆ X, 0 ≤ Č({v i }) ≤ R. Also, R-x R+x decreases monotonically over the range x ∈ [0, R]. Thus 1 -R-x R+x increases monotonically on x ∈ [0, R]. Thus if we order the subsets of of X by increasing birth radius

(s 1 , s 2 , • • • , s n ), (d St (s 1 ), d St (s 2 ), • • • , d St (s n ))

is also in increasing order. Thus the two filtrations are isomorphic.

We now address the case of 1-skeleton of the Čech and cover filtrations in arbitrary dimension. It is clear that if the 1-skeletons are isomorphic, then the cover filtration is isomorphic to the VR filtration. We prove one direction of this isomorphism (see Page 15 for the proof). Lemma 4.2. The VR filtration completely determines the cover filtration in arbitrary dimensions.

Hence one can derive the cover filtration from the Vietoris-Rips filtration. In Appendix B, we present some experimental evidence suggesting that the 1-skeleton of the Steinhaus filtration and the Vietoris-Rips filtration are isomorphic.

5. STABLE PATHS:

We develop a theory of stable paths in the 1-skeleton of a cover filtration. We provide an algorithm to find a maximally stable path from one vertex to another, with Steinhaus distances as edge weights. Note that a maximally stable path might not be a shortest path in terms of number of edges. Conversely, a shortest path might not be highly stable. Since the two objectives are at odds with each other, we provide an algorithm to identify a family of shortest paths as we vary the stability level, similar in a loose sense to computing persistent homology.

We were studying shortest paths in a Mapper constructed on a machine learning model as ways to illustrate the relations between the data as identified by the model. In this context, shortest paths found could have low Steinhaus distance, and thus could be considered noise. This motivated our desire to find stable paths, as they would intuitively be most representative of the data set and stable with respect to changing parameters in Mapper or changing data. Definition 5.1 (ρ-Stable Path). Given a Steinhaus distance ρ, a path P is defined to be ρ-stable if max{d St (e)|e ∈ P } ≤ ρ .

In other words, the largest edge weight (Steinhaus distance) along the path is at most ρ. Note that a ρ 1 -stable path is also ρ 2 -stable for any ρ 2 ≥ ρ 1 . Also, a ρ 1 -stable path P 1 is more stable than a ρ 2 -stable path P 2 when ρ 1 < ρ 2 . Hence we have a higher confidence that edges in P 1 do exist (are not due to noise) than those in P 2 . We now define maximally stable paths between a pair of vertices. Definition 5.2 (Maximally Stable Path). Given a pair of vertices s and t, a maximally stable s-t path is a ρ-stable path between s and t for the smallest value of ρ. If there are multiple s-t paths at the same minimum ρ value, a shortest path among them is defined as a maximally stable path. The problem of finding the maximally stable s-t path can be solved as a minimax path problem on an undirected graph, which can solved efficiently using, e.g., range minimum queries (Demaine et al., 2009) .

We are then left with two paths between vertices s and t, the shortest and the maximally stable. The shortest path is not necessarily stable and the stable path is not necessarily short. As these two notions, stable and short, are at odds with each other, we are interested in computing the entire Pareto frontier between the short and stable path. We present an algorithm to identify the Pareto frontier in Figure 3 , and a visualization of the output from this algorithm in Figure 4 . 

6. APPLICATIONS:

We apply the cover filtration and stable paths to two applications, recommendation systems and Mapper. We first show how recommendation systems can be modeled using the cover filtration and then show how stable paths within this filtration can answer the question what movies should I show my friend first, to wean them into my favorite (but potentially weird) movie? We then define an extension of the traditional Mapper (Singh et al., 2007; Carrière & Oudot, 2017) Explanations in a Machine Learning Model: With a goal to develop a method of model induction for inspecting a machine learning model, we build a Mapper (Singh et al., 2007) from the predicted probability space of a logistic regression model built from the Fashion-MNIST data set (Xiao et al., 2017) . The goal is to understand the model structure by characterizing the relationship between the feature space and the prediction space. We extend the constructed Mapper to be a Steinhaus Mapper Filtration and analyze the stable paths in that object.

See Appendix C.2 for details. We look at three regions of shoes (sneaker, ankle boot, and sandals) that are understandably confusing to the machine learning model. We try to elucidate where these confusions arise by studying the stable paths connecting representative nodes for each type of shoe.

Figure 11 shows representatives from each vertex in the path for the shortest path and the stable path. In both paths, the vertices start predominately containing sneakers and sneaker-like sandals. They then transition to containing a larger proportion of ankle boots, with all three classes showing higher cut tops or high heels.

Along each path we can see the relationships between nodes change. In the most stable path on the right, we a slow transition from sneaker space to ankle boot space, with some amount of sandals spread throughout. Through the path, shoes from each of the three classes become taller. Near the middle of the path, the images from sneakers and ankle boots are nearly indistinguishable. And earlier in the path, we see how some white strips in the sneakers and boots might easily be confused with negative space in the sandals.

7. CONCLUSION:

In this work, we established the cover filtration, a new kind of filtration that enables application of TDA to previously inaccessible types of data. We then developed a theory of stable paths in the cover filtration, and provide algorithms for computing the Pareto frontier between short and stable paths.

As proof of their utility to real world applications, we show how these two ideas can be applied to the analysis of recommendation systems and of Mapper in the context of explainable machine learning.

The results in this paper suggest many new questions. The application of recommendation systems leaves us curious if the cover filtration along with new results such as the one on predicting links in graphs using persistent homology (Bhatia et al., 2018) could provide methods for answering the main question in recommendation system research: what item to recommend to the user next? Proving Conjecture 4.1 is a highly desirable goal.

The applications of cover filtration and stable paths are not limited to ones we highlighted. Another possibility not explored is for sensor networks. Sensor coverage areas are often not uniform balls, and the cover filtration is aptly suited for developing a filtration. In the context of communication networks, stable paths could be interpreted as reliable routes. Yet another direct application could be in finding driving directions that take not only short, but also "easy" routes.

While paths and connected components are most amenable to practical interpretations, could other structures in the cover filtration also suggest insights? What would holes and loops in the cover filtration for recommendation systems mean?

Our application for explanations in machine learning models raises the following question. What are the implications of understanding a path as in Figure 11 ? How could the predictive model be updated to account for such implications?

We showed that the cover filtration is stable to small changes within the cover. Does this result imply that the persistence diagram of the Steinhaus Mapper filtration is stable with respect to changes in the data, cover parameters, or filter functions? 

C APPLICATIONS:

C.1 RECOMMENDATION SYSTEMS In this application, we apply the cover filtration to a recommendation system data set and employ the stable paths analysis to compute sequences of movies that ease viewers from one title to another title. Our viewpoint on recommendation systems is similar to work of graph-based recommendation systems. This is an active area of research and we believe our new perspective of interpreting such systems as covers and filtrations will yield useful tools for advancing the field. The general approach of graph-based recommendation systems is to model the data as a bipartite graph, with one set of nodes representing the recommendation items and the other set representing the recommendees. We can interpret a bipartite graph as a cover, either with elements being the recommendees covering the items, or elements being the items covering the recommendees.

For an example that we will see more of shortly, suppose you have only ever seen the movie Mulan and your partner wants to show you Moulin Rouge. It would be jarring to just watch the movie, so your partner might gently build up to Moulin Rouge by showing you movies similar to both Mulan and Moulin Rouge. We compute stable paths that identify such a feasible gentle sequence.

We use the MovieLens-20m data set (Harper & Konstan, 2016) . This data set is comprised of 20 million ratings by 138,493 users of 27,278 movies. Often, these types of data sets are interpreted as bipartite graphs. Once we realize that a bipartite graph can be equivalently represented as a covering of one node set with the other, we can apply the cover filtration to build a filtration. In our case, we interpret each movie as a cover element of the users who have rated the movie. To ensure the entire computation runs efficiently on a laptop, and to avoid noise, we remove all movies with less than 10 ratings and then sample 4000 movies at random from the remaining movies. In Table 1 , we show two stable paths that might be chosen. The stable path with length 4 is found after a large drop in instability. As the length and stability must be traded off, we think this would be a decent path to choose if you want to optimize both. The second path shown is the most stable. For readers who have seen the movies in this path, the relationship between each edge is clear, even if one might consider the path a bit on the longer side. As supervised learning has become more powerful, the need for explanations is also grown. We develop a method of model induction for inspecting a machine learning model. The goal is to develop an understanding of the model structure by characterizing the relationship between the feature space and the prediction space. The gleaned understanding can help non-experts make sense of algorithmic decisions and is essential when models are too complex to fully understand in a white-box fashion. The Mapper (Singh et al., 2007) is aptly suited for visualizing this functional structure. This application is based on the work of using paths in the Mapper to provide explanations for supervised machine learning models (Saul & Arendt, 2018) . We build a Mapper from the predicted probability space of a logistic regression model. We then extend the constructed Mapper to be a Steinhaus Mapper Filtration and proceed to analyze the stable paths in that object.

Given topological spaces X, Y , a function f : X → Y , and a cover of Y , we define Mapper to be the nerve of the refined pullback cover of f (Y ). A refined cover is one such that each cover element is split into its path-connected components. By incorporating information about the amount of overlap between the cover produced by the Mapper, our analysis is robust to noise and largely insensitive to the chosen parameters of the Mapper construction.

Figure 9 : Depiction of stable paths found along Pareto frontier in Figure 10 .

Figure 8 shows the Steinhaus Mapper filtration constructed from a logistic regression model built from the Fashion-MNIST data set (Xiao et al., 2017) . This data set consists of 70,000 images of clothing items from 10 classes. Each image is 28 pixels. It is widely regarded as a more difficult drop-in replacement for the ubiquitous MNIST handwritten digits data set. The dimensionality of the data set is first reduced to 100 dimensions using Principal Components Analysis, and then a logistic regression classifier with l 1 regularization is trained on the reduced data using 5-fold cross validation on a training set of 60,000 images. The model is evaluated at 93% accuracy on the remaining 10,000 images. We then extract the 10-dimensional predicted probability space and use UMAP (McInnes & Healy, 2018; McInnes et al., 2018) to reduce the space to 2 dimensions. This 2-dimensional space is taken as the filter function of the Mapper, using a cover consisting of 40 bins along each dimension with 50% overlap between each bin. We explored ranges of values for the number of bins (10-50) and the overlap percentage (20-60%), and observed variabilities in the constructed Mappers. The final choice of parameters (40 bins, 50% overlap) were chosen as the Mappers showed least variability over subsets of values centered at these parameter values. DB-SCAN is used as the clustering algorithm in the refinement step (Ester et al., 1996) . KeplerMapper is used for constructing the Mapper (van Veen & Saul, 2017). Finally, the cover is extracted and the Steinhaus Mapper filtration is constructed.

To illustrate the power of the path explanations, we start with two vertices selected from the sneaker and ankle boot regions of the resulting graph. The three regions of shoes (sneaker, ankle boot, and sandals) are understandably confusing to the machine learning model, and we are interested in where these confusions arise. Figure 9 shows the paths associated with the Pareto frontier (Figure 10 ). In Figure 10 , we show the Pareto frontier between the two chosen vertices. This frontier shows a large decrease in instability value (thus increase in stability) when moving to a path length of 12. As noted in Section 5, paths found after a large increase in stability correspond to highly stable paths, i.e., the path remains the shortest path while sweeping the instability value over a comparatively large range.

Figure 11 shows representatives from each vertex in the path for the shortest path and the stable path with length 12. Each row corresponds to one vertex and the columns show a representative from each class represented in the vertex. Each image shows the multiplicity of that type of shoe in the vertex.

In both paths, the vertices start predominately containing sneakers and sneaker-like sandals. They then transition to containing a larger proportion of ankle boots, with all three classes showing higher cut tops or high heels.

Along each path we can see the relationships between nodes change. In the most stable path on the right, we a slow transition from sneaker space to ankle boot space, with some amount of sandals spread throughout. Through the path, shoes from each of the three classes become taller. Near the middle of the path, the images from sneakers and ankle boots are nearly indistinguishable. And earlier in the path, we see how some white strips in the sneakers and boots might easily be confused with negative space in the sandals.

These two paths provide a holistic representation of how the trained logistic model interprets the data. By exploring these paths, we gain valuable insight into why a model is making a decision. This can help either reinforce our trust in the model or reject the prediction. In either outcome, these explanations can strengthen the results of the predictions by including humans in the loop. Even though the case of predicting clothing types is a low stakes application, this framework is readily applicable to much more important data sets.

D NOTE ON COMPLEXITY OF COVER FILTRATIONS:

The complexity of constructing the cover filtration is by and large inherited directly from the computational complexity of the nerve. Given a cover U, the nerve could have at most 2 |U | -1 simplices and dimension at most |U| -1 Otter et al. (2017) . These bounds are equivalent to the corresponding worst case bounds for VR and Čech complexes.

The work involved for each simplex in constructing Nrv St includes computing the volume of intersection and volume of union of the elements in the simplex. The complexity of union and intersection operations is largely dependent on the type of data being used. Let C Unn (V) and C Int (V) be the costs of computing the union and intersection, respectively, of a set of cover elements V ⊆ U. In the worst case, we have to do C Unn (U) + C Int (U) operations per simplex, leading to an overall worst case computational complexity of (C Unn (U) + C Int (U))(2 |U | -1). For instance, if we assume that a hashing-based dictionary could be produced for each set in U, both C Unn (V) and C Int (V) will be at most linear in |V| Bille et al. (2007) .

:

EQUIVALENCETo situate the cover filtration, we wish to show that it is isomorphic to the Čech and VR filtrations under certain conditions. We conjecture that the Čech filtration on a finite set of points, i.e., the nerve of balls with radius r around each point and over a sequence of r, and the Steinhaus Nerve constructed from the terminal cover of the Čech filtration are isomorphic.

Figures and Tables:

4. Lemma 3.3. Let a, b, c, d, e, f be real numbers with a < b, c + d = e + f , |b| > |d|, and |b| > |f |. Then we have that (a -c)/(b + d) > (a -e)/(b + f ) when c < e. In words, for a weight α = c + d

Figure 3: Algorithm to identify the Pareto frontier between shortest and maximally stable paths.

Figure 4: Pareto frontier between length and stability of path.We repeatedly compute the shortest path, while essentially sweeping over the Steinhaus Distance. This process results in a Pareto frontier balancing the shortest paths with the stability of those paths. The blue points in Figure4are on the Pareto frontier, while the orange points are the pairs [P , ρ ] that get replaced from the LIST in the course of the algorithm. We then visualize the paths on the Pareto frontier in Figure5. Continuing our analogy to persistence, the path corresponding to a point on the Pareto frontier which sees a steep rise to the left is considered highly persistent, e.g., the path with length 21 on the frontier.

Figure 5: Visualization of paths on the Pareto frontier in Figure 4. Length /ρ listed on top.

Figure 6: Persistence diagrams for the Vietrois-Rips filtration and the approximate Steinhaus filtration of a set of uniformly sampled points in the plane.

Figure 7: Pareto frontier of stable paths between Mulan and Moulin Rouge.

Figure7shows the computed Pareto frontier of stable paths for the case of Mulan and Moulin Rouge. In Table1, we show two stable paths that might be chosen. The stable path with length 4 is found after a large drop in instability. As the length and stability must be traded off, we think this would be a decent path to choose if you want to optimize both. The second path shown is the most stable. For readers who have seen the movies in this path, the relationship between each edge is clear, even if one might consider the path a bit on the longer side.

Figure 8: Constructed Mapper from logistic regression model of Fashion-MNIST data set. The window marks the frame of Figure 9

Definition C.1 (Steinhaus Mapper filtration). Given data X, a function f : X → Y , and a cover U of Y , we define the Steinhaus Mapper as the Steinhaus nerve (Definition 2.4) of the refined pullback cover of f (U ): Nrv St (f * U ) .

Figure 10: Pareto frontier of stable paths between predominately sneaker vertex and predominately ankle boot vertex.

Figure 11: Path visualizations for shortest path (left) and stable path with length 12 (right). Columns in the visualization are based on the class and each row represents a node in the Mapper. We show one representative for each node in each column. Columns with no shoes shown had no representative of that class in the node.

called the Steinhaus Mapper Filtration, and show how stable paths within this filtration can provide valuable explanations of populations in the Mapper. As a direct illustration, we focus on the case of explainable machine learning, where the Mapper is constructed with a supervised machine learning model as the filter function, and address the question what can we learn about the model? Movie Recommendations: We illustrate how our cover filtration framework could be used to find a sequence of movies to gently transition from Mulan to Moulin Rouge. It would be abrupt to switch directly from one to the other movie, since they belong to completely different genres. We compute stable paths that identify such feasible gentle sequences. Two sequences corresponding to a shortest path and the most stable path are presented in Table1. See Appendix C.1 for details. Two sequences of movie transitions from Mulan to Moulin Rouge.

Table content: <table><tr><td>Shortest Path</td><td>Most Stable Path</td></tr><tr><td>1. Mulan (1998)</td><td>1. Mulan (1998)</td></tr><tr><td>2. Dumbo (1941)</td><td>2. Robin Hood (1973)</td></tr><tr><td>3. Sound of Music, The (1965)</td><td>3. Dumbo (1941)</td></tr><tr><td>4. Moulin Rouge (2001)</td><td>4. Sound of Music, The (1965)</td></tr><tr><td/><td>5. Gone with the Wind (1939)</td></tr><tr><td/><td>6. Psycho (1960)</td></tr><tr><td/><td>7. High Fidelity (2000)</td></tr><tr><td/><td>8. Moulin Rouge (2001)</td></tr></table>

Two sequences of movie transitions.

Table content: <table><tr><td>Shortest Path</td><td>Most Stable Path</td></tr><tr><td>1. Mulan (1998)</td><td>1. Mulan (1998)</td></tr><tr><td>2. Dumbo (1941)</td><td>2. Robin Hood (1973)</td></tr><tr><td>3. Sound of Music, The (1965)</td><td>3. Dumbo (1941)</td></tr><tr><td>4. Moulin Rouge (2001)</td><td>4. Sound of Music, The (1965)</td></tr><tr><td/><td>5. Gone with the Wind (1939)</td></tr><tr><td/><td>6. Psycho (1960)</td></tr><tr><td/><td>7. High Fidelity (2000)</td></tr><tr><td/><td>8. Moulin Rouge (2001)</td></tr><tr><td>C.2 STEINHAUS MAPPER FILTRATION</td><td/></tr></table>

Peer review (iclr2020):
1. Paper summary This paper develops a novel filtration for the analysis of based on the idea of *covers* of data sets. The filtration employs the notion of a generalised Jaccard distance to define stable paths within the nerve of the cover. These stable paths are then shown to be useful for the creation of *gentler* transitions for recommendation systems, as well as the development of explainable supervised machine learning models. 2. Review summary I found this paper to be very interesting in terms of its new perspective on filtrations and its idea of the introducing a *stability* concept inspired by topological persistence. However, I recommend rejecting the paper in its current form due to the following issues: A. Missing clarity: the paper requires readers to be familiar with the Mapper algorithm and glosses over important details. Several results that are mentioned as core contributions in the main texts are only stated in the supplementary materials. B. Missing experimental depth: the experiments shown in the paper are interesting, but only scratch the surface. To have a convincing case study, a more quantitative analysis is required. At present, the selection and depiction of results seems ad-hoc. I realise that, when the foremost goal is interpretability, providing a quantitative analysis is not always easily possible. Nevertheless, each data set should be used for more than one case study; ideally, multiple results that are *surprising* can be reported. For example, are there paths that do not match our intuition? What do they tell us about the data set? C. Doubts about the technical correctness: the supervised learning example requires an elaborate setup (dimensionality reduction, UMAP for further reductions, setting up Mapper with additional parameters). I am wondering how trustworthy any result obtained from such an analysis can be. I would suggest discussing the parameter selection process in more detail and ideally providing more information about the impact of these choices. In the following, I will comment on these issues in more detail. 3. Clarity - Concepts such as *cover* should be briefly introduced; already the abstract presumes that readers are familiar with several TDA concepts - I would shorten the abstract to improve its flow; the paragraphs *We demonstrate...* and *For explainable...* could also be added to the introduction to improve the exposition of the paper. - The introduction already starts with TDA concepts; a brief motivation would make the paper more accessible - I disagree with the statement that the existence of a metric on the data is an implicit assumption of TDA. My perspective is quite the opposite: TDA is rather flexible *because* of its support for different metrics; Vietoris--Rips complex calculation, for example, only requires a matrix of pairwise distances. Hence, I would rewrite this sentence. - To add to the previous point: the paper itself introduces a new metric based on a generalised Jaccard distance. I feel that the discussion of *ill-fit or incomplete* metrics detracts from the main message of the paper. - The first explanation/definition of Mapper in the introduction is rather complicated (*nerve of a refined pullback cover*); I would suggest rephrasing this. - The point about the -skeleton warrants more explanation: it is my understanding that the paper uses paths that are defined using this skeleton as well. My first pass of the paper slightly confused me because I figured that the described paths would be generalised over high-dimensional simplices as well. I would suggest making this *restriction* (it is not a proper restriction because paths can be defined for arbitrary simplices, but it is a restriction in terms of the dimensionality) or property clear from the beginning. - The discussion of hypercube covers is repeated multiple times in the introduction and the related work section; I would suggest mentioning this only once as it does not have to a large bearing on the methods described in the paper anyway. - Discussing stability of the paths/cover in the introduction is misleading because these aspects are only discussed in the appendix. Same goes for some of the contributions in Section 1.1; the conjectures or connection to other filtrations are only mentioned in the appendix. This needs to be rewritten; I would pick a few contributions that the main text can focus on and mention the rest in passing. The paper lacks this structure at present and for a conference submission, all main contributions should also be a part of the main text. - Stability is meant to reflect a property of a cover; this could be clarified by means of extending Figure 1, for example. During my first pass of the paper, some of the subsequent definitions were lacking a clear motivation. I would suggest to _clearly_ state that the goal is to circumvent issues with paths in a cover that only depend on a few data points. - Moreover, it would be interesting to point out to what extent the method presented here is the _only_ one capable of doing this. It occurred to me that there*s a preprint that discusses how to stabilise the calculations of persistent homology (with respect to picking the _same_ creator simplex for a feature, for example): Bendich, Paul et al. Stabilizing the unstable output of persistent homology computations https://arxiv.org/abs/1512.01700 It seems that one of the unique features of the method in this paper is that the definition of path stability aligns exactly with the other stability concept---the paths are thus indeed stable with respect to perturbations of the underlying data set. Maybe this could be mentioned as an interesting feature. - The paragraph *In Section 4.1 [...]* in the related work section is somewhat redundant; I would suggest putting it at the beginning of the respective experimental section and merging it with the existing description there. - The definition of the Steinhaus distance strikes me as unnecessary complex; while it is mathematically pleasing to know that arbitrary measures could be used, it seems that this is never exploited anywhere in the paper. - In the interest of clarity, maybe it would make sense to refer to the distance as a *generalised Jaccard distance* instead. - The proof of Theorem 2.5 could be moved to the appendix. Moreover, I think it could be simplified by mentioning that the nerve is constructed from the cover and that weights are assigned based on the number of intersections; then the main result would follow from monotonicity. (the current proof is of course fully correct, I just had to rephrase this result in terms of concepts that I found easier to grasp) - Concerning the terminology, I find *a most stable path* to be somewhat confusing at the first read. I now understand what is meant by it, but maybe *highly stable* or *maximally stable* would be better. - In Section 3, the 1-skeleton should be explicitly mentioned. - Moreover, the notion of *shortest path*, which _could_ also employ distances, should be distinguished from stable paths; if I understand the argumentation correctly, shortest paths are defined in terms of the number of edges, while stable paths are defined in terms of the weights along those edges. I would suggest spelling this out directly to make the concepts non-ambiguous. - In Definition 3.1, it should be , not , I think. - Definition 3.1 could also be intuitively summarised as *the largest edge weight along a path*, right? - The algorithm in Figure 2 should include some comments that make the procedure more understandable. I found the conceptual leap to Pareto frontiers confusing at first; maybe this could be motivated better. - Figure 3 needs more explanations. In particular the connection to persistence could be elucidated---I get that there*s an immediate connection (see the paper above) but this concept needs at least a brief introduction. Moreover, if this connection is relevant, it deserves to be elucidated in the paper explicitly. - Figure 4 needs additional labels; I expect that *distance/stability* are shown in the caption. Is this correct? In general, I found the path visualisation not so helpful; maybe it would be better to show the full 1-skeleton (or an excerpt) and highlight the corresponding paths? - The language and motivation in Section 4 is somewhat informal; this is not an issue for me, but I wanted to mention it as a something that could potentially be rephrased. - The additional application domains should be moved from Section 4 to a discussion section. - The cover generation strategy could be understood more rapidly if a small illustration was provided. Do I get it correctly that every *cover set* constitutes a film, while the overlap between them is based on whether the same user also rated another film? - The path selection procedure for the experiment in Section 4.1 needs to be explained formally. I get that it is akin to selecting a point on the *elbow* of a curve, but this should be briefly explained. - Figure 5 needs to be referenced more prominently in the text. - Section 4.2 is glossing over many important details of the definition of Mapper. These are absolutely required, though, and any parameters selected here should also be analysed to learn whether they affect the results. - I am not sure about the utility of the paths in Figure 7 - Figure 9 needs more explanations; as mentioned below, why not compare this path with a geometry-based path in the embedding? Moreover, why are there not the same number of images for all classes? - The conclusion needs to be rewritten; the paper does *not* show stability properties in the main text 4. Experiments - As a general question, I would like to see how stable the interpretations of the different sections are. There is always a degree of stochasticity when training a neural network, so does the output of Mapper stay stable? - I am not sure about the relevance of experiment in Section 4.1; it does not really provide a link to an explainable model for me, but instead is more along the lines of *gentle interpolation in a latent space*. I could see that this has its uses, but an evaluation requires more than one example. I would be particularly interested in knowing about cases in which result is unexpected. Do such cases exist? - Please comment on the stability of the sampling procedure in Section 4.1 - I understand that Section 4.2 wants to show how algorithms like Mapper can act as a middle ground between black-box and white-box models. Is this correct? If so, the chosen example is _not_ sufficiently complex to be compelling. Would it not be equally appropriate to rewrite this experiment in terms of explaining paths in the latent space of autoencoders? In this context, I see more of a need for these paths as an alternative to paths that purely employ latent space geometry. - Adding to this, the autoencoder context would it also make possible to compare paths generated using Mapper and the proposed as well as the paths generated by the model. Such an experiment would be more compelling, I think. - In general, what are the implications of understanding a path as in Figure 9? How could the model updated to account for this? If the paper were to include an example of how to *fix* a model based on such information, it would a highly compelling use case. - Moreover, would it be possible to detect *problematic* regions such as the one shown in Figure 9 automatically? If so, it would again provide a highly compelling example. Otherwise, I think that the interpretation of a model depends again on humans and are thus restricted based on model complexity. 5. Minor style issues - Mapper should be capitalised consistently - I suggest removing the paragraph *Organization* as it is redundant - *mod differences* --> *modulo differences* (?) - *distanceof* --> distance of* - *on undirected graph* --> *on an undirected graph* - *Principle component analysis* --> *Principal component analysis*