Many medical segmentation targets have no visible edge. The pancreas, the esophagus and the optic chiasm fade into neighboring tissue of nearly the same brightness. Networks trained to label pixels as "inside" or "outside" can score well by getting the obvious interior right and guessing at the rim. One proven fix is to predict a signed distance map instead of a mask: every voxel stores how far it is from the organ surface, negative inside and positive outside. This forces the network to model the shape as a whole. Shape-Aware Organ Segmentation by Predicting Signed Distance Maps did this with a single 3D U-Net and cut Hausdorff distance on hippocampus CT from 23.57 mm to 5.40 mm. That single network, however, is asked to do two different jobs with one set of weights. Estimating that a background voxel sits 40 mm from the organ needs a wide view of the anatomy. Locating the exact surface needs sensitivity to faint intensity changes over a few voxels.
We propose to split the distance map itself between two parallel branches. A coarse, wide-view branch regresses the smooth far-field distance at low resolution. A full-resolution local branch regresses a truncated distance only inside a thin band around the surface. The global branch's own distance estimate decides where that band lies, so the local branch never runs on clear interior or background voxels. This lets the design operate on whole 3D volumes without the slicing or patch-cropping that earlier dual-branch models fell back on. In two sentences: the global branch answers "roughly where is the organ and how far am I from it," and the local branch answers "exactly where is the surface" only where the global branch says the surface is near. The routing comes from predicted geometry rather than from a hand-tuned uncertainty threshold.
Core Claim
The claim has three parts. First, a single network regressing a full signed distance map suffers measurable gradient conflict between far-field and near-surface voxels. Second, assigning those two regimes to separate parallel branches, each with a matching receptive field and resolution, improves boundary accuracy specifically on low-contrast surface segments. Third, gating the local branch by the predicted distance gives a geometric, end-to-end differentiable alternative to entropy thresholds and makes dense local processing affordable in native 3D.
Concretely, let $D(x)$ be the ground-truth signed distance at voxel $x$, in millimetres. The global branch predicts $\hat D_g(x)$ at quarter resolution, which is then upsampled. The local branch predicts $\hat D_\ell(x)$, supervised only against the truncated target $\mathrm{clip}(D(x), -\tau, \tau)$, where $\tau$ is the band half-width in millimetres. The two are fused as
$$\hat D(x) = \big(1 - w(x)\big)\,\hat D_g(x) + w(x)\,\hat D_\ell(x), \qquad w(x) = \sigma\!\left(\frac{\tau - |\hat D_g(x)|}{k}\right),$$
where $\sigma$ is the logistic function and $k$ is a softness constant. The final mask comes from the same differentiable Heaviside mapping, with the same L1 and product losses, as in Xue et al. Because $w(x)$ is near zero far from the predicted surface, the local branch is evaluated sparsely: only on voxels with $|\hat D_g| < \tau + \delta$, using sparse 3D convolution.
Relation to Prior Work
Three lines of work motivate the proposal.
Xue et al. supply the distance-map target and its losses. They do not separate far-field from near-surface regression, and that conflict is the specific tension we test.
Dual-branch local–global networks show that parallel streams help low-contrast segmentation, but all of them keep a binary or mask target. BELGNet runs a ResNeSt CNN in parallel with Mamba blocks in a 2D encoder, then refines boundaries with heuristic feature negation in a shared decoder. DB-MSMUNet splits the decoder into an edge path and a lesion path, but slices pancreatic CT into 2D and acknowledges the loss of inter-slice consistency. vMixer is natively 3D but places local window attention and global mixing at different stages rather than running them concurrently. Our branches are not simply "CNN and attention over the same mask." Each is given a different regression target defined by the geometry of the distance field.
The closest routing work is HUR-MACL. It sends only high-entropy regions to parallel Mamba and deformable-CNN branches and gains 4.61 Dice points on the optic chiasm. It uses cross-entropy targets and a manually tuned threshold $T$, which the authors identify as a weakness. We replace entropy with predicted distance, and the band width $\tau$ is an interpretable physical quantity that we sweep openly rather than hide.
The general argument that serial local-then-global stacks discard information comes from InterFormer. The Glance-and-Gaze Vision Transformer shows that a dilated global branch plus a depthwise-convolution local branch can be cheap. That paper supplies our global-branch design: dilated 3D sampling with attention at quarter resolution.
Two results constrain the design. Distance regularization is known to over-smooth genuine irregular extensions. Edge modules are known to collapse under severe contrast loss. We therefore test thin-structure recall and contrast degradation explicitly rather than assuming the method is immune.
Research Program
The first stage is diagnostic and could falsify the premise before any architecture work. We train a single-stream 3D U-Net on full signed distance maps for NIH Pancreas and SegTHOR. Throughout training we measure the cosine similarity between the shared-encoder gradients contributed by voxels with $|D| > 3\tau$ and those contributed by voxels with $|D| < \tau$. If this similarity stays near zero or positive, the conflict hypothesis is wrong and the project shifts to the cheaper alternatives described below. If it is consistently negative, especially late in training, the split is motivated.
The second stage builds the model. The global branch is a dilated-attention or state-space encoder-decoder at quarter resolution. The local branch is a shallow, full-resolution sparse 3D convolutional network fed with raw intensities plus the upsampled global features at band voxels. Fusion follows the equation above. Gradients flow through $w$ into the global branch, so the global branch is also pushed to place the band correctly. The local branch's output is the only path to the zero crossing inside the band, which prevents it from being starved of gradient. Without this, the global branch could dominate training, the imbalance flagged in the dual-branch literature.
The third stage is analysis. We stratify every boundary metric by the local intensity contrast across the ground-truth surface, computed as the gradient magnitude of the image along the surface normal and binned into terciles. We also measure compute as a function of $\tau$.
Baselines
The naive reference point is nnU-Net-style 3D U-Net training with Dice plus cross-entropy, at the same patch or full-volume input size and with the same augmentation. HUR-MACL reports beating nnU-Net, but no reported result was found on Lacuna for nnU-Net on our target datasets, so we run it ourselves.
The most direct competitor is Xue et al.'s single-stream signed-distance U-Net with L1 and product loss. It attacks the same geometric problem with one network, so any gain of ours must come from the split rather than the target. We re-implement it on our splits at a parameter count matched to our two branches combined. Its reported Hausdorff distance of 5.40 mm on hippocampus CT is the only number on Lacuna for it, and it is on a dataset we do not use. The comparison is therefore entirely re-run.
The strongest existing published dual-branch method on our main benchmark is DB-MSMUNet, which reports 89.47% Dice on NIH Pancreas and 87.59% on MSD Pancreas Tumor. It processes 2D slices, so we re-run it under our 3D-evaluated splits and also quote its published figures. On Synapse, vMixer reports HD95 of 6.78, against 10.63 for nnFormer and 17.65 for Swin UNETR. We re-run vMixer and treat it as the boundary-accuracy bar. On SegTHOR, the cascaded EMSN reports esophagus Dice of 0.8597. On the left atrium dataset, the loss-based method in Combating Uncertainty with Novel Losses for Automatic Left Atrium Segmentation reports 92.24% Dice.
All methods get the same training budget in GPU-hours and the same hyperparameter search budget of twenty trials. Each is reported over three seeds with paired bootstrap confidence intervals.
The key ablations isolate the ingredient. The first keeps two parallel branches but gives both the full binary mask target, which tests whether the split target matters or only the split architecture. The second keeps the split target but replaces the distance-derived gate with HUR-MACL-style entropy gating at a tuned threshold. The third runs the local branch densely everywhere rather than sparsely, which tests whether sparsity costs accuracy.
Beating the field means two things. Our model must reduce HD95 and average surface distance relative to the matched single-stream distance network with non-overlapping confidence intervals, with the gain concentrated in the lowest-contrast tercile of surface segments. It must also at least match the published Dice of DB-MSMUNet and vMixer under re-run conditions.
Why not just…?
Why not just truncate the distance map in a single network? This is the most serious threat. If the far-field voxels cause the conflict, a single U-Net regressing only a truncated distance, with a separate mask head for coarse localization, might capture most of the gain at no architectural cost. We include exactly this baseline at matched parameters. The stage-one gradient diagnostic also predicts the outcome: if truncation alone removes the negative gradient similarity, we will report that the simpler model suffices. Our expected advantage is specific. Truncation discards the shape-coherence signal that suppressed floating false positives in Xue et al. The split keeps that signal in the global branch and still frees the local branch. We measure false-positive connected components to test this.
Why not just put two output heads, mask and distance, on one shared encoder? Multi-task heads are cheap and common. However, a shared encoder still has a single resolution and receptive field, which is where the hypothesized conflict lives. The first ablation (two branches, same target) and this baseline (one encoder, two targets) bracket the question. If shared-encoder multi-task matches us, the parallel branches are unnecessary and we will say so.
Why not just use boundary-focused losses on a standard backbone? Overlap and focal-positive losses raised left atrium Dice from 82.01% to 91.54%. Reaching 92.24%, however, still required an architectural recursive refinement stage. The DUCore losses (DUCore) need dataset-specific settings, with $\gamma$ of 0.5 on ISLES versus 0.8 elsewhere. We run the best of these losses on the 3D U-Net baseline under the same tuning budget. Our method is compatible with such losses, so we also report it combined with them, to show whether the gains add.
Why not just apply reverse attention or post-hoc polarization? Fixed erasure and size-threshold post-processing, as in Parallel Res2Net-based Network with ReverseAttention, assume a size prior that breaks on tiny structures. We include reverse attention on the U-Net baseline, and we report per-structure results on the esophagus and thin pulmonary veins, where such priors are most likely to prune true foreground.
Proposed Experiments
The primary benchmarks are NIH Pancreas, MSD Pancreas Tumor and Synapse (abdominal CT), SegTHOR with emphasis on the esophagus, and the 2018 left atrium MRI challenge. All are processed as full 3D volumes. Metrics are Dice, HD95, average symmetric surface distance, and boundary F-score at 1 mm and 2 mm tolerance, each also reported per contrast tercile. Compute is reported as peak memory and latency against vMixer's 154.3 ms.
Three checks would be decisive. The first is the stage-one gradient-conflict measurement described above. The second is the contrast-stratified comparison against truncated single-stream regression. If our gain is not larger in the lowest tercile than in the highest, the boundary-ambiguity story is not supported, even if averages improve.
The third is a stress test addressing the known contrast-collapse failure of edge modules. We progressively compress foreground-background intensity differences in test volumes, mimicking non-contrast CT, and plot HD95 against degradation for all methods. Our prediction is that the global branch's shape prior keeps the band correctly placed after edge-based methods have fragmented. If our curve degrades as fast as BELGNet-style boundary attention, that prediction fails.
A $\tau$ sweep from 2 to 10 mm reports accuracy and compute together. We also report recall of pulmonary-vein branches on the left atrium dataset, to check whether the smooth global branch erases genuine thin extensions that the local branch should recover.
References
- Shape-Aware Organ Segmentation by Predicting Signed Distance Maps
- Boundary-enhanced local-global collaborative network for medical image segmentation
- DB-MSMUNet: Dual Branch Multi-Scale Mamba UNet for Pancreatic CT Scans Segmentation
- Improving 3D Medical Image Segmentation at Boundary Regions using Local Self-attention and Global Volume Mixing
- HUR-MACL: High-Uncertainty Region-Guided Multi-Architecture Collaborative Learning for Head and Neck Multi-Organ Segmentation
- InterFormer: Interactive Local and Global Features Fusion for Automatic Speech Recognition
- Glance-and-Gaze Vision Transformer
- Combating Uncertainty with Novel Losses for Automatic Left Atrium Segmentation
- DUCore: Dual Uncertainty-Guided Consistency and Regional Contrastive Learning for Semi-supervised Medical Image Segmentation
- Parallel Res2Net-based Network with ReverseAttention for Polyp Segmentation