Graphcode: Learning from multiparameter persistent homology using graph neural networks

Authors: michael  kerber
florian  russold
Venue: NeurIPS_cc_2024_Conference
Published: 2024-05-15 09:25:58

Abstract: We introduce graphcodes, a novel multi-scale summary of the topological properties of a dataset that is based on the well-established theory of persistent homology. Graphcodes handle datasets that are filtered along two real-valued scale parameters. Such multi-parameter topological summaries are usually based on complicated theoretical foundations and difficult to compute; in contrast, graphcodes yield an informative and interpretable summary and can be computed as efficient as one-parameter summaries. Moreover, a graphcode is simply an embedded graph and can therefore be readily integrated in machine learning pipelines using graph neural networks. We describe such a pipeline and demonstrate that graphcodes achieve better classification accuracy than state-of-the-art approaches on various datasets.

Main paper: 
 introduction: 
 A quote attributed to Gunnar Carlsson says "Data has shape and shape has meaning". Topological data analysis (TDA) is concerned with studying the shape, or more precisely the topological and geometric properties of data. One of the most prominent tools to quantify and extract topological and geometric information from a dataset is persistent homology. The idea is to represent a dataset on multiple scales through a nested sequence of spaces, usually simplicial complexes for computations, and to measure how topological features like connected components, holes or voids appear and disappear when traversing that nested sequence. This information can succinctly be represented through a barcode, or equivalently a persistence diagram, which capture for every topological feature its lifetime along the scale axis. Persistent homology has been successfully applied in a wealth of application areas [14, 23, 28, 30, 31, 36] , often in combination with Machine Learning methods -see the recent survey [22] for a comprehensive overview.A shortcoming of classical persistent homology is that it is bound to a single parameter, whereas data often is represented along several independent scale axes (e.g., think of RGB images which have three color channels along which the image can be considered). To get a barcode, one is forced to chose fixed scales for all but one scale parameters. The extension to multi-parameter persistent homology [7, 9] avoids to make such choices. Similar to the one-parameter setup, the data is represented in a nested multi-dimensional grid of spaces and the evolution of topological features in this grid is analyzed. Unfortunately, a succinct representation as a barcode is not possible in this extension, which makes the theory and algorithmic treatment more involved. Nevertheless, the quest of how to use informative summaries in multi-parameter persistence is an active field of contemporary research. A common theme in this context is vectorization, meaning that some (partial) topological information is extracted from the dataset and transformed into a high-dimensional vector suitable for machine learning pipelines. Contribution. We introduce graphcodes, a novel representation of the homology of a dataset that is filtered along two scale parameters. The idea, depicted in Figure 1 , is to consider one-parameter slices of the dataset by fixing one parameter, obtaining a stack of persistence diagrams. We define a map between two consecutive diagrams in this stack, resulting in a bipartite graph connecting these diagrams. The graphcode is the union of these bipartite graphs over all consecutive pairs. Since the maps connecting diagrams depend on a choice of basis for each persistence diagram, the graphcode is not a topological invariant. Nevertheless, the graphcode is a combinatorial description whose features are easy to interpret and which permits, for fixed bases per diagram, a complete reconstruction of the persistence module induced by the bifiltration. Moreover, the structure as an (embedded) graph in R 3 admits a direct integration of graphcodes into machine learning pipelines via graph neural network architectures. In that way, graphcodes avoid the vectorization step of other homology-enhanced learning pipelines which often require more parameter choices and are sometimes slow in practice. In contrast, we describe an efficient algorithm to compute the graphcode of a bifiltered simplicial complex which essentially computes all required information through a single out-of-order matrix reduction of the boundary matrix of the entire complex. While the worst-case complexity is cubic, the practical performance is closer to linear for realistic datasets [5, 29] .We demonstrate how graphcodes facilitate classification tasks. For that, we implemented a machine learning pipeline that feeds the graphcodes into a simple graph neural network pipeline. On graph datasets used in related works on multi-parameter persistent learning, our approach shows a comparable classification quality. As a proof of concept, we also created a synthesized dataset of point clouds in R 2 that contain a number of densely sampled disks and annuli plus some uniform noise. Clearly, topological classifiers are well-suited for such data. In our experiments, graphcodes outperform related methods on this type of data in terms of accuracy. At the same time, graphcodes are faster computed than all alternative topological descriptors, sometimes by several orders of magnitude. We also demonstrate that graphcodes perform better than other topological methods on two further datasets, established in related work on TDA, which consist of samples from different random point processes and orbits generated by a dynamical system, respectively. Related work. Our method can be viewed as a generalization of PersLay [11] to the two-parameter case. PersLay is a neural network layer that enables vectorization-free learning from one-parameter persistent homology. It uses a deep set [37] architecture to directly take persistence diagrams as input. A conceptually simpler generalization of PersLay would consist of only using the union of persistence diagrams of the one-parameter slices, that is, the graphcode without connecting edges. We show in our experiments, however, that the edges improve the accuracy in the two-parameter case.Most of the previous methods used in applications are based on transforming persistence diagrams into vectors in Euclidian space, or other data structures suitable for machine learning. Examples are persistence landscapes [8] , persistence images [1] , or scale-space kernels [32] . These vectorization methods for one-parameter persistence modules have been generalized in various forms to the twoparameter case [10, 16, 18, 26, 35] . The difference in the two-parameter case is that the vectorizations are not based on a complete invariant like the persistence diagram but on weaker invariants like the rank-invariant, generalized rank-invariant or the signed barcode. Hence, these vectorizations capture the persistent homology only partially. Moreover, even this partial information is often times computationally expensive. In contrast, our method avoids to compute a direct vectorization, although we point out that a vectorization is implicitly computed eventually within the graph neural network architecture. To our knowledge there exists no other method that allows to feed a complete representation of two-parameter persistent homology into a machine learning pipeline.Our approach also resembles persistent vineyards [17] in the sense that a two-parameter process is considered as a dynamic 1-parameter process and the evolution of persistence diagrams is analyzed. Indeed, vineyards produce a layered graph of persistence diagrams just as graphcodes (see Fig VIII.6 in [19] ), but they operate in a different setting where the simplicial complex is fixed throughout the process and only the order of simplices changes, whereas graphcodes rely on bifiltered simplicial complex data that only increases along both axis. Most standard constructions of multi-parameter persistence yield such a bifiltered complex and graphcodes are more applicable in this situation.Generating bifiltered simplicial complexes out of point cloud data is computationally expensive and an active area of research. In the context of the aforementioned two-dimensional point clouds that we analyze with graphcodes, we heavily rely on sublevel Delaunay bifiltrations which were introduced very recently by Alonso et al. [2] . That algorithm (and its implementation) render the two-parameter analysis of such point clouds possible in machine learning contexts, partially explaining why previous methods have only tested their approaches on very small point cloud data, if at all.Outline. We review basic notions of persistent homology in Section 2 and define graphcodes in Section 3 based on these definitions. We decided for a "down-to-earth" approach, defining graphcodes in terms of cycle bases in simplicial complexes to keep concepts concrete and relatable to geometric constructions for the benefit of readers that are not too familiar with the algebraic foundations of persistent homology. Moreover, this treatment simplifies the algorithmic description to compute graphcodes in Section 4. We explain the machine learning architecture based on graphcodes in Section 5 and report on our experimental results in Section 6. We conclude in Section 7. 
