D-GRIL: End-To-End Topological Learning with -Parameter Persistence
Abstract
End-to-end topological learning using -parameter persistence is well-known. We show that the framework can be enhanced using -parameter persistence by adopting a recently introduced -parameter persistence based vectorization technique called Gril. We establish a theory for gradient descent on Gril producing D-Gril. We show that D-Gril can be used to learn a bifiltration function on benchmark graph datasets. Further, we exhibit that this framework can be applied in the context of bio-activity prediction in drug discovery.
Keywords and phrases:
Topological Data Analysis, Persistent Homology, Multiparameter Persistence, Graph Learning, Graph Neural NetworksCopyright and License:
2012 ACM Subject Classification:
Mathematics of computing Algebraic topology ; Computing methodologies Machine learningSupplementary Material:
Software: https://github.com/TDA-Jyamiti/d-gril/ [39]archived at
swh:1:dir:379b8266de5d11b54b8041b9a4af9b9dde1fa254
Funding:
This work is partially supported by NSF grants CCF 2049010 and DMS 2301360.Editors:
Hee-Kap Ahn, Michael Hoffmann, and Amir NayyeriSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
In recent years, persistent homology, one of the flagship concepts of Topological Data Analysis (TDA), has found its use in many fields such as neuroscience, material science, sensor networks, shape recognition, gene expression data analysis and many more [12, 25]. The performance of machine learning models such as Graph Neural Networks (GNNs) can be improved by augmenting topological information captured by persistent homology [8, 15, 29, 30]. Classical persistent homology, also known as -parameter persistence, captures the evolution of topological structures in a simplicial complex following a filter function . The evolution of topological structures, in this case, can be completely characterized and compactly represented as persistence diagrams or equivalently barcodes [21, 50]. These persistence diagrams or barcodes can be vectorized [1, 2, 8, 28, 31, 42] and used in machine learning pipelines. In most applications, the simplicial complex is given and the choice of the filter function depends on the application. Choosing an appropriate filter function can be challenging. To avoid this, in [27], the authors proposed an end-to-end learning framework to learn the filter function rather than relying on making the right choice. They showed that learning the filter function performs better than the standard choices of filter functions on many graph datasets.
To obtain richer topological information, we can consider an -valued filter function instead of a scalar filter function. This leads to the structure of a multiparameter persistence module instead of -parameter persistence module. Multiparameter persistence modules, unlike their -parameter counterparts, can not be classified completely using a discrete invariant [5]. Consequently, vectorizing multiparameter persistence modules while retaining as much topological information as possible has become a challenging problem. There are many recent works in this direction which use incomplete invariants such as rank invariant [5] or equivalently fibered barcodes [33], multiparameter persistence images [6], multiparameter persistence landscapes [45], multiparameter persistence kernel [11], vectorization of signed barcodes [35], topological fingerprinting for virtual screening using multidimensional persistence [16], effective multidimensional persistence [10] or generalized rank invariant [48]. The authors, in all these works, show that -parameter persistence methods perform better than -parameter persistence methods on many graph and time-series datasets, suggesting that an -valued filter function, indeed, captures richer topological information than a scalar filter function. However, in all these works, one needs to make a suitable choice for an -valued filter function. Akin to the -parameter setup, learning the filter function rather than choosing a filter function can prove to be more informative and beneficial for the task at hand.
In this paper, we propose an end-to-end learning framework using -parameter persistent homology based on the vectorization Gril introduced by [48]. We show that Gril is piecewise affine and give an explicit formula for the differential of Gril. The results discussed in [7, 14] help us to show the convergence of stochastic sub-gradient descent on Gril. We use these results to build a differentiable topological layer D-Gril, consequently an end-to-end learning pipeline. We use D-Gril for bio-activity prediction and provide experimental results. One of the key advantages of using TDA in the context of bio-activity prediction is its ability to capture and analyze the shape and structural characteristics of molecules in a manner that traditional methods might overlook. Molecules possess intricate shapes and topological features that directly influence their interactions with biological targets. TDA can uncover these subtleties, allowing for a deeper understanding of structure-activity relationships. We also show that D-Gril can be used, more generally, for bifiltration learning on graphs and provide experimental results where we compare with existing multiparameter persistence methods on benchmark graph datasets.
In a recent work, authors of [44] present an end-to-end topological learning method by developing a general framework suitable for a class of invariants of multiparameter persistence. Our approach though specific to Gril is more direct, uses simpler arguments, and is faster for training.
2 Overview
Our main construct is Gril, introduced in [48] for vectorizing a -parameter persistence module. Gril is defined in the same spirit as persistence landscapes [2], introduced for -parameter persistence. The landscape uses the rank function over the interval decomposition known for -parameter persistence modules. To extend the concept to -parameter persistence modules, one faces two main challenges: (i) in general, persistence modules beyond -parameter may not decompose into intervals, (ii) the usual rank function cannot be defined for intervals that are not rectangular. Gril solves (i) by defining the landscape function over a fixed set of two-dimensional intervals called -worms instead of the support of the indecomposables of the modules, and solves (ii) by considering a generalized version of the rank function termed as generalized rank (Definition 3).
An interesting property of the generalized rank over intervals is that it monotonically decreases as the intervals get larger. Thus, given fixed parameters and , the width of an -worm can be increased until the generalized rank over the worm drops below . The maximum value of the width thus obtained, , is the value of Gril at the worm center point for and .
Gril yields a vector representation of the 2-parameter persistence module formed from a given simplicial complex and a bifiltration function (formally defined in section 3). However, there is no provision to learn this bifiltration function. To learn a suitable bifiltration function, we build a differentiable layer called D-Gril. We show in section 6 that the learnt bifiltration function performs better than some of the popular bifiltration functions known in TDA supporting the need for end-to-end learning.
3 Background
We review and recall some definitions and results in this section. Section 3.1 primarily consists of concepts in multiparameter persistent homology. Section 3.3 consists of concepts and results that establish the conditions required for the convergence of stochastic sub-gradient descent. Section 3.2 contains some background which is required to prove that Gril satisfies these conditions.
3.1 Multiparameter persistent homology
In this subsection, we briefly review the concepts in multiparameter persistent homology. We focus, primarily, on 2-parameter persistent homology. For detailed definitions, refer [20, 22]. We begin by recalling the definition of a simplicial complex. Given a finite vertex set , a simplicial complex defined on this vertex set is a collection of subsets of such that if a subset is in , then all proper subsets are also in . Each element in with cardinality is called a -simplex or simply a simplex. A graph is a simplicial complex where is the vertex set of the graph and consists of edges and vertices of the graph. A filtration is a collection of simplicial complexes indexed by the reals, with the property that for each . Extending this definition to collections of complexes indexed by with the product partial order ( if and ), we get a bifiltration.
Definition 1 (Bifiltration).
A bifiltration is a collection of simplicial complexes where for all comparable .
Let be a simplicial complex and be a map with the property that for all . For each , let . Clearly, for all comparable . The resulting bifiltration, denoted , is called the sub-level set bifiltration of the bifiltration function .
A filtration in the -parameter case induces a persistence module, obtained by considering the inclusion-induced linear maps between the vector spaces given by the homology groups of the simplicial complexes comprising the filtration. Similarly, we obtain a -parameter persistence module from a bifiltration.
Definition 2 (2-parameter persistence module).
A 2-parameter persistence module is an assignment of finite-dimensional vector spaces for each , and of linear maps for all comparable , with the properties that and for all .
Readers familiar with category theory can recognize that a 2-parameter persistence module is a functor where the poset is regarded as a category and denotes the category of finite-dimensional vector spaces over a field .
Given a bifiltration , we consider , the th homology group of the simplicial complex over a field , say . Then, for each inclusion , we get an induced linear map . By this assignment, we get a 2-parameter persistence module.
Let be a sub-level set bifiltration. Then the 2-parameter persistence module obtained by the homology assignment is called the 2-parameter persistence module induced by , and we denote it as .
As mentioned in Section 2, Gril vectorization uses the concept of generalized rank introduced by [32], which we define below formally.
Definition 3 (Generalized Rank).
Let be a 2-parameter persistence module. The restriction of to an interval of , denoted by , is the diagram formed by the collection of vector spaces for and linear maps for all comparable . Then, the generalized rank of over is defined as the rank of the canonical map from the limit to colimit :
We refer the reader to [36] for the definitions of limit, colimit, and the construction of the canonical limit-to-colimit map. Intuitively, generalized rank captures the number of independent topological features supported over the interval . It can be computed efficiently for -parameter persistence modules [18] using zigzag persistence [17].
Remark 4.
In the special case where is a rectangle, is the rank of the linear map from the lower left corner of the rectangle to the upper right corner .
3.2 o-minimal geometry
We recall the definitions of o-minimal structure and definable function here.
Definition 5 (o-minimal structure).
An o-minimal structure on is a collection where each is a set of subsets of such that:
-
1.
is exactly the collection of finite union of points and intervals.
-
2.
contains all the sets of the form where is a polynomial on .
-
3.
is a Boolean sub-algebra of for all .
-
4.
If and , then .
-
5.
If is the canonical projection onto the first -coordinates, then for , .
A subset for some is known as a definable set in the o-minimal structure. Let be given. A function is said to be definable if the graph of the function in is a definable set.
We note that all semi-algebraic functions are definable. In fact, the author in, [47], shows that there exists an o-minimal structure that simultaneously contains all semi-algebraic sets and the graph of the exponential function. The authors in [14] use this result to show that a neural network, being a composition of definable functions, is definable (Corollary 5.11 [14]). For readers not familiar with the notion of definable functions, it is sufficient to know that a piecewise affine map is definable.
3.3 Stochastic sub-gradient descent
In this subsection, we briefly review the result and the conditions under which stochastic sub-gradient descent converges as shown in [14]. In [7], authors use this result in the setting of -parameter persistent homology and show that stochastic sub-gradient descent converges in that case. We begin by reviewing the definition of Clarke subdifferential. Given a locally Lipschitz function , the Clarke subdifferential of at a point is defined as:
where denotes the convex hull of the set.
Now, given a loss function with the objective of minimizing it, consider the differential inclusion
where denotes the Clarke subdifferential of the function at the point . The solutions are the trajectories of the sub-gradient of which can be approximated by the standard stochastic sub-gradient descent method given by:
| (1) |
where the sequence is the learning rate and is a sequence of random variables or “noise”. [14] establish that under mild technical assumptions ( stated below) on these two sequences, the stochastic sub-gradient method converges almost surely to critical points of if is locally Lipschitz and definable.
Consider the following assumptions (Assumption C in [14]):
-
1.
for any , , and ;
-
2.
, almost surely;
-
3.
denoting by the increasing sequence of -algebras , there exists a function which is bounded on bounded sets such that almost surely, for any ,
Proposition 6 (Corollary 5.9 [14]).
Let be a locally Lipschitz definable function111The authors in [14] show that the result holds for a more general class of -stratifiable functions.. Consider the iterates produced by the stochastic sub-gradient method (Eq (1)) and suppose Assumption C of [14] holds. Then, almost surely, every limit point of the iterates is critical for and the function values converge.
4 Differentiability of GRIL
We begin this section by proving that Gril is a piecewise affine map in section 4.1. Gril being piecewise affine leads to stochastic sub-gradient converging almost surely on Gril, discussed in section 4.2. In section 4.3, we give an explicit formula for differential of Gril.
4.1 GRIL as a piecewise affine map
We begin by recalling the definitions of -worm and Gril.
Definition 7 (discrete -worm, [48]).
Let be the -square centered at with side . Given , the -worm, , is defined as the union of all -squares centered at some point on the off-diagonal line segment with where .
Refer to Figure 1 for a -worm.
Definition 8 (Gril, [48]).
For a 2-parameter persistence module , the Generalized Rank Invariant Landscape (Gril) is a function defined as
Fixing the bifiltration function and , the landscape provides a function , . The Gril vector is the vector of values of evaluated at a set of chosen sample points .
Let be a simplicial complex with simplices, labelled . A bifiltration function can be viewed as a vector where, for , and . Here, and denote the - and -coordinates of the vector respectively. Notice that the vectors in that correspond to a valid bifiltration function form a convex cone. We work with this set of vectors in . In this setting, the authors in [48] show that Gril is Lipschitz continuous in the following sense.
Proposition 9.
Let be a discrete space with . For fixed , let be the map . Then, is Lipschitz continuous.
By Rademacher’s theorem [23], is differentiable almost everywhere.
Let be the map defined as:
| (2) |
where are the sampled center points. We drop the and refer to as whenever are well understood. We note that is also a function of the center points for all . We show that is piecewise affine.
For notational convenience, in what follows we denote as and as , and we call them the simplex coordinates of . Similarly, we denote the -coordinate and -coordinate of as and respectively.
We observe that, if there are two simplices such that for some and , one has then, say for and , the point representing the vector lies on a hyperplane in :
Corresponding to each such pair of simplex coordinates, we get one hyperplane. Here, in the example, we chose one simplex coordinate to be -coordinate and the other to be -coordinate. This, however, need not always be the case: we can have all four possible combinations of - and -coordinates, corresponding to each of which we get a hyperplane. We refer the reader to Appendix A in [40] for the exact formula of all such hyperplanes. Combining all these hyperplanes, we get an arrangement of hyperplanes in [26]. The arrangement partitions into relatively open -cells, . We observe that this arrangement induces an affine stratification (refer [34] for the formal definition) of where the -dimensional strata are precisely the -cells.
In the following we prove that is a piecewise affine map relative to this arrangement, meaning that it is affine on each stratum of . To this end, we introduce the notions of upper boundary, lower boundary, and constraining simplex coordinate for an -worm which will allow us to characterize the strata of in terms of conditions on the bifiltration function. We give an intuitive explanation of these concepts using Figure 1. We refer the reader to Appendix A in [40] for the formal definitions.
In Figure 1, a -worm is shown with its lower boundary colored in blue and its upper boundary in red. As depicted, the lower boundary consists of the part of the boundary that is in the lower half of the worm, while the upper boundary consists of the rest of the boundary, i.e., a point belongs to the lower boundary (resp. upper boundary) if the open lower-set (resp. upper-set) of the point does not intersect the worm.
For an intuitive understanding of constraining simplex coordinate, consider the Gril value of an -worm centered at for a given rank . It follows from Definition 8 that there exists at least one simplex such that or prevents the worm from expanding any further to have a Gril value more than at . The coordinate in question (either or ) is called a constraining simplex coordinate for the -worm centered at . Here, by preventing the worm from expanding, we mean that if the worm were to expand then the value of the generalized rank over the worm would drop below the given value of rank . Note that an -worm can have multiple constraining simplex coordinates, including some coming from the same simplex .
We can characterize the top-dimensional (-dimensional) strata of in terms of conditions on constraining simplex coordinates for -worms, and consequently, in terms of conditions on the bifiltration functions.
Proposition 10.
The top-dimensional strata of consist precisely of those bifiltration functions that have a unique constraining simplex coordinate for each -worm.
We state the main theorem of this subsection.
Theorem 11.
Let be a simplicial complex with simplices. Let , and let be the sampled center points for the -worms. Then, , as defined in Eq.(2), is a piecewise affine map relative to the arrangement .
Overview of the proof: depends affinely on the simplex coordinates in each top-dimensional stratum, because there is a unique constraining simplex coordinate for each -worm. By continuity of (Proposition 9), the restriction of to each (affine) lower dimensional stratum is affine.
4.2 Stochastic sub-gradient descent
In our machine learning pipeline, the Gril map is post-composed with a loss function , derived e.g. from some neural network. In the corollary below, we give sufficient conditions on that ensure the convergence of stochastic sub-gradient descent on .
Corollary 12.
Overview of the proof: In the discussion towards the end of section 3.3, we saw that any piecewise affine map is definable. Since is piecewise affine, it is locally Lipschitz and definable. We know that the composition of two definable functions is definable, and that the composition of two locally Lipschitz functions is locally Lipschitz. These facts, put together with Proposition 6, immediately lead to the fact that stochastic sub-gradient descent converges almost surely to critical points of .
4.3 Differential of GRIL
In order to back-propagate gradients through the Gril computation, we need an explicit formula for the differential of . Such a formula is needed only in the top-dimensional strata, where is actually smooth. In lower-dimensional strata, sub-gradients can be approximated using, e.g., gradient sampling [3].
In section 4.1, we saw that is piecewise affine, which implies that its differential is constant in each top-dimensional stratum. In order to compute it, we need to determine the sign of the gradient at different simplex coordinates. To do so, given a worm, we distinguish between simplex coordinates that constrain the lower boundary of the worm and those that constrain its upper boundary. Since each simplex has two coordinates, and , and these can be constraining either the upper boundary or the lower boundary, we get four different cases: lower -constraining, lower -constraining, upper -constraining and upper -constraining. All these cases are shown in Figure 1.
We deduce an explicit formula for the differential of in the top-dimensional strata.
Theorem 13.
Let be a simplicial complex with simplices. Let and be the sampled center points for the -worms. Then, the differential of at any in a top-dimensional stratum is given by:
where,
and is the Gril value at .
Recall that each in a top-dimensional stratum of corresponds to a bifiltration function with a unique constraining simplex. Refer to Figure 2 for an intuitive explanation about the sign of the gradient and the different cases in Theorem 13, as shown by the arrows in Figure 1.
Corollary 14.
Given the conditions of Theorem 13, partial derivatives of with respect to and also exist and are given by:
5 Experimental setup
In this section, we outline the overall experimental setup. We first describe some practical considerations involved in implementing D-Gril, and then describe the architecture used across all experiments.
5.1 Practical considerations
In section 4.1 we saw that is piecewise affine and in section 4.2 we deduced that stochastic sub-gradient descent converges almost surely to critical points of for any definable and locally Lipschitz loss function . We gave an explicit formula for the differential of Gril in the top-dimensional strata in section 4.3, and at the beginning of that section we argued that gradient sampling can be used to approximate sub-gradients in lower-dimensional strata. In practice, for the sake of computational efficiency, we use a simple variant of gradient sampling, which consists of sampling a single nearby point and taking its gradient.
So far, we considered a bifiltration function on the entire simplicial complex . However, in practice, we may need to extend the filtration function to the entire simplicial complex based on filtration function values on certain simplices. For example, in a lower-star filtration, the filtration function values on the higher dimensional simplices are dictated by the filtration function values on the vertices of the simplicial complex. In a Rips filtration, the filtration function values on the vertices are 0, while the filtration function values on higher dimensional simplices are dictated by the filtration function values on the edges.
In such scenarios, the bifiltration function is given on a subcomplex of the simplicial complex . This is extended to a bifiltration function on the entire simplicial complex in a piecewise constant manner. We use the example of lower-star bifiltration to show how our framework fits to this type of scenario. Let be a function on the vertices of the simplicial complex with vertices and simplices. The map is extended to a piecewise constant map as follows: for an edge , we let and ; the values on higher dimensional simplices are defined inductively. Notice that for each simplex , there is a maximal -vertex and a maximal -vertex, the vertices that give the and -values to the simplex respectively. We know that can be represented as a vector and as a vector after ordering the simplices of . Consider the map given by . The map is piecewise affine and thus, is piecewise affine as well. Therefore, we can apply stochastic sub-gradient descent on with analogous convergence guarantees.
Observe that we get an arrangement of hyperplanes on , , analogous to on that we saw in the previous subsections. On the top-dimensional cells of , the differential of is well-defined and constant and expressions analogous to the ones in Theorem 13 can be derived, and the chain rule can be used for back-propagating gradients. As mentioned previously, we use a simple form of gradient sampling to approximate sub-gradients when the gradient is not well-defined. For the experimental section that follows, is a neural network with one of the standard choices for loss functions, which is definable as discussed towards the end of section 3.2.
We observe that if the bifiltration is extended to as described above , then we end up in a scenario where multiple simplices have the same or -values. This is a degenerate scenario with respect to the assumptions in Theorem 11. To avoid this, in practice, we add an infinitesimal perturbation to the higher dimensional simplices to ensure the values are not exactly the same. We note that this is, in spirit, similar to gradient sampling.
5.2 Model architecture
Every instance in each dataset is an attributed graph with a label associated with it. We use a Graph Isomorphism Network (GIN) [49], as a candidate GNN architecture, to obtain a bifiltration function over the vertices. We consider the lower-star bifiltration of this function. This gives us a bifiltration function on the entire graph, which we denote as . Let denote the vector representation of which we get after ordering the simplices of the graph. We divide the range of into a grid of size . We randomly initialize the center points from this grid and compute the vector (Eq. (2)) for and at these center points. This vector is fed to a -layer Multilayer Perceptron (MLP) classifier and the loss is back-propagated through the Gril computation according to the gradient described in Section 4. Refer to Figure 3 for an illustration. Note that the positions of the center points are also optimized as the gradient can be back-propagated to the coordinates of the center points as well. We refer the reader to Appendix B in [40] for additional details.
6 Experimental results
In this section, we present the experimental results on various bio-activity prediction datasets and benchmark graph datasets. We begin the section with a brief description of bio-activity prediction datasets followed by experimental results on those datasets. Then, in section 6.2, we show that D-Gril can be, more generally, applied in the context of bifiltration learning on standard benchmark graph datasets. We compare with existing multiparameter persistent homology methods on these datasets. All the reported accuracy/ROC-AUC scores, in this section, are -fold cross-validated scores.
6.1 Bio-activity prediction datasets
The data is extracted from the ChEMBL database [24, 13]. Each dataset contains the SMILES [46] encoding of a novel drug (compound), and activity pairs for a target of interest. For example, the EGFR dataset contains all the molecules that have been tested against epidermal growth factor receptor (EGFR) kinase, and their measured bio-activity. The SMILES encodings of the molecules are then converted to graphs with Molfeat [41]. Bio-activity is measured in half maximal inhibitory concentration , which qualitatively indicates how much a drug is needed, in vitro, to inhibit a particular process by . To facilitate the comparison of values, it is common practice to convert to , expressed in molar units. Threshold for activity cutoff is used throughout the paper. We refer the reader to Appendix B in [40] for additional details.
| Dataset | GIN | GIN-GRIL | GIN-MPSM | D-GRIL |
|---|---|---|---|---|
| EGFR | ||||
| ERBB2 | ||||
| CHEMBL1163125 | ||||
| CHEMBL2148 | ||||
| CHEMBL4005 |
In the first set of experiments, we compare D-Gril with (i) a standard GNN model–GIN with sum-pooling, (ii) with GIN and Gril as a readout layer and with (iii) GIN and Mpsm [44]. Note that for the results on GIN-Gril, Gril is used as a passive readout layer, i.e., we obtain a bifiltration function from a pre-trained GIN (pre-trained for graph classification on the same dataset) and compute Gril on it. We use the exact same pipeline as GIN-Gril and train it end-to-end using D-Gril and GIN-Mpsm and report the results. The classifier, -layer MLP, is the same for all the experiments. Refer to Figure 3 for the pipeline. From Table 1, we can see that adding topological information after GIN has been trained can improve the performance in some cases and need not be beneficial in others. However, it is clear that adding topological information in an end-to-end framework appears to be beneficial for bio-activity prediction. D-Gril has comparable performance to Mpsm.
Further, we perform a series of experiments where we augment other popular molecular fingerprints such as ECFP and Morgan3 [43, 37] with the D-Gril framework. In these experiments, we compare the performance of the model with and without D-Gril augmentation. We report the results in Table 2. We see from the table that augmenting with D-Gril seems to, generally, increase the performance of the model. Fingerprints such as ECFP and Morgan3 can essentially represent an infinite number of different molecular features, including stereochemical information [43] but they are not effective in capturing global features of molecules such as size and shape [4]. Combining D-Gril with these fingerprints augments the model with topological information, yielding an improved performance.
| Dataset | ECFP | ECFP+D-GRIL | Morgan3 | Morgan3+D-GRIL |
|---|---|---|---|---|
| EGFR | ||||
| ERBB2 | ||||
| CHEMBL1163125 | ||||
| CHEMBL203 | ||||
| CHEMBL2148 | ||||
| CHEMBL279 | ||||
| CHEMBL2815 | ||||
| CHEMBL4005 | ||||
| CHEMBL4722 |
| Dataset | D-GRIL | MPSM | GRIL | MP-I | MP-L | MP-K | P |
|---|---|---|---|---|---|---|---|
| MUTAG | |||||||
| PROTEINS | |||||||
| DHFR | |||||||
| COX2 | |||||||
| IMDB-BINARY |
| Dataset | D-GRIL | MPSM |
|---|---|---|
| MUTAG | 00:05:08 | 00:08:47 |
| COX2 | 00:11:34 | 00:18:32 |
| DHFR | 00:16:48 | 00:27:12 |
| PROTEINS | 00:30:03 | 00:50:26 |
6.2 Benchmark graph datasets
D-Gril can be used more generally for filtration learning on graph datasets. We perform a series of experiments with benchmark graph datasets such as Mutag, Proteins, Dhfr, Cox2 [38] and compare with existing multiparameter persistence methods. Details about the datasets are given in Appendix B in [40]. We report the results in Table 3. For a valid comparison, we use a -layer MLP as the classifier for all the multiparameter signatures. Hence, the numbers reported look different from the ones in [48], [6] where the authors consider XGBoost [9]. In fact, in [48], the authors show that XGBoost performs much better than a -layer MLP classifier for Gril vectors on these datasets. We can see from the table that learning the bifiltration function seems to perform better than multiparameter persistence methods on popular choices of bifiltration functions on most datasets. We can also see that D-Gril performs better than Gril, supporting our argument for an end-to-end learning framework. We also see that D-Gril performs better than Mpsm. The training times for the two end-to-end learning methods, D-Gril and Mpsm are reported in Table 4. We can see that the training times for D-Gril are improved by about compared to the ones of Mpsm. We refer the reader to Figure 4 [40] for visualizations of bifiltration functions learnt by D-Gril.
| Dataset | D-GRIL | MPSM | D-GRIL + MPSM |
|---|---|---|---|
| MUTAG | |||
| PROTEINS | |||
| DHFR | |||
| COX2 | |||
| IMDB-BINARY |
Additionally, we performed experiments where we added a fusion layer to combine the representation power of both D-Gril and MPSM. We present the results in Table 5. We see from the table that combining the representations leads to a better overall performance, which includes a generally higher mean and a lower standard deviation. Thus, D-Gril can also be used with existing vectorization methods in a complementary manner to capture additional topological information.
7 Conclusions
In this paper, we propose a differentiable framework using Gril. We show that stochastic sub-gradient descent converges almost surely on Gril, and we compute an explicit formula for the differential of Gril. We use this formula to back-propagate gradients through the Gril computation, yielding the differentiable framework D-Gril. We use D-Gril to show that adding topological information in an end-to-end manner is beneficial for bio-activity prediction. Further, we show that D-Gril can be used in a more general setting, for filtration learning on graphs. Moreover, we show that D-Gril is faster and lighter, both in theory and in practice, than Mpsm. Our results indicate that learnt bifiltration functions on graphs, generally, give a better performance than the standard choices for bifiltration functions. Recently, the Gril framework has been extended to a variant of 2-parameter persistence called quasi-zigzag persistence [19]. The results in this paper may shed light on the question of differentiability in the quasi-zigzag framework.
References
- [1] Henry Adams, Tegan Emerson, Michael Kirby, Rachel Neville, Chris Peterson, Patrick Shipman, Sofya Chepushtanova, Eric Hanson, Francis Motta, and Lori Ziegelmeier. Persistence images: A stable vector representation of persistent homology. Journal of Machine Learning Research, 18(8):1–35, 2017. URL: http://jmlr.org/papers/v18/16-337.html.
- [2] Peter Bubenik. Statistical topological data analysis using persistence landscapes. J. Mach. Learn. Res., 16:77–102, 2015. doi:10.5555/2789272.2789275.
- [3] James V Burke, Frank E Curtis, Adrian S Lewis, Michael L Overton, and Lucas EA Simões. Gradient sampling methods for nonsmooth optimization. Numerical nonsmooth optimization: State of the art algorithms, pages 201–225, 2020. URL: https://link.springer.com/chapter/10.1007/978-3-030-34910-3_6.
- [4] Alice Capecchi, Daniel Probst, and Jean-Louis Reymond. One molecular fingerprint to rule them all: drugs, biomolecules, and the metabolome. Journal of Cheminformatics, 12(1):43, June 2020. doi:10.1186/s13321-020-00445-4.
- [5] Gunnar Carlsson, Gurjeet Singh, and Afra Zomorodian. Computing multidimensional persistence. In International Symposium on Algorithms and Computation, pages 730–739. Springer, 2009. doi:10.1007/978-3-642-10631-6_74.
- [6] Mathieu Carrière and Andrew Blumberg. Multiparameter persistence image for topological machine learning. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 22432–22444. Curran Associates, Inc., 2020. URL: https://proceedings.neurips.cc/paper/2020/file/fdff71fcab656abfbefaabecab1a7f6d-Paper.pdf.
- [7] Mathieu Carrière, Frédéric Chazal, Marc Glisse, Yuichi Ike, Hariprasad Kannan, and Yuhei Umeda. Optimizing persistent homology based functions. In International conference on machine learning, pages 1294–1303. PMLR, 2021. URL: http://proceedings.mlr.press/v139/carriere21a/carriere21a.pdf.
- [8] Mathieu Carrière, Frédéric Chazal, Yuichi Ike, Theo Lacombe, Martin Royer, and Yuhei Umeda. Perslay: A neural network layer for persistence diagrams and new graph topological signatures. In Silvia Chiappa and Roberto Calandra, editors, Proceedings of the Twenty Third International Conference on Artificial Intelligence and Statistics, volume 108 of Proceedings of Machine Learning Research, pages 2786–2796. PMLR, 26–28 August 2020. URL: https://proceedings.mlr.press/v108/carriere20a.html.
- [9] Tianqi Chen and Carlos Guestrin. XGBoost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD ’16, pages 785–794, New York, NY, USA, 2016. Association for Computing Machinery. doi:10.1145/2939672.2939785.
- [10] Yuzhou Chen, Ignacio Segovia-Dominguez, Cuneyt Gurcan Akcora, Zhiwei Zhen, Murat Kantarcioglu, Yulia Gel, and Baris Coskunuzer. Emp: Effective multidimensional persistence for graph representation learning. In The Second Learning on Graphs Conference, 2023. URL: https://openreview.net/pdf?id=WScCJnX4ek.
- [11] René Corbet, Ulderico Fugacci, Michael Kerber, Claudia Landi, and Bei Wang. A kernel for multi-parameter persistent homology. Computers & Graphics: X, 2:100005, 2019. doi:10.1016/j.cagx.2019.100005.
- [12] Baris Coskunuzer and Cüneyt Gürcan Akçora. Topological methods in machine learning: A tutorial for practitioners, 2024. doi:10.48550/arXiv.2409.02901.
- [13] Mark Davies, Michał Nowotka, George Papadatos, Nathan Dedman, Anna Gaulton, Francis Atkinson, Louisa Bellis, and John P Overington. ChEMBL web services: streamlining access to drug discovery data and utilities. Nucleic acids research, 43(W1):W612–W620, 2015. doi:10.1093/NAR/GKV352.
- [14] Damek Davis, Dmitriy Drusvyatskiy, Sham Kakade, and Jason D Lee. Stochastic subgradient method converges on tame functions. Foundations of computational mathematics, 20(1):119–154, 2020. doi:10.1007/S10208-018-09409-5.
- [15] Nima Dehmamy, Albert-Laszlo Barabasi, and Rose Yu. Understanding the representation power of graph neural networks in learning graph topology. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. URL: https://proceedings.neurips.cc/paper_files/paper/2019/file/73bf6c41e241e28b89d0fb9e0c82f9ce-Paper.pdf.
- [16] Andac Demir, Baris Coskunuzer, Yulia Gel, Ignacio Segovia-Dominguez, Yuzhou Chen, and Bulent Kiziltan. Todd: Topological compound fingerprinting in computer-aided drug discovery. Advances in Neural Information Processing Systems, 35:27978–27993, 2022. URL: https://openreview.net/pdf?id=8hs7qlWcnGs.
- [17] Tamal K. Dey and Tao Hou. Fast computation of zigzag persistence. In 30th Annual European Symposium on Algorithms, ESA 2022, September 5-9, 2022, Berlin/Potsdam, Germany, volume 244 of LIPIcs, pages 43:1–43:15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.ESA.2022.43.
- [18] Tamal K. Dey, Woojin Kim, and Facundo Mémoli. Computing generalized rank invariant for 2-parameter persistence modules via zigzag persistence and its applications. Discret. Comput. Geom., 71(1):67–94, 2024. doi:10.1007/S00454-023-00584-Z.
- [19] Tamal K. Dey and Shreyas N. Samaga. Quasi zigzag persistence: A topological framework for analyzing time-varying data. In Proceedings of the 1st Conference on Topology, Algebra, and Geometry in Data Science(TAG-DS 2025), volume 321 of Proceedings of Machine Learning Research, pages 147–165. PMLR, 01–02 December 2026. URL: https://proceedings.mlr.press/v321/dey26a.html.
- [20] Tamal K. Dey and Yusu Wang. Computational Topology for Data Analysis. Cambridge University Press, 2022. doi:10.1017/9781009099950.
- [21] Edelsbrunner, Letscher, and Zomorodian. Topological persistence and simplification. Discrete & Computational Geometry, 28:511–533, 2002. doi:10.1007/S00454-002-2885-2.
- [22] Herbert Edelsbrunner and John Harer. Computational Topology: An Introduction. Applied Mathematics. American Mathematical Society, 2010.
- [23] Herbert Federer. Geometric measure theory. Springer, 2014.
- [24] Anna Gaulton, Louisa J Bellis, A Patricia Bento, Jon Chambers, Mark Davies, Anne Hersey, Yvonne Light, Shaun McGlinchey, David Michalovich, Bissan Al-Lazikani, et al. ChEMBL: a large-scale bioactivity database for drug discovery. Nucleic acids research, 40(D1):D1100–D1107, 2012. URL: https://academic.oup.com/nar/article/40/D1/D1100/2903401?login=false.
- [25] Barbara Giunti, Jānis Lazovskis, and Bastian Rieck. Donut: Database of original & non-theoretical uses of topology, 2022. URL: https://donut.topology.rocks.
- [26] J. E. Goodman and J. O’Rourke. Handbook of Discrete and Computational Geometry, Second Edition. Graduate Texts in Mathematics, Vol. 5. CRC Press, Boca Raton, FL, 2004.
- [27] Christoph D. Hofer, Florian Graf, Bastian Rieck, Marc Niethammer, and Roland Kwitt. Graph filtration learning. In Proceedings of the 37th International Conference on Machine Learning, ICML 2020, 13-18 July 2020, Virtual Event, volume 119 of Proceedings of Machine Learning Research, pages 4314–4323. PMLR, 2020. URL: http://proceedings.mlr.press/v119/hofer20b.html.
- [28] Christoph D Hofer, Roland Kwitt, and Marc Niethammer. Learning representations of persistence barcodes. J. Mach. Learn. Res., 20(126):1–45, 2019. URL: https://www.jmlr.org/papers/volume20/18-358/18-358.pdf.
- [29] Christoph D. Hofer, Roland Kwitt, Marc Niethammer, and Andreas Uhl. Deep learning with topological signatures. In Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, pages 1634–1644, 2017. URL: https://proceedings.neurips.cc/paper_files/paper/2017/file/883e881bb4d22a7add958f2d6b052c9f-Paper.pdf.
- [30] Max Horn, Edward De Brouwer, Michael Moor, Yves Moreau, Bastian Rieck, and Karsten M. Borgwardt. Topological graph neural networks. In The Tenth International Conference on Learning Representations, ICLR 2022, Virtual Event, April 25-29, 2022. OpenReview.net, 2022. URL: https://openreview.net/forum?id=oxxUMeFwEHd.
- [31] Kwangho Kim, Jisu Kim, Manzil Zaheer, Joon Kim, Frédéric Chazal, and Larry Wasserman. PLLay: Efficient topological layer based on persistent landscapes. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 15965–15977. Curran Associates, Inc., 2020. URL: https://proceedings.neurips.cc/paper/2020/file/b803a9254688e259cde2ec0361c8abe4-Paper.pdf.
- [32] Woojin Kim and Facundo Mémoli. Generalized persistence diagrams for persistence modules over posets. Journal of Applied and Computational Topology, 5(4):533–581, December 2021. doi:10.1007/s41468-021-00075-1.
- [33] Michael Lesnick and Matthew Wright. Interactive visualization of 2-d persistence modules. CoRR, abs/1512.00180, 2015. arXiv:1512.00180.
- [34] Jacob Leygonie, Steve Oudot, and Ulrike Tillmann. A framework for differential calculus on persistence barcodes. Foundations of Computational Mathematics, pages 1–63, 2021. URL: https://link.springer.com/article/10.1007/s10208-021-09522-y.
- [35] David Loiseaux, Luis Scoccola, Mathieu Carrière, Magnus Bakke Botnan, and Steve Oudot. Stable vectorization of multiparameter persistent homology using signed barcodes as measures. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL: https://proceedings.neurips.cc/paper_files/paper/2023/hash/d75c474bc01735929a1fab5d0de3b189-Abstract-Conference.html.
- [36] Saunders MacLane. Categories for the working mathematician. Graduate Texts in Mathematics, Vol. 5. Springer-Verlag, New York-Berlin, 1971.
- [37] Harry L Morgan. The generation of a unique machine description for chemical structures-a technique developed at chemical abstracts service. Journal of chemical documentation, 5(2):107–113, 1965. URL: https://pubs.acs.org/doi/pdf/10.1021/c160017a018.
- [38] Christopher Morris, Nils M. Kriege, Franka Bause, Kristian Kersting, Petra Mutzel, and Marion Neumann. TUDataset: A collection of benchmark datasets for learning with graphs. In ICML 2020 Workshop on Graph Representation Learning and Beyond (GRL+ 2020), 2020. arXiv:2007.08663.
- [39] Soham Mukherjee, Shreyas N. Samaga, Cheng Xin, Steve Oudot, and Tamal K. Dey. D-GRIL: End-to-End Topological Learning with 2-parameter Persistence. Software, swhId: swh:1:dir:379b8266de5d11b54b8041b9a4af9b9dde1fa254 (visited on 2026-04-13). URL: https://github.com/TDA-Jyamiti/d-gril/.
- [40] Soham Mukherjee, Shreyas N. Samaga, Cheng Xin, Steve Oudot, and Tamal K. Dey. D-gril: End-to-end topological learning with 2-parameter persistence, 2025. doi:10.48550/arXiv.2406.07100.
- [41] Emmanuel Noutahi, Cas Wognum, Hadrien Mary, Honoré Hounwanou, Kyle M. Kovary, Desmond Gilmour, thibaultvarin r, Jackson Burns, Julien St-Laurent, t, DomInvivo, Saurav Maheshkar, and rbyrne momatx. datamol-io/molfeat: 0.9.4, September 2023. doi:10.5281/zenodo.8373019.
- [42] Jan Reininghaus, Stefan Huber, Ulrich Bauer, and Roland Kwitt. A stable multi-scale kernel for topological machine learning. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4741–4748, 2015. doi:10.1109/CVPR.2015.7299106.
- [43] David Rogers and Mathew Hahn. Extended-connectivity fingerprints. Journal of chemical information and modeling, 50(5):742–754, 2010. doi:10.1021/CI100050T.
- [44] Luis Scoccola, Siddharth Setlur, David Loiseaux, Mathieu Carrière, and Steve Oudot. Differentiability and optimization of multiparameter persistent homology. In Ruslan Salakhutdinov, Zico Kolter, Katherine Heller, Adrian Weller, Nuria Oliver, Jonathan Scarlett, and Felix Berkenkamp, editors, Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pages 43986–44011. PMLR, 21–27 July 2024. URL: https://proceedings.mlr.press/v235/scoccola24a.html.
- [45] Oliver Vipond. Multiparameter persistence landscapes. Journal of Machine Learning Research, 21(61):1–38, 2020. URL: http://jmlr.org/papers/v21/19-054.html.
- [46] David Weininger. Smiles, a chemical language and information system. 1. introduction to methodology and encoding rules. Journal of chemical information and computer sciences, 28(1):31–36, 1988. doi:10.1021/CI00057A005.
- [47] Alex Wilkie. Model completeness results for expansions of the ordered field of real numbers by restricted pfaffian functions and the exponential function. Journal of the American Mathematical Society, 9(4):1051–1094, 1996. URL: https://community.ams.org/journals/jams/1996-09-04/S0894-0347-96-00216-0/S0894-0347-96-00216-0.pdf.
- [48] Cheng Xin, Soham Mukherjee, Shreyas N. Samaga, and Tamal K. Dey. GRIL: a 2-parameter persistence based vectorization for machine learning. In Proceedings of 2nd Annual Workshop on Topology, Algebra, and Geometry in Machine Learning (TAG-ML), volume 221 of Proceedings of Machine Learning Research, pages 313–333. PMLR, July 2023. URL: https://proceedings.mlr.press/v221/xin23a.html.
- [49] Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In International Conference on Learning Representations, 2019. URL: https://openreview.net/forum?id=ryGs6iA5Km.
- [50] Afra Zomorodian and Gunnar Carlsson. Computing persistent homology. In Proceedings of the twentieth annual symposium on Computational geometry, pages 347–356, 2004. doi:10.1145/997817.997870.
