Topology-Preserving Segmentation Network: A Deep Learning Segmentation Framework for Connected Component

Han Zhang, Lok Ming Lui

TL;DR

The Topology-Preserving Segmentation Network (TPSN) ensures medical image segmentations maintain correct anatomical structure by deforming a template mask rather than classifying pixels individually. By using a diffeomorphic (topology-preserving) mapping and a novel Jacobian-based loss, the framework guarantees that the output matches a prescribed shape—like a single connected kidney—even in noisy or corrupted images.

What Problem Does This Paper Address?

Standard deep learning models for medical imaging, like the ubiquitous UNet, typically treat segmentation as a pixel-wise classification task: "Is this specific pixel part of the kidney or not?" While effective, this approach is "topology-blind." It often produces results with "islands" (stray clusters of pixels), holes, or disconnected components that are anatomically impossible.

In clinical practice, we usually know the topology of the organ we are looking for (e.g., a kidney is a single, simply-connected mass). Existing post-processing methods like Connected-Component Analysis (CCA) can remove small outliers but cannot fix fundamental structural errors or "thin connections" that shouldn't exist. The authors aim to bake these topological "priors" directly into the neural network's architecture.

Methods

The authors shift the paradigm from classification to deformation. Instead of predicting labels, the network (a UNet backbone) predicts a deformation map ($f$).

  1. Diffeomorphic Mapping: The core idea is to take a simple "template mask" (like a 2D disk or 3D ball) and warp it to fit the target object in the image. Because the warping is a diffeomorphism (a smooth, bijective map), the topology of the template is mathematically guaranteed to be preserved. If you start with one connected component, you end with one.
  2. $\epsilon$-ReLU Jacobian Loss: To ensure the deformation map remains a diffeomorphism and doesn't "fold" or "flip" the pixels, the authors introduced a specific regularization term. This loss penalizes any part of the deformation where the Jacobian determinant (a measure of local volume change) drops below a small threshold $\epsilon$.
  3. Multi-level TPSN (mlTPSN): To handle complex geometries, the authors proposed a coarse-to-fine strategy. The network first predicts a rough mask on a low-resolution image, then uses that result as the template for a higher-resolution stage, gradually refining the shape.

Datasets

The framework was evaluated on two primary datasets:

  • Ham10000 (2D): A collection of 10,015 dermatoscopic images of skin lesions. These are generally simply-connected shapes, making them ideal for 2D testing.
  • KiTS21 (3D): The 2021 Kidney Tumor Segmentation challenge dataset. The authors focused on segmenting the kidney, which requires maintaining a single continuous 3D volume.

Key Insights and Ideas

  • Topology as a Constraint, Not an Afterthought: By making the output a transformation of a template, the network literally cannot produce a disconnected segmentation. This moves the "knowledge" of the organ's structure from the human's head into the network's mathematical constraints.
  • Robustness to Corruption: One of the most striking findings was how the model handled "information loss." When slices of a 3D scan were zeroed out (simulating sensor failure or patient movement), standard UNets produced fragmented, nonsensical results. TPSN, however, "filled in the gaps" logically because it was forced to maintain a continuous shape.
  • The Power of Multi-Scale: The multi-level approach (mlTPSN) proved essential. Trying to warp a simple sphere into a complex kidney shape in one giant leap is hard; doing it in stages allows the model to capture fine boundary details without losing the global structure.

Key Results

The TPSN and mlTPSN models consistently outperformed baseline UNets and other topology-aware models like TEDSNet.

  • Accuracy (Dice Score): On the Ham10000 dataset, mlTPSN achieved a 94.42% Dice score, compared to 93.50% for a standard UNet.
  • 3D Performance: On KiTS21, mlTPSN reached a 93.17% Dice score, significantly outperforming TEDSNet (87.67%).
  • Qualitative Superiority: Visually, the TPSN results are much "cleaner." While UNet often mislabeled parts of the wrong kidney or created "pixel spray," TPSN produced a single, smooth, anatomically plausible volume.

Limitations and Future Work

  • Fixed Topology: The current model requires the user to prescribe the topology beforehand (e.g., "there is exactly one object"). It might struggle in cases where the number of components varies, such as segmenting multiple scattered tumors.
  • Template Sensitivity: While the multi-level approach helps, the final result still depends on the initial template. Choosing a template that is "too far" from the target shape might lead to sub-optimal fitting.
  • Future Directions: The authors suggest that this framework could be integrated with other neural architectures beyond UNet to further improve boundary precision while maintaining the guaranteed topological properties.

Summary updated

Abstract

Medical image segmentation, which aims to automatically extract anatomical or pathological structures, plays a key role in computer-aided diagnosis and disease analysis. Despite the problem has been widely studied, existing methods are prone to topological errors. In medical imaging, the topology of the structure, such as the kidney or lung, is usually known. Preserving the topology of the structure in the segmentation process is of utmost importance for accurate image analysis. In this work, a novel learning-based segmentation model is proposed. A {\it topology-preserving segmentation network (TPSN)} is trained to give an accurate segmentation result of an input image that preserves the prescribed topology. TPSN is a deformation-based model that yields a deformation map through a UNet, which takes the medical image and a template mask as inputs. The main idea is to deform a template mask describing the prescribed topology by a diffeomorphism to segment the object in the image. The topology of the shape in the template mask is well preserved under the diffeomorphic map. The diffeomorphic property of the map is controlled by introducing a regularization term related to the Jacobian in the loss function. As such, a topology-preserving segmentation result can be guaranteed. Furthermore, a multi-scale TPSN is developed in this paper that incorporates multi-level information of images to produce more precise segmentation results. To evaluate our method, we applied the 2D TPSN on Ham10000 and 3D TPSN on KiTS21. Experimental results illustrate our method outperforms the baseline UNet segmentation model with/without connected-component analysis (CCA) by both the dice score and IoU score. Besides, results show that our method can produce reliable results even in challenging cases, where pixel-wise segmentation models by UNet and CCA fail to obtain accurate results.
BibTeX
@misc{zhang2022topology,
  author = {Han Zhang and Lok Ming Lui},
  title = {{Topology-Preserving Segmentation Network: A Deep Learning Segmentation Framework for Connected Component}},
  year = {2022},
  eprint = {2202.13331},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2202.13331},
}
Figure