Knowledge Distillation for Incremental Learning in Semantic Segmentation

Umberto Michieli, Pietro Zanuttigh · DOI

Abstract

Incremental learning in semantic segmentation is hindered by "catastrophic forgetting," where models lose performance on previously learned classes when trained on new ones. This paper introduces a framework that leverages knowledge distillation and strategic layer freezing to enable continual learning without storing old training data. By employing four distinct distillation strategies—targeting output layers, intermediate features, dilation layers, and similarity preservation—the proposed method maintains high performance across both old and new tasks. Evaluations on Pascal VOC2012 and MSRC-v2 benchmarks show significant improvements over naive fine-tuning, approaching the performance of models trained on all data simultaneously.

Introduction: The Challenge of Catastrophic Forgetting

Deep learning models typically suffer from catastrophic forgetting when updated with new classes. In semantic segmentation, this problem is exacerbated by spatial co-existence (multiple classes in one image), background ambiguity (old classes appearing as unlabeled background), and privacy/storage constraints that prevent the use of replay buffers. This research proposes a framework to learn new classes incrementally using only new data and the previous model iteration ($M_{k-1}$).

Methods: Distillation and Freezing Strategies

The core architecture is based on DeepLab v2 with a ResNet-101 backbone. The primary mechanism for preventing forgetting is a Distillation Loss ($L_D$) added to the standard Cross-Entropy loss ($L_{CE}$). This loss penalizes the new model if its internal representations or outputs deviate significantly from the previous version of the model.

Overview of the incremental learning framework showing distillation losses between the frozen teacher model ($M_{k-1}$) and the trainable student model ($M_k$).

Four distillation methodologies were developed:

  1. Output Layer Distillation ($L_D^{cls-T}$): Uses temperature-scaled softmax outputs to capture class relationships and uncertainty rather than just hard labels.
  2. Intermediate Feature Space Distillation ($L_D^{enc}$): Maintains geometric similarity in encoder output features using a Frobenius norm penalty.
  3. Dilation Layer Distillation ($L_D^{dec}$): Targets the Atrous Spatial Pyramid Pooling (ASPP) layers in the decoder to preserve multi-scale context.
  4. Similarity-Preserving Distillation ($L_D^{SPKD-avg}$): Ensures that images perceived as similar by the old model remain similar in the new model by averaging activations over spatial dimensions.

Additionally, the authors found that freezing the encoder ($E_F$) or its initial layers ($E_{2LF}$) acts as a strong regularizer, forcing the model to adapt to new classes primarily through the decoder.

Experimental Results

The framework was evaluated on Pascal VOC2012 and MSRC-v2. A key focus was the "Incremental Labeling" protocol, where old class pixels in new images are explicitly labeled as background, challenging the model to handle shifting class statistics.

Quantitative results on the Pascal VOC2012 dataset for the $M_1(20)$ scenario (adding one class). The proposed distillation and freezing methods significantly outperform naive fine-tuning.

As shown in the results table above, naive fine-tuning on VOC2012 (adding 1 class) results in a performance drop to 65.1% mIoU. In contrast, the combination of Encoder Freezing and Output Distillation ($E_F, L_D^{cls-T}$) achieves 72.0% mIoU, nearing the "all-at-once" training upper bound of 73.6%. In sequential learning scenarios (adding 5 classes one-by-one), the distillation approach maintained 64.6% mIoU, while fine-tuning collapsed to 44.2%.

Conclusion

Strategic knowledge distillation and layer freezing effectively mitigate catastrophic forgetting in incremental semantic segmentation. While a performance gap remains compared to joint training, these methods provide a robust path for updating models in privacy-sensitive or storage-constrained environments. Future work may explore GAN-based pseudo-replay and more complex multi-layer distillation schemes to further close the performance gap.

Summary updated

BibTeX
@article{michieli2019knowledge,
  author = {Umberto Michieli and Pietro Zanuttigh},
  title = {{Knowledge Distillation for Incremental Learning in Semantic Segmentation}},
  journal = {Comput. Vis. Image Underst.},
  year = {2019},
  doi = {10.1016/j.cviu.2021.103167},
}
Figure