MRI scans carry a smooth, scanner-specific brightness distortion called the bias field. Coil sensitivity and radio-frequency imperfections make the same tissue look brighter in one corner of the image than in another. This distortion differs from hospital to hospital, which is one reason segmentation models trained at one site fail at another. The usual response is to remove the field with a generic estimator before training, or to add random smooth brightness distortions during training. This proposal makes a different observation. When a radiologist draws a quick scribble (a few strokes inside the prostate, the heart chamber, and the surrounding background) to replace an expensive full contour, they are also telling us which pixels belong to the same tissue. Pixels of one tissue should have roughly one true intensity. Whatever brightness variation remains along a scribble is therefore a direct sample of that scanner's bias field. The cheap annotation we already need because experts are scarce doubles, at no added cost, as a measurement of the scanner.
We propose to use scribbles for this dual purpose. For every scribbled training scan, we fit a low-dimensional bias field anchored on the labeled pixels. We then use the fitted field in two places. First, it makes the scribble-to-mask expansion step insensitive to shading. Second, the fields collected across source hospitals form an empirical library of real scanner distortions, which we replay as training augmentation so the model generalizes to hospitals it has never seen. The claim is specific and testable. On leave-one-site-out prostate MRI, a model trained only on scribbles should generalize better with harvested fields than with offline N4 correction or random smooth-field augmentation of matched strength. The gain should concentrate at sites with strong coil-induced shading.
Where this sits in the literature
The three directions meet only in pairs in the existing work, and each pair leaves out the third.
Scribble supervision works on a single site. Learning to Segment Medical Images with Scribble-Supervision Alone expands scribbles into pseudo-masks with random walks and conditional random fields, refines them over rounds with uncertainty filtering, and comes within 2.9 Dice points of full supervision on cardiac MRI and 4.5 on prostate. Its expansion step compares raw intensities of neighboring pixels. We do not replace that pipeline. We change what the pairwise comparisons see.
Scribbles have also been used across domains. Scribble-Based Domain Adaptation via Co-segmentation uses target-domain scribbles to adapt a source model, but only for a cross-modality shift at one institution. It also requires target annotations, whereas we target unseen sites with none.
Two lines of work target site generalization with dense labels. Shape priors under meta-learning in Shape-aware Meta-learning for Generalizing Prostate MRI Segmentation to Unseen Domains reach 87.67% average Dice on six prostate sites, but they need full contours everywhere. Style codes in Learning Site-specific Styles for Multi-institutional Unsupervised Cross-modality Domain Adaptation model site appearance as discrete one-hot vectors, which that paper notes break down for sites with several scanners. Our field library is continuous and per-scan, so it sidesteps that limitation.
Three papers supply parts of our method. Robust Training of Neural Networks against Bias Field Perturbations models bias fields as low-order polynomial coefficients and shows that unstructured perturbations poorly match them. We reuse the polynomial form, but we fit its coefficients from scribbles instead of bounding over all of them. That paper certifies classification, not dense segmentation, so it does not settle the edge-preservation question. DeepN4: Learning N4ITK Bias Field Correction for T1-weighted Images shows a network can imitate N4 closely on brain T1 (median PSNR 47.96 dB versus N4). However, it is trained on brain T1 only and inherits N4's own errors. It is therefore not a drop-in tool for prostate T2 or cardiac cine, and we treat N4 itself as the baseline. The self-training framework in A Semi-Supervised Framework for Cardiac MRI Segmentation via Multi-Constraint Collaborative Self-Training motivates the problem. Its confidence and entropy filters operate on raw intensities, and it makes no attempt to separate shading from anatomy.
Core mechanism
Write the observed image in log space as $\log I(x) = \log J(x) + \log B(x)$. Here $I$ is the observed intensity, $J$ the true tissue intensity, and $B$ the smooth multiplicative field. We parameterize $\log B(x) = \sum_{k} a_k \phi_k(x)$ with low-order polynomial basis functions $\phi_k$, constrained to zero mean. For each scan, let $S$ be the set of scribbled pixels, $c(x)$ the scribble class of pixel $x$, and $\mu_{c,m}$ a small set of per-class intensity levels. We solve
$$\min_{a,\,\mu,\,z}\ \sum_{x \in S} \rho\Big(\log I(x) - \sum_k a_k \phi_k(x) - \mu_{c(x),\,z(x)}\Big) + \lambda \lVert a \rVert^2 .$$
Here $\rho$ is a robust (Huber) loss, $\lambda$ weights a ridge penalty, and $z(x) \in \{1,\dots,M_c\}$ assigns each scribbled pixel to one of $M_c$ intensity sub-levels of its class. We solve by alternating assignment and weighted least squares, in the spirit of classical expectation-maximization bias correction.
The sub-levels matter for honesty. The prostate's peripheral zone is brighter on T2 than the central gland, and a "background" scribble crosses fat, muscle, and bone. Forcing one level per class would absorb real anatomy into the field. The zero-mean constraint removes the confound between the field's constant term and the class levels. A spatially spread set of at least two classes is what makes the field identifiable. We will report, per scan, the condition number of the fit, and fall back to a lower polynomial order when scribbles are too clustered.
The fitted field is used twice. For label expansion, we compute pairwise affinities on the corrected log image $\log I - \log \hat B$ rather than on raw intensity. A multiplicative field scales every raw boundary contrast by the local $B$, so edges in dark shaded regions look weak and leak. Log differences remove that scaling exactly, and subtracting $\log \hat B$ also fixes the long-range comparisons used by fully connected conditional random fields. For generalization, the fitted fields from all source-site scans form a library. During training we multiply each input by a field drawn from the library, with randomized rotation, flipping, and amplitude, and apply the same field to the image used to build its pseudo-mask. Unseen sites thus see distortions drawn from the empirical distribution of real coils rather than an arbitrary prior.
Research Program
Stage one: validate the fit on controlled data. On ACDC cardiac cine and NCI-ISBI 2013 prostate, we first correct each scan with N4, then multiply it by known synthetic polynomial fields. We generate scribbles from the dense masks by eroding and skeletonizing them, a standard proxy we will state openly. We then compare fitted-field recovery error against N4 on the same distorted scans, as a function of scribble length and field strength.
Stage two: weak supervision and domain generalization. We run the full scribble-supervised pipeline on the six-site prostate collection (RUNMC, BMC, HCRUDB, UCL, BIDMC, HK) under leave-one-site-out evaluation. Held-out sites receive no annotation and no adaptation. We use one nnU-Net-style 2D backbone throughout, so all differences come from supervision and augmentation.
Stage three: behavior near real pathology. We examine where scribble-anchored fields and N4 fields disagree on real scans, and whether that disagreement coincides with anatomy N4 flattens. We treat this as analysis, not as a headline claim. A small real-scribble session with a clinician will time annotation and check that synthetic scribbles are not overly favorable.
Baselines
The naive reference is a scribble-only model trained with partial cross-entropy on scribbled pixels. It uses only global z-score normalization and standard nnU-Net intensity augmentation, with no mask expansion. This tells us how much any expansion or field modeling is worth at all.
The strongest weak-supervision competitor is the pipeline of Learning to Segment Medical Images with Scribble-Supervision Alone run on N4-corrected inputs. That paper reports 78.1% Dice on NCI-ISBI prostate from scribbles, against 81.8% with full supervision, and 88.0% versus 91.2% on ACDC. We reproduce it on the same backbone, scribbles, and epochs. Running it after N4 makes it the "decouple the problem offline" alternative in its strongest form.
A second strong competitor is structured bias-field augmentation. It is the same pipeline, but augmenting with random polynomial fields whose amplitude distribution is matched to our harvested library, in the spirit of the adversarial smooth-field augmentation of Chen and colleagues. We found no Lacuna id for that work, so it is not linked. This is the key ablation. It differs from our method only in whether the fields come from real scribbled scans. A third ablation uses N4-estimated fields from the same source scans as the library, isolating whether anchoring on scribbles, rather than harvesting per se, matters.
As an upper reference we reproduce fully supervised shape-aware meta-learning. Shape-aware Meta-learning for Generalizing Prostate MRI Segmentation to Unseen Domains reports 87.67% average leave-one-site-out Dice on these six sites, against 86.21% for heavy-augmentation BigAug and 86.55% for MASF. We found no reported result on Lacuna for scribble-supervised domain generalization on this six-site benchmark.
Fairness rules apply to every method. All methods share the same scribbles, backbone, training schedule, and a fixed budget of hyperparameter trials tuned only on source-site validation folds. Beating the field means two things. First, a leave-one-site-out average Dice gain over the N4-plus-matched-random-augmentation pipeline that exceeds the across-seed standard deviation, over three seeds. Second, the absence of a worse result on any single held-out site. Closing at least half the gap between the naive scribble model and the fully supervised meta-learning reference would make the result practically meaningful.
Why not just…?
Why not just run N4 offline and then use any scribble method? This is the most serious threat. On prostate T2, N4 may already remove most shading. The file's arguments against it are about non-differentiability, runtime, and flattening of large lesions. Those matter less for gland segmentation than for tumor work. We therefore make N4 the foundation of our strongest baseline rather than a straw man. If N4-plus-random-augmentation matches our method within seed noise on every held-out site, we will report that harvesting adds nothing. We expect a difference mainly at endorectal-coil sites, where near-coil brightening is steep and not well captured by N4's smooth B-spline model. The per-site stratification is designed to show exactly that.
Why not just augment with random smooth fields and skip the fitting? Structured random fields fix the main problem with gamma and contrast jitter, namely their mismatch to spatially correlated distortions. That mismatch is shown by Robust Training of Neural Networks against Bias Field Perturbations and by the BigAug-versus-meta-learning gap in Shape-aware Meta-learning for Generalizing Prostate MRI Segmentation to Unseen Domains. What random fields cannot provide is realism in field shape and a corrected expansion step. The matched-amplitude random-field ablation isolates the first. Comparing expansion with raw versus corrected affinities, using no augmentation at all, isolates the second.
Why not just train on scribbled pixels only, so expansion and its shading sensitivity never enter? Partial cross-entropy avoids expansion leakage entirely. It is our naive reference and could be competitive when scribbles are dense. The 2.9-point and 4.5-point margins in Learning to Segment Medical Images with Scribble-Supervision Alone depended on expansion plus uncertainty filtering. That paper named filtering as the main safeguard against error propagation, which suggests expansion is worth keeping. We will measure how the gap between the two changes as synthetic scribble length shrinks.
Decisive checks
Four results would settle the claim. On synthetic fields, scribble-anchored recovery error must beat N4 at realistic scribble lengths. If it does not, the rest of the program loses its premise. On real data, pseudo-mask Dice against the withheld dense masks must improve when affinities use the corrected log image, and most of all in the brightest and darkest tenth of each scan. On leave-one-site-out prostate, the harvested library must beat the matched random-field library. That comparison is the single cleanest test of the idea. Finally, gains should correlate across held-out sites with measured shading strength, estimated by N4 on those sites for analysis only. An improvement uncorrelated with shading would suggest the method helps for some reason other than the one claimed, and we would report it that way.
References
- Learning to Segment Medical Images with Scribble-Supervision Alone
- Scribble-Based Domain Adaptation via Co-segmentation
- Shape-Aware Meta-learning for Generalizing Prostate MRI Segmentation to Unseen Domains
- Learning Site-Specific Styles for Multi-institutional Unsupervised Cross-Modality Domain Adaptation
- Robust Training of Neural Networks against Bias Field Perturbations
- DeepN4: Learning N4ITK Bias Field Correction for T1-weighted Images
- A Semi-Supervised Framework for Cardiac MRI Segmentation via Multi-Constraint Collaborative Self-Training