persistent homology: 
 We will use the following standard notions from simplicial homology. For readers not familar with these concepts, we provide a summary in Appendix A. For a more in-depth treatment see, for instance, the textbook by Edelsbrunner and Harer [19] .For an (abstract) simplicial complex K and p ≥ 0 an integer, let C p (K) denote its p-th chain group with Z 2 coefficients (which is, in fact, a vector space) and ∂ p : C p (K) → C p-1 (K) the boundary map (see also Figure 2 (left)). Let Z p (K) be the kernel of ∂ p . Elements of Z p (K) are called p-cycles. B p (K) is the image of ∂ p+1 , and its elements are called p-boundaries. The quotient Z p (K)/B p (K) is called the p-th homology group H p (K), whose elements are denoted by [α] K with α a p-cycle, or just [α] if the underlying complex is clear from context. See Figure 2 (right) for an illustration of these concepts.We call a basis (z 1 , . . . , z m ) of Z p (K) (boundary-)consistent if there exists some ℓ ≥ 0 such that (z 1 , . . . , z ℓ ) is a basis of B p (K). In this case, [z ℓ+1 ], . . . , [z m ] is a basis of H p (K). A consistent basis can be obtained by first determining a basis of B p (K) and completing it to a basis of Z p (K). Clearly, Z p (K) usually has many consistent bases.Homology maps. Let L ⊆ K be a subcomplex. The inclusion map from L to K maps p-cycles of L to p-cycles of K and p-boundaries of L to p-boundaries of K. It follows that for every p, the map i * :H p (L) → H p (K), [α] L → [α] Kis a well-defined map between homology groups. This map is a major object of study in topological data analysis, as it contains the information how the topological features (i.e., the homology classes) evolve when we embed them on a larger scale (i.e., a larger complex). Right: The 1-cycle marked in thick on the left is also a 1-boundary, since it is the image of the boundary operator under the 4 marked 2-simplices. On the right, the 1-cycle α going along the path ABCDE is not a 1-boundary; therefore it is a generator of an homology class[α] of H 1 (K). Likewise, the 1-cycle α ′ going along ABCF GH is not a 1-boundary neither. Furthermore, [α ′ ] = [α]since the sum α + α ′ is the 1-cycle given by the path AEDCF GH, which is a 1-boundary because of the 5 marked 2-simplices. Hence, α and α ′ represent the same homology class which is characterized by looping aroung the same hole in K.Being a linear map, i * can be represented as a matrix with Z 2 -coefficients. It is instructive to think about how to create this matrix: Assuming having fixed consistent bases A L for Z p (L) and A K for Z p (K) and considering a basis element [α] L of H p (L), we write the p-cycle α as a linear combination with respect to the basis A K . We can ignore summands that correspond to basis elements of B p (K), and the remaining entries yield the image of [α] L in H p (K), and thus one column of the matrix of i * .Alternatively, i * takes a diagonal form when picking suitable consistent bases A L and A K . We can do that as follows: We start with a basis A ′ of Z p (L) ∩ B p (K), the set of p-cycles in L that become "trivial" when included in K. This subspace contains B p (L) and we can choose A ′ such that it starts with a basis of B p (L), followed by other vectors. Now we extend A ′ to a basis A L of Z p (L) which is consistent by the choice of A ′ . Since Z p (L) is a subspace of Z p (K), we can extend A L to a basis A K of Z p (K). Importantly, we can do so such that A K is consistent, because the sub-basis A ′ maps to B p (K) and A L \ A ′ does not, so we can first extend A ′ to a basis of B p (K), ensuring consistency, and then extend to a full bais of Z p (K). In this way, considering a homology class [α] with α a basis element of A L , α is also a basis element of A K , and the map i * indeed takes diagonal form.. A filtration of a simplicial complex K is a nested sequence K 1 K 2 • • • K n = K of subcomplexes of K.Applying homology, we obtain vector spaces H p (K i ) and linear maps H p (K i ) → H p (K j ) whenever i ≤ j. This data is called a persistence module. For simplicity, we assume that H p (K) is the trivial vector space, implying that all p-cycles eventually become p-boundaries.A i for Z p (K i ) such that all maps H p (K i ) → H p (K j ) have diagonal form.Equivalently, there is one basis of Z p (K) that contains consistent bases for all subcomplexes K 1 , . . . , K n . To make this precise, we first observe that for every α ∈ Z p (K), there is a minimal i such that α ∈ Z p (K ℓ ) for all ℓ ≥ i. This is called the birth index of α. Moreover, there is a minimal j such that α ∈ B p (K ℓ ) for all ℓ ≥ j. This is called the death index of α. By our simplifying assumptions that H p (K) is trivial, every α indeed has a well-defined finite death index. The half-open interval [i, j) consisting of birth and death index is called the bar of α. We say that α is already born at index ℓ if its birth index is at most ℓ. We call α alive at ℓ if alpha is already born at ℓ and ℓ is strictly smaller than the death index of α; otherwise we call it dead at ℓ. Definition 2.1. For a filtration of K as above, a barcode basis is a basis A of Z p (K) where each basis element is attached its bar such that the following property holds: For every i, the elements of A dead at i form a basis of B p (K i ), and the elements of A already born at i form a basis of Z p (K i ). In particular, these cycles form a consistent basis of Z p (K i ).See Figure 3 (left) for an illustration. The collection of bars of a barcode basis is called the barcode of K. Indeed, while there is no unique barcode basis for K, they all give rise to the same barcode. ) and [2, 2), respectively. Note that also abd and bcd form a basis of Z 1 (L), but that is not a barcode basis as none of these cycles is already born at L 1 , so they do not induce a basis of Z 1 (L 1 ). Left, upper row: Here, abd and bcd form a barcode basis with attached bars [0, 2) and [1, 3) , respectively, and abd and abcd as well (with identical barcode). Right: Choosing the basis abcd, abd for Z 1 (L) and abd and bcd for Z 1 (K), we have abcd = abd + bcd, hence the cycle abcd has two outgoing edges, to both basis elements in K. We ignore the basis vector abd of L in the figure, since its birth and death index coincide, so the corresponding feature has persistence zero.L 0 L 1 L 2 L 3 K 0 K 1 K 2 K 3 L K + [1,3) [0,2) [1,3)This barcode (or the equivalent persistence diagram, where a bar [i, j) is interpreted as a point (i, j) in the plane) yields a topological summary of the filtration, revealing what topological features are active on which ranges of scale. Therefore, barcodes are a suitable (discrete) proxy for a dataset and are heavily used in applications.The concept of a barcode basis enhances the barcode with a consistent choice of representative cycle for every bar. In practice, this extra information is obtained with no additional computation costs because the standard algorithm to compute barcodes computes a barcode basis as a by-product.Question: Does the paper discuss the limitations of the work performed by the authors?Answer: [Yes] Justification: We discuss that graphcodes are not a topological invariant and depend on a choice of basis. Moreover, we discuss that graphcodes seem to perform not as well on small datasets as on big datasets.Guidelines:• The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper. • The authors are encouraged to create a separate "Limitations" section in their paper.• The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect on how these assumptions might be violated in practice and what the implications would be. • The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on a few datasets or with a few runs. In general, empirical results often depend on implicit assumptions, which should be articulated. • The authors should reflect on the factors that influence the performance of the approach.For example, a facial recognition algorithm may perform poorly when image resolution is low or images are taken in low lighting. Or a speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon. • The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size. • If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness. • While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations. Guidelines: 
graphcodes: 
 We now consider the case of two filtered complexes L, K such that L i ⊆ K i for all i:EQUATIONAssume we have fixed barcode bases A L for Z p (L) and A K for Z p (K). The inclusion L ⊆ K induces a linear map ϕ : Z p (L) → Z p (K), mapping each element of A L to a linear combination of A K with Z 2 -coefficients, or equivalently, to a subset of A K . The map ϕ can be represented as a bipartite graph over A L ⊔ A K . By furthermore replacing elements of A L and A K with their attached bars, we can interpret this graph as a graph between barcodes, which we call the graphcode of (1). See Figure 3 (right) for an illustration. We emphasize that the graphcode depends on the chosen barcode bases for L and K, thus the graphcode is not unique, and not a topological invariant.The bases A L and A K together with their graphcode are sufficient to recover the homology mapsϕ i : H p (L i ) → H p (K i ), induced by the inclusion L i ⊆ K i : Since a basis of Z p (L i ) is contained in A L , ϕ restricts to a map Z p (L i ) → Z p (K i ),and it is not hard to see that this map equals the map induced by the inclusion Z p (L i ) → Z p (K i ). Moreover, the basis of Z p (L i ) within A L is simply determined by those elements in A L that are already born at i, by definition of the barcode basis. Within this basis, the homology class represented by cycles alive at i form a basis of H p (L i ). The image of these classes under ϕ yields a linear combination of cycles in Z p (K i ) which are all already born, and removing the summands corresponding to dead cycles yields the image of ϕ in H p (K i ).Bifiltrations. Assume our data is now a bifiltered simplicial complex written asEQUATIONSuch a structure often times appears in applications where a dataset is analyzed through two different scales. An example is hierarchical clustering where the points are additionally filtered by an independent importance value.We can iterate the idea from the last paragraph to a bifiltration in a straight-forward manner: Let A i be a barcode basis for the horizontal filtrationK i,1 K i,2 • • • K i,n = K i . With thatbases fixed, there is a graphcode between the i-th and (i + 1)-th horizonal filtration, and we define the union of these graphs as the graphcode of the bifiltration. The vertices of the graphcode are bars of the form [b, d) that are attached to a basis A i , and we can naturally draw the graphcode in R 3 by mapping the vertex to (b, d, i). This yields a layered graph in R 3 with respect to the 3rd coordinate with edges only occurring between two consecutive layers. As discussed in Appendix D, graphcodes can be defined for arbitary two-parameter persistence modules. They can also be defined for arbitrary fields, in which case we obtain a graph that has not only node but also edge attributes.• The answer NA means that there is no societal impact of the work performed.• If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact. • Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations. • The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster. • The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology. • If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML). 
