Source-linked AI summary

clDice -- A Novel Topology-Preserving Loss Function for Tubular Structure Segmentation

Suprosanna Shit, Johannes C. Paetzold, Anjany Sekuboyina, Ivan Ezhov, Alexander Unger, Andrey Zhylka, Josien P. W. Pluim, Ulrich Bauer, Bjoern H. Menze

arXiv:2003.07311v7cs.CVcs.LGeess.IV

TL;DR

Tubular-network segmentation needs measures that preserve connectivity, not only voxel overlap. The paper introduces clDice and differentiable soft-clDice, proving topology guarantees under stated assumptions and reporting improved topological, graph, and volumetric scores across datasets and architectures.

  • Problem

    Voxel-overlap measures are sub-optimal for tubular networks because they do not adequately represent connectivity, which is important for downstream analyses.

  • Method

    The paper compares predicted and reference skeletons within their masks to define clDice, then uses differentiable soft-skeletonization to train arbitrary neural segmentation networks.

  • Results

    Including soft-clDice with α > 0 improved topological, volumetric, and graph similarity across all evaluated 2D and 3D datasets.

  • Takeaways & Limitations

    clDice provides a topology-aware segmentation objective whose reported improvements were consistent across network architectures, dimensions, and tubular or curvilinear structures.

  • Takeaways & Limitations

    The study notes that a better differentiable skeletonization and multi-class theoretical and experimental studies remain future work.

Abstract

from arXiv · show

Accurate segmentation of tubular, network-like structures, such as vessels, neurons, or roads, is relevant to many fields of research. For such structures, the topology is their most important characteristic; particularly preserving connectedness: in the case of vascular networks, missing a connected vessel entirely alters the blood-flow dynamics. We introduce a novel similarity measure termed centerlineDice (short clDice), which is calculated on the intersection of the segmentation masks and their (morphological) skeleta. We theoretically prove that clDice guarantees topology preservation up to homotopy equivalence for binary 2D and 3D segmentation. Extending this, we propose a computationally efficient, differentiable loss function (soft-clDice) for training arbitrary neural segmentation networks. We benchmark the soft-clDice loss on five public datasets, including vessels, roads and neurons (2D and 3D). Training on soft-clDice leads to segmentation with more accurate connectivity information, higher graph similarity, and better volumetric scores.

1. Introduction

Tubular-network segmentation requires topology-aware evaluation because connectivity can matter more than voxel-wise overlap or radius accuracy. The paper introduces clDice to address this gap and develops it into a trainable loss.

  • Motivation: Connectivity is the key characteristic of objects that are locally tubular and globally organized as physical networks.This matters for vessels, roads, and neurons, where topology supports downstream tasks such as blood-flow simulation and route planning.
  • Motivation: A missed vessel segment can be interpreted pathologically as a stroke or produce dramatic changes in simulated blood flow, whereas moderate radius errors can be tolerated clinically.
  • Motivation: Traditional overlap and volumetric-distance measures can undervalue spatially contiguous predictions and fail to reflect network topology.Dice and Jaccard average voxel-wise hits and misses, so a single-voxel shift can alter the topology of thin structures.
  • Research questions: The paper asks for a pixelwise measure that benchmarks tubular-structure segmentation while guaranteeing network-topology preservation.
  • Contributions: The proposed clDice is a connectivity-aware similarity measure with theoretical guarantees, extended through differentiable soft-skeletonization into a loss for neural networks.Experiments cover multiple 2D and 3D tubular or curvilinear segmentation tasks.

2. Let’s Emphasize Connectivity

clDice evaluates tubular segmentation by comparing predicted and reference skeletons with the corresponding masks. It combines topology precision and topology sensitivity through a harmonic mean and can be implemented as a differentiable loss.

  • Metric definition: clDice is a connectivity-preserving metric based on intersections between segmentation masks and their morphological skeletons.
  • Trainable loss: Soft-clDice applies differentiable soft-skeletonization and can be used with arbitrary segmentation networks.The soft-skeletonization can be implemented using pooling functions in standard deep-learning toolboxes.
  • Metric definition: The method extracts predicted and reference skeletons, then measures how much each skeleton lies within the other mask.
  • Metric definition: Topology precision is sensitive to false-positive predictions, while topology sensitivity is sensitive to false negatives.
  • Metric definition: clDice is the harmonic mean of topology precision and topology sensitivity.The formulation is also described as F1 or Dice.

3. Topological Guarantees for clDice

The paper proves that clDice can guarantee topology preservation under stated skeleton and embedding assumptions. When the relevant inclusions hold, predicted and reference foregrounds and backgrounds are homotopy equivalent.

  • Assumptions: The guarantees assume non-knotted embeddings in S3 and masks admitting both foreground and background skeleta.
  • Assumptions: The proof relies on foreground and background being homotopy-equivalent to embedded topological graphs, with connectedness and graph-like homotopy properties.
  • Topological guarantees: Under the paper’s assumptions, nested inclusions between foregrounds, backgrounds, and their skeleta imply homotopy equivalence.
  • Topological guarantees: The resulting foregrounds and backgrounds are homotopy equivalent, establishing topology preservation for the binary masks.
  • Topological guarantees: If clDice equals 1 for both foreground and background, the inclusion conditions required by the corollary are satisfied.

