Abstract
Skin lesion segmentation in dermoscopy images is highly relevant for lesion assessment and subsequent analysis. Recently, automatic transformer-based skin lesion segmentation models have achieved high segmentation accuracy owing to their long-range modeling capability. However, limited labeled data for training the lesion segmentation models results in sub-optimal learning results. In this paper, we propose a Global-to-Local self-supervised Learning (G2LL) method for transformer-based skin lesion segmentation models to alleviate the problem of insufficient annotated data. Firstly, a structure-wise masking strategy for Masked Image Modeling (MIM) is proposed to force the model to learn the reconstruction of masked structures by exploring the semantic local contexts. Instead of masking patches randomly in the whole view, it computes super-pixels to divide the images into several structured regions. Then, it masks the fixed number of patches in each region, thus it allows the exploration of the structural knowledge and solves the shape variance in the meanwhile. Secondly, a self-distilling architecture is deployed to enhance global context learning where the masked images are sent to a student network and the relative unmasked images are fed to a teacher network for knowledge distillation. In this context, extensive experiments on both the ISIC-2017 and the ISIC-2019 datasets containing a total of 28081 images show that the proposed approach is superior to state-of-the-art self-supervised learning methods.
TL;DR
G2LL (Global-to-Local Learning) is a new self-supervised framework designed to train Vision Transformers for skin lesion segmentation when labeled data is scarce. By combining a "structure-wise" masking strategy that respects the geometry of skin lesions with a teacher-student distillation process, the model learns both fine-grained local details and broad global context, outperforming standard supervised and self-supervised methods.
The Challenge: Data-Hungry Transformers in Medical Imaging
Accurate segmentation of skin lesions in dermoscopy images is a critical first step for diagnosing melanoma. While Vision Transformers (ViTs) have shown great promise due to their ability to model long-range dependencies, they are notoriously "data-hungry."
In the medical field, obtaining high-quality, pixel-level annotations is expensive and time-consuming. Existing Self-Supervised Learning (SSL) methods like Masked Image Modeling (MIM) often use random patch masking, which doesn't account for the specific structural characteristics of medical images (e.g., lesions are usually centered and have distinct boundaries). Conversely, contrastive learning methods focus on global image similarity but often fail to capture the fine-grained local features necessary for precise segmentation. G2LL aims to bridge this gap by learning at both local and global scales simultaneously.
The G2LL Framework
The G2LL framework consists of two primary components designed to capture multi-scale information:
- Structure-wise Masking (Local Learning): Instead of masking patches at random, the authors use the SLIC (Simple Linear Iterative Clustering) algorithm to divide the image into "superpixels"—regions that share similar visual characteristics. They then apply a Semantic Focal Masking strategy, where patches are masked more heavily in the central regions (where lesions typically reside) and less in the margins. This forces the model to reconstruct complex structures by understanding the local semantic context.
- Global Self-Distillation (Global Learning): The authors employ a teacher-student architecture. The student network receives the masked image and performs the reconstruction task. Simultaneously, a teacher network (updated via Exponential Moving Average of the student's weights) receives the full, unmasked image. The student is trained to "distill" knowledge from the teacher by matching its global feature representations.
The final loss function is a weighted combination of the Mean Squared Error (MSE) for local reconstruction and a distillation loss for global context.
Datasets and Evaluation
The authors utilized two major publicly available datasets:
- ISIC-2019: Contains 25,331 dermoscopy images. This was used for the large-scale self-supervised pre-training phase.
- ISIC-2017: Contains 2,750 images with expert pixel-level annotations. This was used for fine-tuning the segmentation task and final evaluation (divided into 2,000 training, 150 validation, and 600 test images).
Key Results and Performance
G2LL demonstrated significant improvements, particularly in "label-efficient" scenarios where only a fraction of the training data is used:
- Superiority at Low Data Volumes: With only 1% of labeled training data, G2LL achieved a 74.43% Dice score, outperforming standard MAE (73.50%) and a model trained from scratch (68.98%).
- Outperforming Full Supervision: When using 100% of the training data, G2LL reached a 82.46% Dice score, which surpassed the performance of a model pre-trained using full supervision on the ISIC-2019 classification labels (81.90%).
- Ablation Success: The "Semantic Focal Mask" alone provided a 0.62% improvement in Dice score over a standard random mask, proving that where you mask matters as much as how much you mask.
Insights and Future Directions
- Inductive Bias via Masking: Standard MIM treats all parts of an image as equally important. By using superpixels and focal masking, the authors inject a useful "inductive bias" into the model—essentially telling it that the structure and center of the image contain the most vital information for this specific task.
- Hybrid Supervision: The results suggest that generative tasks (reconstructing pixels) and discriminative tasks (matching global features) are complementary. The local task helps with boundary precision, while the global task helps the model understand the overall shape and category of the lesion.
While the results are promising, the authors acknowledge that the presence of hair in dermoscopy images remains a challenge for all segmentation models. Future work will explore semi-supervised learning, where labeled and unlabeled data are used together in a single training phase to further boost efficiency.
Summary updated