computation: 
 The vertices and edges of a graphcode in homology dimension p can be computed efficiently in O(n 3 ) time where n is the total number of simplices of dimension p or p + 1. We expose the full algorithm in Appendix B in a self-contained way and only sketch the main ideas here for brevity.First of all, it can be readily observed that the standard algorithm to compute persistence diagrams via matrix reduction yields a barcode basis in O(n 3 ) time (see [19] ). Doing so for every horizontal slice in (2) yields the vertices of the graphcode, and computing the edges between two consecutive slices can be reduced to solving a linear system via matrix reduction as well, resulting in O(n 3 ) time as well for any two consecutive slices. This is not optimal though as it results in a total running time of O(sn 3 ) with s the number of horizontal slices.To reduce further to cubic time, we perform an out-of-order matrix reduction, where the (p + 1)simplices are sorted with respect to their horizontal filtration value, but are added to the boundary matrix in the order of their vertical value. This reduction process, which still results in cubic runtime, yields a sequence of n snapshots of reduced matrices that correspond to the barcode basis on every horizontal slice, and thus yields all vertices of the graphcode. The final observation is that with additional book-keeping when going from one snapshot to the next, we can track how the basis elements transform from one horizontal slice to the next and these changes encode which edges are present in the graphcode.Finally, the practical performance can be further improved by reducing the size of the graphcode, by keeping s small, by ignoring bars whose persistence is below a certain threshold, and by precomputing a minimal presentation instead of working with the simplicial input. See Appendix B for details. 
