Scribble Propagation in a Locally Contrast-Normalized Feature Space

A doctor who marks a tumor with a few quick strokes, called scribbles, instead of tracing its full outline saves most of the annotation time. The model then has to work out where the boundary lies. Current methods do this by spreading the scribble labels to nearby pixels that look similar, where "similar" usually means close in raw intensity. That works when the boundary is a sharp step in brightness. It fails exactly where expert labels are most expensive: a polyp that blends into the surrounding bowel lining, or heart muscle in contrast-enhanced cardiac MRI. In these images there is no brightness step, so the labels leak into neighboring tissue.

We propose to measure similarity in a different space. Instead of raw intensity, we use learned image features that have each been rescaled by the statistics of a small surrounding window. This is local contrast normalization, the operation behind classic adaptive histogram equalization, here applied to feature maps. In the rescaled space, a faint but consistent change in texture or intensity relative to its neighborhood counts as a large difference. We then use a lightweight channel-attention module, a small network that assigns a weight to each feature channel, and fit it only to the scribbles. It learns which channels' local contrast actually separates the foreground strokes from the background strokes in that image. The claim is that boundary-aware scribble training is limited by the affinity it propagates along, not by the segmentation architecture. Fixing the affinity should recover most of the boundary accuracy lost on low-contrast targets without any dense masks.

Core Claim and What Is New

Scribble-supervised methods all rely on a pairwise term: a loss or refinement step that encourages neighboring pixels to share a label when they look alike. How they define "look alike" varies. Learning to Segment Medical Images with Scribble-Supervision Alone grows scribbles with a random walk and snaps boundaries with a dense conditional random field (CRF), a graphical model that smooths labels according to raw pixel differences. It reports Dice within 2.9% of full supervision on cardiac MRI and 4.5% on prostate MRI. Boundary Perception Guidance instead pulls predictions toward the output of an off-the-shelf edge detector and reaches 99.5% of full supervision on natural images. These papers motivate our work: the idea of propagating along image structure is sound. They also constrain it: both rely on step edges, which camouflaged polyps and scar-affected myocardium lack, as the "Indefinable Boundaries" failure category in Video Polyp Segmentation: A Deep Learning Perspective documents.

The method comes from Local Context Normalization. That work shows that normalizing features over the whole image washes out local contrast, while normalizing over a sliding window, computed cheaply with summed-area tables, improves dense segmentation. It reports 77.49% versus 75.08% mIoU for Group Normalization on Cityscapes, and a gain of more than 6% on aerial imagery. That paper uses local normalization as a layer inside a fully supervised network. We use it as the metric for label propagation under weak supervision, which is a different role.

The second source is ALCN. It learns image-dependent local normalization for detection and shows that fixed filters underperform learned ones (AUC 0.611 versus 0.787). We borrow its lesson that the normalization should adapt to the image, but we fit the adaptation from scribbles rather than from a detection loss.

Concretely, let $f_c(x)$ be channel $c$ of a shallow feature map at pixel $x$. We define the locally normalized feature as

$$z_c(x) = \frac{f_c(x) - \mu_{c,W}(x)}{\max(\sigma_{c,W}(x), s_0)},$$

where $\mu_{c,W}$ and $\sigma_{c,W}$ are the mean and standard deviation over a window $W$ centered at $x$. The floor $s_0$ plays the role of the clip limit in contrast-limited histogram equalization: it stops noise from being amplified in flat regions. The affinity between neighboring pixels $x$ and $y$ is

$$a(x,y) = \exp\Big(-\sum_c w_c(I)\,\big(z_c(x)-z_c(y)\big)^2/\tau\Big),$$

where $w_c(I)$ is a nonnegative, sum-to-one channel weight predicted from the image $I$ and $\tau$ is a temperature. The weights are trained with a contrastive objective on scribble pixels. It raises affinity between same-label stroke pixels that are adjacent along a stroke, and lowers it across foreground and background strokes. This affinity then drives a standard relaxed-CRF regularizer. The regularizer takes the form $\sum a(x,y)\lVert p(x)-p(y)\rVert^2$ over local neighborhoods, where $p$ is the predicted class probability, and is added to partial cross-entropy on the scribbled pixels.

The design deliberately does not gate on the network's own intermediate predictions. Reverse attention in PraNet and its axial variant in CaraNet erase confident foreground so that later stages focus on the boundary. Under weak supervision, however, an early mistake at a faint border would be erased in the wrong place and then reinforced. This is the confirmation-bias failure that Can et al. counter with uncertainty gating. In our design, the channel attention depends only on scribbles and image statistics, never on the predicted mask.

Research Program

We build three things. The first is the affinity module. It uses features from the first two encoder stages of an exponential-moving-average copy of the segmentation network, a slowly updated average of its weights. We stop gradients through these features so the network cannot make the affinity trivial by flattening its own features. The raw image is concatenated as an extra channel. The window size is chosen from a small multi-scale set, and $s_0$ is a quantile of local standard deviation estimated on the training set.

The second is the scribble-fit channel attention. It is a squeeze-and-excitation-style network that pools each channel's local-contrast statistics and outputs $w_c(I)$. It is trained only through the scribble contrastive term.

The third is an analysis tool. For every ground-truth boundary segment in the test sets, it computes local contrast-to-noise across the boundary, which lets us stratify errors by how faint the boundary really is. This measurement is what tests the hypothesis. The method should help most where contrast-to-noise is lowest, and where boundaries are sharp it should do about as well as an intensity-based CRF.

