Self-Ensembling Contrastive Learning for Semi-Supervised Medical Image Segmentation

Jinxi Xiang, Zhuowei Li, Wenji Wang, Qing Xia, Shaoting ZhangarXiv 2021

Introduction

Deep learning has revolutionized medical image segmentation, yet its performance is heavily dependent on the availability of large-scale, expertly labeled datasets. In the medical domain, generating these labels is a significant bottleneck, requiring radiologists to perform time-consuming manual tracings. Semi-supervised learning (SSL) addresses this challenge by utilizing a small amount of labeled data in conjunction with a larger pool of unlabeled data.

Most existing SSL methods rely on consistency regularization, which ensures that a model's predictions remain stable under various image-level augmentations. However, these approaches often fail to exploit the rich relational information embedded within the network's internal feature space. This paper proposes Self-Ensembling Contrastive Learning (SECL), a framework that shifts the learning focus to feature-level representations to improve segmentation robustness and accuracy.

Methodology

The SECL framework integrates a student-teacher architecture with a novel contrastive learning objective:

  1. Self-Ensembling Architecture: The system consists of a Student encoder and a Teacher encoder. The Student learns in real-time, while the Teacher’s weights are updated as an Exponential Moving Average (EMA) of the Student’s weights. This creates a stable target for the Student, preventing erratic training behavior.
  2. Feature-Level Contrastive Loss: Instead of relying solely on final output consistency, SECL projects internal features into a latent space. A contrastive loss is employed to pull features belonging to the same anatomical class closer together while pushing features from different classes apart. This encourages the model to learn more discriminative and compact anatomical representations.
  3. Sampling Strategies: To implement contrastive learning for segmentation, the authors introduced two sampling strategies:
  4. Region-Aware (RACS): Samples corresponding coordinates across different patients, assuming anatomical alignment.
  5. Anatomical-Aware (AACS): Uses the model’s pseudo-labels to dynamically crop specific organs (e.g., the left ventricle) as training samples, providing robustness against patient positioning variations.

Experimental Setup

The researchers evaluated SECL on two public benchmarks:

  • ACDC-2017 (MRI): Focused on three cardiac substructures: the left ventricle (LV), right ventricle (RV), and myocardium (MYO).
  • MMWHS-2017 (CT): A "Whole Heart Segmentation" task involving seven substructures (LV, RV, LA, RA, PA, AO, MYO). The experiments used 20 labeled images for training and 50 unlabeled images to assess semi-supervised performance.

Results and Discussion

On the MMWHS-2017 CT dataset, the SECL (AACS) model demonstrated significant improvements over baseline and state-of-the-art SSL methods. As shown in the table below, SECL (AACS) achieved a Whole Heart Segmentation (WHS) Dice score of 0.8843, surpassing the baseline U-Net (0.8435) and the Mean Teacher method (0.8609).

Quantitative comparison of SECL against baseline and state-of-the-art semi-supervised methods on the MMWHS-2017 dataset across Dice, Jaccard, and Hausdorff Distance metrics.

The precision of the segmentation was further highlighted by the Hausdorff Distance (HD) metric. SECL (AACS) reduced the boundary error to 3.221 mm, a dramatic improvement over the baseline's 18.43 mm, indicating much cleaner and more anatomically accurate boundaries.

Ablation studies were performed to optimize the EMA decay parameter $\alpha$ for the self-ensembling component. The results indicate that an $\alpha$ value of 0.9 provides the optimal balance for stable feature learning across the heart substructures.

Ablation study on the EMA decay parameter alpha, demonstrating the impact of the self-ensembling update rate on segmentation performance.

The authors also noted that the Anatomical-Aware strategy (AACS) was superior to RACS because it does not require perfect image alignment, making it more practical for real-world clinical datasets. Furthermore, t-SNE visualizations (reported in the original study) confirmed that SECL produces tighter, more distinct feature clusters for different organs compared to standard consistency-based methods.

Conclusion

SECL introduces a robust framework for semi-supervised medical image segmentation by leveraging feature-level contrastive learning within a self-ensembling architecture. By focusing on the relationships between internal representations, the model achieves state-of-the-art performance on complex cardiac segmentation tasks. While the dual-encoder setup and dynamic sampling increase computational requirements, the gains in accuracy and boundary definition represent a significant step forward for medical AI applications with limited labeled data. Future research may focus on refining pseudo-label quality during the early stages of training to further enhance the system's stability.

Summary updated

BibTeX
@misc{xiang2021self,
  author = {Jinxi Xiang and Zhuowei Li and Wenji Wang and Qing Xia and Shaoting Zhang},
  title = {{Self-Ensembling Contrastive Learning for Semi-Supervised Medical Image Segmentation}},
  year = {2021},
  eprint = {2105.12924},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2105.12924},
}
Figure