learning from graphcodes using graph neural networks: 
 We describe our pipeline that exemplifies how graphcodes can be used in combination with graph neural networks (GNN's). The inputs are layered graphs with vertex attributes [(b, d), i], with [b, d) a bar of the barcode at the i-th layer. We can add further meaningful attributes like the additive d -b and/or multiplicative d b persistence to the nodes to suggest the GNN that these might be important. Any graph neural network architecture can be used to learn from these topological summaries. We propose the architecture depicted in Figure 4 . It starts with a sequence of graph attention (GAT) layers [34] taking the graphcodes as input. The idea is that the network should learn to pay more attention to adjacent features with high persistence which are commonly interpreted as the topological signal. These layers are followed by a local max-pooling layer that performs max-pooling over all vertices in a common slice. Then we concatenate the vectors obtained from the local max-pooling over all slices and feed the resulting vector into a standard feed-forward neural network (Dense Layers).If we remove all the edges from the graphcodes, this model can be viewed as a combination of multiple Perslay architectures [11] , one for each slice of the bifiltration. In such a case, the model would implicitly learn for each barcode individually which bars are important for classification. Adding the edges, in turn, enhances this model as propagation between neighboring layers is possible: a bar that is connected to important bars in adjacent layers is more likely to be significant itself.We also point out that the separate pooling by slices is crucial in our approach. It takes advantage of the additional information provided by the position of a slice in the graphcode. If we simply embed the entire graphcode in the plane by superimposing all persistence diagrams and do one global pooling, the outcome gets significantly worse. 
experiments: 
 We have implemented the computation of graphcodes in a dedicated C++ library and the machine learning pipeline in Python. All the code for our experiments is available in the supplementary materials. The experiments were performed on an Ubuntu 23.04 workstation with NVIDIA GeForce RTX 3060 GPU and Intel Core i5-6600K CPU.Graph datasets. We perform a series of experiments on graph classification, using a sample of TUDatasets, a collection of graph instances [27] . Following the approach in [10] , we produce a bifiltration of graphs using the Heat Kernel Signature-Ricci Curvature bifiltration. From these bifiltrations, we compute the graphcodes (GC) and train a graph neural network as described in Section 5 to classify them. More details on these experiments can be found in Appendix C.1 and the supplementary materials. We compare the accuracy with multi-parameter persistence images (MP-I) [10] , multi-parameter persistence kernels (MP-K) [18] , multi-parameter persistence landsacapes (MP-L) [35] , generalized rank invariant landscapes (GRIL) [16] and multi-parameter Hilbert signed measure convolutions (MP-HSM-C) [26] . All these approaches produce a vector and use XGBoost [15] to train a classifier.The results in Table 1 indicate that graphcodes are competitive on most of these datasets in terms of accuracy. In terms of runtime performance, the instances are rather small and all approaches terminate within a few seconds (with the exception of GRIL that took longer). Also, while the numbers in Table 1 for the previous approaches are taken from [26] , we have partially rerun the classification using convolutional neural networks instead of XGBoost. Since the results were comparable, we decided to use the numbers from the previous work.Graphcodes do not outperform other methods on these datasets but one can observe that there is no descriptor that consistently outperforms the other descriptors. We also observe that the performance of a certain descriptor on a certain dataset seems a little bit arbitrary. For example, (MP-HSM-C) has arguably the best overall performance but has the worst performance on COX2. A possible explanation could be that there is not enough topological signal in these datasets. This might be unfavorable for graphcodes as they capture more information at the cost of invariance. We also note that the different formats of the topological descriptors require different classifiers and make a direct comparison of the results difficult. This test was included primarily because it is the standard test in related work. Still, it seems unclear that topological descriptors are well suited for these datasets as, for example, on the PROTEINS dataset GNN-architectures reach up to 85% accuracy [38] . Shape dataset. To demonstrate that graphcodes are powerful topological descriptors, we apply them on a synthetic shape dataset with a strong topological signal. We construct 5 classes of shapes c 0 , . . . , c 4 as follows: Class c i consists of i annuli and 5 -i disks in the plane. The centers and radii are sampled uniformly such that the shapes do not overlap. This implies that the homology of class c i in degree one has rank i. Now we uniformly sample points from these shapes and add uniform noise. The Figure on the left shows an example of class c 3 . We generate 1000 random shape configurations and point samples per class to obtain a dataset of 5000 point clouds. The point clouds are labeled with the homology of the underlying shape configuration. The goal is to classify the point clouds according to their homology in degree one. To filter the homology signal from the noise, we first compute a local density estimate at each point in a point cloud and compute the Delaunay-bifiltration [2] with respect to relative density scores. This yields a dataset of 5000 labeled bifiltrations. From these bifiltrations, we compute the graphcodes as well as the topological descriptors for the same related approaches as for the graph case. Additionally we also compute one-parameter persistence images (P-I) based on a one-parameter alpha filtration.The time to compute these topological descriptors is reported in Table 2 . Graphcode is faster than every other method, in some cases by orders of magnitude. On the other hand, training graph neural networks is more time-consuming than for convolutional neural networks, and thus graphcodes require more time in the subsequent training phase. In our experiments, the training took around 9 minutes for graphcodes and around 1 minute for other methods.We now split the various datasets of topological descriptors and class labels 80/20 into a training set and a test set without labels, train neural networks on the training sets and test their ability to make predictions on the test sets. Further details on these experiments can be found in Appendix C.2 and the supplementary materials. The results in Table 2 show that on this inherently topological classification task, graphcodes outperform every other method by a significant margin. To demonstrate that the graphcode edges that connect consecutive layers add significant information, we run the same experiment on graphcodes with edges removed (GC-NE). The results show even without edges, graphcodes yield a better accuracy compared to related approaches, but also that the edge information further improves accuracy.Random point process dataset. The following is a variation of an experiment proposed in [6] : they consider 4 types of random point processes, namely a Poisson, Matérn, Strauss and Baddeley-Silverman process, and try to discriminate the Poisson null model from the other processes using a hypothesis test based on multiparameter persistent Betti numbers. The latter 3 processes are prototypical models for attractive behaviour, repulsive behaviour and complex interactions, respectively. We instead use multiparameter topological descriptors and neural networks to classify these processes. We create a dataset Processes consisting of 4 classes, each of which consisting of 1000 point clouds sampled from the above processes and use the topological descriptors and neural networks, discussed for the shape dataset above, for the classification. More details can be found in C.3. The results reported in Table 3 show again that graphcodes outperform other topological descriptors. They also show that for these random point processes the influence of the edges of the graphcodes is much smaller than for the shape dataset. This is expected since prominent persistent features along the density direction are very unlikely in random point processes.Orbit dataset. Finally we test our pipeline on another dataset which has been established in topological data analysis as a benchmark in the one-parameter setting. The purpose of this experiment is twofold: On the one hand it demonstrates that grapohcodes can be applied to very big datasets. On the other hand it compares the two-parameter graphcode pipeline to its one-parameter analog PersLay [11] . The dataset consists of orbits generated by a dynamical system defined by the following rule:EQUATIONwhere the starting point (x 0 , y 0 ) is sampled uniformly in [0, 1] 2 . The behaviour of this dynamical system heavily depends on the parameter r > 0. Following [11] , we create two datasets consisting of 5 classes of orbits of 1000 points generated by this dynamical system, where the 5 classes correspond to the following five choices of the parameter r = 2.5, 3.5, 4.0, 4.1 and 4.3. The datasets Orbit5k and Orbit100k consist of 1000 and 20000 orbits per class, respectively. We again use our graphcode pipeline, discussed for the shape dataset, to classify them. The computation of the graphcodes of the 100000 point clouds took just 27 minutes demonstrating the efficiency of our algorithm. The results are reported in Table 4 where we compare them to the results achieved by Persistence Scale Space Kernel (PSS-K) [32] , Persistence Weighted Gaussian Kernel (PWG-K) [24] , Sliced Wasserstein Kernel (SW-K) [12] , Persistence Fisher Kernel (PF-K) [25] and (PersLAY) [11] as reported in Table 1 of [11] . The results demonstrate that graphcodes perform better than the one-parameter methods and underpin our conjecture that the performance of the graphcode-GNN pipeline relative to other methods gets better as the size of the dataset increases. More details can be found in C.4.Graphcodes with different bases. The edges of the graphcode of a two-parameter persistence module depend on a choice of bases. So far, in all experiments, we used graphcodes with bases produced by our graphcode-algorithm which is based on the standard reduction algorithm. We next discuss the performance of graphcodes on the shape classification task introduced above with respect to different choices of bases. We compute the graphcodes using the dataset from the previous paragraph "Shape dataset". At first we construct a graphcode dataset (GC-ER) using an exhaustive column reduction [4] instead of the standard reduction. Next we construct a graphcode dataset (GC-RS) where we randomly shuffle the bases. This is done by performing valid column additions on the input presentation with a 5% probability. Finally, we produce a graphcode dataset (GC-BC) containing 20 graphcodes constructed with random base shuffles for each input instance.We observe that the bases chosen by the standard reduction and exhaustive reduction algorithm are far from random. The input presentation arising from a simplicial bifiltration is usually sparse. We find that this initial sparseness is preserved by the standard and exhaustive reduction algorithm in the sense that both lead to sparse graphcodes. If we do random base changes in the input presentation we reduce the sparseness of the input which also leads to a loss of sparseness in the output graphcodes. The result is an increase in the average number of edges of the produced graphs. Average number of edges with standard reduction: ∼ 826, exhaustive reduction: ∼ 841, random shuffle: ∼ 1977.We train the same graph neural network as in the previous experiments on these alternative graphcode datasets and report the results in Table 5 . The results in Table 5 show that the exhaustive reduction (GC-ER) does not significantly change the result compared to the standard bases (GC). The random basis shuffle (GC-RS) leads to slightly worse performance and a slight increase in variability of the results but we note that the performance is still better than without edges (GC-NE). If we use randomly shuffled bases but provide the network 20 different bases for each instance we match, and with more training epochs, even exceed the performance of (GC) and (GC-ER). These results indicate that changing the graphcode bases during the training process can increase the performance. 
conclusion: 
 Our shape experiment shows that current implementations of topological classifiers struggle with simple datasets that contain a clear topological signal but also a lot of noise. A possible explanation is that the vectorization step in these methods blurs the features too much or relies on invariants which might be too weak for a classifier to pick up delicate details. Graphcodes, on the other hand, provide an essentially complete description of the (persistent) topological properties of the data and delegates finding the relevant signal to the graph neural network. As additional benefit, some vectorizations are challenging to compute, whereas graphcodes can be computed efficiently.The biggest drawback of graphcodes is certainly that they dependent on a choice of basis and therefore are not uniquely defined for a given dataset. The bases chosen by the standard reduction algorithm are special in the sense that they lead to sparse graphs. Doing random basis changes on the graphcode dataset leads to denser graphs and a slightly worse performance on the shape classification task. But doing multiple random basis changes during the training process and, thus, providing the neural network different bases for the same instance, increases the performance even beyond the performance of the sparse graphs.A goal for future work is to combine sparse graphcodes and random basis changes during the training process. A possible direction could be to decompose the two-parameter modules into indecomposable summands, compute the graphcodes for the indecomposables and perform random basis changes on the individual components during the training process. By working only with graphcodes of decompositions we could reduce the number of possible edges.We speculate that the combination of computational efficiency and discriminatory power will make graphcodes a valuable tool in data analysis. With the advent of more efficient techniques to generate bifiltrations for large datasets, we foresee that the potential of graphcodes will be a study of investigation in the coming years. 
safeguards: 
 Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?Answer: [NA] Justification: We don't see any potential for misuse of our work.Guidelines:• The answer NA means that the paper poses no such risks.• Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters. • Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images. • We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort.12. Licenses for existing assets Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?Answer: [Yes]Justification: All authors of assets used in our experiments are properly credited.Guidelines:• The answer NA means that the paper does not use existing assets.• The authors should cite the original paper that produced the code package or dataset.• The authors should state which version of the asset is used and, if possible, include a URL. • The name of the license (e.g., CC-BY 4.0) should be included for each asset.• For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided.• If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswithcode.com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset. • For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided. • If this information is not available online, the authors are encouraged to reach out to the asset's creators. 
new assets: 
 Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?Answer: [Yes] Justification: The provided code is properly documented.Guidelines:• The answer NA means that the paper does not release new assets.• Researchers should communicate the details of the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc. • The paper should discuss whether and how consent was obtained from people whose asset is used. • At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file. 
crowdsourcing and research with human subjects: 
 Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?Answer: [NA]Justification: The paper does not involve crowdsourcing nor research with human subjects.Guidelines:• The answer NA means that the paper does not involve crowdsourcing nor research with human subjects. • Including this information in the supplemental material is fine, but if the main contribution of the paper involves human subjects, then as much detail as possible should be included in the main paper. • According to the NeurIPS Code of Ethics, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector. 
institutional review board (irb) approvals or equivalent for research with human subjects: 
 Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?Answer: [NA]Justification: The paper does not involve crowdsourcing nor research with human subjects.Guidelines:• The answer NA means that the paper does not involve crowdsourcing nor research with human subjects. • Depending on the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.• We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution. • For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review. 
 
 Appendix: An (abstract) simplicial complex K with vertex set V is a collection of subsets of V , called simplices, with the property that whenever σ ∈ K and τ ⊆ σ, then τ ∈ K as well. In that case, τ is called a face of σ. A subcomplex L of K is a subset of K that is itself a simplicial complex. The dimension of a simplex is its number of vertices minus 1 -this corresponds to the interpretation that the vertices are embedded in Euclidean space and a simplex is identified with the convex hull of the embedded vertices that define the simplex. Simplices in dimension 0, 1, 2 are called vertices, edges, and triangles, respectively. A facet of a p-simplex σ is a face of σ that has dimension p -1. A p-simplex has exactly (p + 1)-facets.Let Z 2 the field with two elements, p ≥ 0 an integer and K be a simplicial complex. The set of p-simplices forms the basis of a Z 2 -vector space C p (K), and we call elements of this vector space p-chains. Put differently, a chain is a formal linear combination of p-simplices with coefficients in {0, 1} and can thus be interpreted as a subset of p-simplices. The boundary of a p-simplex σ, written ∂σ, is the (p -1)-chain formed by all facets of σ. For instance, the boundary of a triangle is the sum of the three edges that (geometrically) form the boundary of the triangle. The boundary extends to a linear map ∂ :C p (K) → C p-1 (K) because it is defined on a basis of C p (K).A p-chain c is called a p-cycle if ∂c = 0. The p-cycles are the kernel elements of the map ∂ and hence form a vector space which we denote by Z p (K). The aforementioned three edges bounding a triangle form a 1-cycle because when taking their boundary, every vertex appears twice, and hence vanishes because we work with Z 2 -coefficients.A p-chain c is called a p-boundary if there exists a (p + 1)-chain d such that ∂d = c. In other words, the p-boundaries are the images of the map ∂ and hence, form a vector space that we denote by B p (K). A fundamental property is that for any chain c, we have that ∂(∂c) = 0. As an example, for c a triangle, the above examples exemplify that indeed, the boundary of the boundary of the triangle is trivial. As a consequence, p-boundaries are p-cycles and hence B p (K) is a subspace of Z p (K).The p-th homology group H p (K) is the quotient Z p (K)/B p (K). We will use the standard notion of "homology group" even though it is even a vector space in our case. The rank of H p (K) can be interpreted as the number of p-dimensional holes in K: indeed, a "hole" in K must have a p-cycle (i.e., an element of Z p (K)) that encloses the hole, but we need to disregard such cycles that loop around a space that is filled by (p + 1)-simplices, hence we divide out B p (K). We write Computing barcode bases. We start by reviewing the classical matrix reduction algorithm for computing persistent homology. For a fixed filtration of a simplicial complex K and p ≥ 0, we put the (p + 1)-simplicies of K in a total order that respects the filtration, meaning that if a (p + 1)-simplex σ of K enters the filtration at index i and a (p + 1)-simplex τ of K enters at index j with i < j, then σ precedes τ in the order. Writing n p+1 for the number of (p + 1)-simplices of K, we can assign to each (p + 1)-simplex an index in {1, . . . , n p+1 } that reflects this order. Doing the same for the p-simplices of K (with total number n p ), the boundary matrix ∂ of K in dimension p is defined as the (n p × n p+1 )-matrix over Z 2 where each row corresponds to a p-simplex and each column to a (p + 1)-simplex, and the entry at position (i, j) equals 1 if and only if the i-th p-simplex is a facet of the j-th (p + 1)-simplex.The columns of ∂ span B p (K). Recall our simplifying assumption that H p (K) is trivial, implying that the columns also span Z p (K). However, they are not necessarily a basis because of linear dependance. To obtain a basis, we apply matrix reduction on ∂: for a non-zero column, denote by its pivot the highest index whose coefficient is not zero. Then, traverse the columns from left to right, writing c j for the currently considered column. As long as c j is not zero and has the same pivot as a previous column c i with i < j, add c i to c j . Every column addition will make the pivot entry in c j disappear since we work with Z 2 -coefficients.This process results in a reduced matrix R in which no two columns have the same pivot. The remaining non-zero columns of R are linearly independent and thus form a basis of Z p (K). The bar attached to each cycle can easily be read off the matrix R: fixing a cycle α represented by column j, let σ be the (p + 1)-simplex that corresponds to column j in ∂. Then the death index is the minimal d such that σ is contained in K d . Furthermore, let i denote the pivot of column j and let τ be the p-simplex that corresponds to row i in ∂. Then, the birth index is the smallest b such that τ is contained in K b . Exploiting the fact that the matrix reduction only performs left-to-right column additions and that the resulting basis has pairwise-disjoint pivots, one can show that this basis forms a barcode basis of Z p (K).Moreover, the reduction process has the additional property that any column that is ever added to another column is already reduced, that is, will not be modified further in the process. We record this for later: Proposition B.1. If a matrix A gets reduced to R as above, and a column addition c j ← c i + c j happens during the reduction process, then c i is a column of R.Being a variant of Gaussian elimination, the algorithm to compute a barcode basis out of the boundary matrix ∂ requires O(n 3 ) in the worst case (with n = max{n p+1 , n p }). However, the initial sparseness of ∂ results in a close-to-linear performance in many applied scenarios [5, 29] .The assumption that H p (K) is trivial might seem crucial for the construction, but one can lift this assumption without much computational overhead. In that case, one also needs to perform matrix reduction on the boundary matrix spanned by (p -1)and p-simplices and do some additional book-keeping to obtain basis elements for p-cycles that do not die in K. We omit details for brevity.Efficient graphcodes through batched matrix reduction. We consider the algorithmic problem to compute the graphcode of a bifiltration of a simplicial complex K. We assume that the bifiltration is 1-critical which means that for every simplex σ, there is a index pair (i 0 , j 0 ), such that σ ∈ K i,j if and only if i 0 ≤ i and j 0 ≤ j. In other words, every simplex has a unique entrance time into the bifiltration; while this assumption does not apply for every bifiltration, it is still satisfied for many instances that occur in practice; furthermore, there are techniques to transform other types of bifiltrations to the 1-critical case [13] .Our input is a list of simplices of K together with a critical index pair (i 0 , j 0 ) per simplex, defining a 1-critical bifiltration as in (2) . The output is the graphcode of the bifiltration.The straight-forward approach to compute the graphcode is to first compute a barcode basis for each horizontal slice ℓ independently, obtaining the vertices of the graphcode. Then, express every basis element at level ℓ using the barcode basis at level ℓ + 1 to determine the edges between levels ℓ and ℓ + 1. This requires to solve one linear system per basis element. With s the total number of horizontal slices and n the number of simplices, this approach requires O(sn 3 ) to compute the barcodes bases and also O(sn 3 ) to get the edges, since every linear system can be solved in O(n 2 ) time using the reduced matrices.The straight-forward approach is non-optimal because it computes the barcode bases on each level from scratch. Since K ℓ+1 contains K ℓ , we can devise a more efficient strategy to update a barcode basis for K ℓ to a barcode basis for K ℓ+1 . In this way, we obtain the barcode bases for all horizontal filtrations in O(n 3 ) time.First, we sort all (p + 1)-simplices of K with respect to their second critical index, and refine to a total order, assigning to each (p + 1)-simplex an integer in {1, . . . , n p+1 }. Initialize A to be an empty matrix, whose number of columns equals n p+1 . Precompute for every level ℓ the set of (p + 1)-simplices that are contained in K ℓ , but not in K ℓ-1 (these are precisely those simplices whose first critical value equals ℓ), calling them the ℓ-th batch. Now assume that A contains a barcode basis for the horizontal level ℓ -1. Add the columns of the ℓ-th batch to A at the appropriate place with respect to the chosen total order and apply the matrix reduction from the previous paragraph on A.The resulting reduced matrix yields a barcode basis for level ℓ.This above algorithm computes all vertices of the graphcode in worst-case O(n 3 ) time, and also efficiently in practice, as it basically performs a single reduction of the boundary matrix of K, in some order that is determined by the bifiltration. What is perhaps remarkable is that with some extra bookkeeping, the algorithm also computes the edges of the graphcode on the fly. To see that, consider a non-zero column of the boundary matrix before the ℓ-th batch gets added, representing a basis element α of Z p (K ℓ-1 ). If the column does not change during the reductions caused by the batch, α is also basis element in the barcode basis for K ℓ , and there is a single edge connecting the two copies of α in the basis for K ℓ-1 and K ℓ . If the column changes, this is caused by a column addition with a column from the left. Because of Proposition B.1 the added column is a basis element z 1 of the ℓ-th barcode basis, and we know that α = z 1 + α (1) , where α (1) is the cycle represented by the column after the addition. Now if α (1) gets modified by another basis element z 2 of the ℓ-th barcode basis, we get α = z 1 +z 2 +α (2) , and so on. The process either stops when the column becomes 0, in which case α (k) = 0 for some k, and we have obtained the linear combination of α, or the process stops because some α (k) is reduced and will not be modified further in the reduction. In that case, α (k) is itself a basis element z k+1 of the ℓ-th barcode basis, and we obtain that α = z 1 + z 2 + . . . + z k+1 . Storing the linear combination during the process does not affect the running time, hence the graphcode can be computed in O(n 3 ) time.Speed-ups. When implementing the above algorithm, we observed that the resulting graphcodes can become rather large and the practical bottleneck in the computation is to merely create the graphcode data structure. We suggest two ways to reduce the size, resulting in a much better performance: first of all, standard constructions for bifiltrations result in a large number of horizontal slices to consider. Instead, we propose to fix an integer s > 0, and to equidistantly split the parameter range of the first critical value equidistantly at s positions, obtaining s slices in the graphcode. To reduce the size of individual graphcodes, we propose to only consider relevant bars, where relevance means that the persistence of the bar (i.e., the distance between death and birth) is above some threshold. In particular, this removes bars of zero length from consideration, which are often the majority of all bars in a barcode. We then only return the subgraph of the graphcode induced by the relevant bars. In Figure 3 (right), we have applied this filter, for instance.Finally, we observed significant performance gains by first computing a minimal presentation [20] of the input bifiltration, and computing the graphcode of this minimal presentation. A minimal presentation consists of generators and relations capturing the homology of a bifiltration. The entire approach works in an analogous way, with generators taking the role of p-simplices and relations the role of (p + 1)-simplices. We skip details for brevity.In all our experiments, we compute the graphcodes from minimal presentations using our C++ library. The graphcode software requires parameters specifying the homology degree, the number of slices and the direction in which to take the slices. If the minimal presentation is already computed for a specific homology degree (an option provided by MPFREE bitbucket.org/mkerber/mpfree and FUNCTION_DELAUNAY bitbucket.org/mkerber/function_delaunay), the degree parameter can be omitted. One can also specify a relevance threshold t to obtain the subgraph induced by all nodes (b, d) such that d -b > t.For the datasets listed in Table 1 we first compute the Heat Kernel Signature-Ricci Curvature bifiltration using a function provided by github.com/TDA-Jyamiti/GRIL and then compute a minimal presentation of this filtration using the software MPFREE [20] . In all the graph experiments we compute the graphcodes using homology degree one, 20 slices and relevance-threshold t = 0. We tested both possible slicing directions controlled by the option "primary-parameter" in the graphcode software and found that primary parameter 1 is slightly better. The computation of the graphcodes of these datasets takes between 1 and 7 seconds. We additionally augment the vertices [(b, d), i] of the raw graphcodes with their multiplicative d b and additive d -b persistence. The vertex attributes [(b, d, d b , d-b), i] yield slightly better results. The slices index i is only used for the local max-pooling and not as part of the vector attributes for the neural network.We then train a graph neural network classifier on these graphcode datasets where we use the architecture specified in Section 5. The details of the chosen parameters for the GNN architectures can be found in the code provided as supplementary material. We randomly shuffle the dataset and split it 80/20 into a labeled training set and a test set without labels, train the GNN on the training set and evaluate it on the test set. We run this procedure 20 times and average the achieved test set prediction accuracy over this 20 train/test runs. The results are reported in Table 1 .The point cloud dataset is generated as follows. For class i we have to put i annuli and 5 -i disks on an empty canvas in a way such that they don't overlap. We put the shapes on the canvas one by one by uniformly sampling radii and centers in such a way that a newly added shape would have at least separation ϵ > 0 from all shapes that are already there. At the end we put uniform noise with a uniformly sampled density over the whole canvas. For each of the 5 classes we generate 1000 of these random shape configurations and take a point sample from each of them. This leads to a dataset of 5000 point clouds in the plane. The details of all the chosen parameters can be found in the code in the supplementary materials.The point clouds have a lot of randomness to them. The only thing that two point clouds in the same class have in common is that, before adding the noise, they are both sampled from a space with the same homology in degree one. A human could probably still predict with high accuracy how many annuli are in a picture (cf. the example figure in Section 6). This is because the underlying regions of the shapes have much higher density. To enable a classifier based on topological descriptors to do a similar kind of inference we have to introduce some measure of density. Hence, we compute a local density estimate at every point of a point cloud based on the number of neighbours in a circle with a given radius. We then score the points with respect to these local density estimates and use these score values as function values for the Delaunay-bifiltration computed with FUNCTION_DELAUNAY [2] .For the graphcode computation we use homology degree one, 10 slices and we slices the bifiltration in direction of fixed density. On these datasets we have to set a positive relevance-threshold of 0.1 because the resulting graphcodes would be too big for the available GPU memory in the GNN training process. The density scores and the slicing along fixed density will yield the following slices: The first slice contains those 5% of the points with the lowest density. The second slice contains those 10% of the points with the lowest density, etc. The computation time reported in Table 2 is the time needed to compute the graphcodes of the whole dataset from the minimal presentations.We then train a graph neural network classifier on these graphcode datasets where we use the architecture specified in Section 5. The details of the chosen parameters for the GNN architectures can be found in the code provided as supplementary material. We randomly shuffle the dataset and split it 80/20 into a labeled training set and a test set without labels, train the GNN on the training set and evaluate it on the test set. We run this procedure 20 times and average the achieved test set prediction accuracy over this 20 train/test runs. We repeat this experiment for the graphcodes after removing all the edges. The results are reported in Table 2 .As a comparison we test various other topological descriptors on this classification task. We start with one-parameter persistence images obtained from one-parameter alpha-filtrations in homology degree one on the point clouds. For the computation we use the Gudhi package [33] . The computation time reported in Table 2 is the time needed to compute the persistence images of the whole dataset from the alpha filtrations.Next we compute the multiparameter persistence images, landscapes and the signed measure convolutions using the multipers package github.com/DavidLapous/multipers. These vectorizations are computed from minimal presentations, for homology degree one, of the Delaunay-bifiltrations. For all these vectorizations we use a resolution of 100 × 100, i.e., the output are 100 × 100 images. For the landscapes we use the first 5 landscapes. The computation time reported in Table 2 is the time needed to compute the vectorizations of the whole dataset from the minimal presentations.Finally we compute the generalized rank invariant landscapes (GRILs), for homology degree one, using the GRIL package github.com/TDA-Jyamiti/GRIL/. Since the GRIL package takes bifiltrations as input we first have to compute the Delaunay-bifiltrations in non-presentation form and convert them to inputs suitable for GRIL. Since the computation of the GRIL's is costly we were forced to choose a rather large step size to make the computation of the landscapes feasible. We found that enlarging the step size lead to better results than reducing the resolution. The resulting images are of size 17 × 17. The computation time reported in Table 2 is the time needed to compute the landscapes of the whole dataset from the precomputed GRIL inputs.For the computation of all multiparameter vectorizations we first scale the bidegrees of the bifiltration, i.e., the parameter of the alpha complex and the density scores, to one to make the two parameters comparable.We then train convolutional neural network classifiers on these image datasets. As in the GNN case, we randomly split the datasets into training and test sets using a 80/20 split, train the network on the training set and test it on the test set. We run this procedure 20 times and take the average test set prediction accuracy. The results are reported in Table 2 .We note that despite the big step size in the GRILs, leading to rather coarse images, the performance is quite good compared to other vectorization methods. We believe that, given the computational resources to use a smaller step size, the GRILs would perform significantly better.Following [6] , we consider four classes of point processes and create the dataset Processes by simulating random samples of these processes. The four classes of our dataset correspond to the four different processes and consist of 1000 random samples per class. We simulate all processes in two-dimensional Euclidian space where we restrict the sampling window to [0, 1] 2 . The first process is a standard homogeneous Poisson process which, in our case, corresponds to uniformly sampling a Poisson distributed number of points with a given intensity in [0, 1] 2 . The second process is a Matérn cluster process which is based on a parent Poisson process, whose points can be viewed as cluster centers, where each parent point creates a Poisson distributed number of child points uniformly sampled in a sphere centered at the parent. The third process is a Strauss process which models repulsive behaviour. In the Strauss process there is a penalty on points sampled within a given distance of each other based on an interaction parameter. To sample these processes, we use the functions PoissonPointProcess, MatérnPointProcess and StraussPointProcess in MATHEMATICA. The last process we consider is a Baddeley-Silverman process where we subdivide the sampling window [0, 1] 2 into a grid of boxes and sample 0, 1 or 2 points in each box with probabilities 0.45, 0.1 and 0.45, respectively. Since we could not find an implementation of this process in MATHEMATICA we implemented this process in PYTHON. The details of all parameter choices can be found in the supplementary materials. We choose the parameters in such a way that a sample of any of the above processes contains about 200 points on average. As in the previous experiments we compute a Delaunay-bifiltration based on local density estimates and then compute graphcodes in homology degree one using 10 slices along fixed density values without a threshold. The results are reported in Table 4 .We then train a graph neural network classifier on this graphcode dataset where we use the architecture specified in Section 5. The details of the chosen parameters for the GNN architectures can be found in the code provided as supplementary material. We randomly shuffle the dataset and split it 80/20 into a labeled training set and a test set without labels, train the GNN on the training set and evaluate it on the test set. We run this procedure 20 times and average the achieved test set prediction accuracy over this 20 train/test runs. We repeat this experiment for the graphcodes after removing all the edges. The results are reported in Table 3 .As a comparison we also compute persistence images based on a one-parameter alpha filtration and multiparameter persistence images, landsacapes and signed measure convolutions as well as generalized rank invariant landscapes from the bifiltrations and classify them using convolutional neural networks. For all these experiments we use the same settings as for the shape datasets. The results can be found in Table 3 .The orbit datasets Orbit5k and Orbit100k are created as follows. For each of the five parameter values r = 2.5, 3.5, 4.0, 4.1 and 4.3 we uniformly sample 1000 and 20000 points (x 0 , y 0 ) in [0, 1] 2 , respectively, and run the dynamical system (3) for 1000 steps. In this way we obtain the two datasets Orbit5k and Orbit100k consisting of 5 classes of 1000 and 20000 point clouds, respectively, where each point cloud consists of 1000 points in R 2 . The class labels are the values of r used to generate a point cloud.After constructing the datasets we compute local density estimates at every point, score the points with respect to these density estimates and compute a Delaunay-bifiltration with respect to these density scores. In contrast to the point clouds of the shape dataset, the point clouds from the orbit datasets do not have particularly prominent dense regions which explains why the the difference between the methods based on one-parameter persistence and graphcodes is smaller than for the shape dataset. From these bifiltrations we compute graphcodes in homology degree one, using 10 slices along fixed density values and use a persistence threshold of 0.002.We then train a graph neural network classifier on these graphcode datasets where we use the architecture specified in Section 5. The details of the chosen parameters for the GNN architectures can be found in the code provided as supplementary material. We randomly shuffle the dataset and split it 70/30 (to be consistent with [11] ) into a labeled training set and a test set without labels, train the GNN on the training set and evaluate it on the test set. We run this procedure 20 times for Orbit5k and 10 times for Orbit100k and average the achieved test set prediction accuracy over this train/test runs. We note that in [11] they average over 100 train/test runs. For time reasons, especially on the relatively large Orbit100k dataset, we avoided such a large number of runs but, since the results have low variability, this does not make a significant difference. We repeat this experiment for the graphcodes after removing all the edges. The results are reported in Table 4 . We note that in [11] they use persistent homology in degree zero and degree one for the classification. Thus we achieve the reported accuracy with less information. We can observe that the performance of graphcodes relative to perslay and the other methods as well as the influence of the graphcode-edges increases as the size of the dataset increases. This demonstrates that the true power of the combination of graphcodes and graph neural networks really starts to manifest itself on larger datasets.In Section 3, we defined graphcodes of two-parameter persistence modules arising from bifiltered simplicial complexes. In this section, we show that graphcodes can be defined for arbitrary twoparameter persistence modules. For the graphcode construction, we consider a two-parameter persistence module as a sequence of one-parameter persistence modules connected by morphisms. A one-parameter persistence module M is a diagramM 1 M 2 • • • M n 1 M n M 2 1 M 3 2 M n 1 n 2 M n n 1where M i is a finite-dimensional vector space and M i+1 i : M i → M i+1 is a linear map. The elementary building blocks of one-parameter persistence modules are the so-called interval modules I [a,b) defined by(I [a,b) ) i := k if a ≤ i < b 0 else (I [a,b) ) i+1 i := id if a ≤ i < b -1 0 else A morphism of one-parameter persistence modules ϕ : M → N is a collection of linear maps ϕ i : M i → N i such that the following diagram commutes: N 1 N 2 • • • N n 1 N n M 1 M 2 • • • M n 1 M n N 2 1 N 3 2 N n 1 n 2 N n n 1 M 2 1 ϕ1 M 3 2 ϕ2 M n 1 n 2 M n n 1 ϕn 1 ϕnThe theorems of Krull-Remak-Schmidt [3, Theorem 1] and Gabriel [21, Chapter 2.2 ] imply that every one-parameter persistence module M is isomorphic to a unique direct sum of interval modules, i.e., M ∼ = The results discussed above can be interpreted on an elementary level in the following way: for a persistence module M there exists a choice of bases of the vector spaces M i such that all the matrices M i+1 i are in diagonal form, i.e., every basis element in M i is either mapped to a unique basis element in M i+1 or is mapped to zero. Since there is no unique way of transforming arbitrary bases of M into a barcode basis there is no unique isomorphism.Since every persistence module is isomorphic to a direct sum of interval modules, to understand morphisms of persistence modules, it is enough to understand morphisms between interval modules. Given two interval modules I The morphisms between summands are given by composition with the inclusion and projection to these summandsI [as,bs) I [ct,dt) g j=1 I [aj ,bj ) h l=1 I [c l ,d l ) ιs ψ ϕ ts ψ ϕ πtHence, by (4), ψ ϕ ts := π t • ψ ϕ • ι s is either zero or determined by a scalar λ ϕ ts ∈ k and we can represent the morphism ψ ϕ by a matrix M(ϕ) of the form[a 1 , b 1 ) [a 2 , b 2 ) • • • [a g , b g )           [c 1 , d 1 ) λ ϕ 11 λ ϕ 12 • • • λ ϕ 1g [c 2 , d 2 ) λ ϕ 21 λ ϕ 22 • • • λ ϕ 2g . . . . . . . . . . . . . . . [c h , d h ) λ ϕ h1 λ ϕ h2 • • • λ ϕ hgwhere λ ϕ ts is the scalar determining the morphism ψ ϕ ts . Note the analogy to matrices representing maps between vector spaces with respect to a choice of basis. Example D.1. Consider the following morphism of persistence modulesN : k k 2 k 0 M : 0 k k 0 1 2 3 4 1 0 1 0 ϕ 0 0 1 1 1 1modules: Guidelines:M •m M 0m M 1m • • • M nm . . . . . .• The answer NA means that the abstract and introduction do not include the claims made in the paper. • The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or NA answer to this question will not be perceived well by the reviewers. • The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings. • It is fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper. 


Decision: This paper presents a new multi-scale summary of topological features of graphs, called a *graphcode*. Graphcodes are obtained from bifiltrations, i.e. a filtration process along two (independent) variables on a graph. Leveraging ideas from computational topology, in particular persistent homology, the paper calculates graphcodes as a representation of maps between consecutive slices in a stack of persistence diagrams, i.e. topological descriptors. The resulting features can be easily integrated into a deep-learning model, leading to a new way of solving graph-learning tasks.

Initial support of the paper was not very pronounced; reviewers agreed on the utility, novelty, and relevance of the idea, but cited concerns about the experimental setup as well as some of the theoretical properties. For the latter point, the fact that graphcodes—unlike many other methods in topology-based graph learning—are *not* a topological invariant was raised multiple times. The authors acknowledge this fact openly in their submission, though, and the AC believes that this is not a shortcoming *per se*, since graphcodes can nevertheless be gainfully employed empirically (and most, if not all, graph-learning methods do not even discuss properties like invariance). That being said, the other shortcoming, raised by multiple reviewers, concerns the experimental results and their framing. For a new method like this, which the AC construes to be primarily about showing that multi-parameter persistent-homology methods can be computationally efficient, a paper cannot be expected to report state-of-the-art results. Nevertheless, the AC essentially echoes the feedback by reviewer `j5Nq`, who made additional suggestions about (a) discussiong **additional related work**, and (b) an **improved contextualisation of the results**.

Since the authors engaged openly and actively in their rebuttal, several of the concerns could already be alleviated. Thus, the authors are trusted to implement the aforementioned suggestions, as well as other suggestions raised by reviewers (mostly concerning the accessibility of the work), in the camera-ready version of their paper.

Reviews: review: paper_summary: paper_summary: This paper proposes a computationally fast method to extract information from a 2-parameter persistence module. The authors consider a 2-parameter persistence module as slices of 1-parameter persistence modules. Each 1-parameter persistence module can be represented as barcodes. The authors consider these barcodes as basis and represent the maps between the barcodes, induced by the bifiltration, as an attributed graph. This attributed graph is used as an input to a GNN architecture. The information extracted by this method is not a topological invariant, however, empirical results show that the method gives comparable results on TU datasets and better results on some synthetic datasets as compared to existing multiparameter methods.
strength_weakness: strength_weakness: 1. The authors have shown experiments on TU Datasets and some synthetic datasets. GC seems to perform well on the synthetic datasets, however, the performance on TU datasets is not particularly impressive. The authors claim that it might be because there are not enough topological signals to capture in those datasets, which is not fully convincing.  

2. The exact experimental setup (hyperparameter choices, number of GAT layers etc.) is not described in the paper, not even in the appendix.
questions: questions: 1. Was there a specific reason to choose GAT as the GNN architecture? How does GC perform with other GNN architectures? 

2. Was there a specific reason to choose max-pooling? How does the model perform with sum/average pooling? 

3. It is interesting to see from Table 3 and Table 4 that adding edges in GC amounts to a marginal increase in performance. Does this mean that the information carried by the maps between barcodes is not as important? 

4. How does the proposed method stand with respect to the expressivity as compared to other multiparameter persistent homology methods?
limitations: limitations: Yes, the authors have discussed limitations.
paper_summary: paper_summary: The paper introduces "graphcodes," a novel multi-scale summary of the topological properties of datasets using graph neural networks. Unlike traditional persistent homology, which uses a single parameter, graphcodes handle datasets filtered along two real-valued scale parameters, resulting in a more informative and interpretable summary. The paper outlines how graphcodes can be efficiently computed and integrated into machine learning pipelines, demonstrating improved classification accuracy over state-of-the-art approaches.
strength_weakness: strength_weakness: From the experimental results, it’s hard to find too much practical meanings of using graphcode.
questions: questions: 1.	How is the graph constructed in graphcode? Is it a directed graph?
2.	From Table 1, MP-HSM-C performs much better than GC. Moreover, as stated in Line 251, all approaches terminate within a few seconds even on the devices mentioned in Line 240. So do we really need a method that runs a few seconds faster at the cost of losing considerable accuracies?
3.	As stated in Line 227, GC-NE can be viewed as Perslay. It seems that Perslay is already accurate and efficient enough. From my perspective, it’s more practical to use Perslay rather than graphcode considering the experimental results provided in this paper. Besides, how does GC-NE perform on graph classification tasks?
4.	As mentioned in line 172, the graphcode depends on the chosen barcode bases. I wonder if there is a risk that different choices of barcode bases could impact the robustness and consistency of GC?
limitations: limitations: See Questions
paper_summary: paper_summary: This paper introduces "Graphcode", a new representation for summarizing the topological properties of datasets filtered along two parameters. Graphcodes are based on persistent homology but aim to provide a more interpretable and efficient summary than existing multi-parameter topological descriptors. The key idea is to collect one-parameter sliced barcodes with basis-choice dependent mappings between consecutive persistence diagrams, which results in a bipartite graph structure, as the so-called Graphcode summary. 

The authors present an efficient algorithm to compute Graphcodes and demonstrate how they can be directly used as input to graph neural networks for machine learning tasks. Experiments on several datasets show that Graphcodes have competitive or superior performance compared to other existing topological descriptors of multi-parameter persistence, especially on tasks with clear topological signals.
strength_weakness: strength_weakness: - Graphcode are not topologically invariant, depending on choice of basis. Impact of this is not fully explored.
- Theoretical analysis of expressiveness/information captured by Graphcode is limited.
questions: questions: - How sensitive are the results to the choice of basis used in constructing the Graphcode? Is there a way to make this choice optimal or at least consistent/stable locally?
- Since the Graphcode is not topological invariant, one concern might be that if the GNN based on such method is still permutational invariant / equivalent? If yes, more discussion or justification should be included in the main text. If not, the potential issue or constraints in application should be discussed. 
- The theoretical foundations and analysis of what information Graphcode capture compared to other descriptors is somewhat limited. Can this be expanded?
limitations: limitations: As the author already mentioned in the paper, one main concern is raised from the issue that the Graphcode, as a topological descriptor, is not invariant. It might also break the stability property of persistence modules. A GNN based on Graphcode might no longer be permutation invariant or equivalent. More discussion about such limitations in both theory and application will buy the paper more benefits.
paper_summary: paper_summary: This paper introduces graphcodes, biparametric persistence summaries that are empirically efficient to compute yet not topologically invariant. It also provides a dedicated C++ library for calculating graphcodes. Graphcodes are structured as layered graphs; each layer contains vertices representing points in persistence diagrams derived from "horizontal slices" of a bifiltration. Edges connecting these points are induced by the inclusion maps between homology groups across the vertical slices.  The authors propose the use of graphcodes as effective representations of data topology for graph neural networks, which facilitates the learning from topological features in datasets through deep learning approaches.  The performance of graphcodes is empirically tested and benchmarked against other (multi)persistent summaries across three distinct tasks: graph classification, shape classification, and binary classification of samples derived from various random point processes. While graphcodes demonstrate superior performance in shape and binary classification tasks, they do not outperform state-of-the-art methods in graph classification.
strength_weakness: strength_weakness: The main weakness of the paper is that the topological summary is not a topological invariant and depends on a choice of basis. This likely means that, in a real scenario, neural networks fed with graphcodes would require numerous examples to learn how to overcome this limitation. In a context where equivariance and invariance are becoming increasingly important in neural networks to avoid issues like this one, this may prevent graphcodes from being a suitable choice in deep learning pipelines. However, something similar occurs with graph eigenvector positional encodings, yet they are still used in state-of-the-art graph neural networks. The suitability of graphcodes may depend on how sensitive the performance of neural networks trained with graphcodes is to the choice of basis. Given that this conference is oriented towards machine learning, I believe that experiments assessing this sensitivity are crucial for the paper's acceptance.

Regarding the entire set of experiments, I feel the discussion on the graph classification problem is not fair. For instance, it is mentioned that the performance of their methods is affected by small training sets for GNN architectures, but for the proteins dataset, a GNN achieves an accuracy of 84.91%, which is significantly higher than the methods reported, according to PapersWithCode: https://paperswithcode.com/sota/graph-classification-on-proteins. Although it is a drawback that the results with graphcodes are inferior to their counterparts, I do not think this is a critical weakness, and I believe it is preferable to have a more critical discussion of the method. Similarly, I think that the comparison with other methods in graph classification is unfair because they do not report the accuracies of neural networks trained with the other summaries. Although you mention partial experimentation, it is not specified adequately how these experiments were conducted, how many parameters they used, etc., to dismiss the experiments and present results from other tables.

Regarding the text, it is unusual for me to work with half-open intervals [a, a). As stated in Figure 2, some cycles can be born at the same time they die. While it is useful for computations to have these bars, it is not standard to consider persistence diagrams with only some diagonal points. Even the notation is counterintuitive (what does an interval like this signify?). Perhaps it would be worth adding a comment about this fact. 

There is a typo in line 134 (bais -> basis).

I believe there is a typo in line 143: I think you meant to say that it "contains consistent bases for all chain vector spaces $Z_p(K_1)$, ..., $Z_p(K_n)$"; subcomplexes are not vector spaces.

Finally, regarding literature review, I feel like the Mapper paper [1], and [2] and [3] could be good additions to the section, The first one is used usually to generate graph representations of datasets that "preserves" topology and can also be used as inputs to graph neural networks. The second one analyzes expressivity of topology for graph learning (coincides very well with the topic). The third one is a topological layer based on persistent homology for graphs.

[1] Singh, Gurjeet, Facundo Mémoli, and Gunnar E. Carlsson. "Topological methods for the analysis of high dimensional data sets and 3d object recognition." PBG@ Eurographics 2 (2007): 091-100.
[2] Rieck, Bastian. "On the expressivity of persistent homology in graph learning." arXiv preprint arXiv:2302.09826 (2023).
[3] Horn, Max, et al. "Topological graph neural networks." arXiv preprint arXiv:2102.07835 (2021).

PS: Some basic experiments (really basic) on sensitivity and a slight modification of the discussion for graph classification being more critique would increase my score to weak accept. More critical experiments on sensitivity, or/and a good discussion about this section may likely make me to increase the score even higher.
questions: questions: - Vertices of the graph are given by persistence diagrams computed from "horizontal" slices, and edges from vertical morphisms. Does the construction depend on which parameter you select to be "horizontal" and which parameter you select to be "vertical"? 

- Can computations be parallelized? If so, what is the impact on the computation time? I saw that you compute the whole graph reducing one big matrix. However, it seems to me that parallelization, like reducing several matrices at a time, could be worth in this context.

- Could this be extended to $n$-parametric persistent homology? 

- Are there differentiability results for these computations? You compare your method with PersLay. One of the good points of PersLay is precisely that backpropagation can be computed using PersLay as in intermediate layer due to differentiability results of one-dimensional persistence barcodes. Can something be said about this?
limitations: limitations: Authors have addressed adequately the limitations of their paper through the text.

Comments: comment: Thank you answering the questions. I will keep my score.
Thank you for your response. I understand that it's hard to include additional experiments now, but I still believe that comparisons with random bases is necessary in revealing the stability of the proposed method. I have revised my score.
Regarding the first sentence: We are happy to include experiments with minimal lexicographic cycle and random bases in a final version. 

Regarding the second sentence: To establish a learning pipeline where in each iteration of the training process the bases of the graphcodes are randomly shuffled we need an efficient method of doing random basis changes without blowing up the graphs. This is still work in progress and is not part of this paper but it is an obvious way to deal with the basis dependence in future work.
> The minimal lexicographic cycle bases did not effect the results at all while the random bases did slightly worse. There are still problems with the random change of basis as it strongly increases the number of edges but there are many avenues for future research to improve the pipeline.

Is there any supporting evidence? Or is it considered as a limitation in this paper?
We do not claim that graphcodes are better compared to other topological descriptors on the TUDatasets. They outperform most of the other methods on some of the TUDatasets and they don't do well on others. If you look at this table you see that there is no method that outperforms all the other methods. But on all the datasets we considered, except the TUDatasets, graphcodes outperformed all the other methods in computation time and classification accuracy. Although these might not be "real world" datasets, given their more topological/geometric nature, it is still a strong proof of concept that graphcodes are very good at picking up the topology or geometry of datasets. Of course one can ask the broader question of how useful are topological methods on real world datasets in general? But as mentioned before topological data analysis is a young and developing field and it can take time for methods to be successfully applied in practice. It also took quite some time for neural networks to be successfully applied in practice.  

**Regarding question 4:** Theoretically there is a risk that the basis dependence can effect the robustness and consistency. But in practice they still perform well on the geometric datasets. We propose to deal with this dependence on representation by showing the neural network graphcodes with respect to different choices of basis for each instance to teach it to extract the relevant information independent of the basis. That such an approach can work is demonstrated, for example, in the lastest alphafold paper https://www.nature.com/articles/s41586-024-07487-w  where they got rid of the equivariance and invariance constraints of the previous version. We implemented options in our graphcode software package to compute an alternative basis based on minimal lexicographic cycles and an option to randomly change the basis. The minimal lexicographic cycle bases did not effect the results at all while the random bases did slightly worse. There are still problems with the random change of basis as it strongly increases the number of edges but there are many avenues for future research to improve the pipeline.
If there is no evidence that topological descriptors are particularly well suited for these datasets, what is making Graphcode better than compared methods?Besides, I cannot find a clear response to Question 4.
Thank you very much for your answers. I'm really glad that you performed experiments on the sensitivity of the method to different choices of basis. I would really love to see a brief discussion of this in the paper. That said, I'm not convinced by your first argument: I need data that corroborate your point. Although theoretically valid, I would need to see if networks are really able to extract information independent of the choice of basis. For example, experiments comparing accuracies with respect to the number of "augmented" representations with different bases would be really clarifying.

Regarding datasets, I'm not complaining about the results, but about how the discussion goes in the paper. I'm planning to raise my score, but I would need to see a more critical discussion. As you say, you are starting a new research topic! In particular, I'm talking about sentences like this line:

*Moreover, we believe that the performance of our pipeline relative to the other methods is worse on these datasets compared to the following experiments because the training sets are rather small, which is disadvantageous for our GNN architecture*.

Also, for improved transparency on the results, I would add some results for usual graph neural networks (non-topological), and discuss the differences among topological and non-topological methods. If you think that it is really the case that this will work with more examples better than other SOTA methods, then I would require you to do experiments with bigger datasets, like ogb-lsc: https://ogb.stanford.edu/docs/lsc/pcqm4mv2/

This said, I'm really excited about this avenue of multiparameter persistent homology and machine learning. I'm going to trust you will make the changes requested and I'll raise my score to 6. Also, please address the comments I made that were not reflected in your answer (e.g., the ones about the typos).

P.S.: Could you please include a reference for the theorem in the general rebuttal? I'm interested in that theorem and its formal formulation.
I would like to thank the authors for their response. I have read the responses and would like to stick to my score.