arXiv:2611.02305cs.CVNov 2026

Manuscript Offprint

arXiv:2611.02305

Peripheral prototypical contrastive loss for supervised medical image segmentation

Takuro Shimaya, Ryosaku Shino, Masahiro Saiko

ABSTRACT

Robust segmentation of biomedical images remains challenging primarily due to ill-defined object boundaries. Although several loss functions have recently been proposed to enhance object boundary recognition, concerns remain about the susceptibility to unstable annotations resulting from boundary ambiguities. Here, we introduce the Peripheral Prototypical Contrastive (PPC) loss, which leverages prototypical contrastive learning to improve boundary recognition and enable stable training even under noisy annotation conditions. The PPC loss utilizes prototype features obtained from local regions near object boundaries, focusing specifically on ambiguous areas that have been challenging for existing approaches. Extensive experiments across multiple datasets demonstrated that the PPC loss consistently improve segmentation performance even under conditions with noisy labels. A newly proposed strategy, which adaptively determines the local region for prototype calculation, enhanced robustness and outperformed existing methods. Our findings indicate the potential of the PPC loss in facilitating scalable and reliable medical image segmentation, including the development of foundation models with imperfect annotations.

1. INTRODUCTION

Segmentation has long been a crucial task in biomedical image analysis, and its methodologies have continued to advance. In recent years, a continuous stream of foundation models targeting medical imaging has been proposed [1-3], demonstrating that the utilization of large-scale datasets can address many challenges that are specific to the medical domain. Nevertheless, several critical issues still persist despite the rise of these foundation models. For instance, lesions and organs frequently exhibit ambiguous and ill-defined margins, which can introduce several complications such as annotation noise [4] and degradation in object boundary recognition of the foundation model [1]. To address these challenges, various approaches have been explored, including specialized

neural network architecture designs [5, 6], the utilization of labels from multiple annotators [4, 7], and proposals for novel loss functions [8, 9]. Among these, the development of novel loss functions for enhancing boundary recognition can be highly versatile and, as noted in ref. [1], holds promise for further improving foundation models.

Several loss functions have been investigated to improve boundary identification. In the context of generic images, camouflaged object detection (COD) [10, 11] addresses similar challenges, aiming to segment objects whose textures are similar to those of the background. For the COD task, the multi-task learning framework has been commonly applied, in which the model is simultaneously trained to segment boundary pixels using the edge detection loss [10, 11]. In the biomedical field, contour-weighted cross-entropy and Dice (CWCD) loss [8] and ROI-based contrastive loss [9] have been proposed. CWCD loss amplifies cross-entropy and Dice losses near object contours to enhance boundary recognition. ROI-based contrastive loss applies instance-wise contrastive (IC) learning to pixel-wise features randomly sampled around object boundaries, promoting the separation of features around boundaries.

Although the above-mentioned existing methods can be effective when annotations are well-defined and clean, the loss functions can be highly perturbed when annotations are unstable or inconsistent, possibly degrading segmentation performance. The values of the edge detection loss and CWCD loss vary significantly depending on the position of object boundaries, resulting in high susceptibility to annotation errors. Conversely, contrastive learning induces a relative separation of pixel-wise features between foreground and background, without enforcing abrupt changes in the features around object boundaries. While this seems to improve robustness against label noise, it has been pointed out that IC learning underperform when incorrectly assigned negative pairs are present [12], which can be caused by pixel-level annotation errors in medical images.

In this study, we design a prototype-based loss to further enhance robustness against ambiguous object boundaries. Prototypical contrastive (PC) learning [12] incorporates representative features of each class, i.e., prototypes, and has already been applied to segmentation tasks [13, 14]. While IC learning utilizes pixel-wise features to obtain the contrastive

© 2026 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.

Figure

Fig. 1. The overview of the proposed the PPC loss (LPPC\mathcal{L}_{\mathrm{PPC}}) to enhance boundary recognition of the DNN.

loss, PC learning leverages the mean of pixel-wise features belonging to the same class. Unlike pixel-wise features, the prototypical feature obtained thereby is less affected by pixel-level perturbation of annotation masks, leading to more stable training than IC learning. Although PC learning has been particularly utilized in weakly-supervised settings [15, 16], few studies have explored the enhancement of object boundary recognition in fully-supervised settings. Here we develop the peripheral prototypical contrastive (PPC) loss, where the prototype is computed using pixel-wise features from hard negative pixels around the object boundary. Our work yields the following contributions:

  1. We introduce the idea of PC learning instead of IC learning to enhance boundary recognition in fully-supervised medical images with both clean and noisy annotations.

  2. We propose a method for adaptively determining the peripheral region for prototype calculation, which further improves the segmentation performance.

  3. Through a series of experiments on three datasets, our PPC loss demonstrates the potential applicability across various imaging modalities and robustness against label noise.

References (26)