Boundary-aware Contrastive Learning for Semi-supervised Nuclei Instance Segmentation

Ye Zhang, Ziyue Wang, Yifeng Wang, Hao Bian, Linghan Cai, Hengrui Li, Lingbo Zhang, Yongbing Zhang

Introduction

Accurate nuclei instance segmentation is a fundamental task in digital pathology, serving as a prerequisite for cancer diagnosis, grading, and treatment planning. By quantifying the morphology and distribution of nuclei, clinicians can derive critical biomarkers. However, training robust deep learning models for this task typically requires exhaustive, pixel-level annotations. In the medical domain, such annotations are not only time-consuming and expensive but also require specialized expertise, creating a significant bottleneck for model development.

Semi-supervised learning (SSL) has emerged as a promising solution, leveraging a small set of labeled data alongside a larger pool of unlabeled images. A common approach in SSL is the teacher-student framework, where the model generates pseudo-labels for unlabeled data. However, nuclei segmentation presents a unique challenge: nuclei often exhibit low contrast against surrounding tissue and vary significantly in shape. This leads to "noisy" pseudo-labels, particularly at the boundaries. When a model iteratively trains on these imprecise edges, errors compound, ultimately degrading the accuracy of clinical metrics. To address this, the BASS (Boundary-aware Semi-supervised Segmentation) framework introduces a coarse-to-fine denoising strategy to refine boundary predictions and improve feature discrimination.

The BASS Framework

BASS is designed to mitigate the impact of noisy pseudo-labels through two primary components: the Low-Resolution Denoising (LRD) module and the Cross-RoI Contrastive Learning (CRC) module. Together, these modules address noise at both the structural (coarse) and feature (fine) levels.

Low-Resolution Denoising (LRD)

In many computer vision tasks, higher resolution is equated with better performance. However, in the context of noisy semi-supervised labels, high-resolution feature maps can inadvertently amplify pixel-level errors and "hallucinate" complex, jagged edges that do not exist.

The LRD module counterintuitively performs segmentation on a lower-resolution ($14 \times 14$) feature map. This downsampling acts as a natural spatial smoother, suppressing high-frequency noise and encouraging the model to produce more anatomically plausible, smooth contours. To further enhance robustness, the module employs a weighted loss function. By assigning lower importance to pixels located in uncertain boundary regions during training, the framework prevents the student model from over-fitting to the unreliable edge predictions of the teacher model.

Cross-RoI Contrastive Learning (CRC)

While the LRD module handles global smoothness, the CRC module focuses on fine-grained feature discrimination. To help the model distinguish between nuclei and the visually similar background, the CRC module implements a targeted sampling strategy.

Instead of random pixel sampling, the module identifies four specific regions of interest (RoIs): the inner contour, outer contour, foreground-inner, and background-outer. Using a contrastive loss, the model is trained to pull features from the same category (e.g., foreground pixels across different nuclei) closer together in the embedding space while pushing features from different categories (foreground vs. background) apart. By focusing specifically on these "hard samples" at the boundaries, BASS ensures the model learns highly discriminative features even in low-contrast environments.

Experimental Results

The researchers evaluated BASS on two prominent public datasets: CryoNuSeg (30 images from 10 human organs) and DigestPath (69 images of the human digestive system). To simulate real-world data scarcity, the model was tested using only 1/8, 1/4, and 1/2 of the available labeled data.

BASS consistently outperformed existing state-of-the-art (SOTA) semi-supervised methods, including MMT-PSM and PointWSSIS, across multiple metrics:

  • CryoNuSeg (1/2 labels): The model achieved a Dice score of 76.76% and a Panoptic Quality (PQ) of 49.66%, establishing a new benchmark for the dataset.
  • DigestPath (1/8 labels): Even in extreme data-starved scenarios, BASS reached a PQ of 45.07%, outperforming other SOTA methods by nearly 1%.

Qualitative analysis confirms these quantitative gains. While baseline models often produce jagged edges or misclassify surrounding tissue as nuclei, BASS generates cleaner, more distinct segmentations that align closely with expert ground truth.

Discussion and Future Work

The success of BASS lies in its coarse-to-fine synergy: the LRD module provides global structural smoothness, while the CRC module ensures local feature distinctness. This dual-pronged approach effectively breaks the feedback loop of error propagation inherent in semi-supervised learning.

Despite its performance, the authors identify areas for further optimization. The contrastive learning module introduces computational overhead as the sampling ratio ($\alpha$) increases. Additionally, the model's reliance on a distance parameter ($d=4$) to define boundary regions may require manual tuning when applied to datasets with significantly different pixel scales. Future research may explore more efficient sampling techniques and the integration of modern architectures, such as Vision Transformers (ViTs), to further enhance the framework's versatility across diverse pathological contexts.

Summary updated

Abstract

Semi-supervised segmentation methods have demonstrated promising results in natural scenarios, providing a solution to reduce dependency on manual annotation. However, these methods face significant challenges when directly applied to pathological images due to the subtle color differences between nuclei and tissues, as well as the significant morphological variations among nuclei. Consequently, the generated pseudo-labels often contain much noise, especially at the nuclei boundaries. To address the above problem, this paper proposes a boundary-aware contrastive learning network to denoise the boundary noise in a semi-supervised nuclei segmentation task. The model has two key designs: a low-resolution denoising (LRD) module and a cross-RoI contrastive learning (CRC) module. The LRD improves the smoothness of the nuclei boundary by pseudo-labels denoising, and the CRC enhances the discrimination between foreground and background by boundary feature contrastive learning. We conduct extensive experiments to demonstrate the superiority of our proposed method over existing semi-supervised instance segmentation methods.
BibTeX
@inproceedings{zhang2024boundary,
  author = {Ye Zhang and Ziyue Wang and Yifeng Wang and Hao Bian and Linghan Cai and Hengrui Li and Lingbo Zhang and Yongbing Zhang},
  title = {{Boundary-aware Contrastive Learning for Semi-supervised Nuclei Instance Segmentation}},
  booktitle = {MIDL},
  year = {2024},
  url = {https://openreview.net/forum?id=GLSbF2rpvq},
}
Figure