Medical image segmentation models are trained on masks that radiologists draw by hand, one 2D slice at a time, on organs whose edges barely differ in brightness from the surrounding tissue. These masks are wrong in two predictable ways. Where the boundary has low contrast, the drawn edge is a guess. Where the organ surface tilts through the stack of slices, the edge carries a staircase error, because the annotator only ever saw it in discrete steps. Standard losses treat every one of these voxels (3D pixels) as a hard inside-or-outside fact. The network is then penalized for predicting the smooth, physically plausible surface that a 3D model would naturally produce.
We propose to replace the binary mask with a soft label at every voxel near the boundary. Instead of asking "is this voxel inside?", the network predicts a probability distribution over how far the voxel is from the boundary, as a histogram over signed-distance bins. The width of each target distribution is computed in closed form from two things the annotation pipeline actually got wrong: how weak the image contrast is at that edge, and how much slice quantization could have displaced it. In short, the network learns a per-voxel distribution over distance to the boundary, and the target spreads wider exactly where low contrast or slice-by-slice drawing makes the human label untrustworthy.
Core Claim
Label distribution learning trains on a probability distribution over neighbouring ordinal values instead of a single correct class. Its foundations come from Xin Geng et al.. It has been used almost entirely for image-level targets such as age or cancer grade, and the research file flags the extension to dense voxel targets as absent. The closest dense work predicts distance to the boundary deterministically. Shape-Aware Organ Segmentation by Predicting Signed Distance Maps regresses a 3D signed distance map, with a product loss that punishes sign errors sharply at the zero crossing. Hot-Distance adds a tanh-bounded distance head next to a one-hot head. Bounding Maps for Universal Lesion Detection softens 2D box targets with a fixed linear ramp.
None of these models the uncertainty of the distance itself. None makes the softness depend on the specific, physically derivable sources of label error in slice-annotated volumes. Our claim is that this dependence matters. A target whose width tracks local contrast and through-plane quantization should give better surfaces and better-calibrated boundary uncertainty than three alternatives: deterministic distance regression, uniform softening, and a learned variance with no physical prior.
The staircase term can be derived rather than tuned. Consider a surface annotated on slices spaced $s_z$ apart. Each true boundary point is assigned to the nearest slice, so its $z$-position error is roughly uniform on $[-s_z/2, s_z/2]$. Projecting that error onto the surface normal scales it by $|n_z|$, the through-plane component of the unit normal at that point. This gives a displacement variance of $s_z^2 n_z^2/12$, the variance of a uniform quantization error. For voxel $v$ with annotated signed distance $d_v$, distance-bin centres $b_k$, and local cross-boundary intensity contrast $c_v$, the target is
$$ q_v(k) \propto \exp\!\left(-\frac{(b_k-d_v)^2}{2\sigma_v^2}\right), \qquad \sigma_v^2 = \sigma_0^2 + \frac{s_z^2\, n_z(v)^2}{12} + \frac{\alpha}{c_v+\epsilon}. $$
Here $\sigma_0$ is a small floor, and $\alpha$ is the single tuned weight on the contrast term. The network outputs a softmax $p_v$ over the same bins and is trained with cross-entropy against $q_v$ inside a narrow band around the boundary. Beyond the band, distances are clamped to the end bins. The segmentation probability is the mass on negative-distance bins, so a standard mask comes out at no extra cost.
Research Program
The work has three parts. The first is building the targets. Signed distances, surface normals, and contrast are computed once per training volume from the annotation and the image. Contrast is the absolute difference of mean intensity in small regions on either side of the nearest boundary point, normalised by local noise. Everything is precomputed, so this avoids the bilevel meta-learning cost that Adaptive Variance Based Label Distribution Learning for Facial Age Estimation pays to learn per-sample variance. That paper motivates the idea that variance should vary per sample. We depart from it by deriving the variance instead of learning it.
The second part is the model. We attach a 16-bin distance head to the 3D full-resolution configuration of nnU-Net. Restricting the loss to the boundary band, and using few bins, keeps memory within the patch budget that nnU-Net already chooses. This matters because the file documents 3D memory limits as a real constraint, for example in Poisson Ordinal Network for Gleason Group Estimation. We use a symmetric Gaussian rather than a Poisson-type distribution. That paper's mean-equals-variance coupling is exactly the rigidity we want to avoid here, since we want width to be independent of distance.
The third part is analysis. We test whether the predicted distribution width at test time tracks real annotator disagreement. We also test whether the gains concentrate on through-plane-oriented and low-contrast surface patches, as the derivation predicts.
The scope is deliberately limited. Beyond Boundary Noise shows that boundary-level uncertainty does not capture disagreement about whether a lesion exists at all. Our method models boundary width only, and we will not claim it addresses presence ambiguity.
Baselines
The naive reference point is nnU-Net 3D full-resolution trained with its default Dice plus cross-entropy on binary masks nnU-Net. It is the strongest widely used method on volumetric organ segmentation, and every other variant changes only the target and head on top of it.
The strongest existing competitor on this specific question is deterministic signed-distance regression with a differentiable Heaviside and product loss, following Shape-Aware Organ Segmentation by Predicting Signed Distance Maps. It already encodes geometric smoothness across slices, which is the main competing explanation for any gain we see. No reported result was found on Lacuna for that method or for nnU-Net on the benchmarks below, so all numbers will come from our own reruns.
We also run a heteroscedastic version of that regressor, which predicts a mean distance and a variance per voxel under a Gaussian likelihood. We run a Hot-Distance-style dual head Hot-Distance as well.
Three ablations isolate the key ingredient, the physically derived width. The first is distance label distribution learning with one fixed global $\sigma$. The second is our model with only the staircase term. The third is our model with only the contrast term.
For fairness, every method uses the same nnU-Net preprocessing, patch size, folds, and epoch count. Each gets the same search budget of eight configurations over its own hyperparameters, chosen on a held-out fold. Our method's only tuned quantity is $\alpha$. Beating the strongest baseline means three things. First, a gain in surface Dice and 95th-percentile Hausdorff distance over the better of the two distance regressors that holds across all five cross-validation folds under a paired test. Second, no loss in volumetric Dice. Third, a higher correlation between predicted width and annotator disagreement than the heteroscedastic regressor achieves.
Why not just…?
Why not just blur the binary mask with an anisotropic Gaussian and train on soft masks? This is the most serious threat. It is cheap, and it captures much of the staircase intuition. If anisotropic blurring with the same derived widths matches our results, the distance histogram adds nothing, and the honest conclusion is "use derived-width soft masks." We include exactly this variant, with identical $\sigma_v$ maps, as a baseline. What a blurred mask cannot represent is a two-peaked belief about where the edge is, for example fat versus duodenum on either side of the pancreas. We will look specifically for bimodal predicted histograms on those patches. If none appear and the metrics tie, we will report the simpler method as the result.
Why not just let the network learn its own per-voxel variance (heteroscedastic regression)? Learned variance can absorb label noise without any physical prior. But with staircase errors, the noise is systematic and correlated along the surface, so a likelihood-trained variance may simply fit the jagged ground truth. The synthetic staircase experiment below settles this. Both models train on artificially staircased labels and are scored against the original labels, so a prior that knows where the stairs are should win if the idea is right.
Why not just add an edge-enhancement branch or reverse attention, as in pancreas and polyp work? DB-MSMUNet supervises its edge branch with binary edge targets on 2D slices. Parallel Res2Net-based Network with ReverseAttention refocuses features on uncertain regions. Both change the architecture, not what counts as correct at an ambiguous edge, so they still reward copying the staircase. They also work in 2D, discarding through-plane context. These methods are complementary in principle, but we do not include them as main baselines, because their 2D design confounds the comparison with dimensionality.
Why not just smooth predictions in 3D after inference? Deep convolutional networks for pancreas segmentation in CT imaging did this with a 3D Gaussian filter on 2D outputs. Post-hoc smoothing cannot tell a low-contrast edge from a sharp one. It also does nothing about the training signal that punishes smooth predictions. We apply the same filter to the nnU-Net baseline as a cheap check.
Proposed Experiments
The primary setting is pancreas CT, the low-contrast organ studied by Roth et al.. There, attenuation nearly matches the surrounding fat and bowel, and the annotations were drawn on axial slices. The second setting is the multi-annotator 3D lung nodule CT used in Beyond Boundary Noise. Having several radiologists per nodule lets us measure whether predicted width matches inter-annotator boundary spread. The measure is the Spearman correlation between the predicted distribution standard deviation and the annotators' signed-distance spread at each surface point.
Metrics in both settings are volumetric Dice, surface Dice at a 1 mm tolerance, and 95th-percentile Hausdorff distance. We also add a through-plane consistency score: the mean absolute change in predicted boundary position between adjacent slices, compared with the same quantity for a smooth surface fit. Every surface metric is reported separately for patches with high versus low $|n_z|$ and high versus low contrast. The theory predicts the gains concentrate in the high-$|n_z|$ and low-contrast cells. Uniform gains would instead suggest a generic regularization effect.
The decisive check is a controlled staircase experiment. Starting from the nodule and pancreas labels, we keep every third annotated slice and rebuild the mask between them by nearest-slice assignment. This produces known, exaggerated staircase error with a known effective $s_z$. All methods train on the degraded labels and are evaluated against the originals. If derived-width distance distributions recover the original surface better than heteroscedastic regression, deterministic regression, and the anisotropic blurred mask, the core claim holds. If the blurred mask ties, the contribution shrinks to the variance derivation, and we will say so.
A final sanity check confirms the scope limit. On nodules that annotators disagree exist, we expect our widths to be no more informative than any boundary-uncertainty method, consistent with the post-hoc ambiguity-detection findings of that paper.
References
- Facial Age Estimation by Learning from Label Distributions
- Shape-Aware Organ Segmentation by Predicting Signed Distance Maps
- Hot-Distance: Combining One-Hot and Signed Distance Embeddings for Segmentation
- Bounding Maps for Universal Lesion Detection
- Adaptive Variance Based Label Distribution Learning for Facial Age Estimation
- nnU-Net: Self-adapting Framework for U-Net-Based Medical Image Segmentation
- Poisson Ordinal Network for Gleason Group Estimation Using Bi-Parametric MRI
- Beyond Boundary Noise: Aggregated Aleatoric Uncertainty Fails to Capture Presence Ambiguity in 3D Lung Nodule Segmentation
- DB-MSMUNet: Dual Branch Multi-Scale Mamba UNet for Pancreatic CT Scans Segmentation
- Parallel Res2Net-based Network with ReverseAttention for Polyp Segmentation
- Deep convolutional networks for pancreas segmentation in CT imaging