Papers
Topics
Authors
Recent
Search
2000 character limit reached

SDF-TopoNet: Topology-Aware Segmentation

Updated 16 July 2026
  • The paper introduces SDF-TopoNet, a two-stage framework that first regresses signed distance functions before applying topology-aware fine-tuning to maintain structural connectivity.
  • It utilizes a U-Net with an EfficientNet-B0 encoder and a dynamic adapter to convert continuous SDF features into precise binary segmentations.
  • Empirical evaluations on multiple benchmarks show significant improvements in both overlap (Dice) and topology preservation (clDice) metrics compared to baseline methods.

SDF-TopoNet is a topology-aware segmentation framework for tubular and curvilinear structures that combines signed distance function pre-training with persistent-homology-based fine-tuning. It is designed for settings in which pixel-level overlap is insufficient because small discontinuities in thin branches can alter connectivity and change Betti numbers, thereby degrading downstream tasks such as path tracing and graph extraction. The method, introduced in “SDF-TopoNet: A Two-Stage Framework for Tubular Structure Segmentation via SDF Pre-training and Topology-Aware Fine-Tuning,” uses a two-stage procedure: first, a U-Net regresses signed distance fields; second, the learned representation is adapted to binary segmentation using a dynamic adapter and a Dice-weighted topological loss (Wu et al., 14 Mar 2025).

1. Problem formulation and motivation

The framework addresses segmentation of tubular and curvilinear structures, including retinal vessels, neurons in electron microscopy, and road networks. In these domains, segmentation quality is not determined solely by overlap-based metrics. A small gap in a vessel or neurite can split a connected component, eliminate a cycle, or otherwise alter the topology of the segmented object. The paper therefore frames the task as requiring both local boundary fidelity and global structural correctness (Wu et al., 14 Mar 2025).

The motivation is articulated against two limitations of prior topology-aware segmentation methods based on persistent homology. First, persistent-homology losses are computationally expensive because they require persistence-diagram computation and matching, including Betti matching or Wasserstein-style distances. The detailed description notes that previous works often restrict training to small patches such as 65×6565 \times 65 or 48×4848 \times 48. Second, purely topological losses are relatively insensitive to local pixel accuracy, so they are commonly paired with Dice or mean squared error losses to preserve boundary precision. SDF-TopoNet is proposed as a response to both limitations by moving part of the topology-related supervision into a less expensive pre-training stage.

A central premise of the method is that signed distance functions provide a continuous signal that encodes boundary proximity and topology-relevant geometric structure. This suggests a division of labor between stages: distance-based representation learning first, explicit topological correction later. A plausible implication is that this decomposition reduces the need to optimize expensive topological objectives from random initialization.

2. Topological background and signed distance functions

The paper formulates topology in the language of cubical complexes, which are natural for images. For a cubical complex KK with chain complex

C(K)=({Cd(K)}dZ,{d}dZ),C_*(K) = (\{C_d(K)\}_{d \in \mathbb{Z}}, \{\partial_d\}_{d \in \mathbb{Z}}),

the boundary operators satisfy

k1k0.\partial_{k-1} \circ \partial_k \equiv 0.

Cycles and boundaries are defined as

Zd(K)=Ker(d),Bd(K)=Im(d+1),Z_d(K) = \mathrm{Ker}(\partial_d), \qquad B_d(K) = \mathrm{Im}(\partial_{d+1}),

and the homology group and Betti numbers are

Hk(K)=Zk(K)/Bk(K),βk(K)=dimHk(K).H_k(K) = Z_k(K) / B_k(K), \qquad \beta_k(K) = \dim H_k(K).

In image analysis, β0\beta_0 counts connected components, β1\beta_1 counts loops or cycles in 2D, and β2\beta_2 counts voids in 3D (Wu et al., 14 Mar 2025).

Persistent homology is used to characterize the birth and death of topological features across a filtration, with persistence diagrams collecting the corresponding 48×4848 \times 480 pairs. Within SDF-TopoNet, this machinery appears most explicitly during fine-tuning, but the pre-training stage is motivated by the observation that signed distance fields align naturally with distance-based filtrations.

