Source-linked AI summary

Sparse cubical complexes for efficient topology-preservation in image data

Alexander H. Berger, Marco Fontana, Daniel Rueckert, Johannes C. Paetzold, Laurin Lux, Ulrich Bauer

arXiv:2609.37177v1cs.CVcs.CGcs.LG

TL;DR

Persistent-homology losses for image segmentation are limited in practice by their computational cost, especially for large 3D patches. The paper introduces sparse cubical filtrations for Betti Matching, reporting up to 100-fold reductions in loss-computation time and substantial topological improvements across six datasets. Its computational advantage depends on the retained complex and interface remaining small.

  • Problem

    PH-based methods can take seconds on common training patches, making large-scale training infeasible, while patch-based cost reduction can disregard global topology or alter computed persistence.

    Source: §1 · pp. 1–2
  • Method

    SparseBM restricts prediction, label, and comparison filtrations to a common cubical subcomplex selected from the comparison filtration.

    Source: §1 · p. 2
  • Results

    Across six datasets, sparseBM reduces loss-computation time by up to ×100 and substantially improves topological segmentation accuracy.

    Source: §6 · p. 9
  • Takeaways & Limitations

    SparseBM closely reproduces the dense method’s optimization signal and was evaluated on four 3D large-patch datasets where dense PH training is practically infeasible.

    Source: §6 · p. 9

    Speed-ups are smaller when much of the comparison filtration lies below the sparsification threshold, and topology-preserving losses provide only train-time guarantees that do not generalize during inference.

    Source: §6 · p. 9

Abstract

from arXiv · show

Persistent homology (PH) is a frequently used tool for extracting and preserving topological information from image data, particularly in image segmentation, where preservation of topological structures is important. However, despite its general applicability across dimensionality, domains, and target structures, the runtime cost of PH-based methods often makes their practical use infeasible. In this work, we argue that this runtime cost is largely driven by processing information that is unimportant for downstream application (e.g. as optimization objective). We propose sparse cubical filtrations as an alternative foundation for PH computation, reducing subsequent computational costs by factors of up to 100 on real datasets. We show close agreement with the optimization signal of the dense counterpart and empirically evaluate our solution's effectiveness as an optimization objective in realistic training regimes where other PH-based objectives can practically not operate (i.e., 3D data with large patch sizes). We show how our solution improves topological accuracy by up to 80\% across six diverse datasets while maintaining pixel- and region-based accuracy.

1 INTRODUCTION

Persistent homology (PH) can support topologically accurate segmentation across dimensions and target structures, but its computational cost limits practical use. The paper proposes sparse cubical complexes to reduce that cost and enable PH-based losses with large patches.

1 INTRODUCTION

  • PH-based methods support topology-aware segmentation across input dimensions and target structures, but their high computational cost limits practical application.For common training patch sizes, computation can take seconds and make large-scale training infeasible.Source: §1 · pp. 1–2
  • Figure 1 reports that sparseBM reduces topological error across diverse targets in 2D and 3D and runs orders of magnitude faster than classical PH losses in the illustrated 3D setting.The figure describes runtime as less sensitive to patch size in the sparse regime considered.Source: Figure 1 · p. 2
  • Sparse cubical complexes omit cells representing confident background regions, enabling sparseBM to use PH-based losses with large patches and state-of-the-art training paradigms.The approach assumes foreground sparsity and that confident background regions contain no information needed for topology-preserving losses.Source: §1 · p. 2

2 BACKGROUND: IMAGES AS FILTERED CUBICAL COMPLEXES

The paper represents images as filtered cubical complexes and uses persistence barcodes to describe how their topology changes across binarization thresholds.

2 BACKGROUND: IMAGES AS FILTERED CUBICAL COMPLEXES

  • The V-construction represents each voxel as a vertex with its image value, and assigns each higher-dimensional cell the maximum value of its vertices.The convention used here assigns foreground value 0 and background value 1 in binary labels.Source: §2 · p. 2
  • A sublevel filtration K_t contains cells with values at most t, corresponding to the image binarized at threshold t.As t increases, features appear and disappear in the filtration.Source: §2 · p. 2
  • A barcode is the multiset of birth–death intervals for image features across the filtration.Birth and death correspond to the thresholds where a feature appears and disappears, respectively.Source: §2 · pp. 2–3
  • Barcode birth and death values correspond to specific image voxels, a property used to compute partially differentiable loss functions.Features that never die are called essential.Source: §2 · p. 3
  • Barcode computation enumerates, sorts, and processes every cell; for a 3D image with n voxels, the V-construction yields approximately 8n cells.The full computation has cubic worst-case complexity in the number of cells, while practical runtime and memory scale with complex size.Source: §2 · p. 3

