Mitigating Distributional Shift in Semantic Segmentation via Uncertainty Estimation from Unlabelled Data

David S. W. Williams, Daniele De Martini, Matthew Gadd, Paul Newman

Abstract

Knowing when a trained segmentation model is encountering data that is different to its training data is important. Understanding and mitigating the effects of this play an important part in their application from a performance and assurance perspective - this being a safety concern in applications such as autonomous vehicles (AVs). This work presents a segmentation network that can detect errors caused by challenging test domains without any additional annotation in a single forward pass. As annotation costs limit the diversity of labelled datasets, we use easy-to-obtain, uncurated and unlabelled data to learn to perform uncertainty estimation by selectively enforcing consistency over data augmentation. To this end, a novel segmentation benchmark based on the SAX Dataset is used, which includes labelled test data spanning three autonomous-driving domains, ranging in appearance from dense urban to off-road. The proposed method, named Gamma-SSL, consistently outperforms uncertainty estimation and Out-of-Distribution (OoD) techniques on this difficult benchmark - by up to 10.7% in area under the receiver operating characteristic (ROC) curve and 19.2% in area under the precision-recall (PR) curve in the most challenging of the three scenarios.

Introduction

Deep learning models for semantic segmentation are notoriously overconfident. While they perform well on data similar to their training set, they often fail catastrophically when faced with a distributional shift—such as a robot trained in a sunny city suddenly driving through a foggy forest. This presents a significant safety risk for autonomous systems.

The challenge in addressing this is two-fold: manually annotating every new environment is prohibitively expensive, and existing uncertainty techniques (like Monte Carlo Dropout or Ensembles) are often too computationally slow for real-time robotics. This paper introduces $\gamma$-SSL, a framework designed to use unlabelled data to teach a model to flag unfamiliar objects or ambiguous textures as "uncertain" in a single, high-speed forward pass.

Methodology: The $\gamma$-SSL Framework

The core of the approach relies on prototype-based segmentation and a novel consistency proxy. Instead of a standard classification layer, the model maps pixels into a feature space where each class has a "prototype" (a central point).

Conceptual diagram of the feature space showing prototypes (p) and the learned gamma threshold defining the 'safe' radius for known classes.

As shown in the figure above, the authors introduce a learned parameter, $\gamma$, which defines a "safe region" around class prototypes. If a pixel's feature vector falls outside this radius for all known classes, it is flagged as uncertain. To train this without labels, the model uses a feedback loop: it compares two differently augmented versions of the same unlabelled image. If the model's predictions are inconsistent across these views, it learns to adjust the $\gamma$ threshold to reflect that uncertainty. This allows the model to learn the boundaries of its own knowledge using only raw video from the new environment.

Experimental Setup and Datasets

The researchers evaluated the method using standard source domains (Cityscapes and Berkeley DeepDrive) and a brand-new benchmark: the SAX Segmentation Benchmark. This benchmark features three distinct domains with increasing levels of distributional shift: London (urban), New Forest (rural), and the Scottish Highlands (off-road), providing over 700 manually curated pixel-wise labels for rigorous evaluation.

Results and Discussion

$\gamma$-SSL demonstrates significant improvements in both detection accuracy and computational efficiency:

  • Superior Detection: On the most challenging "Scottish Highlands" dataset, $\gamma$-SSL outperformed existing benchmarks by 10.7% in AUROC and 19.2% in AUPR.
  • Real-Time Performance: The model operates at 183 Hz on a V100 GPU, nearly 10x faster than Monte Carlo Dropout (19 Hz), making it viable for high-speed autonomous deployment.
  • Qualitative Success: The model successfully flags "unknown" objects, such as animals on a road, as uncertain even when the underlying segmentation fails.
Qualitative results from the New Forest domain. The bottom panel shows the uncertainty mask successfully flagging a horse on the road as an unknown/uncertain object.

Conclusion

By distilling uncertainty into a single feature-space distance, $\gamma$-SSL provides a path toward safer autonomous systems that "know what they don't know." While the model currently performs best when it has access to unlabelled data from the specific target domain, future work will focus on creating more universal uncertainty models and integrating these pixel-wise confidence scores directly into robot path planners.

Summary updated

BibTeX
@article{williams2024mitigating,
  author = {David S. W. Williams and Daniele De Martini and Matthew Gadd and Paul Newman},
  title = {{Mitigating Distributional Shift in Semantic Segmentation via Uncertainty Estimation from Unlabelled Data}},
  journal = {IEEE Trans. Robotics},
  year = {2024},
  url = {https://openreview.net/forum?id=0iP1ddl3RT},
}
Figure