The signed distance function is given using the formulation attributed to Malladi et al. Let 48×4848 \times 481 be the set of points inside the object. The unsigned distance is

48×4848 \times 482

and the signed function is

48×4848 \times 483

In implementation, the SDF is computed from ground-truth masks using Euclidean Distance Transform:

48×4848 \times 484

with the final representation

48×4848 \times 485

Under this convention, SDF values are positive inside the object, zero on the boundary, and negative outside. The paper states that this representation is robust to small pixel noise and encodes distance to boundaries in a way that aligns with persistent-homology filtrations.

3. Two-stage framework and architecture

SDF-TopoNet uses a U-Net with an EfficientNet-B0 encoder as its backbone. The training protocol is explicitly divided into two stages. In the first stage, the network is trained as an SDF regressor. In the second stage, the original segmentation head is replaced by a dynamic adapter, and the model is fine-tuned for binary segmentation with a topology-aware objective (Wu et al., 14 Mar 2025).

During pre-training, the network outputs an SDF field for each image or patch. The target is the SDF computed from the ground-truth mask, and the loss is mean squared error. Conceptually, the objective is

48×4848 \times 486

implemented as MSE. The optimizer is Adam, and the schedule is 200 epochs of SDF regression. Images are cropped into smaller patches, and no additional smoothing or normalization beyond EDT is reported.

The paper emphasizes that SDF thresholds can close gaps in thin structures: lowering the threshold enlarges segmented regions and can restore connectivity. This observation motivates the dynamic transformation from continuous SDF features to binary masks. Rather than treating the SDF prediction as an end in itself, the method uses it as an intermediate representation that is subsequently adapted for segmentation.

The dynamic adapter is attached to the U-Net decoder outputs, described as SDF feature maps. Its role is to map continuous distance-informed features to binary masks while adapting to local context. The adapter has three described components: a large-kernel depthwise separable convolution that reconstructs or modulates feature maps from the backbone; a squeeze module consisting of global average pooling and a small feed-forward network for channel-wise scaling; and a variant that flattens features, applies a fully connected layer, and uses a 48×4848 \times 487 activation to predict a threshold for binarization. The detailed description therefore presents the adapter as combining feature modulation with dynamic threshold prediction.

4. Fine-tuning objective and topological losses

The second stage performs topology-aware fine-tuning for 100 epochs using a weighted combination of Dice loss and a topological loss. The objective is

48×4848 \times 488

where 48×4848 \times 489 is the predicted segmentation, KK0 is the ground truth, KK1 is Dice, and KK2 in all reported configurations. The topological term is selected as either Wasserstein Matching or Betti Matching:

KK3

During this stage, supervision uses ground-truth masks rather than SDFs (Wu et al., 14 Mar 2025).

For matching stability, the method pads a 2-pixel-wide bounding box around masks before computing persistence diagrams. The paper states that this “adds additional topological features,” increasing the number of diagram points and improving matching effectiveness for both Wasserstein and Betti matching.

The Wasserstein Matching loss is defined on persistence diagrams KK4 and KK5 as

KK6

where KK7 is the set of valid matchings and KK8 is Euclidean distance. This is the Earth Mover’s Distance formulation over birth-death points in the persistence diagrams.

The Betti Matching loss is defined using induced matchings in a common filtration space. Given binarized prediction KK9 and ground truth C(K)=({Cd(K)}dZ,{d}dZ),C_*(K) = (\{C_d(K)\}_{d \in \mathbb{Z}}, \{\partial_d\}_{d \in \mathbb{Z}}),0, the common space is

C(K)=({Cd(K)}dZ,{d}dZ),C_*(K) = (\{C_d(K)\}_{d \in \mathbb{Z}}, \{\partial_d\}_{d \in \mathbb{Z}}),1

applied element-wise. The induced matching is

C(K)=({Cd(K)}dZ,{d}dZ),C_*(K) = (\{C_d(K)\}_{d \in \mathbb{Z}}, \{\partial_d\}_{d \in \mathbb{Z}}),2