3 RELATED WORK

Prior work applies persistent homology and other topology-aware losses to segmentation and computer vision, but existing approaches face trade-offs in spatial correspondence, runtime, dimensionality, or target structure.

3.1 PERSISTENT HOMOLOGY BASED LOSS FUNCTIONS FOR IMAGE SEGMENTATION

  • Betti Matching uses a comparison image C = min(L, P) to match label and prediction barcode features carried to the same comparison feature, providing spatial correspondence.Other approaches use priors, Wasserstein distance, or heuristic spatial information; subsequent work improved Betti Matching runtime through computational optimizations.Source: §3.1 · p. 3
  • Computing Betti Matching still requires persistence computations on prediction, label, and comparison filtrations plus two image-persistence computations, with runtimes governed by complex size.Small-patch evaluation or error-centered patch selection limits cost but can disregard global topology or alter computed persistence.Source: §3.1 · p. 3

3.2 OTHER TOPOLOGY-AWARE LOSS FUNCTIONS FOR IMAGE SEGMENTATION

  • Alternative topology-aware losses include skeleton-based methods, logit penalties, Euler-characteristic approximations, and limited-threshold component methods.The approaches address individual problems, but none demonstrated general applicability across diverse targets, changing topology, and 3D while supporting large-scale training at realistic patch sizes.Source: §3.2 · pp. 3–4
  • Topograph uses superpixel graphs to identify topologically critical regions, but its stated theoretical guarantee relies on 2D Alexander duality between 0- and top-dimensional features.The passage describes that dimensional restriction alongside Topograph’s approach.Source: §3.2 · pp. 3–4

3.3 PERSISTENT HOMOLOGY IN COMPUTER VISION OUTSIDE OF IMAGE SEGMENTATION

  • Persistent homology is also used in computer vision for generative modeling and for extracting topological signatures in image classification.The cited examples include topologically realistic sample generation and classification signatures.Source: §3.3 · p. 4

4 METHOD

The method restricts PH computations for Betti Matching to a common subcomplex selected from the comparison filtration, retaining original filtration values while representing omitted regions implicitly.

4 METHOD

  • Sparse cubical complexes address the hypothesis that much of the information processed by PH losses is unnecessary for computing a topology-preserving segmentation loss.The proposed sparseBM follows Betti Matching principles and restricts prediction, label, and comparison filtrations to a common subcomplex selected from the comparison filtration.Source: §4 · p. 4

4.1 SPARSE CUBICAL FILTRATION

  • The retained complex is S = C_τ, and each sparse filtration is the restriction of its original filtration to S.The threshold τ selects retained cells but does not truncate their filtration values.Source: §4.1 · pp. 4–5

4.2 RELATION TO THE DENSE FILTRATION

  • Sparse and dense persistence are isomorphic through level τ; matched interval endpoints move by at most 1 − τ, while unmatched intervals have persistence at most 1 − τ.This confines the effect to a terminal filtration band of width 1 − τ, independently of the filtration-value distribution.Source: §4.2 · p. 5
  • The compatible sparse–dense comparison does not imply pairwise equality of complete Betti matchings above τ or allow sparsification to be described as independent barcode-interval deletion.The inclusion-induced matching is the appropriate comparison because induced matchings are not generally functorial.Source: §4.2 · p. 5

4.3 INTERPRETATION FOR IMAGE SEGMENTATION

  • Label-supported cells remain retained even when their prediction value exceeds τ, and prediction, label, and comparison complexes are represented exactly for inference thresholds θ ≤ τ.Above τ, features may be shifted or omitted; binary filtrations completed at level 1 retain exact agreement between sparse and dense persistence data.Source: §4.3 · p. 5

4.4 IMPLEMENTATION AND DESIGN CHOICES

  • The implementation represents connected omitted regions by virtual vertices and generates required cone incidences implicitly; expensive persistence computations are governed primarily by retained cells plus interface size.The input still requires a linear scan, and the experiments use τ = 0.8; savings require the retained complex and interface to be small.Source: §4.4 · p. 6