4. Training Neural Networks with clDice

The paper adapts clDice for neural-network training by replacing nondifferentiable skeletonization with soft-skeletonization, then combining soft-clDice with soft-Dice to optimize topology-preserving segmentation.

  • 4.1. Soft-clDice using Soft-skeletonization:: Soft-skeletonization uses iterative min- and max-pooling as differentiable proxies for morphological erosion and dilation.The method is motivated by topology-preserving morphological thinning and is computed through an iterative process.
  • 4.1. Soft-clDice using Soft-skeletonization:: Choosing k below the largest tubular radius causes incomplete skeletonization, whereas larger k preserves performance but increases computation time.Experiments use k = 5...25, matched to the pixel radius of the largest observed tubular structures.
  • 4.1. Soft-clDice using Soft-skeletonization:: The soft-skeleton is extracted by sequentially skeletonizing structures across iterations, with thinner structures processed before thicker ones.Figure 3 illustrates the process using iterations k > j > i and vessel diameter d.
  • 4.1. Soft-clDice using Soft-skeletonization:: Soft-skeletonization makes clDice a fully differentiable, real-valued measure called soft-clDice.Algorithm 2 applies the resulting soft skeletons to compute the trainable loss.
  • 4.2. Cost Function: The combined cost function uses soft-Dice and soft-clDice because the objective is topology-preserving segmentation rather than centerline learning.The weighting parameter is restricted experimentally to α ∈[0, 0.5].
  • 4.2. Cost Function: For complex, highly imbalanced datasets, experiments compute clDice only on the underrepresented foreground class despite the two-class theoretical formulation.The paper attributes this sufficiency to tubularness, foreground sparsity, and the lack of cavities in the data.

5. Experiments

The experiments evaluate soft-clDice across five public datasets, architectures, and volumetric, topology-based, and graph-based metrics. Including soft-clDice improves reported segmentation quality, especially connectivity-related measures, while adding only marginal training overhead.

  • Experimental setup: Five public datasets spanning 2D retina, roads, and neurons plus 3D synthetic and Vessap vessels were evaluated with three-fold cross-validation.The study used U-Net and FCN architectures and compared soft-Dice with the proposed loss across α values from 0.1 to 0.5.
  • Experimental setup: Volumetric, topology-based, and graph-based metrics jointly assessed segmentation quality, including Dice, Betti errors, Euler characteristic, Streetmover distance, and Opt-Junction F1.This evaluation framework combines voxel overlap with connectivity and graph similarity.
  • Quantitative results: Including soft-clDice for any α > 0 improved topological, volumetric, and graph similarity across all 2D and 3D datasets.The authors interpret α as a dataset-specific hyperparameter, with larger α often improving clDice.
  • Quantitative results: Soft-clDice produced larger improvements on the more complex Vessap and Roads datasets, while CREMI and synthetic vessels showed the smallest gains over baseline.The authors attribute the smaller gains to CREMI’s near-uniform thickness and the synthetic data’s high signal-to-noise ratio and limited illumination variation.
  • Qualitative results: Soft-clDice recovered connections missed by soft-Dice and avoided false-positive vessel connections in real 3D vessel data.The qualitative differences were particularly frequent in the complex road and DRIVE datasets.
  • Computational efficiency: Training overhead was under 10% for 1024×1024 images, taking 1.35 s with soft-clDice versus 1.24 s with soft-Dice per batch of four.The reported soft-skeleton complexity is O(kn^2), compared with a cited competing worst-case complexity of O(n^6log(n)).
  • Limitations and future work: A better differentiable skeletonization remains future work because the proposed soft-skeleton approximation could still be improved.The authors also identify theoretical and experimental multi-class studies as a sensible extension.

6. Conclusive Remarks

The paper introduces clDice as a topology-preserving similarity measure and soft-clDice as a differentiable training loss for tubular-structure segmentation. Across the presented applications, the approach improves connectivity information, graph similarity, volumetric scores, and qualitative recovery of missed connections.

  • Contributions: clDice is a topology-preserving similarity measure for tubular structure segmentation with a theoretical guarantee up to homotopy equivalence.The guarantee is stated for binary 2D and 3D segmentation.
  • Contributions: Soft-clDice is a differentiable version used to train 2D and 3D neural segmentation networks.The paper evaluates it alongside volumetric, topological, and graph-based measures.
  • Findings: Training on soft-clDice yields more accurate connectivity information, better graph similarity, better Euler characteristics, and improved Dice and Accuracy.Figure 5 qualitatively shows recovered road, retina-vessel, and neuron connections that soft-Dice misses.

A. Theory - clDice in Digital Topology