Two analyses accompany the method. The first inspects the learned channel weights on low- versus high-contrast images to check whether the attention moves toward texture channels when intensity is uninformative. The second is a stress test on the limitation ALCN flags: saturated regions such as specular highlights in colonoscopy, where no normalization can recover the signal. There we expect the affinity to become uninformative, and we measure whether this causes leakage or only a return to the smoothness prior.

Baselines

The naive reference is a U-Net trained with partial cross-entropy on scribbled pixels only. CycleMix reports 76.6% Dice for this kind of baseline on ACDC and 37.8% on MSCMRseg. We re-run it in our pipeline rather than copying these numbers.

The strongest existing scribble-only methods on cardiac data are ShapePU, with 85.2% average Dice on MSCMRseg, and CycleMix, with 84.8% on ACDC and 80.0% on MSCMRseg. ShapePU is the primary competitor because MSCMRseg is the lowest-contrast cardiac benchmark in the file. Beating it means exceeding its Dice on MSCMRseg under the same scribble protocol and, more importantly, reducing 95th-percentile Hausdorff distance. The file gives no Hausdorff number for ShapePU, so we compute it ourselves for every method.

The intensity-CRF pipeline of Can et al. is the most direct competitor on the mechanism. It reports 88.0% Dice on ACDC and 78.1% on NCI-ISBI prostate, although its protocol may differ from CycleMix's. For polyps, MixPolyp reaches 85.9% weighted Dice, but that figure combines masks, boxes and scribbles. We found no reported scribble-only polyp result on Lacuna, and no reported scribble-only result on SUN-SEG. We will therefore re-run MixPolyp's scribble branch, its binary minimum-entropy loss on the same PVTv2-B2 backbone, as the polyp baseline.

Three ablations isolate the key ingredient. The first keeps the full pipeline but computes affinity on the same features without local normalization, so the only change is the rescaling. The second keeps local normalization but fixes the channel weights to uniform, which tests whether scribble-fit attention matters. The third replaces the network's normalization layers with Local Context Normalization and uses an ordinary intensity CRF loss, which tests whether local contrast helps as an architecture change rather than as a propagation metric.

All methods share the backbone per domain: a 2D U-Net for cardiac and prostate data, and PVTv2-B2 for polyps. They also share splits, scribbles, augmentation, epochs and GPU budget. Each method gets the same budget of 20 validation-selected hyperparameter configurations, with the CRF bandwidths of the intensity baselines tuned just as hard as our window and temperature.

Why not just…?

Why not just apply CLAHE to the images and keep an intensity CRF? This is the most serious threat, and we treat it as a head-to-head baseline rather than dismissing it. CLAHE, contrast-limited adaptive histogram equalization, remaps each image tile's intensity histogram. It acts only on the one intensity channel with fixed tiles, and it cannot expose a boundary that differs in texture but not in brightness. ALCN's fixed-versus-learned gap suggests fixed normalization leaves performance on the table. However, that evidence comes from detection, not from scribble propagation. If CLAHE plus an intensity CRF matches our method in the lowest contrast-to-noise stratum, our central claim is wrong, and we will report that.

Why not just swap Group Normalization for Local Context Normalization in the backbone? The LCN paper's gains were measured under full supervision, where dense labels already locate the boundary. Under scribbles, the bottleneck is where the unlabeled pixels get their labels, and a normalization layer does not change the propagation term. The third ablation tests this directly. If it closes most of the gap, the contribution reduces to an architectural choice, and the note's claim should be narrowed accordingly.

Why not just prompt a segmentation foundation model with the scribbles? Polyp-SAM shows that such models can be adapted to polyps. We found no reported result on Lacuna for scribble-prompted foundation models on ETIS or SUN-SEG boundary categories. We will run Polyp-SAM with scribble-derived point prompts as a reference. We will also report its frame rate against the 50 fps reported for PraNet, since real-time colonoscopy is the use case. The expectation is that indefinable boundaries remain hard for it, but this is an empirical question we will measure rather than assume.

Why not just use prediction-driven reverse attention trained on scribbles? It is a natural extension of PraNet and CaraNet. Under weak supervision, though, it inherits the self-reinforcement that Can et al. had to counter with uncertainty gating. We include a scribble-trained reverse-attention variant, and its errors, stratified by contrast, will show whether drift actually occurs.

Proposed Experiments

The main experiments train every method on scribbles for four datasets: ACDC, MSCMRseg, NCI-ISBI prostate, and polyps (training on Kvasir-SEG and CVC-ClinicDB, testing on CVC-ColonDB, CVC-300 and ETIS). We use the provided scribble annotations where they exist and matched synthetic scribbles elsewhere. We also train on SUN-SEG's released scribbles and evaluate on the Indefinable Boundaries and Small Objects subsets. Metrics are Dice, IoU, 95th-percentile Hausdorff distance, and boundary F-score within a 2- and 5-pixel band.

The decisive check is the contrast-stratified analysis. Our method should beat the intensity CRF, CLAHE, and unnormalized-feature baselines by a margin that grows as boundary contrast-to-noise falls, with the largest gains on MSCMRseg, ETIS and SUN-SEG's Indefinable Boundaries subset, and roughly equal performance on sharp boundaries. Aggregate Dice alone could hide this, since it is dominated by object interiors.

The second check concerns the noise floor. Sweeping $s_0$ toward zero should reproduce noise-driven false boundaries in flat regions, confirming that the clip-limit analogue is doing real work.

The third check tests annotation efficiency. We repeat the cardiac experiments with 5%, 20% and 100% of training volumes scribbled, following the low-data regime explored by the adversarial attention gate work, to see whether a better affinity lowers the amount of expert annotation needed to reach a fixed Hausdorff target.