5 EXPERIMENTS

The experiments assess sparse cubical complexes for runtime and segmentation effectiveness under realistic imaging and training settings. They report faster PH computation and reduced topological errors while tracking pixel- and region-based accuracy.

5 EXPERIMENTS

  • The experiments are organized to test sparse complexes’ efficiency and effectiveness on realistic imaging data and training paradigms.The efficiency evaluation tests whether the retained comparison subcomplex remains small on realistic segmentation outputs.Source: §5 · p. 6

5.2.1 TRAINING SETUP.

  • The evaluation uses six datasets spanning 2D and 3D targets, follows nnU-Net training principles, and compares against ComboLoss and applicable topological-loss baselines.Dense Betti Matching and DMT are infeasible in the main 3D setting, so the study adds reduced-patch and 2D comparisons; it evaluates Dice and BM error alongside clDice, VOI, and NSD.Source: §5 · p. 6, §5.2.1 · pp. 7–8

5.1 EFFICIENT PH COMPUTATION WITH SPARSE CUBICAL COMPLEXES

  • All barcodes are extracted in under half a second, with sparse PH up to ×78 faster on ATM and at least ×6 faster on NISB than dense PH.Speedup scales roughly inversely with the kept fraction and is only marginally influenced by τ in these experiments.Source: §5.1 · pp. 6–7

5.2.2 RESULTS

  • Across six datasets, sparseBM reduces BM error versus ComboLoss while keeping Dice within the one-percentage-point admissibility criterion; 3D runtime overhead is 5–15%.The reported reduction reaches fivefold; the table reports test-set results across 2D and 3D datasets.Source: Table 1 · p. 7, §5.2.2 · p. 8
  • On ATM’26 predictions, sparseBM’s update steps have high cosine similarity to Betti Matching’s, while most differing features have almost zero persistence and lie in the background.The figure also compares update-step similarity with ComboLoss and with a different batch using the same loss.Source: Figure 5 · p. 8, §5.2.2 · p. 9
  • In 2D, sparseBM significantly reduces topological errors versus all tested baselines except Topograph, with only an insignificant improvement over clDice on ACDC.The table presents test-set results in both 2D and 3D; higher sparseBM runtime overhead in 2D is attributed to a larger foreground fraction.Source: Table 1 · p. 7, §5.2.2 · p. 8
  • With reduced ATM’26 patch sizes, Betti Matching and sparseBM reduce topological errors ×5 and ×6 versus ComboLoss; sparseBM has lower BM error than Betti Matching and 19% versus 88% runtime overhead.The reduced-patch experiment enables dense PH computation; the table compares PH-based losses in that setting.Source: Table 2 · p. 9, §5.2.2 · p. 9

6 CONCLUSION

The paper presents sparse cubical complexes as a basis for faster PH computation and reports improved topological segmentation accuracy. It also identifies when the computational advantage may diminish and points to further applications.

6 CONCLUSION

  • Sparse cubical complexes omit high-valued regions while retaining filtration values on a common comparison-based subcomplex; sparseBM reduces loss-computation time by up to ×100 and closely reproduces the dense method’s optimization signal.Across six datasets, including four 3D large-patch datasets where dense PH training is practically infeasible, the paper reports substantial topological-accuracy improvements.Source: §6 · p. 9
  • The computational advantage depends on a small retained comparison subcomplex and interface; speedups are smaller when much of the comparison filtration lies below the threshold.The paper also notes that topology-preserving segmentation losses provide train-time guarantees that do not generalize during inference.Source: §6 · p. 9
  • The implementation, public datasets, preprocessing and splits, training recipe, model-selection protocol, and runtime-optimized baselines are documented.The implementation is available with C++ persistence and matching, Python bindings, and a PyTorch loss.Source: REPRODUCIBILITY STATEMENT · p. 10

A.1 ABLATION ON WEIGHT PARAMETER

Increasing the sparseBM weight sharply reduces validation Betti Matching error, while Dice remains stable only below a weight-dependent gradient-dominance threshold.

