Topograph: An Efficient Graph-Based Framework for Strictly Topology Preserving Image Segmentation
Authors: Laurin Lux
Alexander H Berger
Alexander Weers
Nico Stucki
Daniel Rueckert
Ulrich Bauer
Johannes C. Paetzold
Venue: ICLR 2025 Spotlight (2025)
Keywords: Image Segmentation
Topology
Graph
Primary area: learning on graphs and other geometries & topologies
TL;DR: A novel metric and loss function based on component graphs for topology preserving image segmentation.

Abstract: Topological correctness plays a critical role in many image segmentation tasks, yet most networks are trained using pixel-wise loss functions, such as Dice, neglecting topological accuracy. Existing topology-aware methods often lack robust topological guarantees, are limited to specific use cases, or impose high computational costs. 
In this work, we propose a novel, graph-based framework for topologically accurate image segmentation that is both computationally efficient and generally applicable. Our method constructs a component graph that fully encodes the topological information of both the prediction and ground truth, allowing us to efficiently identify topologically critical regions and aggregate a loss based on local neighborhood information. Furthermore, we introduce a strict topological metric capturing the homotopy equivalence between the union and intersection of prediction-label pairs. We formally prove the topological guarantees of our approach and empirically validate its effectiveness on binary and multi-class datasets, demonstrating state-of-the-art performance with up to fivefold faster loss computation compared to persistent homology methods.

