Table of Contents
Fetching ...

Topograph: An efficient Graph-Based Framework for Strictly Topology Preserving Image Segmentation

Laurin Lux, Alexander H. Berger, Alexander Weers, Nico Stucki, Daniel Rueckert, Ulrich Bauer, Johannes C. Paetzold

TL;DR

Topograph introduces a graph-based, topology-preserving loss for image segmentation that jointly encodes the topology of predictions and ground truth via a combined component graph. It identifies topologically critical regions and optimizes them through a loss L_CG that emphasizes topology over non-critical errors, with formal guarantees linking zero loss to deformation-retractions and homotopy equivalence of union and intersection. The framework also introduces the DIU metric to quantify strict topological discrepancies between union and intersection, and demonstrates state-of-the-art topological accuracy with up to fivefold faster loss computation than persistent homology methods, across binary and multiclass datasets. Its adaptability, efficiency, and strong topological guarantees offer substantial practical impact for medical and aerospace imaging tasks where topology matters, while highlighting avenues for future integration with filtrations and 3D extensions.

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. Our loss demonstrates state-of-the-art performance with up to fivefold faster loss computation compared to persistent homology methods.

Topograph: An efficient Graph-Based Framework for Strictly Topology Preserving Image Segmentation

TL;DR

Topograph introduces a graph-based, topology-preserving loss for image segmentation that jointly encodes the topology of predictions and ground truth via a combined component graph. It identifies topologically critical regions and optimizes them through a loss L_CG that emphasizes topology over non-critical errors, with formal guarantees linking zero loss to deformation-retractions and homotopy equivalence of union and intersection. The framework also introduces the DIU metric to quantify strict topological discrepancies between union and intersection, and demonstrates state-of-the-art topological accuracy with up to fivefold faster loss computation than persistent homology methods, across binary and multiclass datasets. Its adaptability, efficiency, and strong topological guarantees offer substantial practical impact for medical and aerospace imaging tasks where topology matters, while highlighting avenues for future integration with filtrations and 3D extensions.

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. Our loss demonstrates state-of-the-art performance with up to fivefold faster loss computation compared to persistent homology methods.

Paper Structure

This paper contains 45 sections, 1 theorem, 7 equations, 19 figures, 9 tables.

Key Result

Proposition 2.1

If $\mathcal{L}_{CG}(P,G) = 0$, the commutative diagram consists of deformation retractions: \begin{tikzcd}[row sep=tiny] & {F_{\epsilon}(P)} \\ {F_{\epsilon}(P) \cap F_{2\epsilon}(G)} && {F_{\epsilon}(P) \cup F_{2\epsilon}(G)} \\ & {F_{2\epsilon}(G)} \arrow["\simeq", hook, from=1-2, to=2-3] \a

Figures (19)

  • 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 $\mathcal{G}(P,G)$ is constructed to efficiently identify topological errors, which are used to compute a loss.
  • Figure 2: Overview of our proposed method. (1) We use the prediction in each iteration of the training phase to build a combined image with the labels. (2) Based on the combined image, we construct a superpixel graph $\mathcal{G}(P,G)$ that encodes the full topological information of both segmentations. (3) We can identify topologically relevant errors using each node's local neighborhood. (4) Finally, we can backtrack the critical errors to image regions and calculate a topological loss function. This allows an efficient formulation of a topological loss with strict theoretical guarantees.
  • 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 in $\mathcal{G}(P,G)$. In example (b), none of the inclusions are homotopy equivalences, which corresponds to the presence of critical nodes in $\mathcal{G}(P,G)$.
  • Figure 4: Topological metrics for the characterization of different network predictions (b-d) with a 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.
  • Figure 5: Visualization of the pixels that support the gradient of different losses for an exemplary label-prediction pair. The support pixels are displayed as a 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.
  • ...and 14 more figures

Theorems & Definitions (1)

  • Proposition 2.1