Many medical segmentation models are trained from scribbles, a few quick strokes an expert draws inside each structure, because tracing every boundary in a 3D scan takes hours. Scribbles say what is inside an organ or tumor. They say nothing about where it ends. A natural fix is to borrow edge-preserving refinement from image processing. A guided filter is an operation that smooths a coarse label map while letting it change sharply wherever the raw image changes sharply, so the labels snap to visible edges. The fix breaks on exactly the cases that matter. The boundary between a liver tumor and the surrounding liver, or between infiltrating glioma and edema, often has no sharp intensity step. A filter guided by raw intensities then either bleeds across the true boundary or sticks to speckle and texture.
We propose to learn the guidance itself, meaning the "edge image" the filter consults, using only scribbles. The training signal comes from cross-validating the scribbles against themselves. During training, part of each scribble is hidden. The remaining strokes are propagated with a differentiable guided filter. The guidance map is then penalized whenever the propagated labels get the hidden scribble pixels wrong. Hidden background strokes lying next to a tumor can only be predicted correctly if the guidance stops propagation at the tumor margin. So the scribbles already contain boundary supervision. It is weak and indirect, but it is real, and it can teach a filter where low-contrast edges are without any dense mask. The propagated labels then serve as confidence-weighted pseudo-labels for a standard 3D nnU-Net in a single training run, with no offline relabeling rounds.
Core Claim
Under scribble supervision on low-contrast 3D tasks, a guided filter whose guidance map is learned from the held-out-scribble objective will close a meaningful part of the gap between scribble training and dense training. The current gap is 0.813 versus 0.856 mean Dice on ScribbleBench, as reported in Embarrassingly Simple Scribble Supervision for 3D Medical Segmentation. We expect most of the gain to sit in a narrow band around object boundaries and to come from the tumor tasks (LiTS, BraTS, KiTS) rather than cardiac MRI. A guided filter using raw image intensities as guidance, or a CRF, should help less on these tasks, and possibly hurt.
The claim depends on one ingredient: the hidden-scribble propagation loss, which is the only thing that supervises the guidance map. If a guidance map trained end-to-end with the ordinary scribble loss does just as well, the claim is wrong.
Positioning Against Prior Work
The mechanism comes from Fast End-to-End Trainable Guided Filter. That paper turns the guided filter into a fast differentiable layer and adds a small learnable network that produces task-specific guidance. It was trained only with dense ground truth on natural images, so its guidance network always had full masks to learn from. We remove that assumption. We also extend the filter to multi-channel 3D guidance, with box filters whose radius is set in millimetres rather than voxels. This addresses the known problem that the filter's radius and regularization parameters behave differently at different image resolutions.
LPOSS motivates the approach and also constrains it. It propagates coarse labels to pixels using color similarity and roughly doubles boundary quality on natural images, raising Boundary IoU from 14.8% to 32.1%. Its affinity is hand-defined in Lab color space, which is the assumption that low-contrast CT and MRI violate. Our proposal replaces the fixed affinity with a learned one and gives that affinity a supervision source.
Three scribble methods already use some form of propagation, and each shows a limitation we address:
- Learning to Segment Medical Images with Scribble-Supervision Alone grows scribbles with a random walk and relabels them with a DenseCRF over several retraining rounds, filtered by dropout-based uncertainty. The authors report that the CRF is sensitive to hyperparameters, and the method was validated only on cardiac and prostate MRI. Our propagation instead happens inside training and has learned parameters.
- SparseMamba-PCL dilates scribbles until they meet hand-crafted edges and refines the result with Med-SAM. Fixed edge thresholds are precisely what fail when tissue contrast is weak.
- ScribFormer adds global shape priors through a Transformer branch but does no boundary refinement.
The strongest constraint on this proposal is Revisiting 3D Medical Scribble Supervision. It shows that methods tuned on cardiac data collapse elsewhere: ShapePU falls from 0.850 on cardiac data to 0.369 across the benchmark, and some methods reach 0.05 on brain tumors. DenseCRF post-processing in that study did worse than plain nnU-Net with partial loss. We take this as a design rule. Our method must sit on top of nnU-Net with partial loss without altering its pipeline, and it must be judged on all seven ScribbleBench tasks.
Boundary-branch architectures such as MISNet and PraNet-RA show that explicit boundary modelling helps on low-contrast polyps. Both need dense masks to supervise their boundary branches, and the hidden-scribble objective is our substitute for that dense signal.
Research Program
The system has three parts.
The first is a lightweight guidance network that maps the scan plus shallow encoder features of the nnU-Net to a $k$-channel guidance volume $G$, with $k$ around 8.
The second is a 3D multi-channel guided filter used as a label propagator, written $\mathrm{GF}_G$. Given scribble labels $S$ restricted to a retained subset $R$ of scribble voxels, with indicator mask $M_R$, the propagated class map is computed by normalized filtering:
$$ \hat{Y} = \frac{\mathrm{GF}_G(S \odot M_R)}{\mathrm{GF}_G(M_R) + \delta} $$
Here $\odot$ is voxelwise multiplication and $\delta$ is a small constant. The denominator also acts as a propagation-confidence map $C$.
The third is the training loss. Each iteration hides random connected stroke segments $H$, about 30% of the scribble voxels, chosen so that every class keeps at least one stroke. The total loss is
$$ \mathcal{L} = \mathcal{L}_{pL}(f(x), S) + \lambda\, \mathrm{CE}_H(\hat{Y}, S) + \mu\, \mathrm{CE}_{U}(f(x), \hat{Y}; C) $$
The terms are as follows:
- $\mathcal{L}_{pL}$ is the partial cross-entropy plus Dice loss on all scribble voxels, as in nnU-Net + pL, where $f(x)$ is the segmentation network's output.
- $\mathrm{CE}_H$ scores the propagated labels on the hidden voxels. It is the only term that trains the guidance network.
- $\mathrm{CE}_U$ uses the propagated labels as soft pseudo-labels on unlabeled voxels $U$, weighted by confidence $C$ and ramped in after warm-up.
Gradients from the pseudo-label term are stopped before they reach $G$. Without that stop, the guidance could make pseudo-labels easy to match rather than correct.
At inference, the network's softmax output is additionally passed through $\mathrm{GF}_G$, so the same learned edges refine the final prediction.
Beyond accuracy, the analysis asks two questions. Does the learned guidance put its contrast at annotated tumor margins in held-out validation cases, where it can be compared against the dense masks? And how does the benefit change as scribble density is reduced? The second question bears directly on the annotation-cost argument.
Baselines
The reference point is nnU-Net with partial loss from Embarrassingly Simple Scribble Supervision for 3D Medical Segmentation. It is plain nnU-Net with cross-entropy and Dice computed only on scribbled voxels, and it reports 0.813 mean Dice on ScribbleBench against 0.856 for dense training. It is the strongest competitor because it is the only method shown to generalize across all seven tasks, and it is also exactly our method with the propagation and pseudo-label terms removed. The file gives no per-task numbers for it (no reported result found on Lacuna for per-task nnU-Net + pL Dice on LiTS or BraTS), so we will rerun it ourselves on the released ScribbleBench scribbles. We will use the same folds, preprocessing, and epoch budget for all methods, and give each method an equal hyperparameter search of at most a dozen configurations on a validation split. Beating it means a mean Dice improvement whose bootstrap confidence interval over cases excludes zero. Separately, we require a reduction in 95th-percentile Hausdorff distance (HD95) on at least two of the three tumor tasks, with no task losing more than half a Dice point. As a target, recovering a third of the 4.3-point gap would count as a clear success.
The dense nnU-Net upper bound, 0.856, is rerun under the same protocol. It tells us what fraction of the gap is closed.
The strongest refinement-based competitor is DenseCRF post-processing on nnU-Net + pL predictions, as used by Can et al.. We give it the same tuning budget, since its reported weakness is sensitivity to hyperparameters.
On CHAOS we also compare against the published SparseMamba-PCL result of 73.84% Dice and 16.77 mm HD95. That comparison uses its 2D protocol, so it is a secondary check and not the main comparison.
Two ablations isolate the key ingredient. In the first, a raw-image guided filter, the guidance is the scan intensity itself with a hand-tuned radius and regularization. In the second, end-to-end learned guidance without hidden scribbles, the guidance network is trained only through $\mathcal{L}_{pL}$ applied to the filtered output. This is the natural adaptation of Wu et al. to scribbles. If the second ablation matches the full method, the held-out objective adds nothing and the core claim fails.
Why not just…?
Why not just use nnU-Net with partial loss and stop? It is the real threat, and the 4-point gap may be small enough that boundary refinement buys little. The evidence for room to improve is indirect. Partial loss gives no signal on the unlabeled voxels where boundaries lie, and the dense-label ceilings are low on the tumor tasks: 0.674 to 0.739 tumor Dice in LiTS, and only 50% to 60% for the enhancing core in BRATS. Both suggest boundary errors dominate. We will settle the question by measuring Dice within a 3 mm band around the true boundary. If nnU-Net + pL's deficit relative to dense training is not concentrated in that band, our method's premise fails and we will report it.
Why not just run a CRF or random walk afterwards? Both rely on fixed intensity affinities, which is the assumption that fails at fuzzy margins. The ScribbleBench re-evaluation already found DenseCRF below plain nnU-Net + pL (Revisiting 3D Medical Scribble Supervision). Our raw-image-guidance ablation tests the same question for guided filters. We predict it helps on ACDC, where cardiac contrast is high, and hurts on BraTS and LiTS. Learned guidance should reverse that pattern.
Why not just prompt Med-SAM with boxes derived from the scribbles? SparseMamba-PCL reports substantial training overhead from running several large models together. The general-domain foundation models discussed in LPOSS also localize boundaries poorly without refinement. Still, Med-SAM pseudo-labels are a fair alternative, so we include them as an additional pseudo-label source for nnU-Net under the same budget. If they match our method on the tumor tasks, that is a legitimate negative result.
Proposed Experiments
The main experiment covers all seven ScribbleBench tasks with the provided scribbles and five-fold cross-validation. We report Dice, HD95, and boundary-band Dice per task, along with gap-closure fraction.
The first decisive check is the guidance comparison: raw-image guidance against learned guidance without hidden scribbles against the full method, on high-contrast (ACDC, MSCMR) versus low-contrast (LiTS, BraTS, KiTS) tasks. The core claim predicts an interaction, with learned guidance helping mainly on the low-contrast tasks.
The second check is a scribble-density sweep. We thin strokes to 50% and 25% of their length to test whether the held-out objective still works when little can be hidden. We expect its advantage to grow at moderate sparsity and shrink at extreme sparsity.
The third check places BraTS whole-tumor Dice next to the 74% to 85% inter-rater range reported in BRATS. This keeps gains below annotation noise from being over-interpreted.
Finally, we measure wall-clock training cost against nnU-Net + pL. Given the reported speed of the trainable guided filter, we expect under 20% overhead.
References
- Embarrassingly Simple Scribble Supervision for 3D Medical Segmentation
- Fast End-to-End Trainable Guided Filter
- LPOSS: Label Propagation Over Patches and Pixels for Open-vocabulary Semantic Segmentation
- Learning to Segment Medical Images with Scribble-Supervision Alone
- SparseMamba-PCL: Scribble-Supervised Medical Image Segmentation via SAM-Guided Progressive Collaborative Learning
- ScribFormer: Transformer Makes CNN Work Better for Scribble-based Medical Image Segmentation
- Revisiting 3D Medical Scribble Supervision: Benchmarking Beyond Cardiac Segmentation
- Multi-scale information sharing and selection network with boundary attention for polyp segmentation
- Parallel Res2Net-based Network with ReverseAttention for Polyp Segmentation
- The Liver Tumor Segmentation Benchmark (LiTS)
- The Multimodal Brain Tumor Image Segmentation Benchmark (BRATS)