Modeling the Background for Incremental and Weakly-Supervised Semantic Segmentation

Fabio Cermelli, Massimiliano Mancini, Samuel Rota Bulò, Elisa Ricci, Barbara CaputoIEEE TPAMI 2022 · DOI

Abstract

Deep neural networks have enabled major progress in semantic segmentation. However, even advanced architectures suffer from two primary limitations: catastrophic forgetting during incremental updates and a heavy reliance on dense, pixel-level annotations. We introduce MiB (Modeling the Background), a novel framework that addresses these issues by accounting for the "background shift" inherent in these tasks. By revisiting the traditional distillation paradigm and designing novel loss terms that explicitly model the background as a dynamic set of classes, we significantly reduce forgetting. Furthermore, we introduce a parameter initialization strategy to prevent bias toward the background. Our approach extends to point- and scribble-based weakly supervised segmentation, creating priors for unlabeled pixels. Extensive evaluations on Pascal-VOC, ADE20K, and Cityscapes demonstrate that MiB significantly outperforms state-of-the-art methods.

Introduction

Semantic segmentation requires assigning a category label to every pixel in an image. While current models achieve high accuracy, they are often static. In real-world scenarios, models must frequently learn new classes (Incremental Class Learning, or ICL) or learn from sparse labels like points or scribbles (Weakly-Supervised Learning, or WSL) to reduce annotation costs.

The primary challenge in both ICL and WSL is the semantic ambiguity of the "background" class. In standard training, any pixel not belonging to the current set of interest is labeled as background. However, in an incremental setting, a pixel labeled as background today might have been a known class yesterday or could become a new class tomorrow. This phenomenon, termed Background Shift, leads to catastrophic forgetting in ICL and poor localization in WSL.

The Background Shift Problem

In incremental learning, when a model is trained on a new set of classes, the training data typically only labels the new categories. All other pixels—including those belonging to classes the model learned previously—are collapsed into a single "background" label. Standard cross-entropy loss forces the model to predict the background label for these pixels, effectively teaching the model to "unlearn" its previous knowledge.

Similarly, in WSL using points or scribbles, only a fraction of pixels are labeled. Treating all unlabeled pixels as a static background class ignores the high probability that many of those pixels belong to the foreground objects being supervised.

The MiB Framework

To mitigate these issues, we propose the Modeling the Background (MiB) framework, which treats the background as a container for potential classes rather than a fixed semantic entity.

1. Revisited Loss Functions

We modify the standard objective functions to account for the uncertainty of the background:

  • Revisited Cross-Entropy Loss: Instead of a hard assignment, this loss considers the probability that a background pixel could belong to any of the previously learned classes. This prevents the model from receiving negative reinforcement when it correctly identifies an old class that is currently labeled as background.
  • Revisited Distillation Loss: Distillation is used to keep the current model's outputs consistent with the previous iteration. Our version accounts for the fact that the old model’s background prediction might actually encompass the new classes currently being introduced.

2. Classifier Initialization

Randomly initializing the weights for new classes often leads to a massive misalignment with existing features. MiB initializes the weights of new class classifiers using the parameters of the existing background classifier. This provides a "semantic warm start," as the background weights already represent the space where non-foreground objects reside.

3. Application to Weakly-Supervised Learning

The MiB logic extends naturally to WSL. By modeling unlabeled pixels as potentially belonging to any class present in the image (based on image-level priors), we can utilize the same probabilistic loss structures to improve segmentation boundaries from minimal supervision.

Experimental Results

We evaluated MiB on three major benchmarks: Pascal-VOC 2012, ADE20K, and Cityscapes, using various incremental protocols (e.g., adding classes one-by-one or in batches).

Incremental Class Learning (ICL)

On the Pascal-VOC "15-1" task—where 15 classes are learned first, followed by the remaining 5 classes one at a time—standard methods typically fail. While previous state-of-the-art methods like ILT reached only 5.7% mIoU due to catastrophic forgetting, MiB maintained 29.7% mIoU. Our method demonstrated superior stability across all multi-step incremental scenarios.

Weakly-Supervised Learning (WSL)

In point-supervised experiments on Pascal-VOC, MiB achieved 46.7% mIoU, a significant jump over the previous state-of-the-art of 42.1%. Notably, MiB achieves these results without requiring external "objectness" modules or complex pre-training, relying solely on the improved modeling of unlabeled pixels.

Conclusion

Modeling the background is essential for flexible and efficient semantic segmentation. By acknowledging the semantic shift of the background class, the MiB framework provides a robust solution to catastrophic forgetting in incremental learning and improves the accuracy of weakly-supervised models. Our results suggest that treating "unknown" pixels with probabilistic uncertainty is a powerful alternative to traditional static labeling.

Summary updated

BibTeX
@article{cermelli2022modeling,
  author = {Fabio Cermelli and Massimiliano Mancini and Samuel Rota Bulò and Elisa Ricci and Barbara Caputo},
  title = {{Modeling the Background for Incremental and Weakly-Supervised Semantic Segmentation}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2022},
  doi = {10.1109/tpami.2021.3133954},
}
Figure