When a neural network segments blood vessels, airways or nerve canals from a 3D scan, it often leaves one-voxel gaps in thin branches. Overlap scores such as Dice barely register these gaps, but they are catastrophic for the reason vessel geometry is usually extracted in the first place: to run a flow simulation. A vessel that is 99% correct by overlap but severed in one place carries zero flow past the break. Current fixes count topological features, such as the number of connected pieces and loops (persistent homology), or match one-voxel-wide skeletons (clDice). Both are proxies for connectivity, and neither asks the question that matters downstream: does fluid get from the inlet to every outlet at the right rate?
We propose to ask that question directly during training. The segmenter outputs a signed distance field, a scalar function whose zero level is the vessel wall and whose value inside is the distance to that wall. We turn this field into a spatially varying conductivity and solve one linear diffusion equation from inlet to outlets. The loss is the mismatch between the predicted and ground-truth outlet fluxes. The gradient of this loss, computed with one extra "adjoint" solve, concentrates exactly at gaps and pinches. This gives a location-aware, near-linear-cost connectivity signal that also penalizes narrowing, which counting topological features cannot do. Neural surrogates, meaning networks trained to imitate expensive flow simulators, play two roles. First, we stress-test whether a fast Navier–Stokes surrogate silently "flows through" fragmented geometry. Second, they serve as the consumer on which we judge whether the conductance loss improves downstream hemodynamics more than topology losses do.
Core Claim
Requiring a predicted implicit vessel geometry to reproduce the ground-truth inlet-to-outlet fluxes of a cheap diffusion problem is a better training signal against fragmentation than topological or skeletal losses. It has four advantages. It is spatially localized by construction. It costs one sparse forward solve and one adjoint solve per step, instead of the cubic-cost persistence computations that take about 15 minutes per 3D volume in A Persistent Homology-Based Topological Loss for CNN-Based Multiclass Segmentation of CMR. It needs no fixed prior on how many pieces or loops the structure should have, because the target fluxes come from each case's own ground truth. And it cannot be satisfied by a topologically correct but hydraulically useless one-voxel thread. The measurable consequence is that, at matched Dice, flux-trained segmentations should yield lower error in Navier–Stokes pressure drop and wall shear stress (the friction the flowing blood exerts on the vessel wall) than segmentations trained with clDice or persistent-homology losses.
Mechanism
Let $\phi(x)$ be the predicted signed distance field, positive inside the lumen. We define a conductivity $\sigma(x) = \max(\phi(x),0)^2 + \sigma_0$, where $\sigma_0$ is a small floor conductance everywhere. We then solve
$$\nabla\cdot(\sigma \nabla u) = 0,\quad u=1 \text{ on the inlet},\; u=0 \text{ on outlets},$$
with no-flux conditions elsewhere. Here $u$ is a potential and $Q_k(\phi)$ is the flux leaving outlet $k$. The squared-distance conductivity is chosen deliberately. Integrating $(R-\rho)^2$ over a circular cross-section of radius $R$, where $\rho$ is the distance from the vessel's center, gives total conductance proportional to $R^4$. That matches Poiseuille scaling for slow viscous flow in a tube. The proxy therefore weights narrowing the way real flow does, and it only works because $\phi$ is a distance, not a binary occupancy. The loss is
$$\mathcal{L}_{\text{flow}} = \sum_k \frac{\big(Q_k(\phi)-Q_k(\phi^*)\big)^2}{Q_k(\phi^*)^2},$$
where $\phi^*$ is the ground-truth distance field. The adjoint gives $\partial \mathcal{L}/\partial\sigma(x) \propto \nabla u\cdot\nabla\lambda$, with $\lambda$ the adjoint potential. In a gap the potential drops sharply across the low-conductance region, so this product peaks exactly at the break.
The floor $\sigma_0$ is essential. Without it, no current crosses a gap and the gradient vanishes there. With it, a trickle crosses the gap and pulls $\phi$ upward at the break. We anneal $\sigma_0$ downward over training. We keep a standard Eikonal penalty, which pushes $\|\nabla\phi\|$ toward 1, so the field remains a usable distance. This addresses the tension the file identifies between topological smoothing and the exact wall distance that flow surrogates such as HB-PINN and INFINITY depend on. Inlet and outlet terminals are placed where the ground-truth lumen meets the crop boundary or at ground-truth centerline endpoints. They are needed only at training time.
Relation to Prior Work
Three works motivate the gap. Aneumo builds 85,280 aneurysm CFD simulations and a DeepONet-SwinT surrogate that predicts 3D flow in about 0.01 s. However, it trains and tests only on clean, manifold geometries. Graflow solves Kirchhoff-conserving flow on 1D vascular graphs and explicitly depends on an unbroken graph. The tubular structure review documents that segmenters routinely break distal branches while scoring well on Dice. Our loss is essentially a field-level version of Graflow's network-flow physics. Because it works on the continuous field, it needs no graph extraction, which is the step that fails on fragmented masks.
Three works constrain the design. TopoMatch shows that persistence-diagram losses pair features at the wrong locations up to 99.4% of the time, and fixes this with induced matchings, but only in 2D. Enhancing Implicit Shape Generators Using Topological Regularizations regularizes DeepSDF generators with persistence diagrams and Laplacian smoothing, cutting chair topological error from 1.86 to 0.77. It names location blindness and CPU cost as its limits. Byrne et al. show that persistent-homology losses with fixed Betti priors, which assume a known number of pieces and loops, fail on variable anatomy and slightly reduce 3D Dice. Our loss takes from TopoMatch the insistence on spatial localization. It differs from all three by replacing feature counting with a physical quantity whose gradient is local by construction, and whose target adapts to each case.
The method borrows from the implicit-surface and surrogate literature. HB-PINN shows that a learned distance function, kept separate from the physics network, cuts obstructed-cavity MSE from 0.00801 to 0.00088. This is evidence that downstream solvers care about the accuracy of the distance field, not just the binary mask. Topology-Preserving Neural Operator Learning via Hodge Decomposition preserves topological invariants of the solution field on a fixed domain. We address the complementary problem of a domain that is itself torn.
Research Program
The work proceeds in three stages. The first is a fragmentation stress test of neural surrogates. We take Aneumo geometries and inject controlled defects into their distance fields: gaps of 1–5 voxels, pinches to 20–80% of the radius, and spurious islands, placed at proximal and distal branches. On a stratified subset we run OpenFOAM on both the intact and defected geometries, and we run DeepONet-SwinT, trained on clean Aneumo data, on both. We measure whether the surrogate's predictions follow the true broken-geometry CFD (zero downstream flow) or hallucinate the intact flow. Either outcome matters. Hallucination means surrogates mask segmentation errors in clinical pipelines. Faithful failure means geometry errors propagate directly to the output.
The second stage trains segmenters with the conductance loss and compares them against topology and skeleton losses, in 2D and 3D. In 2D, persistent-homology baselines including TopoMatch are affordable, so the comparison is complete. In 3D we test whether the conductance loss stays cheap where homology becomes prohibitive.
The third stage is functional validation. Reconstructed geometries from each method are run through CFD on a held-out subset and through the surrogate on all cases. We report pressure-drop error, outlet flow-split error, wall shear stress error, and the fraction of outlets receiving any flow.
Baselines
The naive reference is a nnU-Net trained with Dice plus cross-entropy. Its distance-field variant is the same network regressing $\phi$ with an Eikonal penalty, which isolates the effect of the representation from the effect of the loss. On the mandibular canal dataset of Cipriano et al. / ToothFairy, nnU-Net reaches Dice 0.796 according to Lv et al..
The strongest existing method on our real 3D benchmark is Swin-UNetR with deep residual convolution modules and clDice, also from Lv et al. It reports Dice 0.844, IoU 0.731 and HD95 2.947 mm. It is the strongest competitor because it already combines a topology-aware loss with a thin-structure architecture on exactly this task. We will retrain it on our splits, and we will add our loss to the same backbone, so architecture is held fixed. All methods get the same data, the same GPU budget, and the same hyperparameter search size. Beating it means matching its Dice within 0.01 while reducing Betti-0 error, meaning the count of disconnected pieces, and outlet-flux error, and in Aneumo-derived experiments reducing CFD pressure-drop and wall shear stress error by a margin larger than the seed-to-seed spread.
The persistent-homology competitors are the cubical-complex loss of Byrne et al. in 3D, at its reported cost, and TopoMatch in 2D. For TopoMatch, no per-dataset reported result was found on Lacuna. We will rerun it on retinal vessel data from the review's DRIVE/STARE/CHASE-DB1 list, and beating it means lower Betti and flux error at equal Dice.
A post-processing baseline applies morphological closing followed by minimum-spanning-tree bridging of disconnected components.
Ablations isolate the key ingredient. We compare squared-distance conductivity against occupancy conductivity; remove the annealed floor $\sigma_0$; replace the exact adjoint solve with a frozen neural surrogate of the diffusion problem used as critic; and combine Betti-matching loss with our flux loss to test complementarity.
Why not just…?
Why not just use clDice, which already penalizes broken skeletons? clDice is the real incumbent, and Lv et al. show it works on canals. However, a skeleton passes through a one-voxel bridge without penalty, and the review reports that skeleton methods degrade past the tenth branching generation. Our pinch-injection test is designed to separate the two losses. On geometries where clDice is satisfied but the lumen is 20–50% of its true radius, we expect clDice to be blind and the flux loss to respond. If clDice matches our downstream wall shear stress and pressure-drop errors in the main comparison, our claim fails and we will report that.
Why not just use a 3D persistent-homology loss, perhaps with TopoMatch's localization? Byrne et al. report about 15 minutes per 3D volume and rely on fixed Betti priors. TopoMatch is 2D only and cubic in cost. Our 2D experiments give homology its best case. If TopoMatch equals the flux loss there, the remaining advantage is cost and sensitivity to narrowing, which the 3D runtime measurements and the pinch test will quantify.
Why not just train the surrogate on fragmented inputs so it is robust? This is a genuine threat for users who only want flow numbers, and we include it. We train DeepONet-SwinT on defected inputs paired with intact-geometry CFD. Its weakness is that it returns no repaired geometry. Wall shear stress must then be reported on a wall the model never saw, and any physics-based solver downstream still fails. We will report whether its pressure drops rival our pipeline's. If they do, the contribution narrows to geometry quality.
Why not just extract a 1D graph and use Graflow's Kirchhoff physics? That approach requires an intact graph. A broken mask yields a missing edge and zero downstream flow, and 1D models cannot produce wall shear stress. Our loss is a field-level form of the same conservation law that avoids the extraction step. We will include a graph-flux loss computed on skeletonized predictions as a baseline.
Proposed Experiments and Decisive Checks
There are three decisive checks. The first is localization. On injected gaps, we measure the distance from the peak of $|\partial\mathcal{L}/\partial\phi|$ to the true break, compared with the gradient of a persistence-diagram loss. We expect the flux gradient to peak within a vessel radius of the break, following from the adjoint argument above.
The second is functional dominance at matched Dice. Using Aneumo masks rendered into synthetic noisy, blurred images (Aneumo provides masks, not scans), plus ToothFairy, we compare CFD and surrogate pressure-drop error, flow-split error and wall shear stress error across all baselines.
The third is scaling. We record wall-clock time per training step against volume size for the conductance loss and the cubical persistent-homology loss, and expect near-linear growth from multigrid solves against the reported cubic cost.
For the surrogate stress test, no reported accuracy for DeepONet-SwinT on Aneumo fields was found on Lacuna; the file reports only its 0.01 s inference time. We therefore report our own retrained numbers on the clean split before injecting defects.
References
- A Persistent Homology-Based Topological Loss for CNN-Based Multiclass Segmentation of CMR
- Hybrid Boundary Physics-Informed Neural Networks for Solving Navier-Stokes Equations with Complex Boundary
- INFINITY: Neural Field Modeling for Reynolds-Averaged Navier-Stokes Equations
- Aneumo: A Large-Scale Multimodal Aneurysm Dataset with Computational Fluid Dynamics Simulations and Deep Learning Benchmarks
- Graflow: Neural Blood Flow Solver for Vascular Graph
- Human treelike tubular structure segmentation: A comprehensive review and future perspectives
- Topologically Faithful Image Segmentation via Induced Matching of Persistence Barcodes
- Enhancing Implicit Shape Generators Using Topological Regularizations
- Topology-Preserving Neural Operator Learning via Hodge Decomposition
- Automatic segmentation of mandibular canal using transformer based neural networks