Duality in Persistent Homology of Images
Adélie Garin, Teresa Heiss, Kelly Maggs, Bea Bleile, Vanessa Robins
DDuality in Persistent Homology of Images
Adélie Garin
Laboratory for Topology and Neuroscience, EPFL, Lausanne, Switzerlandadelie.garin@epfl.ch
Teresa Heiss
IST Austria (Institute of Science and Technology Austria), Klosterneuburg, [email protected]
Kelly Maggs
Mathematical Sciences Institute, The Australian National University, Canberra, [email protected]
Bea Bleile
School of Science and Technology, University of New England, Armidale, [email protected]
Vanessa Robins
Research School of Physics, The Australian National University, Canberra, [email protected]
Abstract
We derive the relationship between the persistent homology barcodes of two dual filtered CWcomplexes. Applied to greyscale digital images, we obtain an algorithm to convert barcodes betweenthe two different (dual) topological models of pixel connectivity.
Mathematics of computing → Algebraic topology; Theory ofcomputation → Computational geometry; Computing methodologies → Image processing
Keywords and phrases
Computational Topology, Topological Data Analysis, Persistent Homology,Duality, Digital Topology
Funding
This project was initiated at the Second Workshop for Women in Computational Topologyhosted by the Mathematical Sciences Institute at ANU, Canberra, in July 2019. This workshop alsoreceived funding from AWM, NSF, and AMSI.
Adélie Garin : SNSF, CRSII5 177237
Teresa Heiss : ERC H2020, No. 788183
Vanessa Robins : ARC Future Fellowship FT140100604
Persistent homology [5, 16] is a stable topological invariant of a filtration, i.e., a nestedsequence of spaces X ⊆ X ⊆ ... ⊆ X n ordered by inclusion. The output is a barcode or diagram , Dgm k (see Figure 1d-e), a set consisting of pairs denoted by [ b, d ) k of birthand death indices of each k -th homology class (representing “holes” of dimension k ). A filtered complex is a pair ( X, f ) of a CW complex X and a cell-wise constant function f : X → R such that the sublevel sets of f are subcomplexes. We call two d -dimensionalfiltered complexes ( X, f ) and ( X ∗ , f ∗ ) dual if (i) each k -dimensional cell σ ∈ X correspondsto a ( d − k )-dimensional cell σ ∗ ∈ X ∗ , (ii) the adjacency relations σ ≤ τ of X are reversed τ ∗ ≤ σ ∗ in X ∗ and (iii) the filtration order is reversed f ∗ ( σ ∗ ) = − f ( σ ).This extended abstract summarises ongoing research that studies the relationship betweenthe persistent homology of two dual filtered complexes. Our results can be seen as versionsor extensions of Alexander duality [11]. We simultaneously generalise existing results forsimplicial or polyhedral complexes [7], which were confined by a number of restrictions a r X i v : . [ m a t h . A T ] M a y Duality in Persistent Homology of Images including to spheres (instead of general manifolds) [3, 6], specific functions [6], or standardhomology [3]. While our results are similar to those obtained in the study of extendedpersistence [2], our constructions and proofs differ significantly. We use a pair of dualcomplexes filtered by complementary functions, whereas [2] uses a single simplicial complexfiltered by sublevel and (relative) superlevel sets. Moreover, our results extend to the case ofabstract chain complexes derived from discrete Morse theory [9, 12] and refine, for example,the dual V-paths and discrete Morse functions foreshadowed in [1]. Ultimately this enablesus to adapt the image skeletonization and partitioning methods of [4] to a dual version. (a) (b) (c)
528 193 647 528 193 6471 2 3 4 5 6 7 8 9 (d) (e) [1 , ∞ ) [2 , [3 , [4 , [8 , [1 , ∞ ) [4 , Figure 1 (a) The greyscale pixel values of an image represented as an array; (b) and (d) theV-constructed filtered cubical complex (where the pixels are vertices) and its barcode; (c) and (e)the T-constructed filtered cubical complex (where the pixels are the 2-cells) and its barcode.
Dgm consists of the blue bars (representing connected components) and Dgm of the green bars (loops). The first application of our results is to digital image analysis. Images are represented asrectangular arrays of numbers and their topological structure is best captured by a filteredcell complex. Here we focus on two cubical complexes that we refer to as the
T-construction and
V-construction , see Figure 1. The T-construction [10] treats pixels as top dimensionalcells (squares in 2D, cubes in 3D) while the V-construction [14] considers pixels as vertices .In both cases, the function values from the original array are extended to all cells of thecubical complex to obtain the filtered complexes I T and I V respectively. Note that theT-construction corresponds to the indirect adjacency (or closed topology) of classical digitaltopology and the V-construction to the direct adjacency (or open topology). We presenta relationship between the barcodes of I T and I V below. Previous work in [8] obtainssimilar results for digital images using extended persistent homology [2]. That approach is délie Garin, Teresa Heiss, Kelly Maggs, Bea Bleile, Vanessa Robins 3 different as it defines a single simplicial complex which is compatible with the piecewise linearfoundations of extended persistence. Our Theorem 3.1 shows how to compute the barcodeof the T-construction using software designed for the V-construction and vice-versa. Thus,the most suitable software can be chosen independently of construction types. Furthermore,computing higher-dimensional persistent homology barcodes (e.g. Dgm in 3D images) maybe optimised by using lower-dimensional ones of the complementary construction ( Dgm ). Let (
X, f ) and ( X ∗ , f ∗ ) be dual d -dimensional filtered CW complexes. Dual face relationslead to relationships at the filtered chain complex level , and we show the existence of a shiftedfiltered chain isomorphism between the absolute filtered cochain complex of ( X, f ) and therelative filtered chain complex of ( X ∗ , f ∗ ). This induces a natural isomorphism between theabsolute persistent cohomology of ( X, f ) and the relative persistent homology of ( X ∗ , f ∗ ).Relying on the work of [15], we ultimately extend these results to a bijection between theabsolute persistent homology barcodes of ( X, f ) and ( X ∗ , f ∗ ). (cid:73) Theorem 2.1.
Let ( X, f ) and ( X ∗ , f ∗ ) be dual d -dimensional filtered complexes. There isa bijection between the absolute persistent homology barcode of ( X, f ) and ( X ∗ , f ∗ ) , given by: [ p, q ) ∈ Dgm k ( X, f ) ←→ [ − q, − p ) ∈ Dgm d − k − ( X ∗ , f ∗ )[ p, ∞ ) ∈ Dgm k ( X, f ) ←→ [ − p, ∞ ) ∈ Dgm d − k ( X ∗ , f ∗ ) . Applying Theorem 2.1 requires dual filtered complexes, but the T- and V-constructions forimages are dual only within the interior of the image domain. To accommodate this problemand obtain properly dual complexes, we glue a top-dimensional cell to the boundary of theT-construction. The dual complex is then the V-construction with a cone over its boundary.
Figure 2
The blue grid is a cubical complex built from a 2 by 2 array using the T-construction.Gluing a 2-cell to its boundary results in a sphere whose dual is drawn in orange. The orangecomplex is the V-construction with a cone over the boundary.
To implement this construction we add a single layer of pixels with value ∞ around theboundary of the image array and take the one-point compactification of this padded domain. Duality in Persistent Homology of Images
Let I be the original image array and I ∞ the padded image. Then Dgm k ( I T ) = Dgm k ( I ∞ T )and Dgm k ( I V ) = Dgm k ( I ∞ V ). Also note that the one-point compactifications of I ∞ T and( − I ∞ ) V are dual filtered complexes. With a few more accounting steps, we obtain (cid:73) Theorem 3.1.
Let I be a d -dimensional digital image. There are bijections between thebarcodes of I T and ( − I ∞ ) V and the barcodes of I V and ( − I ∞ ) T given by: [ p, q ) ∈ Dgm k ( I V ) ←→ [ − q, − p ) ∈ (cid:93) Dgm d − k − (( − I ∞ ) T )[ p, q ) ∈ Dgm k ( I T ) ←→ [ − q, − p ) ∈ (cid:93) Dgm d − k − (( − I ∞ ) V ) where (cid:93) Dgm denotes the reduced homology, that is, the -dimensional bar [ −∞ , ∞ ) is removed. Figure 3 (( − I ∞ ) T ) and Figure 1d ( I V ) illustrate the first bijection of the theorem. - ∞ -9 -8 -7 -6 -5 -4 -3 -2 -1[ −∞ , ∞ ) [ − , − [ −∞ , − [ − , − [ − , − [ − , − Figure 3
We add a layer of pixels to the image of Figure 1a, consider the negative filtration withthe T-construction (we obtain the filtered complex ( − I ∞ ) T ), and compute its barcode; c.f. Fig.1d. References Ulrich Bauer.
Persistence in discrete Morse theory . PhD thesis, Goettingen University, 2011. David Cohen-Steiner, Herbert Edelsbrunner, and John Harer. Extending persistence usingPoincaré and Lefschetz duality.
Foundations of Computational Mathematics , 9:79–103, 022009. Cecil Jose A. Delfinado and Herbert Edelsbrunner. An incremental algorithm for betti numbersof simplicial complexes on the 3-sphere.
Computer Aided Geometric Design , 12(7):771–784,1995. Olaf Delgado-Friedrichs, Vanessa Robins, and Adrian Sheppard. Skeletonization and partition-ing of digital images using discrete Morse theory.
IEEE transactions on pattern analysis andmachine intelligence , 37(3):654–666, 2015. Herbert Edelsbrunner and John Harer. Persistent homology, a survey.
Discrete & Computa-tional Geometry - DCG , 453, 01 2008. Herbert Edelsbrunner and Michael Kerber. Alexander duality for functions: the persistentbehavior of land and water and shore. In
Proceedings of the twenty-eighth annual symposiumon Computational geometry , pages 249–258, 2012. Herbert Edelsbrunner and Katharina Ölsböck. Tri-partitions and bases of an ordered complex.
Discrete & Computational Geometry , pages 1–17, 2020. Herbert Edelsbrunner and Olga Symonova. The adaptive topology of a digital image. In
Proceedings of the 2012 9th International Symposium on Voronoi Diagrams in Science andEngineering, ISVD 2012 , pages 41–48. IEEE, 06 2012. Robin Forman. Morse theory for cell complexes.
Advances in Mathematics , 134(1):90 – 145,1998. Teresa Heiss and Hubert Wagner. Streaming algorithm for Euler characteristic curves ofmultidimensional images. In
International Conference on Computer Analysis of Images andPatterns , pages 397–409. Springer, 2017. délie Garin, Teresa Heiss, Kelly Maggs, Bea Bleile, Vanessa Robins 5 James R. Munkres.
Elements of algebraic topology . Addison-Wesley Publishing Company,Menlo Park, CA, 1984. Vidit Nanda.
Discrete Morse theory for filtrations . PhD thesis, Rutgers University-GraduateSchool-New Brunswick, 2012. Vidit Nanda, Dai Tamaki, and Kohei Tanaka. Discrete Morse theory and classifying spaces.
Advances in Mathematics , 340:723 – 790, 2018. Vanessa Robins, Peter Wood, and Adrian P Sheppard. Theory and algorithms for constructingdiscrete Morse complexes from grayscale digital images.
IEEE transactions on pattern analysisand machine intelligence , 33, 05 2011. Vin Silva, Dmitriy Morozov, and Mikael Vejdemo-Johansson. Dualities in persistent(co)homology.
Inverse Problems - INVERSE PROBL , 27, 07 2011. Afra Zomorodian and Gunnar Carlsson. Computing persistent homology.
Discrete & Compu-tational Geometry , 33(2):249–274, Feb 2005.
Duality in Persistent Homology of Images
This appendix provides additional results on discrete Morse theory, a proof sketch forTheorem 2.1, an example illustrating Theorem 2.1 and a proof for Theorem 3.1.For the reader familiar with discrete Morse theory [9, 13], we describe explicitly the dualrelations between V-paths in X and V-paths in X ∗ , which allow us to construct a dualfiltered discrete gradient field on X ∗ using a given one on X . Our discrete Morse theoryresults are summarized in the table below. CW complex X Dual CW complex X ∗ Cell σ ( k ) σ ∗ ( d − k ) FiltrationFiltration f : X −→ R σ f ( σ ) f ∗ : X ∗ −→ R σ ∗
7→ − f ( σ ) Filtered vector field V = { ( τ ( k ) λ (cid:67) σ ( k +1) λ ) } λ V ∗ = { ( σ ∗ ( d − k − λ (cid:67) τ ∗ ( d − k ) λ ) } λ V-path ( τ (cid:67) σ (cid:66) τ (cid:67) . . . (cid:66) τ n (cid:67) σ n ) ( σ ∗ n (cid:67) τ ∗ n (cid:66) σ ∗ n − (cid:67) . . . (cid:66) σ ∗ (cid:67) τ ∗ ) Critical cells α , α , . . . α n α ∗ n , α ∗ n − , . . . α ∗ Proof Sketch of Theorem 2.1.
The proof of Theorem 2.1 relies on (1) explicitly showingthe chain isomorphism and (2) using the results of [15] in combination with ours to obtainthe bijection.For (1), we show that
Hom ( C • , Z ) ∼ = ( D n , D n −• ), where C is the filtered chain complexof ( X, f ) and D the one of ( X ∗ , f ∗ ). Intuitively, the fact that the boundary maps commutewith the isomorphisms comes from the following observation: The coboundary map mapsevery cell σ to the collection of cofacets of σ that have already appeared in the filtration.The relative boundary map maps every cell σ ∗ to the collection of facets of σ ∗ that have notbeen mod out yet. These two collections are dual to each other.For (2), we compose the following bijections: absolute persistent homology Prop. 2.3 in [15] ←−−−−−−−−−→ absolute persistent cohomology shifted chain isomorphism (1) ←−−−−−−−−−−−−−−−−−→ relative persistent homology of thedual
Prop. 2.4 in [15] ←−−−−−−−−−→ absolute persistent homology of the dual. (cid:74)
To illustrate our results, we show an example on a pair of dual CW decompositions of asphere. To simplify the example, we use discrete Morse theory to reduce the filtered chaincomplexes by keeping only the critical cells. The discrete gradient vector fields are indicatedby arrows. délie Garin, Teresa Heiss, Kelly Maggs, Bea Bleile, Vanessa Robins 7 (cid:73)
Example 4.1.
We show an example of the duality results. We start with a CW complex X with a function f defined on the vertices and its dual X ∗ with the function f ∗ definedon the top-dimensional cells (Figure 4). We can extend the values of f to all the cells byassigning a cell the maximum value of its vertices. The dual function f ∗ is defined on thetop-dimensional cells of X ∗ by: f ∗ ( σ ∗ ) = − f ( σ ). To extend them to the full complex X ∗ ,we assign to a cell the minimum of its cofaces. Note that this corresponds to defining f ∗ by f ∗ ( σ ∗ ) = − f ( σ ) on all the cells directly. We then show an example of a filtered vector field V compatible with the filtration f (Figure 5) and the corresponding dual vector field V ∗ ,compatible with f ∗ (Figure 6). Both of their sets of critical cells are illustrated in Figure 7and Figure 8. We then describe the absolute filtered cochain complex of X and the relativefiltered chain complex of X ∗ in parallel to illustrate the results of the isomorphism that leadsto Theorem 2.1. Finally, we compute the barcodes of the absolute persistent homology ofboth, showing an example of Theorem 2.1. X X ∗
71 325 86 4 − − − − − − − − Figure 4
On the left, a CW decomposition of a sphere X with a function f defined on thevertices. We do not represent the 2-cells for visibility reasons (they are the faces of the cube). Onthe right, the dual complex X ∗ . We only represent the values of f ∗ on the top-dimensional cells(faces), to avoid confusion. In red, we show the values of the 2-cells that are in the front, and inblue the 2-cells in the back. Figure 5 shows the filtration on X of Figure 4, along with a filtered vector field V . Thecorresponding dual filtration on X ∗ , along with the dual filtered vector field V ∗ , is shown onFigure 6. Figure 5
A filtration of CW decomposition of a sphere X and a filtered vector field V . -8 -7 -6 -5 -4 -3 -2 -1 Figure 6
The dual filtration f ∗ of the dual complex X ∗ and the dual filtered vector field V ∗ . Duality in Persistent Homology of Images
The critical cells of V and V ∗ are in bijection and they appear in reversed order. Figure 7and 8 show the critical cells of X and X ∗ , that is, the cells that are not paired by the vectorfields. a (0) b (1) c (2) d (2) Figure 7
A filtered vector field on X respecting the filtration of Figure 5 and thecorresponding critical cells (the highlightedtop left vertex ( a (0) ) and bottom left edge( b (1) ) and two faces (left hand side: c (2) andbottom: d (2) ). The critical cells of V are (in order ofappearance): Crit ( V ) = { a (0) , b (1) , c (2) , d (2) } . a ∗ (2) b ∗ (1) c ∗ (0) d ∗ (0) Figure 8
The dual complex of Figure 7,with the dual critical cells induced by thedual vector field V ∗ ( a ∗ (2) the top 2-cell, b ∗ (1) the bottom edge, c ∗ (0) the left vertexand d ∗ (0) the bottom vertex). The critical cells of V ∗ are (in order ofappearance):Crit( V ∗ ) = { d ∗ (0) , c ∗ (0) , b ∗ (1) , a ∗ (2) } . délie Garin, Teresa Heiss, Kelly Maggs, Bea Bleile, Vanessa Robins 9 We now build the Morse filtered chain complexes of X and X ∗ . To illustrate the filteredchain isomorphism between the absolute cochains of ( X, f ) and the relative chains of ( X ∗ , f ∗ ),we build the respective filtered complexes.The cochains of the correspondingMorse filtered chain complex of X Z [ˆ a ]0 Z [ˆ b ] Z [ˆ a ] Z [ˆ c ] Z [ˆ b ] Z [ˆ a ] Z [ˆ c, ˆ d ] Z [ˆ b ] Z [ˆ a ] (cid:0) (cid:1)(cid:0) (cid:1) (cid:0) (cid:1)(cid:18) (cid:19) (cid:0) (cid:1) The relative chains of the correspond-ing Morse filtered chain complex of X ∗ Z [ a ∗ ] Z [ b ∗ ] Z [ c ∗ , d ∗ ] Z [ a ∗ ] Z [ b ∗ ] Z [ c ∗ ] Z [ a ∗ ] Z [ b ∗ ] 0 Z [ a ∗ ] 00 0 0 (cid:0) (cid:1) (cid:18) (cid:19)(cid:0) (cid:1) (cid:0) (cid:1)(cid:0) (cid:1) Applying the homology functor to theprevious chain complex, one gets theabsolute persistent cohomology moduleof X :0 0 00 0 Z [ˆ a ]0 Z [ˆ b ] Z [ˆ a ]0 0 Z [ˆ a ] Z [ˆ c + ˆ d ] 0 Z [ˆ a ] Applying the homology functor to theprevious chain complex, one gets therelative persistent homology module of X ∗ : Z [ a ∗ ] 0 Z [ c ∗ + d ∗ ] Z [ a ∗ ] 0 0 Z [ a ∗ ] Z [ b ∗ ] 0 Z [ a ∗ ] 0 00 0 0The corresponding persistence pairs are:( a (0) , ∞ ) , ( b (1) , c (2) ) , ( d (2) , ∞ ) . And the absolute persistent cohomologybarcode with the f -values:[1 , ∞ ) , [6 , , [8 , ∞ ) . The corresponding persistence pairs are:( −∞ , d ∗ (0) ) , ( c ∗ (0) , b ∗ (1) ) , ( −∞ , a ∗ (2) ) . And the relative persistent homology bar-code with the f ∗ -values:[ −∞ , − , [ − , − , [ −∞ , − . Applying the bijections of [15], we obtain the absolute persistent homology barcodes of(
X, f ) and ( X ∗ , f ∗ ): Dgm ( X, f ) = { [1 , ∞ ) , [6 , , [8 , ∞ ) } Dgm ( X ∗ , f ∗ ) = { [ − , ∞ ) , [ − , − , [ − , ∞ ) } , illustrating the results of Theorem 2.1. Proof of Theorem 3.1.
To prove the first of the two statements in Theorem 3.1 for a d -dimensional image I , we apply Theorem 2.1 to the following two dual filtered complexes: theone-point compactifications of I ∞ V and of ( − I ∞ ) T , denoted by C ( I ∞ V ) and C (( − I ∞ ) T ). Wethen need to modify the persistence diagrams to reverse the effect of one-point compactifyingboth filtered complexes.In order to avoid dealing with infinite values, instead of adding a layer of pixels withvalue ∞ , we add a layer of pixels with value N (with N larger than the maximal pixel value).We denote the padded image by I N . The dual complexes are then: C ( I NV ) and C (( − I N ) T ).Compactifying I NV adds a persistence pair [ N, ∞ ) d in dimension d to the barcode. Com-pactifying ( − I N ) T replaces the ( d − − N, − p ) d − by the d -dimensional persistence pair [ − p , ∞ ) d .We observe that Dgm k ( I V ) has one 0-dimensional persistence pair [ p , ∞ ) and the restof the persistence pairs have the form [ p, q ) k with p and q finite. Altogether, we get thefollowing recipe of how to move between the persistence pairs of the different spaces (denotingthe dimension of a persistence pair by an index) Dgm ( I V ) = Dgm ( I NV ) Dgm ( C ( I NV )) Dgm ( C (( − I N ) T )) Dgm (( − I N ) T ) (cid:93) Dgm (( − I N ) T )[ p, q ) k [ p, q ) k [ − q, − p ) d − k − [ − q, − p ) d − k − [ − q, − p ) d − k − [ p , ∞ ) [ p , ∞ ) [ − p , ∞ ) d [ − N, − p ) d − [ − N, − p ) d − − [ N, ∞ ) d [ − N, ∞ ) [ − N, ∞ ) When we denote N by ∞ , as in Theorem 3.1, we see that both cases follow the same rule:namely the one stated in Theorem 3.1. The second statement of Theorem 3.1 can be provedanalogously., as in Theorem 3.1, we see that both cases follow the same rule:namely the one stated in Theorem 3.1. The second statement of Theorem 3.1 can be provedanalogously.