where C(K)=({Cd(K)}dZ,{d}dZ),C_*(K) = (\{C_d(K)\}_{d \in \mathbb{Z}}, \{\partial_d\}_{d \in \mathbb{Z}}),3 and C(K)=({Cd(K)}dZ,{d}dZ),C_*(K) = (\{C_d(K)\}_{d \in \mathbb{Z}}, \{\partial_d\}_{d \in \mathbb{Z}}),4 are induced mappings on barcodes. The loss is

C(K)=({Cd(K)}dZ,{d}dZ),C_*(K) = (\{C_d(K)\}_{d \in \mathbb{Z}}, \{\partial_d\}_{d \in \mathbb{Z}}),5

The paper notes that the factor of C(K)=({Cd(K)}dZ,{d}dZ),C_*(K) = (\{C_d(K)\}_{d \in \mathbb{Z}}, \{\partial_d\}_{d \in \mathbb{Z}}),6 normalizes the matching error.

The method’s stated rationale is that SDF pre-training supplies smooth, distance-based features before expensive topology optimization begins, while the fine-tuning stage restores explicit topological supervision. This suggests a hybrid regime in which persistent homology is reserved for late-stage correction rather than early-stage representation formation.

5. Evaluation protocol and empirical results

The detailed experimental description reports evaluation on four public benchmarks: DRIVE for retinal vessel segmentation, CREMI for electron-microscopy neuron segmentation, Massachusetts Roads for road segmentation, and Elegans as a biomedical dataset with both C(K)=({Cd(K)}dZ,{d}dZ),C_*(K) = (\{C_d(K)\}_{d \in \mathbb{Z}}, \{\partial_d\}_{d \in \mathbb{Z}}),7 and C(K)=({Cd(K)}dZ,{d}dZ),C_*(K) = (\{C_d(K)\}_{d \in \mathbb{Z}}, \{\partial_d\}_{d \in \mathbb{Z}}),8 features. The abstract states that the method is evaluated on five benchmark datasets, whereas the detailed dataset list enumerates these four. The reported split is C(K)=({Cd(K)}dZ,{d}dZ),C_*(K) = (\{C_d(K)\}_{d \in \mathbb{Z}}, \{\partial_d\}_{d \in \mathbb{Z}}),9 for train, validation, and test. Pre-training uses cropped patches for EDT-based SDF computation; fine-tuning uses k1k0.\partial_{k-1} \circ \partial_k \equiv 0.0 patches for Wasserstein Matching and k1k0.\partial_{k-1} \circ \partial_k \equiv 0.1 patches for Betti Matching, with sliding-window sampling at test time (Wu et al., 14 Mar 2025).

The evaluation includes standard segmentation metrics—Dice, Intersection over Union, Pixel Accuracy, and Variation of Information—as well as clDice. The paper describes clDice as a topology-preserving overlap measure based on skeletons k1k0.\partial_{k-1} \circ \partial_k \equiv 0.2 and k1k0.\partial_{k-1} \circ \partial_k \equiv 0.3, following Shit et al. 2021. The paper also discusses topology through Betti numbers, but the reported evaluation uses clDice and persistent matching losses or errors rather than explicit formulas for Betti error.

Baselines include a Dice-only U-Net, Hu et al. using TopoLoss or Wasserstein Matching on persistence diagrams, and Stucki et al. using Betti Matching. The reported model configurations comprise a pure Dice U-Net; U-Net plus Dice and Wasserstein Matching; U-Net plus Dice and Betti Matching; and two SDF-TopoNet variants that use SDF pre-training followed by dynamic-adapter fine-tuning with Dice plus either Wasserstein Matching or Betti Matching.

The key quantitative outcomes reported for the Wasserstein-based SDF-TopoNet variant are summarized below.

