BACS: Background Aware Continual Semantic Segmentation

Mostafa ElAraby, Ali Harakeh, Liam PaullarXiv 2024 · DOI

TL;DR

This paper introduces BACS, a novel framework for Continual Semantic Segmentation (CSS) that tackles the critical "background shift" problem. BACS employs a unique backward background shift detector and a modified loss function to prevent previously learned classes from being mistakenly classified as background, significantly improving model stability and plasticity.

What Problem Does This Paper Address?

Semantic segmentation, a task crucial for understanding visual scenes, typically requires pixel-level annotations for all classes. In real-world applications like autonomous driving, new classes emerge over time, necessitating incremental learning. Continual Semantic Segmentation (CSS) aims to learn these new classes without forgetting old ones. However, CSS faces a unique challenge: the "background shift." When new classes are introduced, pixels not belonging to these new classes are labeled as background. This can lead to two issues: "forward background shift" (new classes appearing as background) and "backward background shift" (old classes being misclassified as background). This ambiguity exacerbates catastrophic forgetting, a common problem in continual learning, making existing CSS methods struggle.

Methods

The core of BACS is its Backward Background Shift Detector (BACS). This detector, inspired by Siamese networks, compares pixel features to learned "foreground prototypes" from previous steps. It outputs a probability indicating whether a pixel is likely a true background or a previously seen foreground class.

This detector is then integrated into a modified cross-entropy loss function. This loss function down-weights pixels identified by BACS as belonging to old classes, effectively preventing them from collapsing into the background.

To further combat catastrophic forgetting, BACS incorporates two additional techniques:

  • Masked Knowledge Distillation (MKD): This distills knowledge from the penultimate layer, but only focuses on background pixels identified by BACS as potentially being foreground.
  • Transformer Decoder: Instead of traditional multi-classifier setups that require new classification heads for each task (which can lead to initialization issues), BACS uses a transformer decoder. This decoder learns class representations as tokens, allowing for flexible addition of new classes without retraining or complex initialization strategies.

Datasets

The paper evaluates BACS on two standard semantic segmentation datasets:

  • Pascal-VOC 2012: A widely used dataset for semantic segmentation.
  • Cityscapes: Another popular dataset, particularly for urban scene understanding.

The authors specifically test BACS on challenging setups that mimic real-world scenarios, including those with a small number of initial classes and small increments, and the "overlap mode" which is considered the most realistic and challenging.

Key Insights and Ideas

  • The "Background Shift" is a distinct problem: The paper clearly articulates the dual nature of background shift (forward and backward) and its detrimental impact on CSS, going beyond the general catastrophic forgetting problem.
  • Foreground Prototypes as a Memory: Using learned foreground prototypes from previous steps as a reference for the background detector is an elegant way to retain knowledge about what constitutes "old foreground" without explicitly storing old data.
  • Transformer Decoders for Flexibility: The adoption of a transformer decoder for class representation offers a more parameter-efficient and flexible way to handle new classes compared to traditional methods that require adding new classification heads.
  • Targeted Loss Function: Down-weighting specific background pixels identified as potentially belonging to old classes is a more nuanced approach than treating all background pixels uniformly.

Key Results

BACS demonstrates significant improvements over existing state-of-the-art CSS methods like PLOP and MiB.

  • Pascal VOC 2012: BACS outperforms baselines by a large margin, especially on challenging setups with few initial classes and small increments. For instance, in the VOC 15-1 setup, BACS achieves 51.13% mIoU for the first 15 classes and 44.32% for the next 6, significantly better than competitors.
  • Cityscapes: BACS also shows superior performance on the Cityscapes dataset, particularly on new classes, achieving 19.47% mIoU for the incremented classes compared to 10% for PLOP.
  • Ablation Studies: The paper shows that each component of BACS (DER, MKD, Transformer Decoder) contributes to the overall performance, with the Transformer Decoder offering plasticity benefits and the MKD improving both plasticity and stability.

Limitations and Future Work

  • Hyperparameter Tuning: The paper mentions that the loss function uses hyper-parameters (α, β, κ) that need to be tuned to balance stability and plasticity. The optimal values might vary across different datasets and tasks.
  • Computational Cost: While the transformer decoder is presented as parameter-efficient, the overall computational cost of the BACS framework, especially with the backward background shift detector, is not explicitly detailed.
  • Future Work: The authors suggest that their framework can be extended to handle more complex scenarios and potentially larger numbers of tasks. Further exploration of the transformer decoder's capabilities for class representation and its impact on memory efficiency could be valuable.

Summary updated

Abstract

Semantic segmentation plays a crucial role in enabling comprehensive scene understanding for robotic systems. However, generating annotations is challenging, requiring labels for every pixel in an image. In scenarios like autonomous driving, there's a need to progressively incorporate new classes as the operating environment of the deployed agent becomes more complex. For enhanced annotation efficiency, ideally, only pixels belonging to new classes would be annotated. This approach is known as Continual Semantic Segmentation (CSS). Besides the common problem of classical catastrophic forgetting in the continual learning setting, CSS suffers from the inherent ambiguity of the background, a phenomenon we refer to as the "background shift'', since pixels labeled as background could correspond to future classes (forward background shift) or previous classes (backward background shift). As a result, continual learning approaches tend to fail. This paper proposes a Backward Background Shift Detector (BACS) to detect previously observed classes based on their distance in the latent space from the foreground centroids of previous steps. Moreover, we propose a modified version of the cross-entropy loss function, incorporating the BACS detector to down-weight background pixels associated with formerly observed classes. To combat catastrophic forgetting, we employ masked feature distillation alongside dark experience replay. Additionally, our approach includes a transformer decoder capable of adjusting to new classes without necessitating an additional classification head. We validate BACS's superior performance over existing state-of-the-art methods on standard CSS benchmarks.
BibTeX
@misc{elaraby2024bacs,
  author = {Mostafa ElAraby and Ali Harakeh and Liam Paull},
  title = {{BACS: Background Aware Continual Semantic Segmentation}},
  year = {2024},
  eprint = {2404.13148},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.13148},
}
Figure