Published as a conference paper at ICLR 2025
TOPOGRAPH: AN EFFICIENT GRAPH-BASED FRAME- WORK FOR STRICTLY TOPOLOGY PRESERVING IMAGE SEGMENTATION
Laurin Lux* 1,3,5 Alexander H. Berger* Alexander Weers', Nico Stucki Daniel Rueckert1.23, Ulrich B.uer Johannes C. Pactzold2.5
Schooo of Computation, Information and Technology, Technical University of Munich, DE *Department of Computing, Imperial College London, UK
Munich Center for Machine Learning, DE
MMunich Data Science Institute, Technical University of Munich, Munich, DE
Weill Cornell Medicine, Cornell University, New York City, NY, USA
[laurin. 1...lll lux, berger ) @ umtumm de; jpaetzo www.tted..edd........... cornell.ee.e.oooo
ABSTRACT
Topological correctness plays critical role in many image segmentation tasks, yet most networks are trained using pixel-wise loss functions, such as Dice, ne- glecting topological accuracy. Existing topology-aware methods often lack robust topological guarantees, are limited to specific use cases, or impose high com- putational costs. this work, we propose a novel, graph-based framework for topologically accurate image segmentation that is both computationally efficient and generally applicable. Our method constructs a component graph that fully encodes the topological information of both the prediction and ground truth, al- lowing us to efficiently identify topologically critical regions and aggregate loss based on local neighborhood information. Furthermore, we introduce strict topo- logical metric capturing the homotopy equivalence between the union and inter- section of prediction-late label pairs. We formally prove the topological guarantees of our approach and empirically validate its effectiveness on binary and multi-class datasets. Our loss demonstrates state-of-the-art performance with up fivefold faster loss computation compared to persistent homology methods
INTRODUCTION
In segmentation and structural analysis tasks, maintaining topological integrity is often more critical than simply improving pixel-wise accuracy. For example, medical imaging, the topological in- tegrity of segmented structures, such as blood vessels Todorov et al. (2020) or neural pathways, can be crucial for accurate diagnosis and functional analysis (Briggman et al.) 2009). However, topolog- common in practice, even when pixel-wise accuracy
ical errors, such loss of connectivity, high. Standard pixel-based loss functions, such as Dice-loss, do not adequately address these issucs. While they minimize pixel-level discrepancies, they do not take into account changes in topology, which may be caused by few or even single pixels. As a result, even small pixel-wise errors can lead significant topological failures.
Previous works have shown how different topology-aware methods can improve the integrity of tar- get structures without sacrificing pixel-wise accuracy. Task-specific methods, such those designed for tubular structure segmentation (Shit et al. [021 Kirchhoff et al.] 2024). are computationally ef- ficient and perform well in their respective domains. However, they do not generalize effectively to other types of topological structures or datasets. In contrast, persistent homology (PH)-based meth- ods can provide strong theoretical guarantees and deliver state-of-the-an performance (Hu et al.) 2019 Stucki et al. 22033] Clough et al.) 2020), but are computationally more demanding. Other lopology-aware methods can be more versatile and computationally efficient, but lack theoretical
guarantees for topological correctness (Mosinska et al. 2018: Funke al. 2018 Hu et al. 2021
"Equal Contribution
Code available at http:////gggggaooaooooaaaaaaa/ar

---

Published as a conference paper at ICLR 2025
y P=10=1
0
0,0
Figure 1: Visualization of the proposed component graph representation. Left: Input image; Right: Overlay of the prediction (P) and ground truth (G). The bright green lines indicate the foreground structures in the ground truth, with (darker) green regions indicating correctly predicted foreground and pink regions representing incorrectly predicted foreground. A combined component graph g(P, G) is constructed to efficiently identify topological errors, which are used to compute a loss.
This work proposes loss function that generalizes to various segmentation tasks where topology is crucial. Our method is based on component graph that combines joint topological information of ground truth and prediction (see Figure []. theoretically founded analysis of nodes graph allows the identification of topologically critical regions, which we then use for loss computation.
Our contribution. We (1) establish a metric that captures topological correctness with strict the- oretical guarantees, especially capturing the homotopy equivalence between union and intersection of label/prediction pair, and (2) formulate general topology-preeeeeooo preserving loss for training arbitrary segmentation networks. Specifically, our loss formulation
1. surpasses existing methods in terms of topological correctness of predictions:
2. provides stricter topological guarantees than existing works, i.e., formal guarantees beyond the homotopy equivalence of ground truth and segmentation, by extending the enforced ho- motopy equivalence to their union and intersection through the respective inclusion maps, capturing the spatial correspondence of their topological properties;
3. is time and resource-efficient because of its low asymptotic complexity (O(n a(n))) and empirically low runtime;
4. and flexible, making it applicable to arbitrary structures and image domains.
We empirically validate the prediction performance on various public datasets for binary and multi- class segmentation tasks.
Related Work Significant progress has been made in segmentation methods that preserve topo- logical accuracy. The use of PH-based loss functions for training segmentation networks (Hu al. 2019 Clough et al. 2020) ensures global topological correctness by aligning Betti numbers when minimized to zero. However, two issues persist: most methods cannot guarantee spatially related matched structures, and 2) computational cost. (ttuci et al. (2023) introduce the Betti Matching con- cept, which ensures spatially correct barcode matching. However, the cost of barcode computation substantially higher compared to overlap-based methods, making its derived methods applicable only to relatively small patch sizes up to 80 80. This limits the applicability to medical and natu- ral images, where whole images are commonly an order of magnitude larger. Another limitation is the gradient's 's dependence on just two simplex values, which Nigmetov & Morozov (2024) recently showed to hinder optimization speed. While other methods are computationally more efficient (Hu) jet al., 2021 Mosinska et al.) (2018), they offer limited guarantees of topological correctness. Task- specific, overlap-based approaches have been proposed for tubular structures where connectivity is the key topological feature. CIDice (Shit et al. 2021) calculates a loss term based on the union of ground truth skeletons and predicted volumes, method extended in recent studies (Kirchhoff al. features through iterative feed-
2024 Menten et al., (202).. Other approaches refine
back learning strategies (Cheng et al. 2021) rely on post-processing networks (Li et al. 2023
2

---

Published as a conference paper at ICLR 2025
Ground Truth
Prediction
Combined
Representation
Graph Representation
Prediction
Topograph
Loss Aggregation
Error Classitcation
Topology Loss
Figure 2: Overview of our proposed method. (I) We the prediction in each iteration of the train-
ing phase to build combined image with the labels. (2) Based on the combined image, we construct superpixel graph G(P. G) that encodes the full topological information of both segmentations. (3) We can identify topologically relevant errors using each node's 's local neighborhood. (4) Finally, we can backtrack the critical errors image regions and calculate topological loss function. This allows an efficient formulation of a topological loss with strict theoretical guarantees.
Wu et 2024). In neuroscience, prior work presented various segmentation methods minimizing false split and false merge errors in neuron segmentation tasks (Funke et al. 2018 Briggman al. 2009). These errors are related to topological segmentation errors in dimension Funke al. (017)) presented the TED metric measuring the number of these errors outside pre- defined "tolerance" region. However, none these approaches generalize effectively to arbitrary structures and complete topological information.
Accordingly,
METHOD
loss function based on the combined component graph G(P, G), which encodes topological information from both the label and prediction. Using this graph, we implement an algorithm for identifying regions in the prediction that must be corrected adhere to the ground truth topology. Thereby, we aim to optimize the network such that topologically critical regions are correctly predicted while less significant regions are ignored. To construct graph, pair the prediction P and ground truth G into 4-class image C that is then partitioned into superpixels via connected component labeling. Each superpixel, composed only of pixels with the same class in C, corresponds exactly node in the resulting component graph G(P, G). This planar and bipartite graph, with edges connecting adjacent superpixels, captures the topology of both P and G. Analyzing the local neighborhood of each node in ((P,G) G), nodes that represent incorrectly predicted regions causing topological errors. Formally, the set of critical nodes is defined all incorrectly predicted nodes that do not have exactly correctly predicted foreground and one correctly predicted background neighbor. The final loss function is obtained by pixel-wise aggregation for each critical region. A schematic overview of the method from graph generation to loss calculation is provided in Figure 2 In the following sections, we provide a detailed description of our method, its theoretical guarantees, its asymptotic complexity, and some interesting adaptations to the method.
We propose
component
identify critical
2.1 COMPONENT GRAPIIS ENCODING DIGITAL IMAGE TOPOLOGY
Our method relies on the fact that a component graph (TT) of a binarized segmentation encodes the relevant topological information of underlying 2D segmentation. The vertices V(G resemble the connected components foreground and background, whereas the edges ((G(I) encode the neighborhood information of these components.
3

---

Published as a conference paper at ICLR 2025
We model the topology of binarized digital image I E {0, 1| by two-dimensional cubical grid complex C = [0, h] x [O, w| C RR² using the T-construction, ie., a voxel (t,j) E {1.....h} h x {I....,w) W) corresponds to top-dimensional cell j 1, x 1.j] E C. To apply duality arguments and exclude edge cases, we add an additional background cell e that is attached to the boundary [0, m0] {0,n) U m0, [0, n] of C. This turns the cubical grid complex C into CW-complex that is homeomorphic to the sphere S
The foreground FT)) is given by the closure of the union of 2-cells whose voxels take value 1 and its background B()) is given by the complement Č F(J). Foreground and background decom- pose into connected components Fi,..., F' and B,...., Bi, which together form the vertices of its component graph (I)) The component graph is a bipartite tree with edges between foreground component F; and background component Bj if and only if P, * Q. Note that the component graph determines the homotopy type of the foreground F(I), since its Betti numbers can be inferred from it. We find bo to be the number of foreground vertices of GTT) and
by (1(())) = Σ degg(r)(E)) 1,
where degg(r) (F;) denotes the number of edges in (T)) that contain vertex F,. Beyond that, starting from the surrounding background node along a path to a leaf of G(T) informs about the relationship of consecutive nodes of the path. A background component following a foreground component is a hole within the previous foreground component.
We consider the thickened foreground (I( (F(()) and the thinned out background (.( C \ (I) to prevent connectivity issues in the combined component graph. Here, for a subset X C R., we denote by (X) {y E IH? | 3x E X: || y xc E]. Note that F(()) deformation retracts onto F(T) and (T) deformation retracts onto B.
Combined component graph Based an overlay of binarized prediction P (0, 13 and its ground truth segmentation G (0, 1xx we can cover the CW-complex C by four subspaces:
1. TP = F.(P) n F2. (G) (Irue positive),
3. FN = (2( (false negative),
2. TN = Be. (true negative).
4. FP F.(P) (G) (false positive).
Each of these subspaces decomposes into connected components TP....., Tp,. ........ TN,, FN,..... FN., FP,,.... FP,, which form the vertices of the combined component graph G(P, G)- Furthermore, we add an edge hetween two vertices of (PP, G) if and only if their closures intersect in an infinite set of points, i.e., the intersection contains 1-dimensional cell.
The combined component graph G(P, G) combines the information of ground truth and predicted segmentation. Since we use the thickened foregrounds and thinned out backgrounds (for visualiza- tion, see Figure 7). g (. G) is a bipartite graph whose edges only occur between vertices contained in T = TPU TN and F FP UFN. Figure 2 visualizes G(P, G)) (bottom right) for a given predic- tion and ground truth segmentation (top left) The component graphs ((P) and ((G) are quotients of ((P, G') that respect to the respective image. Within g P, G), it is possible to identify critical components of the prediction that represent topological errors in the segmentation.
be obtained by contracting all edges incident nodes with the same label with
2.2 IDENTIFYING TOPOLOGICALLY CRITICAL COMPONENTS
Given G(P, G). our goal is to find set V. of critical vertices, whose pixels must be adjusted to guarantee the same homotopy type for prediction and ground truth. Correcting the complete set of incorrectly classified vertices 1/- = {w (PG G)) S F} forces equality of ground truth and prediction. However, a loss that is defined based on this relabeling is similar to a pixel-wise loss and does not focus topologically critical components over topologically irrelevant components. Therefore, we aim to identify all vertices V, S VE whose labeling is irrelevant for the homotopy type of the prediction and exclude them from V. to emphasize the importance of topological errors. In ((P, G). those vertices can be characterized as vertices that have exactly one correctly classi- fied foreground neighbor and exactly one correctly classified background neighbor. We define the
4

---

Published as a conference paper at ICLR 2025
regular vertices
V = {o Vp (3) E (t) A (3! (V)(:.)(()) 5 TN)). (1)
Here, (v) denotes the neighboring vertices of in ((P.C). We provide intuition for this definition in the Supplementary Material (see Figure
2.3 COMPONENT GRAPH LOSS
After excluding the regular vertices V,, which are incorrectly classified but irrelevant for the topol- ogy of the prediction, the set of critical vertices is given by
Ve Vp V
and a loss can be created from the remaining incorrectly classified vertices in this set.
We calculate the loss of single vertex the average score of the predicted class among all its pixels (T.). The combined loss is the sum of all loss terms from the individual regions. Notably, the loss aggregation for each vertex in V, remains a design choice and can be adjusted to the particularities of any target task. With the design choices described above, the loss LCG can be denoted as
LCG =a Σ Dv
(3)
VEV.
where is factor balance LoG with pixel-wise loss term. In this formulation, all pixels that constitute the component of a vertex contribute to the loss via their class score.
2.4 TOPOLOGICAL GUARANTEES OF THE COMPONENT GRAPH LOSS
By definition, our loss formulation drops to zero if and only if the set critical vertices is empty, either because misclassified vertices remain because all misclassified vertices in g(P, T) are regular. We obtain the following proposition
Proposition 2.1. Lo G) O, the commutative diagram consists of deformation retractions:
F((P)
F(PP) (2)
(G)
G2)
We sketch a proof of the fact that the inclusion F. (( (G) + F.(P) is deformation retraction. The following proof by induction be applied similarly to the other inclusions.
Sketch of proof. First note that (P(P) n F2. (G) = TP and F, F((P) = TP FP. We will prove the
statement by induction the number of regular vertices in g G) that contained in FP.
K(P)
R(P))
K(P) n (a))
R.P) UWWO)
EXPI
U
Pu((]
Fs(G)
(a)
(b)
Figure 3: Inclusion diagrams for two exemplary prediction label pairs (a) and (b). For example in
(a), all the inclusions are homotopy equivalences, which corresponds to the absence of critical nodes G(P, G). In example (b), none of the inclusions are homotopy equivalences, which corresponds to the presence of critical nodes in G(P, G).
5

---

Published as a conference paper at ICLR 2025
For 0 regular vertices, (P( n (G) F.(P) holds and n + F.(P) is triv- ially a deformation retraction. So assume that FP contains n > regular vertices, FPI....,FF FPn- By induction hypotheses, the space X TP
FP,) deformation retracts onto TP. Hence, it remains to show that TP L FP deformation retracts onto X. Since consider thickened foregrounds and thinned out backgrounds, the closure of any connected component of FP is home- omorphic to closed disk D with finitely many open balls B cut out. By assumption that FP, is regular, it has exactly one neighbor TP; contained in TP and exactly one neighbor TN; contained in TN. Furthermore, it cannot have any additional neighbors, since G(P, G) is bipartite. Therefore, it has exactly two neighbors, which are connected subsets of R22 and we conclude that it can be at most one ball that cut out the disk. We distinguish two cases:
Case 1: In case the closure of FP,, is homeomorphic to D², its boundary is homeomorphic nected parts: a shared boundary with TP; and shared bound- ary with TNy. This follows by comnectedness of TP, and TN Hence, without loss of generality, we can assume that the north- ern hemisphere of 5a is the shared boundary with TP, and the southern hemisphere is the shared boundary with TN5. Then clearly TP L FP deformation retracts onto X by pushing the shared boundary of FP,, with TN, along the disk onto the shared boundary of FP,. with TP;-
5 and divided into two con-
TP:
FP.
TN₂
Case 2: In case the closure of FP,, is homeomorphic nulus D \ B², its boundary is homeomorphic to two copies of St. One of those is the shared boundary with TP,, and the other one is the shared boundary with TN;. This time, we can push the shared boundary with TN, through the annulus to the shared boundary with TPP: to see that TP FP deformation re- tracts onto X.
FP
TP,
TN,
As an immediate consequence of this deformation retractions, Lee = 0 implies that the BM error (Stucki et al. (203)) is too. This is because homotopy equiva- lences induce isomorphisms in homology and. therefore, the obtained induced matchings match identical intervals the respective barcodes. Therefore, Loa a more sensitive loss function than the BM loss. Similar to Betti Matching (BM), our approach does not only consider the topological spaces represented by images but also takes the natural inclusions that connect them into account. While Betti Match- ing uses induced matchings of persistence bar- codes to compare prediction and label with spect to the inclusions into their union, LCG also considers the inclusions of their intersec- tion, see Figure and Supplementary Figure
(a) Ground Truth
(b)) Prediction
(c) Prediction = 0, AT के 0,
Am = 0, am =0 Tे 2,
Bo = B =
=0=
2.5 DIU METRIC
We propose new metric that describes the Discrepancy between Intersection and Union (DIU) strict measure for topological accu- racy. The metric is based on the linear map i, (.F n (G)) + H. (F.(P) F2. in homology (with coefficients in the field with two elements, F2) induced by the inclusion i
(d) Prediction 85" 0
(e) GT nz
(0 GZ
B 3 B1
By 2
0, =0
B1
F2. (G))
Figure 4: Topological metrics for the characteri- zation of different network predictions (b-d) with given ground truth (a). Evaluating Betti numbers does not favor Pred. X over Y. Similarly, the Betti matching metric does not favor Y over Z. Only the DIU metric (comparing intersection (e) and union (f) prefers the semantically favorable Y over Z.
F.(P) n F2. (G)) + (P) U (G) of the intersection into the union. Formally, gerr is defined as
gerr dim(ker i.) + dim(cokeria i.).
(4)

---

Published as a conference paper at ICLR 2025
By Alexander duality, this quantity can be expressed purely in terms of connected components
(homology in degree 0) of foreground and background. Writing (P) n B2 (G) - B. U
Bzc (G) of the intersection of backgrounds into their union. We have
dim(ker 11) = dim(coker jo), and dim(coker i1) dim(ker jo).
(5)
Thus, we have
cerr dim(ker io) + dimm(cokee io) + dim jo) + dim(coker jo).
(6)
Intuitively, the DIU metric с counts the number of components in the union that do not have counterpart in the intersection (dim and the surplus of intersection components that cor- respond to the same component in the union (dim(ker)) Figure (d) shows an example of cases where the Betti number error and the Betti matching error both fail to capture the semantic differ- ence between ground truth and prediction. We provide more examples of DIU metric scores in the supplementary material Figures 11 and 12 The DIU metric is similar to counting false splits and false merges (e.g., (Funke et al.) 2017) as also counts topological errors in dimension O. However, the DIU considers topological differences between union and intersection and errors in dimension 1. See Suppl. A.9 and anrgerr et al. (2024)) for a detailed comparison.
2.6 COMPUTATIONAL COMPLEXITY
Compared to 2D PH approaches (O log n) (Edelsbrunner & Harer 2022)), our method's asymp- totic complexity is lower. The creation of G (P, G) using connected component labeling (Wu et al., 2009] and extraction of the node labels can be done in O(n - c<(n)), where a is the inverse Acker- mann function, upper-hounded by 5 in practice. Identifying the regular nodes depends on evaluating the node's s 1-hop neighborhood. Given the graph's planarity, the number of edges is upper bounded by Onn). Therefore, evaluating the direct neighborhood of all nodes is possible in linear time. For the final aggregation of pixel scores, every pixel evaluated at most once, which preserves the lin- complexity. In summary, loss Log can be computed in linear time O(n (n)).. Empirical evaluations on the runtime are provided in the results section; see Figure 6 and Table 2
2.7 ADAPTABILITY
Our method provides a foundation for an efficient identification of topologically critical regions. Within this flexible framework, many adaptations to the method possible. In the following, we introduce two adaptations that we found beneficial for the performance in specific tasks.
Aggregation Mode Our method allows for flexible adaptation of the aggregation mode fit task- specific needs. We show ablations on this hyperparameter in Tables 5 6
and 7 Figure 5 shows
comparison of the dense support for the gradient that is achieved with a mean aggregation compared to the support of PH-based methods. More specialized methods can be easily implemented beyond the simple aggregations we evaluate in the ablation. Aggregations, including specific quantiles the pixels, or aggregating distinguished points such as local maxima saddle points, are possibilities.
Threshold Variation Parameter Finally, we introduce a threshold variation parameter. This pa- rameter a defines the scale of a Gaussian distribution with location μ 0. This distribution used to sample a shift parameter 2sh. to randomly alter the binarization threshold bines = 0.5 + Zsh- Introducing this parameter strongly enhanced our method and mitigates information loss due to the binarization step. We provide an ablation on the binarization threshold in Table 3
3 EXPERIMENTS
Datasets We evaluate our method on three real-world binary and two multi-class segmentation tasks using publicly available datasets (binary: Cremi (Funke et al. 2018), Roads (Mnih) 2013).
Buildings (Mnih) 2013); multi-class: Platelet (Guay et al. 2021). TopCoW (Yang al. 2023
We selected tasks from different modalities with different image sizes where topological correctness represents important characteristie, particularly in the context of downstream applications. Please refer to the supplement for more details on the used datasets. Following Berger et al. (2024b), we projected the 3DD volume in the TopCoW dataset to obtain 2D images and used 2D slices for the

---

Published as a conference paper at ICLR 2025
Image
Label
Prediction
Cross-Entropy
Betti-Matchina
Toopograph
Figure 5: Visualization of the pixels that support the gradient of different losses for exemplary label-prediction pair. The support pixels are displayed as white overlay over the prediction. The gradient of pixel-wise loss functions (e.g. CE) is supported by every incorrectly predicted pixel. The BM gradient is supported by two pixels for every topological feature. The Topograph (ours) gradient is supported by every pixel in the incorrectly predicted and topologically relevant regions.
Cremi and Platelet datasets. To apply the topological losses in the multiclass setting, we frame the multiclass problem multiple binary classification problems proposed in (Berger et al. 2024b). This approach scales the computational complexity linearly with the number of classes compared to single binary loss calculation of the respective loss function.
Baselines In all of our experiments, we compare our method to Dice loss. This is important to validate that our loss (1) does not significantly impair pixel-wise accuracy and (2) truly improves lopological correctness. Moreover, we compare our method to the task-specific cIDice method (Shit al. 202I) that is especially well-suited for the tubular structured roads, Cremi, and circle of Willis datasets. Next, we compare to the Mosin loss function (Mosinska et al. 2018), which uses a VGG's feature representation for loss calculation. Finally, we compare to PH-based approaches. First, HuTopp proposed by (Hu et al. (2019), which maximizes the similarity of the predictions persistence diagram to a corresponding ground truth diagram. Second, the refined Betti matching loss, which further matches the barcodes in the persistence diagrams based on spatial correspondence.
Evaluation metrics We evaluate the pixel-wise accuracy using the Dice score. To evaluate topo- logical correctness, we report the clDice metric (Shit et al. 2021). the Betti number error (BO, B1) in dimensions 0 and I, and the more refined Betti matching error (BM) (Stucki et al. (2023). which considers the spatial alignment of topological features in both dimensions. Furthermore, evaluate the DIU metric, which additionally measures topological similarity between union and intersection of label and prediction pairs (see Section 2.5
Training and model selection We train a U-Net architecture (Ronneberger et al. 2015) with residual units from scratch and use the Adam (Kiggma| 2014) optimizer. We perform 5-fold cross- validation and evaluate on an independent test set. We perform a random hyperparameter search with 25 runs on each split and select the model with the highest balanced Dice and BettiMatch- ing score on the validation set. We report the mean performance and standard deviation on the independent test sets across the five data splits. Please refer to the supplement for specifics on the hyperparameter spaces and more details on the training. We use the paired t-test between our model and each baseline to evaluate statistically significant performance (p-value < 0.05) improvements.
3.1 RESULTS
Binary results Our method exhibits improved topological accuracy, shown by the best val- ues on the DIU and BM metrics, with significant improvements compared to most baselines on the Roads dataset. Compared to loss functions such HuTopo and Dice, achieve significant performance improvements. Interestingly, the HuToop baseline shows a very low BO score and a high BM and DIU error. This observation indicates that HuTopo optimizes for the correct number of topological features but disregards spatial alignment, which is in agreement with its theoretical limitation of spatial mismatches (Stucki et al., 2023). Furthermore, we observe that the Dice loss yields (naturally) high Dice and elDice score. Although this difference is insignificant, it comes at the cost reduced topological correctness across all topological metrics. On the Roads dataset, we see that Betti Matching also achieves good DIU and BM scores, almost as low ours, but performs worse in elDice. Specifically, the effects of a homotopy equivalence between union and intersection (achieved when minimizing our loss function, described in Section 2.3) are especially pronounced for tubular structures (such as roads) and also typically lead to a low elDice score, as a mutual inclu- sion of the centerlines also implies this homotopy equivalence (see Suppl. Figure TT). For the Cremi
8

---

Published as a conference paper at ICLR 2025
Table Quantitative results. Best performances indicated in bold, statistical significance underlined (p-value 0.05). Our method outperforms the baselines in strict topological metrics (DIU, BM) for all but one datasets while achieving similar Dice.
Dataset
DIU
BM 4
B0
B1 4
Dice
elDice
Dice
79.798+4470
67.101
25.867
1.452#.12
.777
.611
CIDice
80.86724.48
64.771+2.37
18.
1.407=.06
.774
.623..00
HuTopo
86. 45.55554
+3.36
16.0622t5.50
1,481 0.77
.764+.01
.583+.01
Buildings
BettiM.
79.27 11:11:4440 4:4.24
63.310s:2.62
17.669 4:235
1,407 1.
:774
.605
Mosin
81.724-t-4.90
68.875
29.137
1.495
.763+.01
.581
Ours
77.824
62.652::3.1
20.28
1.443+t.0
.769..01
,590+.02
Dice
7.313#.61
6.615#.58
1,935
2.642+.17
811
.720+.01
CIDice
7.127
5.810#.29
1,515
3.058+.14
.803..01
.704+.01
HuTopo
7.498
6.356
1.185 62
2.683
8177.01
.7142.01
Roads
BetriM.
6.733
5.908
0.942::.10
2.317:108
.818
.707..01
Mosin
7.221
6.352
1.523 .88
2.7561.11
816::01
.710:.01
Ours
6.521+.47
5.635-+.40
1.212#.25
2.619+.16
.877
.711
Dice
21.840
10,872
1,264
2,9361.00
.961..01
.600..0
CIDice
21.728:.35
10.368
1,296:1.06
2.
9441.01
.9611.01
HuTopo
23.192
12.232
1.368
2.768+.17
.422.001
.564..01
Cremi
BetrM..
22.832
10,880
0.920=.06 .06
3.608 33
927
.500..0
Mosin
21.984
10.944
1.3122.07
2.704
.946..0
.60
Ours
21.272
10.392
1.224
2.720+.14
9947
.66
Dice
14.791:1141
1.610
0,640
0.536
.752.: .11
822:.01
CIDice
50.156
6.407
2. 2.909
3.028 1..07
.728
.783
HuTopo
11.523+0.36
1.119=0.05
0.37240.08
0.376
.746+.01
823+.00
Platelet
BetiM.
13.000+1.32
1.239
0.400
0.45111..0
.747=.01
.8264.01
Mosin
11.14320.52
1.130=0.06
0.356
0..07
.747=.01
.835+.00
Ours
10.906
1.110
0.406
0.376
.751+.01
.843+.00
Dice
15.71621.61
0.977=0.89
0.722+0.07
0.073+0.02
.729
.7732.01
CIDice
10.670=1.76
0.678
0.483
0.049
.7332.01
.804 .22
HuTopo
16.057+6.67
0.992
0.717+t..a
0.092
.711#.04
.75+..04
TopCoW
BetiM.
12.352.t0.90
0.761 t0000
0.556++0.0G
0.064++0.01
.740=:01
.787+.02
Mosin
23.534=116.98
+0.9
1. +0.8a
0.154
.606#.16
.659
Ours
10.477:11.5
0.658::...0
1..00
0.052:10.02
.735
.801
dataset, our methods consistently exhibits strong performance across all metrics. clDice performs comparably strong, since the tubular structure of the data beneficial for the centerline-based loss calculation. Some of the other methods have strong performance in one metric but worse results on other metrics.
Multi-class results In both multiclass datasets, our method consistently surpasses all baselines the two key topological met- rics, DIU and BM score, often showing statistically significant performance improve- ment. For the BO and B1 errors, our method performs comparably or slightly below the top- performing baseline (e.g., HuTopo). However, our method's superiority in BM score indicates that this is likely caused by spatial mismatches of topological features, which is also backed by our qualitative results (see Figures 15 and [6]. Additionally, we note that our loss formulation does not compromise pixel-wise accuracy, as reflected in the Dice score, where method matches the performance of the best baseline across both datasets, significantly outperforming elDice and HuTopp the Platelet dataset.
HuTopo
Betti Matching
Mosin Topograph
ClDice
Runtime (+)
10"
10-2
1,000
2,000
3,000 4,000
5,000 6,000 7,000
Step
Figure 6: Runtime for a single loss calculation over the complete training process.

---

Published as a conference paper at ICLR 2025
In the TopCoW dataset, which is vessel dataset, clDice emerges as the strongest baseline. However, its specialization in tubular structures and reliance on extracting accurate centerlines leads to poor performance in the Platelet dataset, where blob-like structures with inclusions dominate. We also observe that, on the TopCoW dataset, Betti Matching yields a relatively good BM score while having significantly worse DIU score. This observation is likely caused by Betti Matching's weaker theoretical guarantees that do not account for homotopy equivalence between intersection and union. This difference is further underlined by Betti Matching's significantly lower clDice score, similar to our binary experiments. In the Platelet dataset, the HuTopp baseline performs strongly, notable contrast to its low performance on the TopCoW dataset and in binary experiments, where spatial mismatches in topological structures become more frequent.
Ablation on runtime We empirically measure the run- time of our loss compared to other topological losses. Figure 6 shows the time demand of different loss func- tions across an exemplary training run on the Platelet dataset. After short run-in phase, our method is con- sistently faster than PH-based approaches and the Mosin baseline. This is also reflected in the accumulated training times in Table 2 which shows that our method saves up to one hour of training time for a single run on the Platelet dataset. For the average loss calculation, we achieve 3-6 fold improvement compared to the PH methods.
Table 2: Computational runtime.
Avg. loss cale.
Train
Loss
time
CIDice
9.88 ms
1h27m
Mosin
233.00 ms
2h29m
et al,
602.99 ms
3h05m
BettiM.
327.64 ms
2h46m
Ours
95.94 ms
1h53m
3.2 ABLATION ON THE BINARIZATION THRESHOLD VARIATION
We investigate the effect of the binarization variation pa- rameter, described in Section 2.7 in Table 3 The results indicate that fixed binarization without variation is in- ferior to additional Gaussian threshold variation. A stan- dard deviation of 0.05 0.1 yields the best results.
Table Ablation on the binariza- tion threshold variation for the buildings dataset. Best results are in bold and sec- ond best in italics.
Thres. Var.
DIU 4
BM +
Dice t
4 CONCLUSION
0.
51,5625
40.6250
0.80886
0.01
47,2500
37.7500
0.81965
This work proposes a novel framework for image seg-
0.05
46.1250
36.2500
0.79447
mentation to identify topologically critical regions via a component graph ((P. G). Our proposed loss function
0.1
46.7500
35.5625
0.82555
0.2
47.8750
38,2500
0.80861
improves topological accuracy over pixel-wise losses, consistently delivers state-of-the-art performance com- preserving approaches, and is low
0.5
49.2500
36.5625
0.82431
Otsu
49.1250
37,0000
0.82396
pared to other topologyy-reeservinng in runtime. Formally, Topograph provides stricter topological guarantees than existing methods. Our method goes beyond ensuring homotopy equivalence between ground truth and segmentation. further enforces homotopy equivalence to both their union and intersection through the respective inclusion maps, thereby capturing the spatial correspondence of their topological properties. Addi- tionally, we propose a sensitive segmentation metric (DIU) capturing fine topological discrepancies which cannot be univocally captured by existing metrics.
Limitations and future work PH-based methods naturally define a filtration on pixel intensities, capturing topological information across all thresholds. While binarization trades off some of this in- formation, significantly enhances runtime efficiency. Despite this, in many scenarios, our method surpasses PH-based methods in segmentation performance. Ablation studies on the threshold varia- tion parameter highlight the value including topological information beyond a fixed threshold of 0.5, with features near the binarization threshold proving particularly important in our experiments (see Table B). Future efforts should aim to explore how our method, with its strict topological guar- antees, be integrated with filtrations to capture topological information at all thresholds, further enhancing performance in every iteration. Additionally, our framework currently designed for 2D images, and extending the method 3D remains a promising direction for future work.
10

---

Published as a conference paper at ICLR 2025
5 REPRODUCIBILITY
We are committed to making our work entirely reproducible for the scientific community. Our source code, relcased under an open-source license, is available via an anonymous public GitHub repository camm/Alexannder wwwaanderBBergee HBrgger Topograph, We provide all checkpoints for all the models trained with our method and all the baselines and make them available upon request. An exemplary model checkpoint is available in the repository. All datasets used in the experi- ments are publicly available and are described detail the Supplementary Material. All applied preprocessing is documented in the code github. We provide details on random and equal hyperparameter search on each data-split and baseline the main manuscript and supplement (see Table 9). We provide extensive schematic and intuitive description of our method and proofs in the Supplementary Material. Moreover, we provide numerous qualitative examples to help the understanding of our newly presented DIU metric in Figures 11 and 12 Lastly, provide further qualitative examples of the combined graph in Figure 10
https: /ttpt/gittbb/.b
REFERENCES
Alexander H Berger, Laurin Lux, Alexander Weers, Martin Menten, Daniel Rueckert, and Johannes Paetzold. Pitfalls of topology-aware image segmentation. arXiv preprint
1rXiv:2412.14619, 2024a.
Alexander H Berger, Nico Stucki, Laurin Lux, Vincent Buergin, Suprosanna Shit, Anna Banaszak, Daniel Rueckert, Ulrich Bauer, and Johannes C Paetzold. Topologically faithful multi-class seg- mentation medical images. arXiv preprint arXiv:2403. //01,, 2024b.
Kevin Briggman, Winfried Denk, Sebastian Seung, Moritz Helmstaedter, and Srinivas C Turaga. Maximin affinity learning of image segmentation. Advances Neural Information Processing Systems, 22, 2009.
Mingfei Cheng, Kaili Zhao, Xuhong Guo, Yajing Xu, and Jun Guo. Joint topology-preserving and feature-refinement network for curvilinear structure segmentation. In Proceedings of the IEEE/CVF International Conference on Computer Vision pp. 7147-7156, 2021.
James R Clough, Nicholas Byrne, Ilkay Oksuz, Veronika A Zimmer, Julia Schnabel, and An- drew P King. A topological loss function for deep-learning based image segmentation using persistent homology. IEEE transactions on pattern analysis and machine intelligence, 44(12); 8766-8778, 2020.
Herbert Edelsbrunner and John I. Harer. Computational topology: an introduction. Mathematical Society, 2022.
American
Jan Funke, Jonas Klein, Francese Moreno-Non Noogue- Albert Cardona, and Matthew Cook. Ted: A tolerant edit distance for segmentation evaluation. Methods, 115:119-127, 2017.
Jan Funke, Fabian Tschopp, William Grisaitis, Arlo Sheridan, Chandan Singh, Stephan Saalfeld, and Srinivas C Turagaa Large scale image segmentation with structured loss based deep learning for connectome reconstruction. IEEE transactions on pattern analysis and machine intelligence, 41(7):1669-1680, 2018.
Matthew D Guay, Zeyad AS Emam, Adam B Anderson, Maria Aronova, Irina D Pokrovskaya, Brian Storrie, and Richard D) Leapman. Dense cellular segmentation for em using 2d-3d neural network ensembles. Scientific reports, 11(1):2561, 2021.
X Hu, Y Wang, F Li, D Samaras, and C Chen. Topology aware segmentation using discrete morse theory. In International Conference on Learning Representations (ICLR), 2021.
Xiaoling Hu, Fuxin Li, Dimitris Samaras, and Chao Chen. Htpology-preservve deep image seg- mentation. Advances in neural information processing systems, 32, 2019.
Diederík Kingma. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6988 2014.
11

---

Published as a conference paper at ICLR 2025
Yannick Kirchhoff, Maximilian R Rokuss, Saikat Roy, Balint Kovacs, Constantin Ulrich, Tassilo Wald, Maximilian Zenk, Philipp Vollmuth, Jens Kleesiek, Fabian Isensee, et al. Skeleton recall loss for connectivity conserving and resource efficient segmentation of thin tubular structures. arXiv preprint arXiv:2404.030000 2024.
Liu Li, Qiang Ma, Cheng Ouyang, Zeju Li, Qingjie Meng, Weitong Zhang, Mengyun Qiao, Vanessa Kyriakopoulou. Joseph Hajnal, Daniel Rueckert, al. Robust segmentation via topology vio- lation detection and feature synthesis. In International Conference on Medical Image Computing and Computer-Assiser Intervention, pp. 67-77. Springer, 2023.
Martin Menten, Johannes Paetzold, Veronika A Zimmer, Suprosanna Shit, Ivan Ezhov, Robbie Holland, Monika Probst, Julia A Schnabel, and Daniel Rueckert. A skeletonization algorithm for gradient-based optimization. In Proceedings of the IEEE/CVF International Conference on Computer Vision pp. 21394-21403, 2023.
Volodymyr Mnih. AAINR96184.
Machine learning for aerial image labeling. PhD thesis, CAN, 2013.
Agata Mosinska, Pablo Marquez-Neilaa Mateusz Koziński, and Pascal Fua. Beyond the pixel-wise loss for topology-aware delineation. In Proceedings of the IEEE conference on computer vision and pallern recognition, pp. 3136-3145, 2018.
Arnur Nigmetov and Dmitriy Morozov. Topological optimization with big steps. Discrete & Com- putational Geometry, 72(1):310-3 31444444, 2024.
Olaf Ronneberger. Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomed- ical image segmentation. In Medical image computing and computer-assisted intervention- MICCAI 2015: 18th international conference, Munich, Germany, October 5-9, 2015, proceed- Springer, 2015.
ings. part 18, pp.
Suprosanna Shit, Johannes C Paetzold, Anjany Sekuboyina, Ivan Ezhov, Alexander Unger, Andrey Zhylka, Josien PW Pluim, Ulrich Bauer, and Bjoern H Menze. cldice-a novel loss function for tubular structure segmentation. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 16560-16550 2021.
Nico Stucki, Johannes C Paetzold, Suprosanna Shit, Bjoern Menze, and Ulrich Bauer. Topologi- cally faithful image segmentation via induced matching of persistence barcodes. In International Conference on Machine Learning, pp. 32698-32727. PMLR, 2023.
Mihail Ivilinov Todorov, Johannes Christian Paetzold, Oliver Schoppe, Giles Tetteh, Suprosanna Shit, Velizar Efremov, Katalin Todorov-Völgyi. Marco Düring, Martin Dichgans, Marie Piraud, et al. Machine learning analysis whole mouse brain vasculature. Nature methods, 17(4):442- 449, 2020.
Kesheng Wu, Ekow Otoo, and Kenji Suzuki. Optimizing two-pass comnected-componentt labeling algorithms. Pattern Analysis and Applications, 12:117- 2009.
Qian Wu, Yufei Chen, Wei Liu, Xiaodong Yue, and Xiahai Zhuang. Deep closing:
Enhancing topo- logical connectivity in medical tubular segmentation. IEEE Transactions on Medical Imaging, 2024.
Kaiyuan Yang, Fabio Musio, Yihui Ma, Norman Juchler, Johannes C Paetzold, Rami Al-Maskari, Luciano Höher, Hongwei Bran Li, Ibrahim Ethem Hamamci. Anjany Sekuboyina, et al. Bench- marking the cow with the topcow challenge: Topology-aware anatomical segmentation of the circle of willis for cta and mra. arXiv preprint arXiv:2312. 2023.
12

---

Published as a conference paper at ICLR 2025
A APPENDIX
A.1
SCHEMATIC TOPOGRAPH Loss
Pixel Space Representation
Combined
Ground Truth
Prediction
Combined Represertation
GT
FG
FG
BG
BG
Pred.
BG
FC
BG
Curve Space Reprsentation
% Thickening
% Thickening
Combined
Embedding
3.
Topological Error Identification
Topograph
Prediction
Loss Aggregation Porel Space
Topology Loss
identfiiation Topological Errors
Figure 7: Overview of the loss calculation using our method. (1.) First, the information of prediction and ground truth is combined. Pixels with correct prediction (purple (FG, FG), white (BG, BG)) do not influence the loss calculation. (2.) To guarantee that the prediction and ground truth foreground areas only have transversal cuts, the areas thickened with different margins. (3) Based on region adjacency graph of the topologically critical areas can be identified and related to the relevant pixels.
13

---

Published as a conference paper at ICLR 2025
A.2 ZERO Loss PROOF
Defintions
Prediction
GT
rogular nodeas
Areguter reteclasaiieed background
ne neighbor and exactly one correctty cizssified foreground neightor.
Visual Proof for theoretical guarantees
1J Froul Vaa prodation that peseratte & looo Eland root Ee
GT
Ground
Groph
P
Oraph
CG
Conbendd Ohagh
companent for groand math companent
oi prediction dompanent that doos overtap at stegle composent
Foreg oune
GT Fovegiourt
mpsiion no companant
non-ovetapped ground truh snsurptiort have cornec fong yound neightor presense
CG
Ao component
overtep
suth
comsanennt cornox (given
bregroun relyrioor presensce nonviegs node
bor
than ans apatialy evertapping prediction
that eecarise the overlipiing
ground frush component
BJ single prodiction comporent ovelayiing auniple ground frut componants
preserce non-eggue node
Assumptan: ovelagoing gvwtagoinggouut gound
ponerss
CG
Ausr rption predicion companents.
The part of the ground truih component ot sepacone have bosal correct toregrsie ne ghioogn
negrröonooddi comnatton betwoon prodiction
componeery whose arique suatidd overlaping ground brtt
neighhormazsle consection behweas
prodiction components wisse unioue sperialy
componasts
nelpthors
CG
CG
8
The racascary wage Nawe difown connectityy contined unitun
GT
P
non coremcctionn of the graph
repurse roation inigus rradii contin impresttio
Figure 8: Visual proof that a zero loss guarantees topological equivalence between ground truth and prediction. First, we present definition of regular nodes. In the following, we prove topological equivalence in three steps using contradiction.
14

---

Published as a conference paper at ICLR 2025
Altemativve understanding of regular node:
Intersection Labeling
The node color defined intersection truth and prediction. The node color foreground prediction foraground.
The Induced subgraph of the 1-hop neighborhood of the misclassified node must result in Isomorph contracted subgraphs for intersection and ground truth labeling
ground
Contraction
Labeling
Nociss of the same class (foreground or beciground] are contracted until not further contraction poss in the graph.
The node color defined by the union ground truth and prediction. The mode oolor foreground (black) if least one of either
ground Inith or prodiction are foreground.
Only neighbor.
required neighbors
Exactly foreground background neighbor
CG
dr
Intersection: all background nodes collaps.
Union: all foreground nodes collaps
Figure 9: Visualization of the properties of regular node. Only regular node results in isomorphic contracted subgraphs after intersection and union labeling.
Figure |9 describes how errors with different neighborhoods behave under labeling according to the intersection or union. Regular nodes (exactly one correct foreground and background neighbor) result in the same graph independent of intersection and union. It follows that these nodes do not affect the isomorphism of the intersection and the union graph.
15

---

Published as a conference paper at ICLR 2025
A.3 ADDITIONAL GRAPH EXAMPLES
Fig. I0 provides additional examples of the combined graph construction and the difference between critical and regular nodes.
Dimension 0 Matching Cases:
(d) Connection between multiple components
Misaing Connection of two components
(4) Matched Component (b) GT unmetched
(c) Pred unmatched
Dimension 1 Matching Cases:
Matching Hole
(g) Missing hole inside
(h) Excess hole
Missing hole outside
Union/Intersection errors:
① Hole Union
(u) Incomplete hole matching
Figure 10: Additional examples of our combined graph representation with critical nodes marked by red circle and regular nodes marked by a green circle. Correctly predicted nodes are not marked. The combined graph is visualized as an overlay following the notation from Fig. g The three rows focus on frequent topological structures Dimension 0 and well as two examples for Union/Intersection errors.
A.4 DIU EXAMPLES
Fig. [| visualizes the difference between multiple topological performance metrics and the practical impl iiation of homotopy equivalence between union and intersection in the case a vessel example.
Fig. 12 shows comparisons between different performance metrics on further examples.
16

---

Published as a conference paper at ICLR 2025
Figure 11: Comparison of different topological performance metrics the example of tubular structure segmentation. (A) results in Betti numher all stricter metrics) since the disconnected blue vessel builds two connected components. (B) results
Betti matching error (+ stricter metrics) because
spatial correspondence hetween the blue and black vessels is not provided. (C) results and DIU error because the two vessels lose the spatial correspondence in parts and then connect again. (D) results in clDice score because the overlap between the vessels does not include the skeleta in all parts.
Blue
PM DU TED
Black
Black
8T
Du TED
TED
Dlack
80'
8
BM
DU
180
DM DI TED
Figure 12: Examples for comparing topological performance metrics with different strictness. In the top left and bottom right examples only the DIU metric captures topological error. The combined graph is visualized an overlay following notation from Fig. g further compare to TED metric Funke et al. (0117) with boundary tolerance. For TED background is assumed be a single instances with potentially disconnected parts. Foreground components are viewed as independent instances with separate lahels.
Funki
17

---

Published as a conference paper at ICLR 2025
A.5 ABLATION ON ALPHA PARAMETER
We study the effect of the loss weighting via an alpha parameter in an ablation experiment. The results, see Table 4 show that there an optimal weighting of the parameter in combination pixel-wise loss.
Table 4: Ablation on the alpha parameter. The provided results are validation scores on the TopCoW dataset. Rows where the best performance was achieved before the activation the topologiaal loss are marked with a star * The best results are in bold, and the second best results are in italics.
Alpha
DIU 4
BM J
B0 J
B1 J
Dice t
clDice 1
0.0
10.944
0.7148
0.5259
0.0704
0.7461
0.7912
0.1
7.1667
0.4815
0.3296
0.0407
0.7540
0.8238
0.2
6,5556
0.4407
0.3037
0.0407
0.7571
0,8279
0.3
7.6111
0.4926
0.3259
0.0556
0.7601
0,8293
0.4
7.7222
0.4815
0.3370
0,0556
0.7770
0.8453
0.5*
11.3889
0.7148
0.5074
0.0667
0.7478
0.8047
0.6
7.0556
0.4630
0.3074
0.0815
0.7372
0.8032
0.7*
11.3889
0.7148
0.5074
0.0667
0.7478
0.8047
0,8*
11.3889
0.7148
0.5074
0.0667
0.7478
0.8047
0,9*
11.3889
0.7148
0.5074
0.0667
0.7478
0.8047
1.0*
11.3889
0.7148
0.5074
0.0667
0.7478
0.8047
A.6 ABLATION ON THE AGGREGATION
The results of the ablations the aggregation mode shown in Tables and The results show that the aggregation mode is an influential hyperparameter with varying optima depending on the dataset. For the roads dataset, dense aggregations such mean and root mean square (rms) that include information of all pixels in the critical region perform better than the sparse max aggrega- tion. In the buildings dataset root mean square provides compromise of high pixel-wise accuracy combined with good topological correctness.
Table 5: Ablation on the aggregation type for pixels within incorrect nodes. The provided results are validation scores on the roads dataset. Best results are in bold and second best results are in itaicss
Aggregation
DIU +
BM
B0
B1
Dice ?
elDice
Mean
4.70
3.95
0.40
1.75
0.90264
0.84036
Max
4.50
4.05
0.40
2.05
0,88350
0.83857
RMS
4.25
3.90
0.45
1.65
0,90137
0.83668
Sum
5.90
5.76
1.50
2.05
0,90140
0.83870
CE
4.80
4.00
0.75
1.75
0.90320
0.83908
Table 6: Ablation on the aggregation type for pixels within incorrect nodes. The provided results are validation scores on the buildings dataset. Best results are bold and second best results are in italics.
Aggregation
DIU 1
BM L
B0
B1 |
Dice 1
clDice t
Mean
47.7500
37.7500
11.0000
0.3750
0.79831
0.66169
Max
45.7500
37.3125
12.1250
0.5625
0.81180
0.69061
RMS
48.8125
38.1250
9.1875
0.8125
0.82333
0.70351
Sum
49.3125
39.4375
12.2500
0.4375
0.81112
0.68048
CE
51.6875
39.0625
9.3125
0.5000
0.81459
0.70370
18

---

Published as a conference paper at ICLR 2025
Triining loss
2
500
1,000
1,500
2,000
2,500
Step
Figure 13: Training loss when setting a to very high value. After the warmup phase (here around step 400), the topograph loss dominates the training, leading to deteriorating performance.
Table 7: Ablation on the aggregation type for pixels within incorrect nodes. The provided results are validation scores on the platelet dataset. Best results are in bold and second best results are in italics.
A Aggregation
DIU
BM 1
B0
B1 4
Dice
clDice 1
Mean
11.25722
1.18968
0.31548
0.54008
0.78641
0.861
Max RMS
10.86111
1.1496
0.29603
0.52024
0.77875
0.86652
11.66111
1.22381
0,31667
0.53413
0.77651
0,86383
Min
12.54722
1.33413
0.38929
0.53373
0.78872
0.85891
A.7 ABLATION ON THE DATASET SIZE
Table& the results of ablation study of the dataset size. We found that our method improves performance across all the different dataset sizes on the buildings dataset. Furthermore, the ablation results do not indicate that the relative topological performance improvement gets smaller with an increased amount of data.
Table Comparison of the relative performance increase of using the Topograph method differ- ent dataset sizes. The displayed performances for BM and DIU represent the best validation scores achieved for the respective metries. The same validation set is used independent of the amount of training data. The ablation was performed on the buildings dataset.
Dataset
BML +
DIU 4 (TG)
BM 4
DIU + (DSC)
BM relative improvement
DIU relative improvement
Frac.
(TG)
(DSC)
12.5%
72.8929
86.5714
76.3333
89.1667
4.51%
2.91% %
25.0%
72.5357
83.9286
74.8095
88.3961
3.04%
5,05%
37.5%
68.5238
84.5952
75.5238
89.6071
9.27%
5,59%
50.0%
66.7857
84.0952
67.4881
86.1191
1.04%
2.35%
62.5%
65.2143
82,8333
65.8095
83.3333
0.90%
0.60%
75.0%
62.9048
79.9048
64.6191
80.0238
2.65%
0.15%
87.5%
62,2738
81.2976
65.4881
82.0476
4.91%
0.91%
100%
59.2381
76.4167
64.3333
80.9524
7.92%
5.60%
19

---

Published as a conference paper at ICLR 2025
A.8 DETAILED DATASET DESCRIPTION
Buildings In the buildings dataset. the aim is to segment buildings based on acrial images. The topologically interesting aspect is the number of foreground components and also the correct spa- tial correspondence, ensuring that, e.g., buildings areas, roads, and other landmarks. We use the buildings dataset created by MMih (2013). Our train- ing/validation set consists of 80 images with a size of 375x375 and three color channels, the test set contains 21 images of the same size. During training, we used random crop to a size of 128x 128. The validation and test set for this dataset were split into 4 patches of size 128x 128 in the quadrants of the image. This results in a total of 64 validation images and 84 test images for every fold.
correctly identified as opposed to parking
Roads The task for the roads dataset is to provide a binary segmentation of aerial images into streets and the background. In the roads dataset the correct connectivity is the most interesting aspect. We use the dataset created by Mnih (2013). Our training/validation set consists of 100 images with size of 375x375 and three color channels, the test set contains 24 images of the same size. During training, we used a random crop to a size of 128x128. The validation and test set for this dataset were split into 4 patches of size 128x122 128 in the quadrants of the image. This results in a total of 80 validation images and 96 test images for every fold.
Cremi The Cremi dataset Funke et al. (2018) contains electron microscopy images of adult fly brain. The segmentations consist of many closed circles of which most are connected together and thus form only a few individual connected components. The images are of size 312x312 and have just one gray-scale channel. We use 100 images for training and validation and 25 images as test set. During training we randomly crop an area of 128 x 128 per image. The validation and test set for this dataset were split into patches of size 128x128 128 in the quadrants of the image. This results in a total of 80 validation images and 100 test images for every fold.
Platelet In this dataset, the aim is segment round objects where the topology is described by "inclusion," e.g., a mitochondrion is always inside a cell segment. The dataset Guay et al.] (2021) contains six different classes (cell, mitochondrion, canalicular channel, alpha granule, dense granule, and dense granule core). The dataset contains 50 samples for training/validant and 25 for testing each (800x 800 pixels) with six classes Guay et al. (202I). We create overlapping patches of size 200 x 200 during our experiments.
TopCoW The goal of the circle of Willis (coW) dataset is the segmentation of the coW and the correct assignment to the 15 different vascular classes. The coW has hypoplastic and absent com- ponents across different subjects, making correct segmentation challenging Yang et al. (0223). We project the magentic resonance angiography scans and the labels to a 2D image and segmentation mask. We use the public MICCAI 2023 TopCoW challenge data and use 110 subjects for train- ing/validation and 22 subjects for testing. We crop each image to size of 100x pixels.
A.9 COMPARISON OF DIU AND BM TO "FALSE SPLITS" AND "FALSE MERGES".
In neuroscience, counting the number of "false splits" and "false merges" is widespread metric to assess neuron segmentation performance, In this paragraph, we compare the DIU metric to these practices. To make meaningful comparison. we have to make some prior assumptions. Definition of "Fase split/merge"" We define a "false split" by spatial overlap of two instances in the predic- tion with a single instance in the ground truth. A "false merge" then defined by two instances of the ground truth being overlapped by a single instance in the prediction. Moreover, we assume that each instance resembles exactly one connected component with a unique label. To make a compar- ison to our method, we furthermore assume that there is a background class that shares common label, but the background can be made up of one or more connected components (but considered single instance with a single label). Using the definitions in Funke et al. (2017), the total number of false splits can be calculated by summing the value n-1 for every ground truth instance, where n is the cardinality of the set of spatially overlapped prediction labels. Similarly, the total number of wrong splits can be calculated by summing the value n-1 for every prediction instance, where n is the cardinality of the set of spatially overlapped ground truth labels.
20

---

Published as a conference paper at ICLR 2025
Background Convention: Furthermore, consider two different options for handling the back- ground. First, the background can be viewed as a normal instance and thus contribute equally to the error calculation (AI). Second, the background can be ignored when calculating the error (A2). In the following paragraph, we investigate the effect of these background choices on different error cases.
With the definitions made above and following A1, we now compare how the sum of "false splits" and "false merges" is related to the DIU metric. First, we consider the basic cases of having an instance in the GT and no corresponding instance in the predictions or reversed. Summing up the "false merges" and the "false splits" would result an error of We can calculate the result as follows: the GT-BG (ground-truth background) only overlaps P-BG (prediction background), (0 error), the GT component GT-1 overlaps P-BG (0 error), (1 error). This behavior matches the behavior of the DIU and BM metric. Next, we consider the case where the size of two corresponding instances (surrounded by the background) in GT and prediction do not match perfectly, e.g., in some area, the prediction instance is larger than the GT instance, and in another area, the GT instance is larger. This would lead GT-BG to overlap P-BG and P-1 (1 error), GT-1 to overlap P-BG and P1 (1 error), P-BG overlap GT-BG and GT-1 (1 error), and P-1 to overlap GT-BG and GT-1 (1 error). This in stark contrast to the DIU and BM metrics. Both metrics yield error of 0 as opposed to the calculated combined "false split" "false merge" error of 4. Following A2, we must change the definition for counting "false splits" and "false merges" to min(n, 1) - 1 - I, where is a binary indicator that is 1 and only P-BG or GT-BG occurs in the list of corresponding labels. For the examples above, this results in the same behavior/error that see in the BM and DIU metrics because overlap with the background does not contribute to the loss. However, doing this would not allow the sum of "false merges" and "false splits" anymore to count the complete absence of an instance as described above. This because "P-BG overlaps both GT-BG and GT-1" would suddenly result in an error of O. This shows that depending on the choices that are made regarding handling the background, the "false splits" and "false merges" are similar to the DIU and BM error for some cases but differ in others.
P-BG overlaps both GT-BG and GT-1
Another interesting comparison is the case of multiple overlaps for the same instances. We consider example for this scenario. Here, the sum of "false merges" and "false splits" evaluates to (follwing A1). Following A2, the error would be In contrast to both these results, the DIU metric results in 2 because of an excess foreground component in the intersection and an excess background component in the union.
Figure I0 (i))
21

---

Published as a conference paper at ICLR 2025
A.10
QUALITATIVE RESULTS
Image
Label
Dice
CIDice
HuTopo
Betti Matching
Topograph
Figure 14: Qualitative results for the cremi dataset.
A.11 HYPERPARAMETER SEARCH SPACES
In Table we show the search space of hyperparameters for each loss method for the Cremi dataset. The hyperparameters for each run are sampled randomly from the specified distributions. We do use weight regularization for any model.
Table 9: Hyperparameter Search Space for Different Loss Methods on Cremi dataset
Hyperparameter
Topograph
Dice
elDice
HuTopp
BettiMatching
Mosin
[0.00001, 0.02
N/A
[0.001, 0.1]"
[0.0. 0.15).
[0.0, 0.15
[0.001. 0.5)
CIDice alpha
N/A (20, 50. 80)
N/A
[0.1,0.8)"
N/A
N/A
N/A
warmup epochs
N/A
N/A
{20. 50, 80)
{20. 50, 80)
N/A
Learning rate
[0.0001,00 0.01]
Channels Residual units
{[16, 32, 64, 128), [32, 64, 128, 256).
[16. 32, 64, 128, 256], [32, 64, 128, 256, 512]
{2. 3, 4.
Batch size
{8. 16, 32)
P: Log-uniform distribution, ": Uniform distribution
A. A2 THRESHOLDING EFFECT
22

---

Published as a conference paper at ICLR 2025
Image
Label
Dice
CIDice
HuTopo
Betti Matching
Topograph
Figure 15: Qualitative results for the platelet dataset.
23

---

Published as a conference paper at ICLR 2025
Image
Label
Dice
CIDice
HuTopo
Betti Matching
Topograph
Figure 16: Qualitative results for the TopCoW dataset.
24

---

Published as a conference paper at ICLR 2025
Dimension
Probability
(a)
(b)
2.4
Probability bbbl
Figure 17: Intuitive illustration of the considered topological information. (a) Persistence barcode of dimension for the image displayed in (b). (b) Output probability map of a segmentation network before binarization. (c) Crop of the component that is highlighted in (b) through red circle. Here, we show a greyscale image and calculate the corresponding persistence diagram. All topological features that are "stabbed" by the red line (0.5 threshold) will be maintained and considered in method. The endpoint of the interval in the red circle is distant from the binarization threshold and is, therefore. not considered relevant topological structure for model training. The other disregarded features can be clearly interpreted as noise.
25


Reviews:
[{"review_id": "d2pbQZnAf4", "reviewer": "Reviewer_U2U3", "summary": "This paper proposes a new loss function, called **Topograph**, for image segmentation, which aims to preserve the topological accuracy of predictions. The authors highlight the importance of **topological correction** in many segmentation tasks, especially in the medical domain where it is crucial for accurate diagnosis and functional analysis. The approach relies on the construction of a component graph that encodes the topological information of both the ground truth and the prediction. \n\nThe main innovations are:\n* **A DIU (Discrepancy between Intersection and Union) metric:** This new metric captures topological correctness with strict theoretical guarantees, notably by capturing the homotopy equivalence between the union and the intersection of a label/prediction pair. The DIU metric is more sensitive to fine-grained topological differences than existing metrics such as the Betti number error and the Betti matching error.\n* **A graph-based loss function:** This general loss function preserves topology and can be used to train various segmentation networks. It is based on a component graph that combines topological information from the ground truth image and the prediction.\n* **Computational Efficiency:** Topograph outperforms existing methods in terms of topological correction of predictions while being efficient in terms of time and resources due to its low asymptotic complexity (O(n α(n))).", "questions": "Although the method demonstrates superior results in 2D, I am not convinced that it will be easy to extend to 3D, and I would like to understand the authors' intuition and thoughts about a 3D extension. The authors may want to discuss some specific challenges they anticipate in extending Topograph to 3D, and to outline potential strategies they are considering to address these challenges.\n\nRegarding the binarization, I am wondering if it is possible to quantify or estimate how much topological information is lost through\nthe binarization approach compared to PH methods. Is it possible to suggest some strategy that mitigate this information loss while maintaining Topograph computational efficiency advantages?", "limitations": "", "rating": 8, "confidence": 4, "soundness": 4, "presentation": 3, "contribution": 3, "strengths": "0. The paper is clearly written and easy to understand. \n\n1. The paper presents **theoretical guarantees** for Topograph, demonstrating that if their novel introduced loss is zero, then there is homotopy equivalence. This means that Topograph not only guarantees homotopy equivalence between the ground truth and the segmentation, but also between their union and intersection, thus capturing the spatial correspondence of their topological properties.\n\n2. The approach has a lower complexity than persistent-homotopy (PH) based ones, and, experimentally, a faster running time.  \n\n3. Experimental results show that Topograph improves topological accuracy compared to pixel-based loss functions and other topology-preserving approaches, as shown by the best scores on DIU and BM metrics. At the same time, it maintains pixel-level accuracy comparable to the best benchmarks, indicating that there is no trade-off between pixel-level accuracy and topological correctness.", "weaknesses": "1. The binarization used in Topograph may result in a loss of topological information compared to PH-based methods. It might be possible to extend the construction of the component graph similarly to what is done with component trees (as defined in mathematical morphology), but it is not straightforward to do so. \n\n2. The method is currently limited to 2D images. Its extension to 3D images is considered, but I believe it is not obvious to do. The component graph as currently defined is difficult to extend to 3D.", "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": "", "extra_scores": {}}, {"review_id": "vYF7QL38nr", "reviewer": "Reviewer_8zuR", "summary": "The authors present a method to address the segmentation problem with a focus on preserving the topology of segmented regions. They also introduce a metric for evaluating the accuracy of the predicted segmentation. The proposed approach consists of several stages: (1) The input image is binarized and overlapped with ground truth segments; (2) A graph is constructed based on this overlapped image; (3) Superpixels are created, with each node in the graph representing a superpixel; (4) A set of misclassified nodes is identified, and nodes that do not impact topological structure are removed; (5) Optimization is performed only on the nodes in this remaining set. The authors evaluate their method on multiple datasets using a range of metrics.", "questions": "How does the method handle edge cases with the $\\alpha$ parameter? Specifically, what is the outcome if $\\alpha$ is set to 0 or to a very large value?", "limitations": "", "rating": 6, "confidence": 2, "soundness": 2, "presentation": 2, "contribution": 2, "strengths": "The proposed method seems to preserve the topology of segmented regions, addressing a challenge in segmentation tasks.", "weaknesses": "The minimization problem formulation is not well-defined (objective function, parameters, and regularization).", "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": "", "extra_scores": {}}, {"review_id": "0Su9QMDtn4", "reviewer": "Reviewer_cmv9", "summary": "This paper presents a method that improves the topological consistency of segmentation while preserving overall performance, like IoU. Besides, a more topologically precise metric is also introduced in this paper.", "questions": "See Weakness.", "limitations": "", "rating": 8, "confidence": 3, "soundness": 4, "presentation": 3, "contribution": 3, "strengths": "1. The method proposed in this paper demonstrates a better solution for tasks emphasizing topological accuracy. \n2. Besides, a new metric aims at topology consistency is also presented showing it's advantage over previous ones.\n3. With a lower asymptotic complexity, the loss introduced in this paper can be computed in linear time which make the loss easy to implement.", "weaknesses": "1. The proposed method works well with relatively small datasets and UNet with fewer parameters. My concern is that if we have a larger dataset, can we achieve similar performance with a larger model without the implementation of Topograph?\n2. In terms of binarization, this paper suggests that introducing a small random value would be helpful. But could it be beneficial if applied automatic thresholding like Otsu method?\n3. In terms of DICE, Topograph seems to have similar performance with other methods. Is that indicating a tradeoff between topological critical pixels and topological irrelevant pixels?", "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": "", "extra_scores": {}}, {"review_id": "jXUEQy1GtE", "reviewer": "Reviewer_qvYt", "summary": "The authors present a novel loss and a novel error metric for topology-aware image segmentation. The loss reflects homotopy equivalence between union and intersection of predicted and ground truth-segmentation. It is computed by establishing a component graph on (thickened/thinned) TP, FP, TN and FN components, and identifying \"regular\" vs non-regular nodes in the graph, where non-regular nodes point to topology-critical, spatially meaningful pixels in the prediction which are then penalised by the loss. Computation is 3-6 times faster than for related works on persistent homology-based losses.", "questions": "Re clarity:\n\n-- \"Nontrivial\" intersection of closures (p. 4 l. 190) needs to be precisely defined (i.e., please provide a formal definition) -- I guess it has to mean \"not finite\", otherwise there could be edges between TP and TN and the component graph would not be bipartite? This confusion is furthered by Fig. 2 (see below) where such edge is actually present (so does \"nontrivial\" mean non-empty after all? but how is the comp. graph bipartite then?); Also, the respective edge is not present in Fig. 3. Please clarify.\n\n-- In Fig. 2 (bottom right) the prediction foreground appears double-thickened, while later you settle for double-thickening of ground truth foreground; this causes an edge between intersection and background in Fig. 2 which should not be there and causes confusion; The same edge is also present in Fig. 7.3 -- I do not understand why; Same holds for the edge from the rightmost (thin) FN component to the spurious component in Fig. 7.3, I do not understand why this is there -- shouldn't it go from the FN component directly to the background node? \n\nRe rel. work:\n\n-- E.g., how is the DIU metric related to the common practice of counting \"false split\" and \"false merge\" errors, as commonly done for segmentation problems (cf [1] for one out of many examples where these are evaluated)? Could it be that DIU is the sum of false splits and false merges (at least for dim. 0 features?)? If not, do you see any other relation?\n\n-- A discussion of [1] as related work appears warranted\n\n-- Funke et al. (2018) is listed in rel. work as having a PH-based loss function, but this is not correct? Please discuss in more detail the relation of your work to their loss, which also focuses on topologically critical regions that are spatially correct\n\n[1] https://doi.org/10.1016/j.ymeth.2016.12.013\n\nMinor: \n\n-- A pointer to Fig. 11 earlier in the text would be very helpful, latest on page 6 line 297 (in addition to pointing to Fig. 3)", "limitations": "", "rating": 8, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "The work provides an efficient loss that is nevertheless formally grounded, with strong topological guarantees. A comprehensive evaluation shows its strengths over existing approaches. Rich figures (also in the supplement) greatly facilitate the read.", "weaknesses": "-- Some definitions are not comprehensive and some Figures appear to be not in line with the text, making the work hard to grasp (see Questions)\n--> fixed post-rebuttal\n\n-- A more thorough discussion of some related work might render the work significantly more insightful (see Questions)\n--> fixed post-rebuttal\n\n-- The authors do discuss the 2d nature of the presented approach as a limitation. However, to clearly convey the significance of this limitation, it should be mentioned in this context that their evaluation features some 3d data (evaluated as 2d slices) -- here, imposing a 2d topological loss on slices appears unsuitable / overly strict.", "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": "", "extra_scores": {}}]

Author rebuttal:

Decision: Accept (Spotlight)