Topologically faithful image segmentation via induced matching of persistence barcodes
Authors: Nico Stucki
Johannes C. Paetzold
Suprosanna Shit
bjoern menze
Ulrich Bauer
Venue: Submitted to ICLR 2023 (2023)
Keywords: Topology
Segmentation
Machine Learning

Abstract: Image segmentation is a largely researched field where neural networks find vast applications in many facets of technology.
Some of the most popular approaches to train segmentation networks employ loss functions optimizing pixel-overlap, an objective that is 
insufficient for many segmentation tasks. In recent years, their limitations fueled a growing interest in topology-aware methods, which aim to recover the correct topology of the segmented structures. However, so far, none of the existing approaches achieve a spatially correct matching between the topological features (persistence barcodes) of label (ground truth) and prediction (output of the neural network). 

In this work, we propose the first topologically and feature-wise accurate metric and loss function for supervised image segmentation, which we term TopoMatch. We show how induced matchings guarantee the spatially correct matching between barcodes in a segmentation setting. Furthermore, we propose an efficient algorithm to compute TopoMatch for images. We show that TopoMatch is an interpretable metric to evaluate the topological correctness of segmentations. Moreover, we demonstrate how induced matchings can be used to train segmentation networks and improve the topological correctness of the segmentations across all 6 baseline datasets while preserving volumetric segmentation performance. 

Under review as a conference paper at ICLR 2023
TOPOLOGICALLY FAITHFUL IMAGE SEGMENTATION VIA INDUCED MATCHING OF PERSISTENCE BARCODES
Anonymous authors Paper under double-blind review
ABSTRACT
Image segmentation is largely researched field where neural networks find vast applications in many facets technology. Some the most popular approaches to train segmentation networks employ loss functions optimizing pixel-overlap, an objective that insufficient for many segmentation tasks. In recent years, their limitations fueled a growing interest in topology aware methods, which aim to recover the correct topology of the segmented structures. However, so far, none of the existing approaches achieve spatially correct matching between the topological features of ground truth and prediction.
In this work, we propose the first topologically and feature-wise accurate metric and loss function for supervised image segmentation, which we term TopoMatch. We show how induced matchings guarantee the spatially correct matching be- tween barcodes algorithm to compute Topo for images. We show that TopoMatch is an in- terpretable metric to evaluate the topological correctness of segmentations, which is more sensitive than the well-established Betti number error. Moreover, the dif- ferentiability of the TopoMatch loss enables its use as loss function. It improves the topological performance of segmentation networks across six diverse datasets while preserving the volumetric performance.
segmentation setting. Furthermore, we propose an efficient
INTRODUCTION
Topology studies properties of shapes that are related to their connectivity and that remain un- changed under deformations, translations, and twisting. Some topological concepts, such as cu- bical complexes, homology and Betti numbers, form interpretable descriptions of shapes in space that can be efficiently computed. Naturally, the topology of physical structures is highly relevant in machine learning tasks, where the preservation of its connectivity is crucial, prominent example being image segmentation. Recently, a number of methods have been proposed to improve topology preservation in image segmentation for wide range of applications. However, none of the existing concepts take the spatial location of the topological features (e.g. connected components or cycles) within their respective image into account. Evidently, spatial correspondence of these features is
critical property of segmentations, see Fig.
Image
Label
Prediction
Label
Prediction
Label
Prediction
CREMI Dataset
TopoMatch
Wasserstein Matching
Figure 1: Motivation comparison of our TopoMatch and Wasserstein matching (Hu et al. (0119) We match cycles between label and prediction for CREMI image and denote matched pairs in the same color. We visualize only six (randomly selected out of the total 23 matches for both methods) matched pairs for presentation clarity. Note that TopoMatch always matches spatially correctly while the Wasserstein matching gets most matches wrong.
Our contribution In this work, we introduce a rigorous framework for faithfully quantifying the preservation of topological properties in the context of image segmentation, Fig. 2 Our method

---

builds on the concept of induced matchings between persistence barcodes from algebraic topology, introduced by Bauer& & Lesnick (2015). The introduction of these matching to a machine learning setting allows to precisely formulate spatial correspondences between topological features of two grayscale images. We achieve this by embedding both images into a common comparison image. efficient, differentiable solution for localized Under review as a conference paper at ICLR 2023
Put in simple terms, our central contribution topological error finding, which serves as:
a topoloicall loss to train segmentation networks, which guarantees to correctly, in a spatial sense, emphasize and penalize the topological structures during training (see Sec
interpretable topological quality metric for image segmentation, which is not only sensitive to the number of topological features but also to their location within the respec- tive images (see Sec. 3.3
Experimentally, our TopoMatch construction proves to be an effective loss function, leading to vastly improved topology across six diverse datasets.
1.1 RELATED WORK
Algebraic stability of persistence Several proofs for the stability of persistence have been proposed in the literature. In 2005. Coohen-Stiner et al. (2005) established a first stability result for persistent homology of real-valued functions. The result states that the map sending a function to the barcode of its sublevel sets 1-Lipschitz with respect to suitable metrics. 2008 this result was generalized by /Chazal et al. (2009b) and formulated in purely algebraic terms, in what is now known as the algebraic stability theorem. It states that the existence of a 6-interleaving (a sort of approximate isomorphism) between two pointwise dimee--ammnnional persistence modules implies the existence of a 5-matching between their respective barcodes. This theorem provides the justification for the use of persistent homology to study noisy data. In Bauer & Lesnick (2015), the authors present constructive proof of this theorem, which associates to a given d-interleaving between persistence modules a specific 8-matching between their barcodes. For this purpose. they introduce the notion of induced matchings, which form the foundation of our proposed TopoMatch framework.
Topology aware segmentation Multiple works have highlighted the importance of topologically correct segmentations in var- ious computer vision applications. Persis- tent homology popular tool from al- gebraic topology to address this issue. A key publication by Hu et al. (2019) intro- variation
0oo 100.0o00
(a) Prediction-1 Dice 0.991 Betti error = Topo =
(b) Ground truth
(c) Prediction-2 Dice 0.974 Betti error TopoMatch 0
duced the Wasserstein losy of the Wasserstein distance to improve im- age segmentation. They match points of dimension in the persistence diagrams- an alternative to barcodes as descriptor of persistent homolgy of ground truth and prediction by minimizing the squared dis- lance of matched points.
Figure 2: (a) and (c) show two predictions for ground truth (b). Volumetric metrics, e.g., Dice favor (a) over (c), and even Betti number error can not differentiate between (a) and (c) while only TopoMatch detects the spatial error (a) and favors (c).
However, this matching has fundamental limitation, in that it cannot guarantee that the matched structures are spatially related in any sense (see Fig. [ and App. A.. Put succinetly, the cycles are matched irrespective of the location within the image, which frequently has an adverse impact during training (see App. Clough et al. 22000) follows similar approach and train without knowing the explicit ground truth segmentation, but only the Betti numbers ought to have. Persistent homology has also been used by Abousamra et al. (2021) for crowd localization and by Waibel al. (2022) for reconstructing 3D cell shapes from 2D images.
Other methods incorporate pixel-overlaps of topologically relevant structures. For example, the clDice score, introduced by (hht et al. (2021). computes the harmonic mean of the overlap of the predicted skeleton with the ground truth volume and vice versa. Hu & Chen (2021) and Jain et al. (010)) use homotopy warping to identify critical pixels and measure the topological difference be- tween grayscale images. Hu al. (202T) utilizes discrete Morse theory (see Delgado-Friedricn
2

---

Under review as a conference paper at ICLR 2023
et al. (2014) to compare critical topological structures within prediction and ground truth. WWang et al. 2 incorperate a marker loss, which is based on the Dice loss between a predicted marker map and the ground truth marker map, to improve gland segmentations topologically. Generally, these overlap-hased approaches are computationally efficient but do not explicitly guarantee the spatial correspondence of the topological features. Other approaches aim enforcing topologically motivated priors, for example, enforcing connectivity priors Sasaki et al. (2017); Waag & Jiang (2118) Mosinska
(2018) applied task-specific pre-trained filters to improve connected compo- nents. Zhang & Lui (2022) uses template masks as an input to enforce the diffeomorphism type of specific shape. Further work by Cheng et al. (2021) jointly models connectivity and features based on iterative feedback learning. Oner et al. (2020) aims to improve the topological performance by enforeing region separation of curvilinear structures.
BACKGROUND ON ALGEBRAIC TOPOLOGY
We introduce the necessary concepts from algebraic topology in order to describe the construction of induced matchings for grayscale images. For the basic definitions, we refer to the App. L
2.1 GRAYSCALE IMAGES AS FILTERED CUBICAL COMPLEXES
The topology of grayscale images is best captured by filtered cubical complexes. In order to filter a cubical complex we consider an order preserving function f: K + R. Its sublevel sets D( == ([-((- r)) assemble to the sublevel filtration D()) (D()r)reR of K. Since can only take finitely many values {/i <... < fi), the filtered cubical complex K. given by K; D(f),, for 1,...,4, already encodes all the information about the filtration.
For a grayscale image I E RmXn we consider the cubical grid complex Km..n consisting of all cubical cells contained in [1, m]] x [1.n] m]] C R Its filter function fi is defined on the vertices of Kmm." by the corresponding entry I, and on all dishes-dmmnnionnl cubes as the maximum value of its ver- tices. Note that fr is order preserving, so we can associate the sublevel filtration of fr and its corresponding filtered cubical complex to the image I and denote them by D(I) and K, (I), respectively. This construction is called the V-construction since pixels are treated as vertices the cubical complex, see Fig. (3b] An alternative, the T-construction, considers pixels as top-dimensional cells of a 2-dimensional cubical complex (see Heiss & Wagner (2017). We implemented both, V- and T-construction, in TopoMatch and encode them in the ValueMap array inside the CubicalPersistencc class.
55
8
3
8
3
8
6
8
3
9
7
9
7
(a)
I
(b) fr:
K333
+
R
Figure (a) shows an image and (b) visualizes the V-construction.
2.2 PERSISTENT HOMOLOGY AND ITS BARCODE
Persistent homology considers filtrations of spaces and observes the lifetime of topological features within the filtration in form of per- sistence modules. The basic premise that features that persist for a long time are significant, whereas features with short lifetime are likely be caused by noise.
(a) K₁
(b) K₂
(c) K₂
Figure 4: A filtered cubical complex with varying homol- ogy in degree 1. Adding the green 1-cell in (b) creates ho- mology and adding the red 2-cell in (c) turns homology trivial. Together they form persistence pair.
The persistent homology H.(f) of an order preserving function f: K - R consists of vector spaces (f),), (D()))), and transition maps H. (J)s)) H. (D(),))
H.())))) induced by the inclusions D()), + D(f), for < 8. Note that H.( p.f.d persistence module. By result of see [Craleyy-Boeve (2012), any p.f.d. persistence module is isomorphic to a direct sum of interval modules M z DIEB(M) C(T). Here, B(M) denotes the barcode of M, which is given by a multiset of intervals. For a grayscale image matrix I E Rm with associated filter function fr: km. R. will refer to the persistent homology of f1 as the persistent homology of the image and denote it by H. (T). Its associated barcode will be denoted by BII). Note that the persistent homology is continuous from above: all intervals in the barcode of the form (s, t).
3

---

Under review as a conference paper at ICLR 2023
In order to compute the barcode (T), we make use of the reduction algorithm described in Edels- brunner et al. (2008). It starts by sorting the cells of the associated filtered cubical complex (2) to obtain a compatible ordering Cy. the cells in K; preceed the cells in K \ K,, and the faces of a cell preceed the cell. This ordering induces a cell-wise refinement (T) of (T),, which encode in the IndexMap array inside the CubicalPersistence class. The algoritm then performs variant of Gaussian elimination on the boundary matrix of K, with rows and columns indexed by the cells in the compatible ordering. Adding a d-cell Cj the complex will either create new homology in degree d or turn homology classes in degree d 1 trivial (see Figure 4). In the latter case, assum- ing that the class that becomes trivial when adding Cą has been created by cell ej with j < k, we pair the cells ej and This way we partition the set of cells into persistence pairs and singletons. Each pair (cg, Gx), satisfying [T(e,) < [r(ee), gives rise to a finite interval [f((cz), [r(c))); ), and each singleton C2 gives rise to an essential interval (c,( oo) in the barcode of I. Note that finite interval [cz) . fr(c)) determines a refined interval []. k). and we call the set Bine (I) of refined
intervals the refined barcode of I. Alternatively, the refined barcode of I can be seen barcode of the persistent homology of the refined filtration L, (I).
2.3 INDUCED MATCHINGS OF PERSISTENCE BARCODES
In order to give constructive proof for the algebraic stability theorem of persistent homology, the authors of Bauer & Lesnick (2015) introduced the notion of induced matchings, which play a central role in our Topo matching. The following theorem (paraphrased special case of the general Theorem 4.2 in Bauer & Lesnick (2015)) is key to the definition of induced matchings:
Theorem Let t: M N be a morphism of p.f.d., staggered persistence modules that confin- uous from above. Then there are unique injective maps Bim b) + B(M) and B(im b) + B(N), which map an interval [b, c) B(im 4) to an interval [b, d) E B(M) with e S d, and an interval [a, c) E B(N) with a < b, respectively.
Note that im & is a p.f.d. submodule of N, and we will refer to its barcode as the image barcode of 4. Obviously, the injections in Theorem determine matchings B B(M) AMr B(im 4) IN, B(N).
The induced matching of & is then given by the composition ( = σ o O.M-
Induced matchings of grayscale images Let J.J JJ E m= be matrices describing grayscale images, such that I 2 J (entry-wise). Then the sublevel sets of I form subcomplexes of the sublevel sets of and the corresponding inclusions D(T,, 4 D(J)r are cubical maps. Hence, they induce maps H. - H. (J)r r in homology. which assemble to a persistence map J): H. + HJ). We will denote the image barcode of & J) by BJI,J). Con- sidering the refined filtrations (T),, L. (J)),
obtain staggered persistence modules resulting in refined barcodes Bine Bine (J). For the computation of the image barcode, we follow the al- gorithm described in Bauer & Schmahl (2022). It involves the reduction of the boundary matrix of Kmm, with rows indexed by the ordering ci...., Ct in L. (I) and columns indexed by the or- dering d in (J). A pair dc) satisfying f(((s) < [d]d), obtained by the means of this reduction, then gives rise to an image persistence pair (cz, dz)), which corresponds to the fi- nite interval [fr fy (dg)) E B(I, By matching refined intervals with the image persistence pairs according to Theorem I we obtain a matching Onne: Bine (I) + Bine (J) between the refined barcodes, which determines the induced matching o J): BIT) -> B(J) by replacing reñindd intervals with the corresponding finite interval.
1
2
Omerde
20
27
26
Gpnendee
0
2
7
39
3
21
49
25
7
19
3
5
4
22
23
24
6
4
(a) J1
(b) o J1)
(c)
(d) o (I
(c) J2
Figure 5: (a), (c) and (e) show images which satisfy I 2 J1 (b) and (d) visualize the induced matchings. Red bars correspond to the barcode of I, green bars to the barcodes of J1, and grey bars to the image barcodes BiI, J1), B(I, J2). The shaded gray area highlights matched intervals according to their endpoints.
4

