Topology-Preserving Loss Functions for Structural Connectivity

97 concepts82 papers2 proposals

In tasks like segmenting blood vessels, mapping road networks, or tracing neurons, the functional utility of a model’s output depends less on per-pixel accuracy and more on global connectivity. A single-pixel gap in a coronary artery segmentation can render a model useless for blood flow simulation, even if it achieves a 99% Dice score. Standard loss functions, such as Cross-Entropy or Dice, are "topology-blind": they treat every pixel or voxel as an independent unit, failing to penalize the small disconnections that break the structural integrity of thin, elongated objects.

To address this, researchers have developed topological regularization—a suite of loss functions that incorporate geometric and algebraic constraints directly into the training objective. These methods ensure that neural networks prioritize the "connectedness" and "holedness" of structures, moving beyond simple overlap metrics to preserve the underlying skeleton of the data.

The Skeleton as a Connectivity Prior

One of the most intuitive ways to enforce connectivity is to focus on the "centerline" or skeleton of a structure. In the segmentation of tubular networks, the skeleton is the most informative feature for maintaining flow. Shit introduced clDice (centerline Dice), a loss function that calculates the intersection between the predicted skeleton and the ground-truth skeleton. By penalizing breaks in these thin centerlines, the model is forced to maintain connectivity that volumetric overlap metrics would otherwise ignore.

This skeleton-centric approach has been extended through distance transforms. Qiu et al. proposed integrating a normalized skeleton distance transform into the loss function, which weights errors near the vessel core more heavily than minor boundary inaccuracies. Similarly, Mishra et al. utilized distance-transform-based weight maps to prioritize the connectivity of tiny, peripheral vessels that represent only a fraction of the total pixels.

Persistent Homology and Betti Numbers

A more mathematically rigorous approach involves Persistent Homology (PH), a tool from algebraic topology that tracks the birth and death of structural features—such as connected components (0D) and loops or holes (1D)—across different intensity thresholds. By incorporating PH into the loss function, the authors can penalize a model when its output has the wrong number of components or holes compared to the ground truth.

Haft-Javaherian et al. demonstrated that adding a "topological loss" based on PH significantly reduces fragmentation and "hole" artifacts in noisy 3D brain vasculature images. To make these calculations differentiable, researchers often use Wasserstein or Bottleneck distances to minimize the discrepancy between the topological features of the prediction and the target. Hwang et al. applied this to catheter segmentation, using PH to ensure that thin medical devices are represented as single, continuous components rather than fragmented segments.

Improving Efficiency and Locality

While powerful, global topological constraints like PH are often computationally expensive and can lead to unstable gradients. To mitigate this, Oner et al. proposed calculating topological loss in small, localized patches. This neighborhood-based approach prevents global image statistics from overshadowing local structural errors, such as short dead-ends in a road network.

Other researchers have sought to simplify the optimization objective. Lux et al. introduced Topograph, a graph-based framework that isolates topologically critical pixels—those whose removal would change the connectivity of the object. By focusing gradients only on these critical points, the authors achieved a 5x speedup over traditional PH methods while strictly preserving hole counts and connectivity.

Beyond Segmentation: Path Planning and Generation

The principles of topological regularization extend beyond medical imaging. In robotic path planning, Lin et al. incorporated Hausdorff distance and connectivity constraints into neural heuristics to ensure that predicted navigation corridors remain continuous and traversable.

In the realm of generative modeling, Liu et al. integrated 0-dimensional persistent homology into LiDAR diffusion models. By penalizing discrepancies in the number of connected components, their framework ensures that generated 3D scenes respect the global "connectedness" of real-world environments, preventing artifacts like floating objects or fragmented roads.

Conclusion

The shift from pixel-wise accuracy to topological integrity represents a fundamental change in how we train models for structural tasks. By leveraging skeletons, Betti numbers, and persistent homology, these loss functions teach neural networks to respect the functional architecture of the world—ensuring that a road remains a path, a vessel remains a conduit, and a neuron remains a bridge. As Oner et al. suggest, the bottleneck in many mapping tasks may not be the model architecture itself, but rather the objective function's inability to see the "big picture" of connectivity.

Key Foundational Work

Efficient convolutional neural networks for pixelwise classification on heterogeneous hardware systems (2016) — contributed 2 concept elements to this direction.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_topological_regularization_4b52949b,
  title = {topological regularization},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/topological-regularization/rdr_4b52949b02ad4e438a0ece78761737fd},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-24},
}

This exact version (version 1, frozen text):

@misc{lacuna_topological_regularization_4b52949b_v1,
  title = {topological regularization},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/topological-regularization/rdr_4b52949b02ad4e438a0ece78761737fd/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-24},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake