Who Gets to Speak: Uncertainty-Gated Long-Range Context for Segmentation with Noisy Labels

Segmentation networks need long-range context to label a pixel correctly. A gray patch could be road or wall, and only distant pixels settle which. Attention layers that let every pixel read from every other pixel supply this context. When the training labels are wrong, though, the same wiring becomes a broadcast channel: a mislabeled region can push its corrupted features into thousands of correctly labeled pixels across the image. Current noise-robust methods for segmentation do not close this channel. They treat label noise as a problem of the loss and down-weight suspicious pixels when computing it. A suspicious pixel's feature still flows through attention into everyone else's representation.

We propose to close it at the architecture level. A contrastive head models each pixel's embedding as a Gaussian, so the predicted variance acts as a per-pixel "how much do I trust this feature" score. We reuse that score to gate how much each pixel is allowed to send through a long-range attention module. Confident pixels broadcast across the image, and uncertain ones are mostly heard only by themselves and their convolutional neighbours. The research question underneath is one nobody has measured: under dense label noise, does a larger effective receptive field filter noise by adding context, or spread it by giving corrupted pixels a megaphone?

Core Claim

Under spatially structured label noise, which is the normal case for pseudo-labels and boundary annotation errors, the harm from adding global context comes mostly from corrupted pixels acting as attention senders. Gating senders by contrastive uncertainty therefore recovers the benefit of long-range context under noise, and loss-side down-weighting alone cannot recover it.

The claim is falsifiable in two ways. Loss reweighting plus an ungated global module might match the gated version. Or a plain local backbone might beat both, meaning context does not help under noise at all.

Background and Where This Sits

Three results motivate the proposal. Understanding the Effective Receptive Field in Deep Convolutional Neural Networks shows that a convolution stack's real spatial influence is Gaussian-shaped and grows only with the square root of depth. Their measurement is the gradient of an output unit with respect to input pixels. They observe that this field expands during clean training, but they never ask what label noise does to it.

CCNet: Criss-Cross Attention for Semantic Segmentation breaks this locality cheaply. Each pixel attends along its row and column, and two such passes reach the whole image. This costs $O(N\sqrt{N})$ instead of quadratic, uses 11x less memory than a dense non-local block, and reaches 81.9% mIoU on the Cityscapes test set. All of this is measured under clean supervision, and the two-hop routing is exactly what would let a corrupted region reach every pixel.

Boosting Semi-Supervised Semantic Segmentation with Probabilistic Representations (PRCL) supplies the uncertainty signal we reuse. It represents each pixel as a mean and variance, compares pixels with a likelihood score that discounts high-variance ones, and finds that variance concentrates at object boundaries. It reports 58.09% mIoU on Cityscapes with 20 labels and 68.52% on PASCAL VOC with 92 labels. PRCL applies variance only inside the contrastive loss and leaves the backbone's routing untouched. That is the specific gap we fill.

The image-level contrastive noise literature constrains the design.

Both work only on whole-image classification, so their conclusions cannot be assumed for dense, spatially correlated noise. Segmentation noise is mostly class-conditional and blob-shaped, which is their weak regime.

Two other papers combine contrastive learning with something receptive-field-like, but neither touches the backbone's spatial routing under noise.

Research Program

The work has a measurement phase and a method phase. The measurement must come first, because if context does not amplify noise, the method has nothing to fix.

Measurement phase. We train a ResNet-101 segmentation network in three variants: the plain dilated backbone, the same backbone with recurrent criss-cross attention, and the same with a dense non-local block. Each is trained under controlled label noise injected into Cityscapes and PASCAL VOC ground truth, using three noise types:

  • Boundary noise: labels dilated or eroded by k pixels.
  • Class-conditional blob swaps: connected regions relabelled to a confusable class, such as sidewalk to road.
  • Real pseudo-label noise: from a teacher in the 20-label and 92-label semi-supervised splits.

We track three quantities during training.

  1. The effective receptive field, measured as in Luo et al. We ask whether noise suppresses its normal growth, or shrinks it as the network isolates memorized pixels.
  2. A memorization curve: the fraction of noisy training pixels predicted as their wrong label, over epochs.
  3. A "noise reach" curve: error on correctly labeled pixels as a function of their distance from the nearest corrupted region, plus the attention mass that clean query pixels place on corrupted key pixels.

If global context spreads noise, the reach curve for the criss-cross model should be flatter and higher at long distances than for the local backbone.

Method phase. We attach a PRCL-style probabilistic contrastive head that outputs a mean $\mu_j$ and variance $\sigma_j^2$ for each pixel $j$. We then modify criss-cross attention so a query pixel $i$ aggregates

$$h_i = \sum_{j \in \mathcal{C}(i)} \frac{\exp(q_i^\top k_j + \log g_j)}{\sum_{j' \in \mathcal{C}(i)} \exp(q_i^\top k_{j'} + \log g_{j'})}\, v_j, \qquad g_j = \left(1 + \tfrac{1}{\tau}\,\overline{\sigma_j^2}\right)^{-1}.$$

Here $\mathcal{C}(i)$ is the row and column of $i$, and $q, k, v$ are the usual query, key and value projections. $\overline{\sigma_j^2}$ is the mean predicted variance of pixel $j$, and $\tau$ is a temperature. The gate lowers how loudly an uncertain pixel speaks without silencing it outright. The query's own position always remains in $\mathcal{C}(i)$, so an uncertain pixel still keeps its local convolutional evidence.

We stop gradients from the gate into the variance head. This prevents the network from learning to inflate variance in order to escape attention. It mirrors PRCL's practice of training the variance head with a much lower learning rate, which it calls soft freezing.

The construction makes the receptive field depend on the data: wide where features are trustworthy, effectively local where they are not.

Baselines

Naive reference. The plain dilated ResNet-101 trained with cross-entropy on the noisy labels, with no attention and no contrastive head. It defines how much each noise level costs a local model. It is also a real competitor: if local models are inherently harder to pollute, this could beat the global variants under heavy noise.

Clean-regime global-context method. CCNet with recurrent criss-cross attention, trained with cross-entropy on noisy labels. Its reported 81.9% mIoU on the Cityscapes test set applies only to clean labels. No reported result was found on Lacuna for CCNet under label noise, so we generate that number ourselves. Under clean labels our reimplementation must land near the published figure before any noisy comparison is trusted.

Strongest existing noise-robust dense method. PRCL ( Boosting Semi-Supervised Semantic Segmentation with Probabilistic Representations), which reports 58.09% mIoU on Cityscapes with 20 labels and 68.52% mIoU on PASCAL VOC with 92 labels. We run PRCL on the same backbone in two forms: the published local-backbone form, and PRCL with ungated criss-cross attention. The second form is the closest competitor to our method, since it differs only in the gate.

Fairness and the bar to beat. All methods share the backbone, crop size, iteration count, and teacher-student schedule for semi-supervised splits. Each gets the same hyperparameter search budget, eight configurations tuned on a held-out clean validation subset. Results are averaged over three seeds.

Beating PRCL means exceeding our reproduced PRCL numbers on the 20-label and 92-label splits by more than the seed spread. Our reproduction must land near the reported 58.09 and 68.52. Under the synthetic blob-swap noise, the gated model must also beat ungated PRCL-plus-criss-cross on clean-pixel accuracy at long distance from corrupted regions.

Ablations isolating the gate.

  • Replace contrastive variance with the classifier's softmax confidence as the gating score.
  • Replace the soft gate with a hard threshold that drops uncertain keys.
  • Apply the gate to queries instead of keys, which tests the sender-versus-receiver hypothesis directly.

Why not just…?

Why not just keep PRCL and add CCNet unchanged? This is the most direct threat, and it is our main comparison. If PRCL's loss-side down-weighting already stops noisy pixels from corrupting the embedding, their features are already benign as attention values and the gate adds nothing. The noise-reach curve settles this. If ungated and gated models show the same clean-pixel error at long range from corrupted blobs, we drop the architectural claim and report the measurement study alone.

Why not just use the local backbone, since context may only hurt under noise? It is possible that, under heavy noise, the plain backbone beats every global variant. That would be an important finding in its own right and would support "context spreads noise" (Argument B in the research file) outright. The proposal predicts otherwise for moderate noise. CCNet shows context matters for disambiguation, and RCA's prototype attention shows long-range evidence repairs incomplete local signals. Distance-binned accuracy at each noise level will show where the crossover lies, if one exists.

Why not just threshold pseudo-label confidence and ignore uncertain pixels? Confidence filtering removes uncertain pixels from the loss, but it does not change what they send through attention. Thresholds tuned to classifier confidence also inherit overconfidence. PRCL argues that confident errors near boundaries survive thresholding, and RCA shows that confident activations cover only discriminative parts. Still, a hard key-dropping threshold might match the soft gate. We include it as an ablation and will report honestly if it does, since a simpler mechanism serving the same sender-side principle would still support the core claim.

Why not just pre-train contrastively, as in image classification? Contrastive pre-training slows memorization, but it wears off with enough fine-tuning (Investigating Why Contrastive Learning Benefits Robustness against Label Noise Investigating Why Contrastive Learning Benefits Robustness against Label Noise) and is weaker under class-conditional noise (Contrastive Learning Improves Model Robustness Under Label Noise Contrastive Learning Improves Model Robustness Under Label Noise), which is the dominant noise type here. We test it by initializing every variant from the same self-supervised checkpoint and checking whether the gate's advantage persists over long training schedules.

Proposed Experiments and Decisive Checks

The benchmarks are:

  • Cityscapes and PASCAL VOC 2012 under the three synthetic noise types, each at 20%, 40% and 60% of pixels or regions affected.
  • The real pseudo-label noise of the Cityscapes 20-label and PASCAL VOC 92-label semi-supervised splits, where PRCL's reported numbers anchor the comparison.
  • ADE20K under boundary noise, as a cluttered-scene stress test where CCNet reports 45.76% mIoU clean.

The metrics are clean-test mIoU, the memorization curve, effective receptive field size over training, and distance-binned clean-pixel error.

The first decisive check is the measurement phase itself. Ungated criss-cross attention must show higher long-range clean-pixel error than the local backbone under blob-swap noise. If it does not, the sender-gating motivation fails.

The second check is the sender-versus-receiver ablation. Gating keys should help, while gating queries should help little. If both help equally, the effect is generic uncertainty regularization rather than blocking broadcast.

The third check is that the gated model's learned receptive field, measured per pixel, is visibly narrower in high-variance regions and wider elsewhere. Without that, the receptive field is not actually adapting to the data.

The fourth check is that the gain over ungated PRCL is largest under class-conditional blob noise and smallest under boundary noise. Blobs are where a single corrupted region can broadcast far, while boundary errors are spatially thin.