---

Under review as a conference paper at ICLR 2023
In this work, augment this induced matching by additionally considering reverse persistence pairs, iee, pairs (ca, dz) obtained by the reduction, with fr(c,) 2 fd((d) (see Figure/5d), 5d). When this is the case, also match the corresponding intervals in Brine (I) and Bine (J). Note that this is slight variation of the induced matching defined in Bauer & Lesnick (2015). This extension satisfies similar properties and is natural adaptation our computational context.
3 TOPOMATCH FROM ALGEBRAIC TOPOLOGY TO IMAGE SEGMENTATION
In general, the structure of interest in segmentation tasks given by the foreground. Therefore, we consider superlevel filtrations instead of sublevel filtrations in applications. For simplicity, stick to sublevel filtrations to describe the theoretical background. Throughout this section, we denote by L (0, _| a likelihood map predicted by deep neural network, by E {0, 13 1 the binarized prediction of L, and by G E {0, 1)mx the ground truth segmentation.
3.1 MATCHING BY COMPARISON IN AMBIENT SPACE
Orneni do
Dimension
Dimeension
1.0
(a) L
(b) B(L)
(c) G
(d) ((G)
(e) C
(1) B(C)
Dimension
Dimension
Dimension
0.0
0.5
1.0
0.0
0.5
1.0
0.0
0.5
1.0
g o CL,C) C)
(h) (G,
(i) LLL G)
Figure 6: An exemplary construction of the TopoMatch matching. (a)-(f) show a likelihood map L, ground truth G. the comparison image C and their barcodes. (g) and (h) show the induced matchings between individual barcodes (matchings indicated grey), and (i) shows the resulting TopoMatch matching between (L) and B(G), which matches red interval to blue interval if there is a green interval in between. We use this matching to define our loss and metric.
order to visualize that two objects in two different images are at the same location, we can simply move one image ontop of the other one and observe that the locations of the objects now agree. Thereby, we are constructing a common ambient space for both images which allows us to identify locations. Following this idea, in order to find matching between B(L) and ((G) that takes the location of represented topological features into account, we are looking for a common ambient filtration of Km..n, which is
(a) big enough contain the sublevel filtrations of L and G; (b) fine enough to capture the topologies of L and G.
Here, (a) guarantees that guarantees that the identification of features by the induced matchings are non-trivial (discrimina- tive). The most natural candidate which comes into mind is given by the union D(L), U D(G), of sublevel sets. Therefore, we introduce the comparison image C = minn(, G) (entry-wise mini- mum) and observe that D(C), = =D . By construction, we have C L. G and obtain induced matchings o (L,C): B(L) + BCC) and (G, C): B(G) + B(C') (see Sec. 2.3 The
compute induced matchings of the respective inclusions and (b)
Topo matching 7 (L, G): (L) - B(G) then given by the composition
T(L = (G, C) C)
C).
5

---

Under review as a conference paper at ICLR 2023
Working with superlevel sets yields analogous construction. In the superlevel-settingg choose C' L, G) as the comparison image to guarantee that each superlevel set of the comparison image is the union of the corresponding superlevel sets of ground truth and likelihood map.
3.2 TOPOMATCH DEFINES TOPOLOGICAL LOSS FUNCTION FOR IMAGE SEGMENTATION
We denote by I. the extended real line I U (-oc, 00). A barcode B consisting of intervals {a, b) can then equivalently be seen as multiset Dgm(B) of points (a, b) R² which lie above the diagonal A {(z
JRJ. Furthermore, we add all the points on the diagonal with infinite multiplicity to (g) and thus define the persistence diagram of B. A matching between persistence
B1 Bg
between barcodes then corresponds to bijection Ø: (g + Dgm diagrams, by mapping unmatched points (a, b) to their closest point ((a + b)/2. (a b)/2) on the diagonal A. We use these perspectives interchangeably (see Fig. 20 For simplicity, we denote by (g the persistence diagram associated to the barcode of grayscale image I.
Persistent homology is stable, see Chazal et al. 2009a), i.e., there exist metrics on the set of persis- tence diagrams for which slight variations in the input result in small variations of the corresponding persistence diagram. Therefore, it is natural to require Dgm to be similar to Dgm G). A frequently used metric measure the difference between persistence diagrams is the Wasserstein distance (see CCoenn-Steiii Steiner et al. (2010)), and it has been adapted in Hu et al. (2019) to train seg- mentation networks. Because of the shortcomings described in Fig. & 19b and App. [[F] propose to replace the Wasserstein matching by the Topo.atth matching 7 L, G') and define the TopoMatch loss
LTM(L,
Σ 11a TLL, G) (EDgm(L)
Since the values in L and G are contained in [0, 1J. we replace the essential intervals (a, oo) with the finite interval [a, 1]. to obtain well-defined expression. To efficiently train segmentation networks, combine our TopoMatch loss with standard volumetric loss, specifically, the Dice Loss,
Ltrain = aLLa G) + Litice (L, G)).
Gradient of Toph loss Note that we can see predicted likelihood map an image I E Rmxn and the segmentation network parameters w IR. A point 9 (41, 92) E Dgm(L) L) describes topological feature that is born by adding pixel b(g) (birth of g) and killed by adding pixel d(q) (death of q) to the filtration. The coordinates of q are then determined by their values = Ld(g) and 92 Lo(g). Assuming that the TopoMatch matching constant sufficiently small neighborhood around the given predicted likelihood map L, the TopoMatch loss is differentiable in w and the chain rule yields the gradient
L(I, w) as a function that assigns the
OL Ow
+ 2(q2 T(L, G)) aL
Σ LLD
2(11 -LL, (L),))))))))))
Ow
Note that likelihood maps for which this assumption not satisfied may exist. But this requires have at least two entries with the exact same value, and the of such likelihood maps has Lebesgue measure zero. Therefore, the gradient is well-defined almost everywhere, and in the edge cases, we consider it as sub-gradient, which still reduces the loss and has positive effect on the topology of the segmentation.
L
Physical meaning of the gradient To understand the effect the TopoMatch gradient during training. consider the example in Fig. 7 Let x. Dgm denote the points corresponding to the yellow and blue cycle in (c), respectively. (b) shows that is matched and y is unmatched. Since, all points in Dgm(G? G) of the form (0, Topo maps to (0, 1) and y to its closest point (1 v1
(b) TopoMatch
(c) 1-cycles in
Figure 7: (a) L shows Topological error (bottom right). (b) Matched cycles Topo- Match are shown in yellow. (c) For both cy- cles in the birth (b(g)) and death pixels (d(a)) are marked with and x, respectively.

---

Under review as a conference paper at ICLR 2023
the diagonal A. Therefore, the gradient will enforce the segmentation network to move closer to 1) (i.e., decrease 21 = Ld(a) and increase 22 = Lb(a)) and y closer to (2 y= (i.e., increase V1 Ldy) and decrease y/2 Lo(y)) This results in amplification of the local contrast between * and of the yellow cycle and a reduction of the local contrast between * and x of the blue cycle, which improves the topological performance of the segmentation.
segmenta
Summarized, we can say that matched features get emphasized, and unmatched features get sup- pressed during training, which highlights the importance of finding spatially correct matching (see App. for further discussion).
3.3 TOPOMATCH LOSS TOPOLOGICAL METRIC FOR IMAGE SEGMENTATION
Betti number error The Betti number error Berr (see App. K compares the topological complexity of the binarized prediction P and the ground truth G. However, limited as only compares the number of topological features in both images, while ignoring their spatial correspondence (see Fig. 8). In terms of persistence diagrams, the Betti number error can be expressed by considering maximal matching B: Dgm( P) Dgm e.g., the Wasserstein matching (see App. F and counting the number of unmatched points:
Benl (P, G) # ker(3) + coker(3).
Here, for a matching we denote by ker (r) the multiset of unmatched points in the domain of a and by coker(o) the multiset of unmatched points in the codomain
(see App. L.5)
TopoMatch error The TopoMatch loss LTM (P, G) can be seen as refinement of the Betti number error, which also takes the location of the features within their respective images into account (see Fig. 8). Since the entries of P and G take values in {0, }]. the only point appearing in their persis- tence diagrams is (0, 1) and its multiplicity coincides with the number of features the respective image. Observe that an unmatched point contributes with (0 _)²² + (1 } 1 to LTM (P, G) and matched pair of points contributes with 0. Hence, the TopoMatch loss takes values in / N and given by half the number of unmatched features in both P and G, i.e.
LTM G) ker(TT(,, G)) + coker(7(P,G))
(a) (en G)
(b) (IM(P,
(c) Lw
Figure 8: Illustration of the advantages of our TopoMatch error over the Betti number error. (a) shows a prediction (left), ground truth (right) and the corresponding Betti number error. (b) shows the TopoMatch matching in dim-1 (no features (c) shows the Wasserstein matching in dim-1 (same color indicates matching) with its correspond- ing loss. Note that both Betti number error and Wasserstein loss fail to represent the spatial error, while TopoMatch correctly does not match any cycles resulting in a loss 2.
matched) with its corresponding loss and
EXPERIMENTATION
Datasets We employ a of six datasets with diverse topological features for our validation exper- imentation. Two datasets, the Massachusetts roads dataset, and the CREMI neuron segmentation dataset, exhibit frequently connected curvilinear, network-like structures, which form large num- ber of cycles in the foreground. 'Te C.elegans infection live/dead image dataset (Elegans) from the Broad Bioimage Benchmark Collection Ljosa al. (2012) and our synthetic, modified MNIST Lataset[LeCun 1998) (synMnist) consist of balanced number of dimension-O and dimension-1 I fea- tures. And third, the colon cancer cell dataset (Colon) from the Broad Bioimage Benchmark Collec- tion Carpenter et al. (2006): Ljosa al. (2012) and the Massachusetts buildings dataset (Buildings) have "blob-like" foreground structures. They contain very few dimension- features but every instance of cell or building forms dimension-O feature.

---

Under review as a conference paper at ICLR 2023
Table 1: Main results for TopoMatch and three basclines on six datasets. Green columns indicate the topological metrics. Bold numbers highlight the best performance for a given dataset if it is significant (i.e. the second best performance is not within std/8). We find that Topo improves the segmentations in all topological metries for all datasets. We further observe a constantly high performance in volumetric metries, indicates higher value wins and + the opposite.
Loss
Dice 1
elDice
Acc.
T.M.L
T.M.OL.
T.M.-IL
Bem
Betti-O
Betti
Dice
0.894
0.939
0.959
74.82
19.84
54.98
114.12
19.12
75.00
CREMI
elDice
0,879
0,944
0.952
73.52
17.18
56.34
103.92
33.64
70.28
et
0.957
81.24
22.12
118.16
43.68
74.48
Ours
0.893
0.941
0.959
64.90
15,50
49.40
79.16
30.36
48,80
0.698
0.974
43.52
113.96
86.54
27.42
Roads
elDice
0.668
0.704
0.975
65,50
$1.04
14.46
125.83
101.67
24.17
Hu et
0.674
0.712
0.974
50.50
36.52
13,98
95. 83.83
72.54
23.29
Ours
0.663
0.713
0.972
41,50
28.15
13.35
75.08
$5,79
19.29
syn
Dice
0,871
0.907
0.962
1.849
0.979
0.870
2.590
1.674
0.916
elDice
0.875
0.921
0.963
1,270
0.436
0.834
1.640
0.700
0.940
Hu ct al.
0,866
0,915
0.960
1.425
0.502
0.923
1.802
0.764
1.038
Ours
0.954
0.265
1.348
0.426
0.922
Dioe
0.922
0.959
0.984
2,05
1.30
0.750
2.60
1.40
1.20
Elegans
clDice
1.10
2:20
Hu et al.
0
0.959
0. 0.984
2.15
1.42
0.725
2.50
1.35
1.15
Ours
0,919
0,960
0.983
1.70
1.05
0.650
1.90
0.80
1.10
Dice
0.899
0.863
0.970
22.
10.88
11.25
33,75
13.75
20.00
Colon
elDice
0.907
0.871
0.974
23.63
9.38
14.25
37.75
11.75
26.00
Hu et
0,902
0.876
0.972
17.25
7.75
9.50
22,00
7.00
15,00
Ours
0,907
0.871
0.975
16.00
7.13
8.88
21.50
6.25
15.25
Buildings
Dice
0.623
0.672
0.934
286.22 22
275.50
10.73
162.95
151.70
11.25
elDice
0.632
0.693
0.931
285.60
267.98
17.63
175.50
155.00
20.45
et
278.
268.75
9.55
181.10
169.
11.50
Ours
0.625
0.685
0.937
244.58
235.63
8.95
118.45
107.75
10.70
Training of the segmentation networks For implementation details, e.g., the training splits, please refer App. [ We train all our models for fixed, dataset-specific number of epochs and eval- uate the final model on an unseen test set. We train all models on an Nvidia P8000 GPU using Adam optimizer. We experiments
range of alpha-parameter's for elDice (Shit et al. (2021) }), the Wasserstein matching (Hu et al. (2019)) and TopoMatch; we choose to present the top performing model in Table T extended results given in tables
in App.
Image
Label
Dice
ciDice
Hu et al.
Ours
Figure 9: Qualitative Results on CREMI dataset (same models used as in Table I Topological errors are indicated by red circles. Our method leads to less topological errors in the segmentation.
4.1 RESULTS
Main Results Our proposed TopoMatch loss improves the topological accuracy of the segmenta- tions across all datasets [T irrespective of the choice of hypeer-parametess (Table compared all baselines. We show superior scores for the topological metrics TopoMatch error (T.M.) and Betti number error (Betti) in both dimension-O and dimension-l. Further, the volumetric metrics (Aceuracy, Dice, and elDice) of the segmentations show equivalent, not superior quantitative re- sults for our method. Our method can be trained from scratch or used to refine pre-trained networks. Importantly, our method improves the topological correctness of curvilinear segmentation problems (Roads, CREMI,, blob-segmentation problems (Buildings, Colon), and mixed problems (SynMnist, Elegans). We confidently attribute this to the theoretical guarantees of induced matchings, which hold for the foreground and the background classes in dim-O and dim-1. For illustration, please consider the Roads and Buildings dataset; essentially, the topology of the background of the Build- ings dataset is very similar to the foreground in Roads. Le., the foreground of the Roads and the background of the Buildings dataset are interesting in dim-1, 1, whereas the background of the roads and the foreground of the Buildings are interesting in dim-O. As our method can efficiently leverage
8

---

Under review as a conference paper at ICLR 2023
the topology features of both foreground and background when we apply sub- and superlevelset- matching and it is intuitive that our method prevails in both. It is of note that for some datasets, the method by Hu et al. (2019) is the best performing bascline and for some Shit et al. (202I)
Table 2: bothlevel versus superlevel matching of our method on the Elegans dataset and the CREMI
dataset. The bothlevel matching appears to have more pronounced contribution in the scenario of topologically complex background
lovel
Dice
clDicc
Acc.
T.M.
T.M.-
T.M.-
Betti
BettiUU
Betti-1
ARI
VOI
Elegans bothlevel
0.005
0.92
0.96
1.70
1.05
1.90
0.80
0.93
0.36
Elegans superlevel
0.005
0.92
0.95
0.98
2.15
1.35
0.80
2.40
1.30
1.10
0.91
0.43
CREMI bothlevel
0.89
0.95
0.95
60.48
12.92
47.56
52.08
25.28
26.80
0.93
0.36
CREMI supertevel
0.5
0.89
0.95
0.96
59,20
14.40
44.80
52.24
28.16
24.08
0.93
0.35
Ablation experiments In order to study the effectiveness of the TopoMatch loss, we conduct var- ious ablation experiments. First, we study the effect of the a parameter in our method, see Table 3 We find that increasing a improves the topological metrics. For some datasets, e.g., synMnist, the Dice metric compromised if a is chosen too big. Therefore, we conclude that and -ataset-specific parameter. Ostensibly, the effect of the a parameter cannot be compared di- rectly. Nonetheless, appears that our method is more robust towards variation in a. Second, we study the effect of considering both the foreground and the background (bothlevel) versus solely the foreground (superlevel). We find that bothlevel is particularly useful if the background has a complex topology (e.g. Elegans), whereas superlevel shows similar performance if the foreground has a more complex topology (c.g. CREMI), see Table 2 Third, we test the effect of pre-training and training from scratch for TopoMatch and the method by HHu al. (211)). Table [6 shows that our method can be trained from scratch efficiently if not superiorly, whereas the baseline method struggles in that setting especially on more complex datasets such as CREMI. We attribute this to the spatially correct matching of Match and its consequences on the gradient (see Sec. (3.2 Training-from--se froh-sctttch means that there is a lot potential for false positives and false negatives the Wasserstein matching (see App. F) since there are a lot noisy features when the network is still un- certain. For example for CREMI we found that the Wasserstein matching matches cycles incorrectly in more then 99 % of the cases, see appendix F. Moreover, we observe that Topo optimizes We also experiment with adding boundary to
tunable
the Wasserstein loss more efficiently (see App. F.2p. images in order to close loops that cross the image border, similar to Hu et al. (2019), and term this relative TopoMatch. Table 4 shows a negligible effect on all metrics. For additional ablation and more metrics on the ablation studies, please refer to the App. our matching is Onn)). see App. for details.
H The computational complexity of
DISCUSSION
Concluding remarks In this paper, we propose rigorous method called TopoMatch, which en- ables the faithful quantification of corresponding topological properties in image segmentation. Herein, method is the first guarantee the correct matching of persistence barcodes in im- age segmentation according to their spatial correspondence. We show that TopoMatch is efficient as an interpretable segmentation metric, which can be understood as a sharpened variant of the Betti error. Further, we show how our method can be used to train segmentation networks. Training networks using TopoMatch is stable and leads to improvements on all 6 datasets. We foresee vast ap- plication potential in challenging tasks such as road network, vascular network and Neuron instance segmentation. We are thus hopeful that our method's theory and experimentation will stimulate future research in this area.
Limitations In the general setting of persistent homology of functions on arbitrary topological spaces, there are instances where maps of persistence modules cannot be written matchings. This is somewhat analogous to the fact that in linear algebra, certain linear transformations cannot be diagonalized. We did not observe any such case in our specific segmentation setting. A theoretical investigation of this question will be the subject of future work. Further, we understand application- specific experimental limitations. Our method's 's computational complexity is beyond widely used loss functions such as BCE (see App. D): moreover, our current implementation is only available in 2D, whereas the theoretical guarantees trivially generalize to 3D.

---

Under review as a conference paper at ICLR 2023
6 REPRODUCIBILITY STATEMENT
To facilitate understanding of the theory section please refer to the basic definitions in the appendix. The core algorithm (TopoMatch) available as a python script in the supplementary material and is printed in pseudocode in the appendix, section [ The training details are also described in the appendix, section Furthermore, all of our code and all of our experimentation, including baselines and hyperparameters, is available in public anonymous Github repository
7 ETHICS STATEMENT
We, the authors, declare that strictly adhere the ICLR Code of Ethics. Our method and experimentation are carried out on (partly modified) public datasets with no known ethical concern associations. Our studies do not involve human subjects and we do not foresee any conflicts of interest and sponsorship, discrininntiio/bia//aanne concerns, privacy and security issues, legal compliance, and research integrity issues.
REFERENCES
Shahira Abousamra, Minh Hoai, Dimitris Samaras, and Chao Chen. Localization in the crowd with topological constraints. In Proceedings of the AAAI Conference Artificial Intelligence, volume 35, pp. 872-881,
Ulrich Bauer. Ripser: efficient computation of vietoris rips persistence barcodes. Journal of Applied and Computational Topology, 5(3):391-4)) 1211 2021.
Ulrich Bauer and Michael Lesnick. Induced matchings and the algebraic stability of persistence barcodes. Journal of Computational Geometry, 602):122-111, 2015
Ulrich Bauer and Maximilian Schmahl. Efficient computation of image persistence. arXiv preprint arXiv:2201.04170, 2022.
Anne E Carpenter, Thouis R Jones, Michael R Lamprecht, Colin Clarke, In Han Kang, Ola Friman, David Guertin, Joo Han Chang, Robert Lindquist, Jason Moffat, al. Cellprofiler: image analysis software for identifying and quantifying cell phenotypes. Genome biology, 7(10):1-11, 2006.
Frédéric Chazal, David imity of persistence modules and their diagrams. Proceedings of the twenty-fifih annual sym- posium on Computational geometry, pp. 237-246, 2009a.
Mare Glisse, Leonidas J Guibas, and Steve Y Oudot. Prox-
Frédéric Chazal, David Cohen- Mare Glisse, Leonidas J Guibas, and Steve Y Oudot. Prox- imity of persistence modules and their diagrams. In Proceedings of the twenty-fifth annual sym- posium on Computational geometry, pp. 237-246, 2009b.
Mingfei Cheng. Kaili Zhao, Xuhong Guo, Yajing Xu, and Jun Guo. Joint and feature-refinement network for curvilinear structure segmentation. In Proceedings of the IEFE/CVF International Conference on Computer Vision, pp. 7147-7156, 2021.
James Clough, Nicholas Byrne, Ilkay Oksuz, Veronika A Zimmer, Julia A Schnabel, and Andrew King. A topological loss function for deep-learning based image segmentation using persistent homology. IEEE Transactions on Pottern Analysis and Machine Intelligence, 2020.
David Cohen-Steiner Herbert Edelsbrunner, and John Harer. Stability of persistence diagrams. In Proceedings of the twenty-first annual symposium on Computational geometry, pp. 263-271, 2005.
David Cohen-Steiner, Herbert Edelsbrunner, John Harer, and Yuriy Mileyko. Lipschitz functions have I p-stable persistence. Foundations of computational mathematics, 10(2):127-139, 2010.
10

---

persistence modules, Under review as a conference paper at ICLR 2023
William Crawley-Boevey. Decomposition of pointwise 2012. htttps://arxiv.crtt
Olaf Pelgado-Friedriee Vanessa Robins, and Adrian Sheppard. Skeletonization and partitioning of digital images using discrete morse theory. IEEE transactions on pattern analysis and machine intelligence, 3763)655--66,, 2014.
Herbert Edelsbrunner, John Harer, et al. Persistent homology-a survey, Contemporary mathematics, 453:257-282, 2008.
Jan Funke, Fabian Tschopp, William Grisaitis, Arlo Sheridan, Chandan Singh, Stephan Saalfeld, and Srinivas C. Turaga. Large scale image segmentation with structured loss based deep learning for connectome reconstruction. IEEE Transactions on Pattern Analysis and Machine Intelligence, 41(7):169911680, Jul 2019. ISSN 1939-3539. doi: 10.1 2tt.1009/mm.2221188888533.
URL http:
//dx. dox. org/ 1109 TPAMI 2018.10 2835450
Adélie Garin, Teresa Heiss, Kelly Maggs, Bea Bleile, and Vanessa Robins. Duality in persistent homology of images. arXiv preprint arXiv:2005.0455 2020.
Teresa Heiss and Hubert Wagner. Streaming algorithm for euler characteristic curves of multidi-
mensional images. CoRR, abs/1705.02045, 2017. URL http:://arxiiv.orr/ab///1010
02045
X Hu, Y Wang, Fi,, D Samaras, and C Chen. Topology segmentation using discrete morse theory. In International Conference on Learning Representations (ICLRR), 2021.
Xiaoling Hu and Chao Chen. Image segmentation with homotopy warping. arXiv preprint arXiv:21 2021.
Xiaoling Hu, Fuxin Li, Dimitris Samaras, and Chao Chen.
preservireeeeggg deep image seg- mentation. Advances in neural information processing systems, 32, 2019.
Viren Jain, Benjamin Bollmann, Mark Richardson, Daniel R Berger, Moritz N Helmstaedter, Kevin L Briggman, Winfried Denk, Jared Bowden, John M Mendenhall, Wickliffe C Abraham, et al. Boundary learning by optimization with topological constraints. In 2010 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pp. 2488-2495. IEEE, 2010.
Tomasz Kaczynski, Konstantin Mischaikow, and Marian Mrozek. Cubical Homology, pp. 39- 92. Springer New York, New York, NY. 2004. ISBN 978 978-0-387-215997-6 0- 0-387-21597-222.
doi: 10.1007/
Yann LeCun. The mnist database of handwritten digits. http://yann. lecun. com/exdb/mmist// 1998.
Vebjorn Ljosa, Katherine L Sokolnicki, and Anne Carpenter. Annotated high-throughput mi- croscopy image sets for validation. Nature methods, 9(7):637-637,200 2012.
Volodymyr Mnih. Machine Learning for Aerial Image Labeling. PhD thesis, University of Toronto, 2013.
Agata Mosinska et al. Beyond the pixel-wise loss for topology-aware delineation. In CVPR, pp. 3136-3145, 2018.
Doruk Oner, Mateusz Koziński, Leonardo Citraro, Nathan C Dadap, Alexandra Konings, and Pascal Fua. Promoting connectivity of network-like structures by enforcing region separation. arXiv preprint arXiv:2009.00011 2020.
Nina Otter, Mason A Porter, Ulrike Tillmann, Peter Grindrod, and Heather A Harrington. A roadmap for the computation of persistent homology. EPJ Data Science, 6:1-38, 2017.
Kazuma Sasaki, Satoshi lizuka, Edgar Simo-Serra, and Hiroshi Ishikawa. Joint gap detection and inpainting of line drawings. Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 5725-5733, 2017.
11

---

Under review as a conference paper at ICLR 2023
Suprosanna Shit, Johannes C Paetzold, Anjany Sekuboyina, Ivan Ezhov, Alexander Unger, Andrey Zhylka, Josien PW Pluim, Ulrich Bauer, and Bjoern Menze. cldice-a novel topology sopology-preserving loss function for tubular structure segmentation. In Proceedings of the IEEE/CVF Conference Computer Vision and Pattern Recognition, pp- 16560-16569, 2021.
Hubert Wagner, Chao Chen, and Erald Vuçini. Efficient computation of persistent homology for cubical data. Topological methods data analysis and visualization II, pp. 91-106. Springer, 2012.
Dominik JE Waibel, Scott Atwell, Matthias Meier, Carsten Marr, and Bastian Rieck. Capturing shape information with multi-scale topological loss terms for 3d reconstruction. arXiv preprint arXiv:2203.01703, 2022.
Haotian Wang, Min Xian, and Aleksandar Vakanski. Ta-net: Topology-ane network for gland segmentation. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pp. 1556-1564, 2022.
Xiaohong Wang and Xudong Jiang. Post-processing for retinal vessel detection. Tenth Interna- tional Conference on Digital Image Processing (ICDIP 2018), volume 10806, pp. 4442-1466 SPIE, 2018.
Han Zhang and Lok Ming Lui. copology-preserve segmentation network: A deep learning seg- mentation framework for connected component. arXiv preprint arXiv:2202.13333 2022.
12

---

Under review as a conference paper at ICLR 2023
A
ADDITIONAL TOPOLOGICAL MATCHING ILLUSTRATION
Label
Prediction
Label
Prediction
U
Fully correct geametric match TopoMatch.
TopoMatch
Laasserstten 0.1
MrapaMMrch
Wasserstein Matching
One false geometric match and one entirely false match Wasserstein matching.
Figure 10: Topological matchings. Illustration of the advantages of our TopoMatch algorithm over the existing Wasserstein matching and the Betti number error for two exemplary segmentations, On the left side, we depict prediction-label pair for an image. On the right side, we depict the matched representative cycles the same color for the Wasserstein matching (bottom row) and TopoMatck matching (top row). Our TopoMatch matches the spatially correct features and will penalize the correct features in the loss. Here, the Wasserstein matching mismatches the correctly predicted feature with the erroneously predicted feature, leading false loss for the wrongly segmented cycle.
TopoMatch
Wasserstein Matching
Dim-O
Dim-0
Dim-O
Prediction
Label
Prediction
Label
Figure 11: Motivation. Our TopoMatch (induced matching) and the Wasserstein matching et al. 2 for Elegans, Colon and Buildings label-prediction pairs. Here we match the connected components (dim-O). The matched components (according the matching methods) are represented in the same color. We randomly sample 6 matched cycles in each pair.
Huu
13

---

Under review as a conference paper at ICLR 2023
TopoMatch
Wasserstein Matching
Prediction
Label
Prediction
Label
Figure 12: Motivation. Our Topo (induced matching) and the Wasserstein matching (Hu et al. 2019 ) for Roads -reee-pre pairs. The matched cycles (according to the matching methods) are represented in the same color. We randomly sample matched cycles (dim-1) I)) each pair. We observe that our method correctly matches the cycles in the first two rows. The third row represents an example early Training. Here we observe that our method correctly matches some "finished" eycles but also provides correct matching to the blue and green cycles which still have to be closed. Essentially, one can observe here that our TopoMatch leads to correct loss.
14

---

Under review as a conference paper at ICLR 2023
TopoMatch
Wasserstein Matching
Prediction
Label
Prediction
Label
Figure 13: Motivation. Our Math (induced matching) and the Wasserstein matching (Hu al. 2019 for CREMI label-predie preec-prediction pairs. The matched cycles (according to the matching methods) are represented in the same color. We randomly sample matched cycles each pair.
15

---

Under review as a conference paper at ICLR 2023
TopoMatch
Wasserstein Matching
Dim-1
4
Dim-1
Dim-0
Prediction
Label
Prediction
Label
Figure 14: Motivation. Our Topo (induced matching) and the Wasserstein matching (Hu et al. (2019) for synMnist label-prediction pairs (top row), colon cells (middle row) and the Elegans dataset (lower row). The matched connected components (dim-O) and cycles (dim-1) (according to the matching methods) are represented same color. We randomly sample matched cycles in each pair.
16

---

Under review as a conference paper at ICLR 2023
B
ADDITIONAL QUALITATIVE RESULTS
Image
Label
Dice
clDice
Hu
Ours
Figure 15: Qualitative Results on Roads and Buildings dataset. Image, Label, and different segmen- tations (same models as table T].. Topological errors are indicated by red circles. Our method leads to improved topology compared to the baselines.
17

---

Under review as a conference paper at ICLR 2023
Image
Label
Dice
ciDice
Hu et al.
Ours
Figure 16: Qualitative Results on CREMI, Elegans and Colon dataset. Image, Label, and different segmentations (same models table Topological errors are indicated by red circles. Our method leads to improved topology compared to the baselines.
18

---

Under review as a conference paper at ICLR 2023
Image
Label
Dice
cDDice
Hu et al.
Ours
Figure 17: Qualitative Results on SynMnist. Image, Label, and different segmentations (same mod- els as table D examples of the SynMnist testset. Topological errors indicated by red circles. Our method always segments the correct topology.
C DETAIL ALGORITHM
Below, provide the pseudocode for efficient realization of the TopoMatch matching. For the computation of the barcodes in dimension-O we leveraged the Union-Find datastructure, which is very efficient managing equivalence classes. Alexander duality allows as well (see Garin et al. (2020).. Moreover, it can also used for the computation of the image barcodes in both dimensions. Note that adapt the Union Find class manage the birth of equivalence classes. We use clearing (as proposed in Bauer (202I)) by keeping track of critical- edges and columns-to-redd
use it in dimension-1,
in order reduce the amount of operations during the reductions (see
sections 2.2 2.3
19

---

Under review as a conference paper at ICLR 2023
Algorithm 1: Topo.Match
Data:
G. L
Option: relative False, fillralion = 'superlevel' Lo. L1.
Result:
begin
filtraaion="' 'superlevell then
// Construction of comparison image
C max (n.
else
C min end
B(G), Do, Vo, Xa Cubical Persistence
True); SabbaaaePrssssteeeeeeeeerrettrrd
BL, XL t PerricalPesssteennne Dararrrrrseeeeeeee..eettieeee
filtration, (initration,TTue...
B(C), Co, Vc, Xc t TubicallPesistterr
filratin,, False):
10
B(G,C) t Image Pewsistenceeeeeeeeeeeo [D.. Xa, Cc, Xc);
11
BL ImageP Per sistence pistsence L. X L, Cc. Xc);
12
oG.C) t Induced InducedaMtcchhng (B BG)
13
oLL + InducedM (L)
G) 6;
// Initialize matched refined intervals
15
Uo.U1 = BBG))o B
// Initialize unmatched refined intervals
for ground truth
16
Vo. = 1: B(L), B(L): for prediction - for d t by lyylo do
// Initialize unmatched refined intervals
17
// Initialize TopoMatch loss // Loop over dimension-d
18
19
foreach mo E (G, C)a do
20
foreach m, o C) do if mo 2 mi 2 then
// Check for same image persistence
pa ir
Add ((mg [0], mo 2]. m (0)) to TL,
Remove (mo] from Uai
Remove (0) from Vai
25
Remove (m1) from (L,C)
P.q mg [0], mp]]:
[0]:
Io 1 Vo(Inder2Coord((00)) Va Ve([ndee22oordd // Map
index value
Jo = Vy Vi([Inee2Coord((gg (g))), V (u(Indes2Coodd((1)) // Map
index to value
Ca = Ca + (lo - Jo)² + (1 - J1)
// Loss for matched
intervals
break
end end end
34
foreach
p E U. do To, 11 Va (nddee22Coor))))))) Vc(Inde2(oo)d()11) // Map index to value
L1= La (1a-113² :// Loss for unmatched intervals in ground truth
36
37
end
38
foreach
E V. do 1o. Vz (Idde2(Coord())))) ( [[(eereCCo)d))]))) // Map index to value L, = L. + (1-1))² prediction
39
// Loss for unmatched intervals in
41
end
42
end
C + Co + L1
// Total TopoMatch loss
44 end
20

