Abstract
The collection and curation of large-scale medical datasets from multiple institutions is essential for training accurate deep learning models, but privacy concerns often hinder data sharing. Federated learning (FL) is a promising solution that enables privacy-preserving collaborative learning among different institutions, but it generally suffers from performance deterioration due to heterogeneous data distributions and a lack of quality labeled data. In this paper, we present a robust and label-efficient self-supervised FL framework for medical image analysis. Our method introduces a novel Transformer-based self-supervised pre-training paradigm that pre-trains models directly on decentralized target task datasets using masked image modeling, to facilitate more robust representation learning on heterogeneous data and effective knowledge transfer to downstream models. Extensive empirical results on simulated and real-world medical imaging non-IID federated datasets show that masked image modeling with Transformers significantly improves the robustness of models against various degrees of data heterogeneity. Notably, under severe data heterogeneity, our method, without relying on any additional pre-training data, achieves an improvement of 5.06%, 1.53% and 4.58% in test accuracy on retinal, dermatology and chest X-ray classification compared to the supervised baseline with ImageNet pre-training. In addition, we show that our federated self-supervised pre-training methods yield models that generalize better to out-of-distribution data and perform more effectively when fine-tuning with limited labeled data, compared to existing FL algorithms.
Introduction
Training high-performance deep learning models for medical imaging typically requires large, centralized, and expertly annotated datasets. However, three primary obstacles prevent this in practice:
- Privacy Constraints: Regulatory and ethical barriers prevent hospitals from sharing raw patient data.
- Data Heterogeneity (Non-IID): Variations in imaging equipment, patient demographics, and disease prevalence across institutions lead to non-independent and identically distributed (non-IID) data.
- Label Scarcity: Expert annotation is expensive and time-consuming, leaving the vast majority of clinical data unlabeled.
While Federated Learning (FL) addresses privacy by keeping data local, standard algorithms like FedAvg often struggle with extreme distribution shifts and the lack of labeled data. This work proposes a framework to leverage the abundant unlabeled data available at clinical sites to build more robust and generalizable models.
Methodology
The proposed framework consists of a two-stage pipeline designed to maximize label efficiency and robustness to heterogeneity.
Stage 1: Federated Self-Supervised Pre-training
Instead of relying on supervised pre-training on generic datasets like ImageNet, the model is pre-trained directly on decentralized, unlabeled medical images. The authors utilize Masked Image Modeling (MIM)—specifically Fed-BEiT and Fed-MAE. In this approach, the model learns to reconstruct missing patches of an image. This task is inherently label-free, allowing the framework to utilize 100% of the available local data to learn fundamental medical image representations.
Stage 2: Federated Supervised Fine-tuning
The resulting global encoder is then fine-tuned using the small subset of labeled data available across the federated network.
The Role of Vision Transformers (ViTs)
A key architectural choice is the use of Vision Transformers (ViTs). The authors demonstrate that ViTs are inherently more robust to distribution shifts than traditional Convolutional Neural Networks (CNNs). The global attention mechanism in ViTs allows the model to focus on relevant features while ignoring site-specific noise, such as lighting variations or scanner-specific artifacts.
Experimental Setup and Datasets
The framework was evaluated on three diverse medical imaging modalities:
- Retina Dataset: 12,000 fundus images for diabetic retinopathy detection.
- Dermatology (Derm) Dataset: 10,000 images for skin lesion classification.
- COVID-FL: A new real-world benchmark curated by the authors, comprising 20,018 chest X-rays from eight global institutions, specifically designed to test heterogeneity.
- Skin-FL: Used to evaluate out-of-distribution (OOD) generalization to unseen clinical sites.
Key Results
- Performance Gains: Under severe data heterogeneity, the proposed method achieved accuracy improvements of 5.06% on retinal images, 1.53% on dermatology, and 4.58% on chest X-rays compared to supervised baselines.
- Label Efficiency: The framework showed remarkable performance even with limited labels. When only 10% of the data was labeled, Fed-MAE/Fed-BEiT significantly outperformed standard FL optimization techniques like FedProx or FedEMA.
- Generalization: Models pre-trained with MIM exhibited superior performance on data from hospitals not included in the training set, indicating that the learned representations are more "universal" and less biased by local site characteristics.
Discussion and Conclusion
This research highlights that "pixels are less biased than labels." While supervised learning can bake site-specific label skews into a model, self-supervised pre-training focuses on the intrinsic structure of the images. Furthermore, MIM proved more sample-efficient for FL than contrastive learning, which often requires large batch sizes difficult to achieve in local clinical settings.
Despite these successes, challenges remain. The communication overhead of large ViT models is significant, and the current reliance on natural-image tokenizers (in Fed-BEiT) suggests further gains could be made with domain-specific medical tokenizers. Future work will focus on optimizing communication efficiency and exploring specialized tokenization for medical imaging.
Summary updated