clDice interprets topology changes through skeleton-based ghosts and misses, linking their removal to homotopy equivalence under stated assumptions. The theory characterizes relevant 2D and 3D topological properties using Betti numbers.

  • β0 counts connected components, β1 counts circular holes, and β2 counts cavities in 3D.
  • Ghosts are predicted-skeleton elements outside the true mask, representing false positives that survive skeletonization.
  • Misses are true-skeleton elements absent from the predicted mask, representing false negatives that survive skeletonization.
  • Voxel-wise losses treat false positives and false negatives equally, whereas clDice targets errors affecting topological differences.
  • For any topological difference, optimal clDice requires a minimum error correction that removes the corresponding ghosts or misses.The proposition identifies removing these skeleton errors as sufficient for removing topological differences.
  • In the absence of ghosts and misses, clDice equals 1 for foreground and background, and Theorem 1 guarantees homotopy equivalence.

B. Additional Qualitative Results

Qualitative examples compare soft-Dice with clDice-based training on road, retina, and 3D vessel segmentation. The comparisons emphasize connectivity errors, including missed or incorrect connections and vessel-radius over-segmentation.

  • Soft-clDice segments road connections that soft-Dice misses in Massachusetts Road and DRIVE examples.The figure compares real images, labels, soft-Dice predictions, and predictions using Lc with α = 0.5.
  • In 3D vessel slices, soft-clDice helps better segment vessel connections across different field-of-view sizes.
  • Soft-Dice predictions over-segment vessel radius and create incorrect connections, whereas these errors are not present with the proposed loss.
  • A prior region-separation approach closes ambiguous gaps using a ground-truth map dilated by a five-pixel kernel.
  • That dilation-based approach can connect foreground objects within twice the kernel size, including closely spaced vessels, synaptic gaps, or irregular road intersections.The cited discussion states that generalizing it to smaller kernels was described as infeasible.

D. Datasets and Training Routine

The experiments use cross-validation and held-out tests across vessel, road, CREMI, and other datasets, with U-Net and FCN architectures. The supplied passages also specify architecture notation and layer layouts.

  • Datasets and splits: DRIVE uses three-fold cross-validation on 30 images and tests the best model on 10 images.
  • Datasets and splits: Massachusetts Roads uses 120 cross-validation images and 13 official test images, excluding images without a road network.
  • Datasets and splits: CREMI uses three-fold cross-validation on 324 images and testing on 51 images.
  • Architectures: U-Net is described with encoder blocks, a bottleneck, decoder up-convolution blocks, skip concatenations, and a single output channel.
  • Architectures: The FCN architecture is represented as a sequence of convolutional layers ending in a one-channel output.
  • Architectures: For the Road Dataset, the architecture is the same as for the DRIVE Dataset, while another configuration replaces bilinear up-sampling with 2x2 up-convolutions.

E.4. 3D Dataset

The 3D experiments use FCN and U-Net configurations, with parameter counts summarized separately. Differentiable 3D skeletonization combines directional soft erosion, dilation, opening, and iterative ReLU-based skeleton accumulation.

  • 3D architectures: The 3D FCN maps one or two input channels through convolutional layers to a one-channel output.
  • 3D architectures: The 3D U-Net uses encoder blocks with a bottleneck and decoder up-convolution blocks connected by concatenation.
  • Model comparison: Table 2 reports the total number of parameters for each architecture used in the experiments.
  • Soft skeletonization: Differentiable skeletonization repeatedly erodes and dilates the mask, compares the result with the pre-dilation image, and accumulates the differences.
  • Soft skeletonization: The 2D implementation uses directional 2D max pooling for soft erosion and a 3×3 dilation window.
  • Soft skeletonization: In 3D, soft erosion applies directional max pooling along each spatial axis, while soft dilation uses a 3×3×3 max-pooling window.
  • Soft skeletonization: Soft opening is dilation after erosion, and iterative soft skeletonization accumulates ReLU-filtered differences over repeated iterations.

H. Evaluation Metrics

The evaluation compares experimental setups using volumetric, graph-based, and topology-based metrics computed on whole volumes or random patches. Topology is assessed through Betti errors and relative Euler characteristic error, with values closer to one preferred for the latter.

  • Three metric families—volumetric, graph-based, and topology-based—are used to compare experimental setups.
  • Dice coefficient, Accuracy, and clDice are calculated on complete 2D/3D volumes.clDice uses a morphological skeleton generated with skeletonize3D from scikit-image.
  • Graph evaluation extracts graphs from random patches measuring 64×64 pixels in 2D and 48 × 48 × 48 in 3D.
  • StreetmoverDistance samples and matches graph points before calculating their Wasserstein distance, while Opt-J uses an F1 score for junction-based metrics.Opt-J can account for nodes with an arbitrary number of incident edges, according to the cited work.
  • Topology-based evaluation uses Betti Errors for β0 and β1, plus the relative Euler characteristic error χratio.χratio is the predicted-to-ground-truth Euler characteristic ratio, and values closer to one are preferred; these scores use random 64 × 64 pixel patches.

I. Additional Quantitative Results

Additional quantitative results compare baseline losses with combinations involving soft-clDice across varied α settings. The reported results show improved scores relative to soft-Dice for almost all α > 0.

  • Using soft-clDice in Lc improves scores compared with soft-Dice for almost all α > 0 in the 3D synthetic vessel experiments.The experiments compare BCE, softDice, and MSE baselines combined with soft-clDice while varying α > 0.
Loading 2003.07311v7…