Rethinking Exemplars for Continual Semantic Segmentation in Endoscopy Scenes: Entropy-based Mini-Batch Pseudo-Replay

Guankun Wang, Long Bai, Yanan Wu, Tong Chen, Hongliang Ren · DOI

Introduction

In the rapidly evolving field of medical imaging, deep learning models for endoscopy—such as those used for identifying polyps, Barrett’s esophagus, or surgical tools—face a significant hurdle: the need for incremental learning. As new diseases are identified or new surgical instruments are introduced, models must be updated. However, standard deep learning architectures suffer from "catastrophic forgetting," where learning new information leads to the erasure of previously acquired knowledge. While "rehearsal" (re-training on a subset of old data) is a common solution in general computer vision, strict data privacy regulations like GDPR often prohibit the long-term storage of sensitive patient images.

The EndoCSS (Endoscopy Continual Semantic Segmentation) framework addresses this dilemma. By replacing real patient data with synthetic "pseudo-replay" data and introducing a noise-injected loss function, EndoCSS enables models to learn continuously without compromising patient privacy or sacrificing performance.

The Problem: Privacy vs. Performance

Continual Semantic Segmentation (CSS) in endoscopy is particularly challenging because medical knowledge is inherently incremental. A model trained at one hospital to detect stomach cancer may later be deployed at another facility to identify Crohn’s disease. Without access to the original training data, the model's performance on stomach cancer detection typically plummets as it adapts to the new task.

Traditional rehearsal methods rely on "exemplars"—a small cache of real images from previous tasks. In the medical domain, this is often legally and ethically impossible due to storage constraints and privacy laws. The challenge, therefore, is to develop a method that allows a model to "remember" previous tasks using only synthetic information.

The EndoCSS Framework

The authors propose two primary innovations to solve the problem of catastrophic forgetting in a privacy-preserving manner: Mini-Batch Pseudo-Replay (MB-PR) and Self-Adaptive Noisy Cross-Entropy (SAN-CE) Loss.

1. Mini-Batch Pseudo-Replay (MB-PR)

The MB-PR module replaces real image storage with generative modeling to facilitate rehearsal.

  • Generative Replay via SinGAN: Instead of storing a database of patient images, the framework employs SinGAN, a generative model capable of learning from a single image. This allows the system to synthesize "fake" versions of old data on demand.
  • Entropy-based Filtering: Synthetic images are only useful if they are accompanied by accurate labels. Since ground-truth labels for synthetic images do not exist, the framework uses the previous version of the model to generate "pseudo-labels." To ensure quality, the authors apply entropy-based filtering: they calculate the uncertainty (entropy) of each pixel and discard those where the model is unsure. This ensures that the rehearsal process is driven by high-confidence, high-quality data.
  • Balanced Feeding: To prevent the model from becoming biased toward the more abundant new data, MB-PR ensures that every training batch contains a fixed ratio of synthetic "old" data and real "new" data.

2. Self-Adaptive Noisy Cross-Entropy (SAN-CE) Loss

Continual learning often suffers from "early saturation," where a model becomes overconfident in its predictions for the current task, leading to poor generalization and further forgetting of old tasks. To combat this, the authors introduced the SAN-CE loss. By injecting Gaussian noise into the model's output (logits) during training, the loss function acts as a regularizer. This noise forces the model to learn more robust, generalized features that are less likely to be overwritten during subsequent training phases.

Experimental Evaluation

The EndoCSS framework was rigorously tested on three major endoscopy benchmarks:

  • EDD2020: A multi-class disease dataset featuring five classes, including Barrett’s esophagus and polyps.
  • EndoVis17 & EndoVis18: Datasets focused on robotic surgical instrument segmentation, which are particularly challenging due to overlapping classes between tasks.

The framework was compared against state-of-the-art (SOTA) continual learning methods, including PLOP, MiB, and ILT.

Key Results

  • Significant Performance Gains: When integrated with existing SOTA methods like PLOP, EndoCSS improved the mean Intersection over Union (mIoU) by up to 9.48% on the EDD2020 dataset.
  • Closing the Gap: One of the most impressive findings was that EndoCSS reached approximately 80% of the performance of "Joint Training"—the theoretical upper bound where a model has simultaneous access to all data from all tasks.
  • Robustness to Corruption: The SAN-CE loss proved its worth in robustness testing. When subjected to 18 types of image corruption (such as defocus blur or Gaussian noise), models trained with EndoCSS consistently maintained higher accuracy than baseline models, demonstrating superior stability in real-world clinical environments.

Discussion and Future Work

The success of EndoCSS suggests that privacy-preserving "pseudo-replay" is a viable alternative to exemplar-based learning in medical AI. By using IoU as a selection metric to choose which images to model with SinGAN, the authors ensured that the "memories" generated were based on the model's most successful previous learning.

However, limitations remain. The computational overhead of training GANs for every new task is significant. Furthermore, the current implementation uses a fixed ratio for synthetic data replay. Future research may explore dynamic adjustment of these ratios based on task complexity and the application of entropy-based pseudo-replay to other medical modalities, such as MRI or CT scans.

Conclusion

EndoCSS represents a significant step forward for continual learning in medical imaging. By rethinking how models "remember" previous tasks, the framework provides a path toward AI systems that can grow and adapt alongside medical knowledge, all while maintaining the highest standards of patient data privacy.

Summary updated

BibTeX
@article{wang2023rethinking,
  author = {Guankun Wang and Long Bai and Yanan Wu and Tong Chen and Hongliang Ren},
  title = {{Rethinking Exemplars for Continual Semantic Segmentation in Endoscopy Scenes: Entropy-based Mini-Batch Pseudo-Replay}},
  journal = {Computers in Biology and Medicine},
  year = {2023},
  doi = {10.1016/j.compbiomed.2023.107412},
}
Figure