A.1 ABLATION ON WEIGHT PARAMETER

  • Betti Matching error falls from > 2500 to < 250 as the sparseBM weight increases, while Dice stays within 0.01 for λ < 10^-4.Dice starts reducing notably (> 0.03) for λ > 10^-3.Source: §A.1 · p. 13
  • Dice performance starts to deteriorate once the sparseBM-to-ComboLoss gradient-norm ratio exceeds 2–3.As sparseBM’s gradient increasingly dominates, Betti Matching error decreases while Dice initially remains stable.Source: §A.1 · p. 13
  • Figure 6 plots Betti Matching error and Dice against topology weight; model selection uses the last point above the −0.010 Dice admissibility floor.The dashed line marks the Dice+CE baseline.Source: Figure 6 · p. 14

A.2 ABLATION ON TAU AND NETWORK OUTPUT DISTRIBUTION

Across τ values from 0.5 to 0.9, the kept fraction changes very little, making sparseBM loss computation comparable across that range.

A.2 ABLATION ON TAU AND NETWORK OUTPUT DISTRIBUTION

  • Across τ = 0.5–0.9, the kept fraction varies by only 0.02%, and loss computation is comparable across these values.Figure 8 shows a small initial jump and a larger jump near the background end of the filtration.Source: §A.2 · p. 14
  • Figure 8 plots the fraction of included voxels as τ increases, with a logarithmic y-axis.Source: Figure 8 · p. 14
  • Table 3 compares kept fraction, runtime, validation BM error, and Dice across τ values on ATM’26 validation; runtime differences are within 2%.Source: Table 3 · p. 15

A.3.1 PREPROCESSING

For datasets susceptible to connectivity choices, labels are preprocessed for well-composedness by adding single pixels.

A.3.1 PREPROCESSING

  • Preprocessing adds single pixels to labels in connectivity-susceptible datasets to achieve well-composedness, changing only a small amount of foreground.The fill adds a median of 0.16% of foreground on ATM’26 and a mean of 0.79% on BraTS-METS; NISB-B is well-composed by construction.Source: §A.3.1 · p. 15

A.3.2 DATASETS.

The experiments span six binary segmentation tasks in 2D and 3D, with held-out testing, a staged training and selection protocol, and runtime-reducing training and evaluation procedures. Sparse PH metrics and airway post-processing are also evaluated.

A.3.2 DATASETS.

  • Six binary tasks cover four 3D and two 2D target regimes, with held-out test sets reserved from design decisions and configurations selected on validation data.Targets include a tree, thin sheets, many small blobs, a shell, a loopy network, and a ring.Source: §A.3.2 · p. 15, Table 4 · p. 15

A.3.3 PRETRAINING, TOPOLOGICAL FINETUNING, AND MODEL SELECTION

  • Training starts from a converged ComboLoss parent checkpoint; each method’s selected setting minimizes validation Betti Matching error while matching parent Dice within 1 percentage point, then is retrained with three seeds.Source: §A.3.3 · p. 16

A.3.4 INTERLEAVED TRAINING.

  • Interleaving two micro-batches overlaps loss calculation with GPU forward/backward passes, hiding CPU runtime behind GPU computation and remaining equivalent to gradient accumulation.Methods for each dataset use the same effective batch size.Source: §A.3.4 · p. 16, Figure 9 · p. 17

A.4.1 SPARSEBM AS SEGMENTATION METRIC

  • Sparse Betti Matching error computation is equivalent to its dense counterpart on binary inputs and is 48-fold faster on BraTS-METS.The speedup increases with patch size and supports efficient validation and topology-aware model selection.Source: §A.4.1 · p. 17, Figure 10 · p. 17

A.4.2 SPARSE CUBICAL FILTRATIONS AS A POST-PROCESSING TOOL

  • Post-processing repairs disconnected airway branches by raising death voxels; the method ranked 3rd in the ATM’26 final test leaderboard.Each branch is treated as a dimension-0 feature that dies when it merges with the main tree.Source: §A.4.2 · p. 17
  • The post-processing step keeps a median of 0.33% of voxels and takes 5.3 seconds on the largest volume; repairs add a median of 7 voxels per volume, at most 125.Source: §A.4.2 · p. 18
  • Reconnection at t = 0.1 and τ = 0.999 improves both tree metrics for every training loss on 53 held-out volumes and three seeds; the small Dice reduction comes from the lower threshold, not added bridge voxels.The post-processing results are reported as improvements over each respective base model.Source: §A.4.2 · p. 18, Table 5 · p. 18
Loading 2609.37177v1…