Dataset Dice comparison clDice
DRIVE Ours 0.716; Dice 0.243; Hu et al. 0.123; Stucki et al. 0.267 0.758
CREMI Ours 0.872; Dice 0.790; Hu et al. 0.849; Stucki et al. 0.832 0.929
Roads Ours 0.616; Dice 0.598; Hu et al. 0.582; Stucki et al. 0.537 0.690
Elegans Ours 0.880; Dice 0.863; Hu et al. 0.817; Stucki et al. 0.838 0.951

The paper states that the SDF-TopoNet Wasserstein variant achieves the best clDice on all four listed datasets. On DRIVE, the reported gain over the Dice baseline is especially large. On CREMI, Roads, and Elegans, the method also improves Dice relative to the listed baselines while maintaining the highest clDice. The reported interpretation is that the framework improves both pixel overlap and topology preservation.

An ablation on CREMI in the Wasserstein setting isolates the effect of SDF pre-training. With SDF pre-training enabled, the reported scores are Dice k1k0.\partial_{k-1} \circ \partial_k \equiv 0.4, IoU k1k0.\partial_{k-1} \circ \partial_k \equiv 0.5, PA k1k0.\partial_{k-1} \circ \partial_k \equiv 0.6, VoI k1k0.\partial_{k-1} \circ \partial_k \equiv 0.7, and clDice k1k0.\partial_{k-1} \circ \partial_k \equiv 0.8. With SDF disabled while retaining a two-stage process and the same final target as the final mask, the scores are Dice k1k0.\partial_{k-1} \circ \partial_k \equiv 0.9, IoU Zd(K)=Ker(d),Bd(K)=Im(d+1),Z_d(K) = \mathrm{Ker}(\partial_d), \qquad B_d(K) = \mathrm{Im}(\partial_{d+1}),0, PA Zd(K)=Ker(d),Bd(K)=Im(d+1),Z_d(K) = \mathrm{Ker}(\partial_d), \qquad B_d(K) = \mathrm{Im}(\partial_{d+1}),1, VoI Zd(K)=Ker(d),Bd(K)=Im(d+1),Z_d(K) = \mathrm{Ker}(\partial_d), \qquad B_d(K) = \mathrm{Im}(\partial_{d+1}),2, and clDice Zd(K)=Ker(d),Bd(K)=Im(d+1),Z_d(K) = \mathrm{Ker}(\partial_d), \qquad B_d(K) = \mathrm{Im}(\partial_{d+1}),3. The authors conclude that SDF pre-training improves both pixel overlap and topology, as reflected by higher clDice and lower VoI.

6. Computational profile, limitations, and place in the literature