---

Under review as a conference paper at ICLR 2023
Procedure Cubi ca Pers stence (I, relative, filtration, critical)
46
relative=True then
47
AddBoonddryy();
// Add image boundary
48
end
49
V. XE FiltterCubeMapp.. filtration)) : // Valuemap, Indexmap & edges
are computed using the CubeMap datastructure as in Wagner et al. (2012)
50
// Initialize refined barcodes C c= // Initialize columns-to- for the clearning trick
B) B(T) #
51
if critical=-Tre then
53
= 6: // Initialize critical-edges for the clearing trick end
55
u Union F-innnionniifii #indes + +1; foreach E E do
// Instantiate a Union-Find class // Compute refined intervals in dimension-1
57
bo. bi + Dual Boundaryl X, xe)); // Find dual boundary of an edge v. if x = y then Add to continue end mwmmmn (ain(44.ttbbrth())) geethrrrh)) if criticall==re True then Add to DD; end
59
61
62
b
// Retrieve birth
64
65
66
(e. b) is valid then Add (e,b) B(I)1
// Check for positive interval
68
end
U U.uiionxz,
end
71
= Union UnionFindd(fi Find(#cubes)) foreach E C do
// Instantiate a Union-Pind class // Compute refined intervals in dimension-0 // Find boundary of an edge
73
bo, in + Boundary( X, xee); xr (.fjid((lb (bnd( (.fnd(())) if σ = y then continue end
75
76
7
// Retrieve birth b max (enna444.ggrrrtttl,,4gghhhrrrr // Check for positive interval if (e. b) is valid then
78
Add (e, b) toB(T)o: end U.umion(I.g) end
80
82
83
84
if critical=True then return (B(T),, D, V
85
// Return refined barcodes, critical-edges, Valuemap & Indexmap
X;
96
else
x7
return (B
// Return refined barcodes, co columns-to-reduce, Va luemap & Tndexmap
end
21

---

// Instantiate Union-Find class // Compute pairs in dimension-l Under review as a conference paper at ICLR 2023
Procedure ImagePersistentt (ID, X, C, X,)
90
// Initialize image persistence pairs
91
U (nndionniind##uubbee
I/ Instantiate Union-Find class // Compute pairs in dimension // Find boundary of an edge
92
foreach e E C do
93
by. b1 < Boundary( X₁, e): - U. find(bu) (u.i((bb))i.ddllel find
94
95
x = y then
continue
97
end
6
// Retrieve birth Add (e, 6) to B(I.J) lo // All pairs for extended induced matching
99
(see Sec. U.umion(z,))
2.3
100
101
end
U Union Uniooninnd##anenl #cbee + 1);
103
foreach e E D do
bo, bi Dual Boundary ,,));;
// Find dual boundary of an edge
105
v. t U. (4
if x y then
107
continue
108
end
b = miin(4.getbirth(()).44 getbbirthh)))))
// Retrieve birth // All intervals for extended induced
110
Add (e,b) b) :
ma matching (see Sec. 2.3
U M.union(I,U)
112
end
return (B(I, B(I.
// Return image persistence pairs
114
Procedure InducedMatching o o
= o;
// Initialize matched refined intervals // Loop over dimension-d
for d + 0 to 1 by do foreach (a, b) ([I, J)a do
117
// For each image persistence pair
118
mi, m, = None; foreach (c, d) B(I)a do
119
// Match left endpoints
120
if c then
121
m, (c, (c;
break
123
end
124
end
125
m; None then continue
1/ Skip search if no match found // Match right endpoints
126
127
end
128
foreach
(c, d) E B(J), do if d then
129
m (c, d); break
131
132
end end
133
134
if m, None then continue end
1/ Skip search if no match found
135
136
Add (m,, (a,b), b), m,) to o Ja:
137
Remove m, from B( a)
139
Remove my from B(J)a: end end
140
return (o(1, (1)
22

---

Under review as a conference paper at ICLR 2023
D COMPUTATIONAL COMPLEXITY
For a grayscale image represented by matrix E TR,, we have n = MN number of pixels and form cubical grid complex of dimension d 2. The computation of the filtration and the boundary matrix can be done efficiently using the CubeMap data structure (see) Wognerr et al. (2012) with O(3"n ddn) time and Oddn) space complexity. Computing the barcodes by means of the reduction algorithm requires cubic complexity in the number of pixels O (see Otter et al. (2017)). Despite our empirical acceleration due the Union-Find class and clearing tricks described in |Bauer & Schmahl (2022); [Bauer (2021)), the order complexity remains ( We need (n22) time complexity for computing the hinal matching and loss. It is noteworthy that Hu al. (2019) also needs Onn²) time complexity to compute the barcode and (n²)) for the matching, whereas Shit et al. (2021) requires relatively lower complexity (n) due to the overlap based loss formulation.
E CONVERGENCE OF TOPOMATCH LOOSS
CREMI
(b) synMnist
(C) ELEGANS
Figure 18: Plot of the empirical convergence curves of our TopoMatch loss for the CREMI, MNIST, and ELEGANS datasets. We plot the TopoMatch contribution in the training loss for varying number of epochs. which is dependent on the dataset size. We show that Topo loss efficiently converges for the different datasets. The absolute magnitude of the loss varies from dataset dataset because TopoMatch is real interpretable measure of dim-O and dim- topological features in the training images. E.g. CREMI has substantially higher number features, especially cycles, than Elegans, therefore, the absolute magnitude of the loss is likely higher.
23

---

Under review as a conference paper at ICLR 2023
F WASSERSTEIN MATCHING
The pth Wasserstein distance is frequently used to measure the difference between persistence diagrams; it is given by
1/p
(B = inf Σ
l1q - 12)
(BD)g((B))
for p 2 where Y runs over bijections Dgm(B, (Bi) ) + Dgm (Bz) that respect the dimension. For
likelihood map L E [0, 1] 1 and ground truth G E (0, jxxx the authors of Hu et al. (2019)
adopt this metric to define the Wasserstein loss
Lw G) min
l1g 7
ggDgm(L)
where 7 runs over all bijections Dgm(L) L) + Dgm(G) that respect the dimension. The bijection % achieving the minimum corre- sponds to the Wasserstein matching Dgm(L) - Dgm (G), which minimizes the total distance of matched points. For the represented topological features this means that the matching is purely based on their local contrast within their respective images. Furthermore, note that Dg) contains exclusively the point (0, 1) since the entries G are contained in {0, 1}. Hence, Y. matches points Dgm L) representing features in L with enough local contrast in descending order until Dgm(G* runs out of points. This proce- dure results in matching of topological features, which potentially exhibit no spatial relation within their respective images (see Fig. 8e 19b] and App. A) and can have a negative impact on the train- ing of segmentation networks. To see this, we distinguish two cases for fixed point g = (41, 92) (L):
(a) L
G
(b) Wasserstein matching
case 1: (false positive) q is matched but there is no spatially corre- sponding feature in G
Figure 19: (a) A predicted likelihood map L and ground truth segmentation G. (b) visualizes the Wasserstein matching Y (only the yellow cycles are matched), i.e. the top-left cycle in L is false negative and the bottom- cycle in L is false positive.
Since is matched to the point (0, E Dgm(G), the loss Lw will be reduced by decreasing the value () and increasing the value (2- Hence, the segmentation network will learn to increase the lo- cal contrast of the feature described by the g (see Sec. 3.2). but it should be decreased.
case 2: (false negative) q unmatched but there spatially cor- responding feature in G: Since q is unmatched, the bijection 7/8 maps it to its closest point ((11 + 92)/2, (q1 + 42)/2) on the diagonal A and the loss Lw will be reduced by increasing the value qı and decreasing the value Q2- Hence, the segmentation network will learn to decrease the local contrast of the feature described by q (see Sec. 3.2), but should be increased.
F.1 FREQUENCY OF INCORRECT WASSERSTEIN MATCHING
Next, we study how frequently these two cases occur. Assuming that the TopoMatch matching is correct, we evaluate the quality of the Wasserstein matching on the CREMI dataset. Therefor, we choose a segmentation model to obtain tabel-predictte and compute both matchings. Among the 37243 matched intervals in the barcodes the predictions by the Wasserstein matching, only 224 have been matched correctly, i.e. it achieves precision of 0.6%.
pairs for every image in the CREMI dataset
F.2 WASSERSTEIN LOSS AS BETTI NUMBER ERROR
For binarized output P and ground truth G. the Wasserstein loss and the Betti number error are closely related. A similar argumentation as in Sec. 3.3 for the TopoMatch loss shows that
Ber (P, G) 2Tw G).
24

---

Under review as a conference paper at ICLR 2023
A lower Betti number enror of model trained with our TopoMatch loss compared to model trained with the Wasserstein loss asserts that the TopoMatch loss produces more faithful gradients during the training of segmentation networks. Note that, empirically, models trained with TopoMatch loss consistently outperform models trained with Wasserstein los with regard to the Betti number error (see Tables 33
G PERSISTENCE DIAGRAM AND BARCODES
1
Dimension
1
0
0
(a) Matching between Barcodes
(b) Bijection between persistence diagram
Figure 20: Illustrations of how to translate a matching between barcodes (a) into a bijection between persistence diagram (b) and vice versa. A red or blue line in (a) is dot of the same color in (b). In (a), a green interval in between a blue and a red line indicates they are matched. In (b), a line connecting two points indicates that they matched. For detail, please refer to Section 3.2
25

---

Under review as a conference paper at ICLR 2023
H ADDITIONAL ABLATION EXPERIMENTS
Table 3: a ablation on the synMnist dataset and the Roads dataset
Dice
eIDice
Acc.
T.M.
T.M.-U
T.M.1
Betti
Beit-O
Betti11
ARI
VOI
OL0DUS
0.670
0.706
0.971
53.958
39. 39.896
14.063
103.917
79.
24.542
0,613
0.817
OWN
0.005
0.670
0.708
0.974
51.250
37.271
13.979
97.583
74.042
23.542
0.647
0.839
0.05
0.667
0.709
0.974
45.396
31.667
13.729
85.042
62.833
22.208
0.655
0.828
0.5
0.663
0.713
0.972
41.500
28.146
13.354
75.083
55.792
19.292
0.690
0.791
0.05
0.604
0.701
0.975
77.292
61.688
15.604
151.250
123. 125
28.125
0.688
0.896
Ronds
ciDice
0.1
0.663
0.697
0.975
81.188
65.979
15.208
158.375
131.708
26.667
0.599
0.885
0.25
0.667
0.701
0.975
79.188
64.125
15.063
154.208
127.917 917
26. 26.292
0.622
0.879
0.75
0.668
0.704
0.975
65.500
51.042
14,4588
125. 833
101 667
24.167
0.615
0.873
0.5
0.663
0.696
0.975
78.625
63.750
14.875
152.41
127 .000
25.417
0.618
0.874
0.0005
0.669
0,706
U.974
53.750
39.521
14.2299
102.500
78 78.3412
23.958
0,651
0.838
Hu et al.
0.005
0.674
0.712
0.974
50,500
36.521
13.979
95.833
72.542
23.292
0.660
0.836
0.05
0.689
0.707
0.974
52.896
80.208
13.688
99.875
77.917
21.958
0.654
0.832
0.5
0.656
0.699
0.970
68. 583
44.604
13,979
106.417
88. 708
16.708
0,709
0.787
0,0005
0.860
0.907
0.962
1.687
0.843
0.844
2.302
1.370
0.932
0.844
0.537
Our
0.005
0.871
0.920
0.962
1.270
0.158
0.812
1.596
0.732
0,861
0.873
0.481
0.05
0.849
0.916
0.955
1.140
0.265
0.875
1.348
0. 0.426
0.922
0.868
0.491
0.5
0.796
0.888
0.939
1.150
0.291
0.859
1.428
0.466
0.962
0.805
0.612
0.05
0.871
0.911
0.963
1.616
0.796
0.820
2.264
1.328
0.936
0.871
0.483
clDice
0.872
U.963
0.816
0.826
2.320
1.384
0.936
0.862
0.506
0.25
0.874
0.917
0.963
1.342
0.519
0.823
1.764
0.826
0.938
0.877
0.461
0.5
0.875
0.922
0.963
1.270
0.436
0.834
1.640
0.700
0.940
0.881
0.454
0,75
0,869
0.921
0.961
1.196
0.401
0.795
1.580
0.622
0,958
0.888
0.429
0.0005
0.872
0.909
0.963
1.881
1.001
0,880
2.650
1.686
0.964
0,880
0.46T
Hi d al.
0.005
0.870
0.908
0.962
1.787
0.911
0.876
2.498
1.514
0.981
0.864
0.501
0.05
0.567
0.916
0.960
1.425
0.502
0.923
1.802
0.764
1.038
0.893
0.425
0.5
0.785
0.862
0.935
1.754
0.562
1.192
1.968
0.840
1.128
0.814
0.589
Table 4: Relative Frame ablation of our method on the Roads dataset
Dice
eiDice
Acc.
T.M.
T.M.O 0
T.M.-
Betti
Betti
Betti-1
ARI
VOI
0.0005
0.670
0.706
0.974
53.958
39.890 896
14.063
103.917
79.375
24.542
0.643
0.847
1on- lon-relative relative
0.005
0.670
0.708
0.974
51,250
37.271
13.979
97.583
74.042
23.542
0.647
0.839
0.05
0.667
0.709
0.974
45.396
31.667
13.729
85.042
62.833
22,208
0.655
0.828
0.663
0.713
0.972
41.500
28.146
13.354
75.083
55.792
19.292
0.690
0.0005
0.669
0.706
0.971
51.729
10.521
14.208
104.3-12
80.542
21.000
0.651
0.835
0.671
0.709
0.974
50.250
36.479
13.771
95.167
72.458
0.661
0.005
0.669
0.712
0.973
46.104
32.271
13.833
84,708
64.042
20.667
0.675
0.818
0.5
0.661
0.711
0.972
41.417
28.167
13.250
75.583
55.833
19.750
U.695
0.787
Table 5: dimension-1 and dimensions-0.1 matching ablation for the Hu al. method on the Roads dataset
Dice
c1Djee
Acc.
T.M.
T.M.-0
T.M.-1
Betti
Betti-O
Betti-1
ARI
VOI
0.0005
0.669
0.706
0.974
53.750
39.521
14.229
102.500
78.542
23.958
0.651
0.838
dim-1
0.005
0.674
0.712
0.974
50.500
36.521
13.979
95.833
72.542
23.292
0.660
0.836
0.05
0.669
0.707
0.974
52.896
39.208
13.688
99.875
77.917
21.958
0.654
0.832
0.5
0.656
0.699
0.970
58.583
44.604
13.979
105.417
88.708
16.708
0.709
0.787
0.0005
0.672
0.709
0.974
54.202
40. 104
14.
104.083
79.708
24.375
0.649
0.839
dim-0.1
0.005
0.673
0.710
0.974
52.750
38, 625
14.125
66.6
76.750
23.917
0.656
0.836
0.05
0. 0.668
0.708
0.974
47. 00.000
33.146
13.85 854
88,083
65.792
22.292
292
U.649
0.832
0.711
0.972
44.708
31.292
13.417
80.583
62.083
18,500
0.692
0.798
26

---

Under review as a conference paper at ICLR 2023
Table Pretraining vs training from scratch of ours and the Hu al. method the Elegans dataset
Training
a
Dice
ciDiee
Acc.
T.M.
T.M.UU
T.M.1
Betti
Betti-0
Betu-1
ART
VOI
Ours I. scratch
0.05
0.882
0.938
0.953
65.06
13.94
51.12
45.72
27.16
18.36
0.919
0.393
CREMI
Ours pretrained
0.05
0.889
0,940
0.957
65.68
14.26
51.42
64.40
27.96
36.44
0.905
0.437
Hu
serutch
0.05
0.880
0.932
0.953
82.76
27.92
54.84
85.60
55.28
30.32
0.905
0.436
Hu ot all pretrained
0.05
0.895
0.942
0.960
66.40
17.76
48.64
75.36
34.96
40.40
0.909
0.425
Ours scratch
0.005
0.919
0.960
0.983
1.700
1.050
0.650
1.90
0.80
1.10
0.927
0.359
Elegans
Ours pretruined
0,005
0.924
0.963
0.984
1.950
1.200
0,750
2.30
1.20
1.10
0.939
0.313
scratch
2.150
2.50
0.350
Hu et al. pretrained
0.005
0.921
0.962
0.984
2.075
1,250
0.825
2.55
1,30
1.25
0.929
0.349
I DATASETS AND TRAINING SPLITS
The full training routine with the complete trainingsets and testsets will be available with github repository ] All our trainings are done on patches of 48 x 48 pixels. For the buildings dataset Mnih (2013), downsample the images 375 375 pixels and randomly choose 80 samples for training and 20 for testing. For each epoch, we randomly sample 8 patches from each sample. For the Colon dataset Carpenter et al. 20066; Ljosa et (2012). we downsample the images 256 256 pixels; we randomly choose 20 samples for training and 4 for testing. For each epoch, we randomly sample 12 patches from each sample. For the CREMI dataset Funke et al. (2019). we downsample the images to 312 x 312 pixels; we choose 100 samples for training and 25 for testing. For each epoch, we randomly sample patches from each sample. For the Flegans dataset [[josa et al.) (2012), we crop the images to 96 96 pixels; we randomly choose 80 samples for training and 20 for testing. For each epoch, we randomly sample patch from each sample. For the synMnist dataset LeCun (1998), synthetically modify the MNIST dataset to image size of 48 48 pixels; please our GitHub repository for details; we train on 4500 full, randomly chosen images and use 1500 for testing. For the Roads dataset MMih (2013), downsample the images to 375 x 375 pixels; randomly choose 100 samples for training and 24 for testing. For each epoch, we randomly sample 8 patches from each sample.
J NETWORK SPECIFICATIONS
We use the following notation:
1. In(inpul channels), Out(oulpul channels). BI(oulpul channels) present input, out- put, and bottleneck information (for U-Net);
2. C(filter size, output channels) denote convolutional layer followed by ReLU and butch-normmllizatin;
3. Uffilter size, output channels) denote trans-posed convolutional layer followed by Rt. and batch-normalization:
4. 4 2 denotes maxpooling;
5. @ indicates concatenation of information from an encoder block.
J.1 UNET CONFIGURATION.
We this configuration for CREMI, SynthMNIST, Colon and Elegans dataset. This is lightweight U-net which has sufficient expressive power for these datasets.
ConvBlock: CB(3, out size) C(3, out size) - C(3, out size) + 2
UpConvBlock: (3, out
out size) = (3, out size) + + + C(3, out size)
Encoder IN (133 ch) + C3(3, 16) + CB(3,32) + CB(3,64) + CB(3, 128) + C3(3, 256) + (256)
"github/anonymous
27

---

Under review as a conference paper at ICLR 2023
Decoder: (2566) - (3 256) - UB(3.128) (B(3,64) UB(3.32) - UB(3,16) Out(1)
J.2 UNET CONFIGURATION-I]
We had to choose a different U-Net architecture for the road and building dataset because realized that larger model is needed to learn useful features for this complex task.
ConyBlock: CB(3, out size) = (3, out size) - C33 out size) -+1 2
UpCon/Block: U3,3,0t out size) (3, out size) - @ C(3, out size)
Encoder (3 ch) + CB(3, 64) + CB(3, 128) + CB(3, 256) CB(3, 1024) B(1024)
7 CB(3,512) +
Decoder: B(1024) + UB(3,1024) - UB(3,512) + UB(3,256) + UB(3, UB(3, 64) + Out(1)
K EVALUATION METRICS
We evaluate our experiments using a set of topological and pixel-based metrics. The metrics are computed with respect to the binarized predictions. Here, TopoMatch constitutes the most meaning- ful quantification, see section 3.3 We calculate the TopoMatch metrie for dimension-O (T.M.-O) and dimension-1 1 (T.M.-1) well as their sum (T.M.). Furthermore, implement the Betti number error for dimension-0 (Betti 0), dimension-1 (Betti 1), and their sum (Betti):
(a. -I (d((D())o.s (a(D())) d=0
It computes the Betti numbers of both foregrounds and sums up their absolute difference in each dimension, i.e. it compares the topological complexity of the foregrounds. It is important to consider the dimensions separately since they have different relevance different datasets. E.g., Roads has many 1-cycles, whereas Buildings has many 0-cycles (connected components).
the traditional Dice metric and Accuracy, which describe the in total cor- rectly classified pixels, as well as the cIDice metric from Shht et al. (202T). Here, we calculate the elDice between the volumes and the skeleta, extracted using the skeletonize function of the skimage python-library. We compute all metrics on the individual test images of their respective size (without patching) and take the mean across the whole testset.
Additionally,
28

---

Under review as a conference paper at ICLR 2023
L BASIC DEFINITIONS AND TERMINOLOGY
L.1 CUBICAL COMPLEXES
d-dimensional (eubical) cell in I is the Cartesian product [T 4, of intervals 1, [aj, by] with d E 2, by E {ag, az+ +1 and d [O.....n] is the number non-degenerate intervals among (I...., Ia).
If and are cells and c S d, we call face of of codimension dim(d) dim(c). A face of codimension one is also called facet.
d-dimensional (cubical) complex in I" is a finite set of cubical cells in IR" with maximal mension d that is closed under the face relation, i.e., if d E K and e is face of d, then c E K. Furthermore we call a cubical complex K' C K a subcomplex of K.
A filtration of cubical complex K is given by family (Kr)reR of subcomplexes of K, which satisfies:
Kr K, for all S.
K K, for some E R.
A filtered (cubical) complex K, is cubical complex K together with nested sequence of sub- complexes, i.e., a sequence complexes
0 Ko Ki Km K.
A function f: K - R on cubical complex is said to be order preserving if f(c) S f(d) for face of a cell d.
L.2 HOMOLOGY
A chain complex C. consists of family {Ca)dez of vector spaces and family of linear maps (Qg: Ca + Ca-13deE that satisfy 0a-1 o 0g = O.
map f: K + K' between cubical complexes is said be cubical if it respects the face relation, ie.. [c) must be a face of (dd in K' if e is a face of d in K.
L.3 HOMOLOGY OF CUBICAL COMOPLEXES
Homology is powerful concept involving local computations to capture information about the global structure of topological spaces. It assigns a sequence of abelian groups to space which encode its topological features all dimensions. A feature dimension-0 describes connected component, in dimension-1, it describes a loop, and in dimension-2, it describes cavity. It also relates these features between spaces by inducing homomorphisms between their respective homol- ogy groups. We briefly introduce the homology of cubical complexes with coefficients in F2, For more details, we refer to Kaczynski et al. (2004).
For d Z, denote by K2 the set of d-dimensional cells in a cubical complex K. The F2-vector space Ca(K) freely gener- ated by K2 is the chain group of K in degree d. We can think of the elements in Ca(K) as sets of d-dimensional cells and call them chains. These chain groups are connected by linear bound- ary maps 0g: Ca(K) + CK-)(K), which map cell to the sum of its faces of codimension and are extended linearly to all of Ca(K). The cubical chain complex C, CKK is given by the pair ((Ca(K))azz) (Q.). We denote by Za(K) = ker 0₂ the subspace of cycles and by Ba(K)
(a) 1-cell
(b) 2-cell
(c) 1 1-cycle 22 (d) 1-cycle
Figure 21: (a) and (b) show cells and their boundary (red). (c) and (d) visualize two ho- mologous 1-cycles (blue) in cubical complex.
im 8.+1 the subspace of boundaries in Ca(K). Since d--1 o Og = 0, every boundary is cycle and the homology group of K in degree d is defined by other words, Ha (K) consists of equivalence classes of d-cycles and two d-cycles
the quotient space Ha(K) == (K)/ ( (K).
29

---

Under review as a conference paper at ICLR 2023
21: 22 equivalent (homologous) if their difference is boundary. For convenience, define (K) = Daz H.(K). Note that the homology groups still carry the structure of a P2-vector space and their dimension Ba(K] (K) = dimg, (Ha(K)) is the dth Betti number of K.
Homology does not only act spaces; it also acts on maps between spaces. Therefor, a cubical map f: + K' induces a linear map Cf)::: C.(K) - C. (K"), by mapping a cell c E K with dim(f(c) dim(c) to f(c) and extending this assignment linearly to all of C.(K). Then C.( descends to a linear map Hz(f): (K) - H. (K') in homology since d C. Cx(f) o
L.4 PERSISTENCE MODULES
A persistence module M consists of family {Mr of vector spaces, which connected by linear transition maps maps Mr.:: M, - M, for all r S 8, such that
(1) M id for all R,
(2) M,,t M = M,, for r Stst.
M is said to pointwise fiite-dimeenional (p.f.d.) if M, is finite-dimensional for every r E A basic example of a persistence module is an interval module C(T) for given interval / R. It consists of vector spaces
F2 if E 1, (0
C(J),
otherwise.
and transition maps
fidg, 0o
Trr,ET otherwise.
C(I)r,
for S 8.
morphism +: .M + between persistence modules is a family {0, M, + N,)reR of linear maps, such that for all the following diagram commutes:
Mr.e
M,
Mg
d
+
N,
N
Nr.e
We call & isomorphism (resp. monomorphism, epimorphism) of persistence modules if 2, is a isomorphism (resp. monomorphism, epimorphism) of vector spaces for all r E R.
For family (Mi)er of persistence modules, the direct sum Dier M, is the persistence mod- ule consisting of vector spaces (@ier M,), (M,,, for all E R and transition maps (+ Mi), (M:)), for all S E I.
A multiset X consists of a set XX| together with a multiplicity function mult |X] + (o))))
Equivalently be represented by its underlying set ILX -Une|x] I (z) (x). We say X finite if its underlying set IIX finite and its cardinality #XX given by the cardinality of its underlying set.
Let K. be a filtered cubical complex and L, a cell-wise refinement according the compatible ordering .I...., ej of the cells K. The boundary matrix B Ffxt of L, is given entry-wise by
[1 if o is facet of oj Bij (0 otherwise.
L.5 MATCHINGS
A map f: X + Y between multisets is map f: IIX -> IIY between their underlying sets.
matching a: X + Y between multisets a bijection o: X' + Y for some multisets X', that satisfy TTXX C ITX and ITY" ITY. We call
30

---

Under review as a conference paper at ICLR 2023
coim((r) X' the coimage of
im(a) = Y' the image of d,
ker(o) = X X' the kernel and of a,
coker(a) = \ Y' the cokernel of o.
For morphism @: M + N of persistence modules, the image of & is the persistence module im) with ( (m)) and transition maps (n))r,, = Nr, (im.)) im( + im( for r, R.
Let N be persistence modules, We call M a (persistence) submodule of N if M, is subspace and the inclusions i, M, > N, assemble to persistence map (1,)rER.
of N, for every In this case we write M S N.
The composition of two matchings X 4 3 Z is given by the composition of the bijections
(Y") a Y (Y
with Y" = (m)) ) n II co)m)(02)
persistence module M said to be staggered if every real number E R occurs at most once as endpoint of interval in (MM).
31


Reviews:
[{"review_id": "xUk1AB2P1Fg", "reviewer": "Reviewer_GXoX", "summary": "", "questions": "", "limitations": "", "rating": 6, "confidence": 5, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "This paper shows how induced matchings guarantee the spatially correct matching between barcodes in a segmentation setting. Furthermore, this paper proposes an efficient algorithm to compute TopoMatch for images. Also this paper shows that TopoMatch is an interpretable metric to evaluate the topological correctness of segmentations. Moreover, this paper demonstrates how induced matchings can be used to train segmentation networks and improve the topological correctness of the segmentations across all 6 baseline datasets while preserving volumetric segmentation performance.", "summary_of_the_review": "This paper is a non-trivial extension of Hu et al.(2019) and achieves better topological performances. ", "strength_and_weaknesses": "**Strengths**:\n\n1. This paper achieves a spatially correct matching between the topological features (persistence barcodes) of label (ground truth) and prediction (output of the neural network).\n\n2. This paper proposes an efficient algorithm to compute TopoMatch for images. This paper shows that TopoMatch is an interpretable metric to evaluate the topological correctness of segmentations. It is better than the Betti number as an evaluation metric.\n\n3. Matching L & G directly has spatial matching issues; using induced matching via map C helps with spatially correct matching.\n\n4. This paper uses both background and/or foreground class topology, depending on dataset.\n\n**Weaknesses**:\n\n1. Values in Table 1 are not correctly bold (worse performing is also bold).\n\n2. The proposed method achieves worse pixel-wise performances compared with baselines.", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}, {"review_id": "piFH5CqjUVr", "reviewer": "Reviewer_WAAt", "summary": "", "questions": "", "limitations": "", "rating": 6, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "In this paper, the authors propose a new loss and evaluation metric based on persistence theory for matching different image segmentations. The proposed loss can be quite different from the usual Wasserstein distance between persistence diagrams, and is rather based on the algebraic foundations of persistence theory, which turns out beneficial for practical purposes as the Wasserstein distances often induces matching errors. Finally the authors provide an exhaustive set of numerical experiments showcasing the efficiency of the new loss.", "summary_of_the_review": "Overall, I think the paper is fine. The writing could be improved by adding some experiments from the supplementary inside the main body of the text and by simplifying a bit the theoretical section, but I think it is OK globally.", "strength_and_weaknesses": "Strengths:\n---The proposed loss seems quite efficient from the numerical experiments\n---It is rather original as topology-based segmentations are often based on standard distances between persistence diagrams\n\nWeaknesses:\n---I think the writing of the paper could be improved, as I find it quite difficult to follow for someone that is not aware of topological data analysis and its algebraic foundations.\n---I think it would be interesting to compare against the simpler, more naive method of using the Wasserstein distances between L and min(L,G) and between min(L,G) and G. It seems that composing these two matchings would already provide better segmentations than the Wasserstein distance between L and G. Why are induced matchings better than this?\n---Optimizing losses based on persistent homology usually requires heavy mathematics (http://proceedings.mlr.press/v139/carriere21a.html, https://link.springer.com/article/10.1007/s10208-021-09522-y), so I was wondering if the gradient of TopoMatch is well defined also, and if it enjoys some kind of convergence guarantees?", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "2: The contributions are only marginally significant or novel."}, "extra_text": {}}, {"review_id": "npB8uH7E2sK", "reviewer": "Reviewer_jgui", "summary": "", "questions": "", "limitations": "", "rating": 5, "confidence": 2, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "This paper provides a metric TopoMatch to evaluate the topological correctness of image segmentation masks. TopoMatch matching is based on induced matching and its advantage over Wasserstein matching is its consideration of spatial correspondence of topological features. Also, TopoMatch can be used as a loss to improve the segmentation results. This method is evaluated on six datasets. Although the segmentation accuracy is not always the best, its topological correctness performs best in all experiments.", "summary_of_the_review": "Overall, the current shape of this paper makes it not easy to be understood. The experimental results do not convince me to choose it for my segmentation task. ", "strength_and_weaknesses": "Strengths:\n\n +) This paper works on an interesting and important task, the topological correctness of segmented masks. \n\n +) The proposed TopoMatch sounds reasonable according to its description and experimental results. \n\nWeakness:\n\n -) The writing of this paper could be greatly improved for a better understanding. For instance, more detailed explanations of figures are desired. In Fig.1, it says the same color means the matched cycles. How about white color? A further explanation of Fig.1 in the main text is missing, which takes time to get the information this figure conveys.  Also, the main content should be self-contained and understandable without the need of an appendix. However, in Section 3.3, the reader needs to read the appendix to understand #ker and #coker. \n\n-) More explanation of the physical meaning of TopoMatch is desired. What is p in the TopoMatch loss equation? \n\n-) The comparison image is defined as C = min(L, G) in the main text, while in the caption of Fig.7, it is defined as C = max(L, G). Why the TopoMatch matching is the composition of two induced matching? \n\n-) The contribution of this paper should be explicitly pointed out. It seems like the main contribution is the use of two-induced matching to define a new metric, which seems to be incremental. \n\n-) The experimental results show that the correction of the topology of segmentation hinders the improvement of segmentation accuracy. Also, once the dice score is over 0.9, the topology correctness, even the spatial correspondences, would not be a big issue, as demonstrated by the Betti number. Is it necessary to have such a complex term in the loss function? Or can we choose a good segmentation mode and just use the Betti number as a constraint? It seems like improving the segmentation accuracy is another good way to correct the topological issues of segmentation. So, in what situations, we do need the topology correctness term? \n\n-) Perhaps more descriptions on the meat of this paper while concisely introducing some background and making connections to the method proposed in this paper. ", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "2: The contributions are only marginally significant or novel.", "empirical_novelty_and_significance": "2: The contributions are only marginally significant or novel."}, "extra_text": {}}]

Author rebuttal:

Decision: Reject