Table of Contents
Fetching ...

Efficient Betti Matching Enables Topology-Aware 3D Segmentation via Persistent Homology

Nico Stucki, Vincent Bürgin, Johannes C. Paetzold, Ulrich Bauer

TL;DR

The paper tackles the computational bottleneck of topology-aware 3D segmentation by introducing an efficient Betti matching algorithm and a highly optimized C++ implementation (Betti-matching-3D) with Python bindings. It builds a robust 3D persistent-homology pipeline based on cubical complexes, image barcodes, and induced matchings to define the Betti matching loss, enabling training of segmentation networks with topological awareness. The authors implement several algorithmic innovations (dimension-separation reductions, implicit reduction, union-find for $H_0$ and $H_2$, emergent-pair optimizations, and memory-efficient cube representations) and cache-friendly data structures, achieving speedups over Cubical Ripser and enabling parallel barcode computations. Empirical results on multiple 3D datasets show that DiceBetti losses improve topological correctness and can outperform several topological baselines across diverse domains, highlighting the practical impact for topology-aware 3D segmentation. The work also provides a pathway to GPU-friendly extensions and further study of loss-component interactions, underscoring its significance for scalable, topology-preserving medical image analysis.

Abstract

In this work, we propose an efficient algorithm for the calculation of the Betti matching, which can be used as a loss function to train topology aware segmentation networks. Betti matching loss builds on techniques from topological data analysis, specifically persistent homology. A major challenge is the computational cost of computing persistence barcodes. In response to this challenge, we propose a new, highly optimized implementation of Betti matching, implemented in C++ together with a python interface, which achieves significant speedups compared to the state-of-the-art implementation Cubical Ripser. We use Betti matching 3D to train segmentation networks with the Betti matching loss and demonstrate improved topological correctness of predicted segmentations across several datasets. The source code is available at https://github.com/nstucki/Betti-Matching-3D.

Efficient Betti Matching Enables Topology-Aware 3D Segmentation via Persistent Homology

TL;DR

The paper tackles the computational bottleneck of topology-aware 3D segmentation by introducing an efficient Betti matching algorithm and a highly optimized C++ implementation (Betti-matching-3D) with Python bindings. It builds a robust 3D persistent-homology pipeline based on cubical complexes, image barcodes, and induced matchings to define the Betti matching loss, enabling training of segmentation networks with topological awareness. The authors implement several algorithmic innovations (dimension-separation reductions, implicit reduction, union-find for and , emergent-pair optimizations, and memory-efficient cube representations) and cache-friendly data structures, achieving speedups over Cubical Ripser and enabling parallel barcode computations. Empirical results on multiple 3D datasets show that DiceBetti losses improve topological correctness and can outperform several topological baselines across diverse domains, highlighting the practical impact for topology-aware 3D segmentation. The work also provides a pathway to GPU-friendly extensions and further study of loss-component interactions, underscoring its significance for scalable, topology-preserving medical image analysis.

Abstract

In this work, we propose an efficient algorithm for the calculation of the Betti matching, which can be used as a loss function to train topology aware segmentation networks. Betti matching loss builds on techniques from topological data analysis, specifically persistent homology. A major challenge is the computational cost of computing persistence barcodes. In response to this challenge, we propose a new, highly optimized implementation of Betti matching, implemented in C++ together with a python interface, which achieves significant speedups compared to the state-of-the-art implementation Cubical Ripser. We use Betti matching 3D to train segmentation networks with the Betti matching loss and demonstrate improved topological correctness of predicted segmentations across several datasets. The source code is available at https://github.com/nstucki/Betti-Matching-3D.
Paper Structure (10 sections, 2 equations, 4 figures)

This paper contains 10 sections, 2 equations, 4 figures.

Figures (4)

  • Figure 1: A predicted segmentation 97% certainty superlevel set on a patch from the BBBC027 cell dataset that has two connected components and a loop, in smoothed surface and cubical grid complex representations.
  • Figure 2: A cubical grid complex consisting of vertices, edges, 2-cubes and 3-cubes
  • Figure 3: Barcode and persistence diagram of an example complex. We highlight one feature each from $H_0$, $H_1$, $H_2$ at different steps in the filtration, and the corresponding bars and points in the barcode and persistence diagram.
  • Figure :