The runtime analysis is reported for a single NVIDIA A40 GPU. Dice-only training requires 100 epochs at Zd(K)=Ker(d),Bd(K)=Im(d+1),Z_d(K) = \mathrm{Ker}(\partial_d), \qquad B_d(K) = \mathrm{Im}(\partial_{d+1}),4 s/epoch for a total of Zd(K)=Ker(d),Bd(K)=Im(d+1),Z_d(K) = \mathrm{Ker}(\partial_d), \qquad B_d(K) = \mathrm{Im}(\partial_{d+1}),5mZd(K)=Ker(d),Bd(K)=Im(d+1),Z_d(K) = \mathrm{Ker}(\partial_d), \qquad B_d(K) = \mathrm{Im}(\partial_{d+1}),6s. Hu et al. with Wasserstein Matching requires Zd(K)=Ker(d),Bd(K)=Im(d+1),Z_d(K) = \mathrm{Ker}(\partial_d), \qquad B_d(K) = \mathrm{Im}(\partial_{d+1}),7 s/epoch for a total of Zd(K)=Ker(d),Bd(K)=Im(d+1),Z_d(K) = \mathrm{Ker}(\partial_d), \qquad B_d(K) = \mathrm{Im}(\partial_{d+1}),8mZd(K)=Ker(d),Bd(K)=Im(d+1),Z_d(K) = \mathrm{Ker}(\partial_d), \qquad B_d(K) = \mathrm{Im}(\partial_{d+1}),9s. Stucki et al. with Betti Matching requires Hk(K)=Zk(K)/Bk(K),βk(K)=dimHk(K).H_k(K) = Z_k(K) / B_k(K), \qquad \beta_k(K) = \dim H_k(K).0mHk(K)=Zk(K)/Bk(K),βk(K)=dimHk(K).H_k(K) = Z_k(K) / B_k(K), \qquad \beta_k(K) = \dim H_k(K).1s/epoch for a total of Hk(K)=Zk(K)/Bk(K),βk(K)=dimHk(K).H_k(K) = Z_k(K) / B_k(K), \qquad \beta_k(K) = \dim H_k(K).2hHk(K)=Zk(K)/Bk(K),βk(K)=dimHk(K).H_k(K) = Z_k(K) / B_k(K), \qquad \beta_k(K) = \dim H_k(K).3mHk(K)=Zk(K)/Bk(K),βk(K)=dimHk(K).H_k(K) = Z_k(K) / B_k(K), \qquad \beta_k(K) = \dim H_k(K).4s. SDF-TopoNet with Wasserstein Matching performs Hk(K)=Zk(K)/Bk(K),βk(K)=dimHk(K).H_k(K) = Z_k(K) / B_k(K), \qquad \beta_k(K) = \dim H_k(K).5 pre-training epochs at Hk(K)=Zk(K)/Bk(K),βk(K)=dimHk(K).H_k(K) = Z_k(K) / B_k(K), \qquad \beta_k(K) = \dim H_k(K).6 s/epoch plus Hk(K)=Zk(K)/Bk(K),βk(K)=dimHk(K).H_k(K) = Z_k(K) / B_k(K), \qquad \beta_k(K) = \dim H_k(K).7 fine-tuning epochs at Hk(K)=Zk(K)/Bk(K),βk(K)=dimHk(K).H_k(K) = Z_k(K) / B_k(K), \qquad \beta_k(K) = \dim H_k(K).8 s/epoch, yielding Hk(K)=Zk(K)/Bk(K),βk(K)=dimHk(K).H_k(K) = Z_k(K) / B_k(K), \qquad \beta_k(K) = \dim H_k(K).9mβ0\beta_00s β0\beta_01 β0\beta_02mβ0\beta_03s β0\beta_04 β0\beta_05mβ0\beta_06s. SDF-TopoNet with Betti Matching yields β0\beta_07mβ0\beta_08s β0\beta_09 β1\beta_10hβ1\beta_11mβ1\beta_12s β1\beta_13 β1\beta_14hβ1\beta_15mβ1\beta_16s (Wu et al., 14 Mar 2025).

These measurements support two points made explicitly in the paper. First, persistent-homology losses remain expensive, with Betti Matching especially costly. Second, SDF pre-training adds only about β1\beta_17mβ1\beta_18s of overhead in the reported setup, while the ablation suggests substantial gains in segmentation quality. The paper further notes that SDF pre-training may accelerate convergence, suggesting that fewer fine-tuning epochs could suffice, although no reduced-epoch experiment is reported.

Several limitations are stated. Extremely thin or very low-contrast branches remain difficult; if SDF prediction is noisy near boundaries, learned thresholds may over-expand or under-expand structures. Betti Matching remains computationally heavy, and patch-based training is still required, which limits whole-image topology optimization. Domain shifts across modalities, such as from electron microscopy to fundus imagery, may affect SDF regression quality; the paper suggests that additional normalization or domain adaptation could help. It also does not report sensitivity to hyperparameters such as β1\beta_19 or adapter configuration, and does not provide memory usage.

Within the broader topology-aware segmentation literature, SDF-TopoNet is positioned as a hybrid between overlap-based supervision and direct persistent-homology optimization. Its distinctive contribution is the decoupling of distance-informed representation learning from expensive topological matching. This suggests a general design pattern for topology-critical segmentation: pre-train on a continuous field aligned with filtration geometry, then apply explicit topological losses only after a useful structural representation has already formed. The paper’s released code is hosted at https://github.com/siyiwu0330/SDF-TopoNet/, and the implementation notes mention that persistent-homology computations can be implemented with torch-topological, giotto-tda, or GUDHI.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to SDF-TopoNet.