aa r X i v : . [ c s . C G ] J a n Notes on pivot pairings
Barbara Giunti
Institute of Geometry, TU [email protected]
Abstract
We present a row reduction algorithm to compute the barcode decomposition ofpersistence modules. This algorithm dualises the standard persistence one and clarifiesthe symmetry between clear and compress optimisations.
Introduction
Persistent homology is a tool of Topological Data Analysis (TDA) whose applicationsrange widely from biology to urban planning to neuroscience (see [15] for an extended listof applications). Persistent homology summarises a dataset’s information in the form ofbarcode [6, 14], whose efficient computation is then crucial to TDA.We provide a new algorithm (Algorithm 1) for the barcode decomposition based onrow pivot pairing, which is the dual of the column pivot pairing presented in [10, 13]. Thealgorithm reduces the boundary matrix of a given filtered simplicial complex proceedingby rows and performing row additions, allowing the full exploitation of the compressoptimisation [3, 9].A non-exhaustive list of algorithms to decompose persistence modules into intervalmodules includes the so-called standard algorithm [13], the chunk algorithm [3], the twistalgorithm [9], the pHrow algorithm [12], and Ripser [2]. The implementation of the firstfour can be found in [4] (cfr. [5]), and that of Ripser in [1]. All of them take as inputa filtered simplicial complex and employ column operations. In addition to these algo-rithms, in [7] it is shown that the barcode decomposition can also be achieved via thedecomposition of filtered chain complexes, whose reduction is performed by row opera-tions. However, the reduction in [7] is different from the standard one, which is the focusof this work, and thus we will not study it further.As we mention, the idea of proceeding by row is not new. Nevertheless, to the bestof our knowledge, the idea of row pivot pairing is original, albeit straightforward, andit clarifies the duality between clear and compress optimisations in the computation ofpersistent homology and cohomology. In [2, 12], it is shown that the column reduction,coupled with the clear optimisation and applied to the coboundary matrix, provides asignificant speed-up in the computation of the barcode. This improvement is not mirroredwhen the same reduction is coupled with the compress optimisation and applied to theboundary matrix. Here, we show that the reason for this asymmetry is that the secondprocedure is not the true dual of the first one: to obtain the dual, and thus the samenumber of operations, it is necessary to reduce the boundary matrix via row operationsinstead of via column operations. 1
Preliminaries
Throughout the work, the symbol K = { σ , . . . , σ m } denote a simplicial complex of di-mension d , such that for each i ≤ m , K i := { σ , . . . , σ i } is again a simplicial complex. Thechain ∅ = K ⊂ K ⊂ · · · ⊂ K m = K is called a filtration of K .Given a simplex σ of dimension h , its boundary is the set of the faces of σ in dimension h −
1. If h = 0, the boundary is empty. Otherwise, it consists of exactly h + 1 simplices.The boundary matrix ∂ of K is a ( m × m )-matrix with coefficients in F where the j -thcolumn represents the boundary of σ j , i.e. ∂ [ i, j ] = 1 if and only if σ i is in the boundaryof σ j . Note that, since σ i is in the complex before σ j is added, ∂ is an upper-triangularmatrix.For 0 ≤ i ≤ m and 0 ≤ p ≤ d , we denote the p -th homology of K i over the field F by H p ( K i ). The inclusions K i ֒ → K j , for all i ≤ j , induce maps on the homology vectorspaces H p ( K i ) → H p ( K j ) for all 0 ≤ p ≤ d . This collection of vector spaces and mapsforms a diagram usually called a persistence module (fig. 1(a)) [8].( a ) 0 V V · · · V m − V m ( b ) 0 F F · · · F ··· a a +1 ··· b b +1 Figure 1: (a) a persistence module; (b) an interval module with interval [ a, b ].Since we consider only simplicial complexes with finitely many simplices, the vectorsspaces are finite-dimensional. In this case, a persistence module admits a nice decom-position into interval modules, which consist of copies of F connected by the identitymorphism for the indices inside an interval, and zero otherwise (fig. 1(b)) [11]. The collec-tion of intervals in the decomposition of a persistence module is called a barcode [6, 14],and it is an invariant of isomorphism type. In [13], the standard algorithm to retrieve thebarcodes of a filtered simplicial complex K is described. Such an algorithm is based on(column) pivot pairing. As shown in [13], the (column) pivot pairing in a reduced boundary matrix ∂ providesthe lifespan intervals of the homological features of a persistence module. Usually, thereduction is performed using only one type of elementary column operation: adding amultiple of one column to a later column. Here, we prove that also a reduction performedusing only one type of elementary row operation, namely adding a multiple of one rowto a previous row, achieves the same pairing. The reason why other types of elementaryrow (column) operations are not allowed is that they do not preserve the order of thegenerators, and thus cannot maintain the pairing.Let K be a filtered simplicial complex, as described in Section 1, with boundary matrix ∂ . For the i -th row of ∂ , let lef t ( i ) denote the column index of the leftmost element ofsuch row. If row i is zero, set lef t ( i ) = 0. Definition 2.1.
A matrix R is called row reduced if lef t ( i ) = lef t ( i ′ ) for all non-zerorows i = i ′ . The element R [ i, j ] is called a row pivot (of R ) if j = lef t ( i ).We recall the some standard notions from [13]. The symbol low ( j ) denotes the indexrow of the lowest element of column j . If column j is trivial, then low ( j ) = 0.2 efinition 2.2. A matrix C is called column reduced if low ( j ) = low ( j ′ ) for all non-zero columns j = j ′ . The element C [ i, j ] is called a column pivot (of C ) if j = low ( i ).Algorithm 1, called row pivot reduction , takes as input the boundary matrix ∂ ofa filtered simplicial complex X and reduces it by row operations. This algorithm is oneof the possible methods to achieve a row reduced matrix. Indeed, there are several, non-isomorphic row reduced matrices, all obtained by the same boundary matrix ∂ and all withthe same row pivots because a row reduced matrix can have several non zero elements tothe right of each row pivot.Let m be the number of rows of ∂ . Algorithm 1:
Row pivot reduction I: Boundary matrix ∂ O: Row reduced boundary matrix ∂R = ∂ for i = m, . . . , doif lef t ( i ) = 0 thenwhile there exists i ′ > i with lef t ( i ′ ) = lef t ( i ) do add row i ′ to row i In matrix notation, Algorithm 1 computes the reduced matrix as R = W · ∂ , where W is an invertible upper-triangular matrix with F -coefficients.For a matrix D , consider the following value: r D ( i, j ) := rk D ji − rk D ji +1 + rk D j − i +1 − rk D j − i where D ji is the lower left submatrix of D , given by all the rows of D with index h ≥ i and all the columns with index l ≤ j . The Pairing Lemma [13] states that, for a columnreduced matrix C of a boundary matrix ∂ , i = low ( j ) in C if and only if r ∂ ( i, j ) = 1. Itis straightforward, however never mentioned in the literature as far as we know, that ananalogous result holds for row reduced matrices: Lemma 2.3 (Row pairing lemma) . Let ∂ be a boundary matrix and R a row reducedmatrix of ∂ . Then j = lef t ( i ) in R if and only if r ∂ ( i, j ) = 1.The proof is precisely the same of the Pairing Lemma [13] since the technique usedrelies on the lower left submatrices. Moreover, from the Pairing Lemma and Lemma 2.3, j = lef t ( i ) in a row reduced matrix R of ∂ if and only if i = low ( j ) in a column reducedmatrix C of ∂ . In particular, if j = lef t ( i ) or i = low ( j ), the indices ( i, j ) form a persistence pair . Remark 2.4.
Since the coboundary matrix is the anti-transpose of the boundary one (i.e.an element in position ( i, j ) is sent to position ( m + 1 − j, m + 1 − i )), Algorithm 1 performsthe standard column reduction on the coboundary matrix. Indeed, for a reduced matrix R , j = lef t ( i ) if and only if i = low ( j ) in its anti-transpose R − T . Thus, Lemma 2.3provides an alternative proof of the correctness of the standard persistence algorithm incohomology, result originally showed in [12].The running time of Algorithm 1 is at most cubic in the number of simplices, as it isfor the standard persistence algorithm. We now refine this estimate a little. Computational costs of the reduction.
In [13], it is shown that the running time of theinner (i.e. while) loop in the standard persistence algorithm for the column j , representing3 h -simplex σ j and whose pivot is in row i , is ( h + 1)( j − i ) . If σ j is positive, i.e. at theend of the reduction column j is trivial, then the cost is higher: ( h + 1)( j − . Whenreducing the coboundary matrix via column operations, as in [2, 12], the running timebecomes c ( j − , where c is the number of cofaces of the simplex σ j , and the cost ofreducing a positive column is c ( j − . When reducing the boundary matrix via rowoperations, as in Algorithm 1, the running time of the inner loop in Algorithm 1 for therow i , representing a simplex σ i and whose pivot is in column j , is c ( j − i ) . Note that,if σ i is negative, i.e. row i becomes zero at the end of the reduction, then the cost is c ( m − j ) , where m is the number of rows. Thus, using row operations, the negative rowsare the more expensive to reduce, dually to what happens when reducing by columns. We now recall two standard runtime optimisations from [3, 9], and show their dualityusing row and column reductions. Similar observations can be found in [7].A simplex in X is called positive if it causes the birth of a homological class, and negative if it causes the death of a homological class. By extension, columns and rows in ∂ are called positive (resp. negative) if the corresponding simplices are positive (negative). Clear.
The clear optimisation is based on the fact that if a row of index j is pos-itive, the j -th column of ∂ cannot be negative. As was already observed in [3, 9], thisoptimisation is particularly effective when performed on the boundary matrices in decreas-ing degrees, or, as shown in [2], when applied to the coboundary matrices in increasingdegrees. Since the clear avoids reducing columns that are already known not to containpivots, it is quite helpful in the persistent algorithms up-to-date. However, it is not souseful when reducing by rows, since it shrinks by one the length of each row, but does notavoid any reduction. Compress.
The compress optimisation hinges on the fact that if a column of index i is negative, the i -th row of ∂ cannot be positive. From Section 2, it follows the real advan-tages of the compress optimisation are obtained when the matrix reduction is performedusing row operations since it avoids a costly loop whose results is already known, whileit is quite inefficient when applied using column operations because it only shortens thecolumns by one element. Performed using the row reduction, the compress is particularlyeffective when applied to the boundary matrices in increasing degrees.Finally, we recall that, as shown in [7], the number of iterations necessary to reducethe boundary matrix of an acyclic complex proceeding by row and using the compressoptimisation is the same as the number of iterations needed to reduce the coboundarymatrix when running on the columns and exploiting the clear optimisation (computed in[2]). Acknowledgments.
The author was mainly supported by FAR2019-UniMORE. Theauthor thanks H˚avard B. Bjerkevik, Wojciech Chach´olski, and Claudia Landi for usefuldiscussions and feedback.
References [1] Ulrich Bauer.
Ripser: a lean C++ code for the computation of Vietoris–Rips persistence barcodes .https://ripser.org, 2015-2020.
2] Ulrich Bauer. Ripser: efficient computation of vietoris-rips persistence barcodes, 2019. arXiv:1908.02518 .[3] Ulrich Bauer, Michael Kerber, and Jan Reininghaus. Clear and compress: Computing persistenthomology in chunks.
Mathematics and Visualization , 03 2013.[4] Ulrich Bauer, Michael Kerber, Jan Reininghaus, and Hubert Wagner.
PHAT - Persistent HomologyAlgorithms Toolbox . https://bitbucket.org/phat-code/phat/src/master/.[5] Ulrich Bauer, Michael Kerber, Jan Reininghaus, and Hubert Wagner. Phat—persistent homologyalgorithms toolbox.
J. Symbolic Comput. , 78:76–90, 2017.[6] Gunnar Carlsson, Afra Zomorodian, Anne Collins, and Leonidas Guibas. Persistence Barcodes forShapes. In Roberto Scopigno and Denis Zorin, editors,
Symposium on Geometry Processing . TheEurographics Association, 2004.[7] Wojciech Chach´olski, Barbara Giunti, Alvin Jin, and Claudia Landi. Algorithmic decomposition offiltered chain complexes, 2020. arXiv:2012.01033 .[8] Fr´ed´eric Chazal, Vin de Silva, Marc Glisse, and Steve Oudot.
The structure and stability of persistencemodules . SpringerBriefs in Mathematics. Springer, [Cham], 2016.[9] Chao Chen and Michael Kerber. Persistent homology computation with a twist. In
Proceedings 27thEuropean Workshop on Computational Geometry , 2011.[10] David Cohen-Steiner, Herbert Edelsbrunner, and Dmitriy Morozov. Vines and vineyards by updatingpersistence in linear time. In
Computational geometry (SCG’06) , pages 119–126. ACM, New York,2006.[11] William Crawley-Boevey. Decomposition of pointwise finite-dimensional persistence modules.
J.Algebra Appl. , 14(5):1550066, 8, 2015.[12] Vin de Silva, Dmitriy Morozov, and Mikael Vejdemo-Johansson. Dualities in persistent (co)homology.
Inverse Problems , 27(12):124003, 17, 2011.[13] Herbert Edelsbrunner and John L. Harer.
Computational topology . American Mathematical Society,Providence, RI, 2010. An introduction.[14] Robert Ghrist. Barcodes: the persistent topology of data.
Bull. Amer. Math. Soc. (N.S.) , 45(1):61–75,2008.[15] Database of real-world applications of TDA. . 2020.. 2020.