FACMIC: Federated Adaptative CLIP Model for Medical Image Classification

Yihang Wu, Christian Desrosiers, Ahmad Chaddad

Introduction

Deep learning in the medical domain faces two primary obstacles: patient privacy and data heterogeneity. Federated Learning (FL) has emerged as a promising solution for the former, allowing models to be trained across decentralized institutions without sharing raw data. However, applying state-of-the-art foundation models like CLIP (Contrastive Language-Image Pretraining) to FL introduces significant challenges. These include prohibitive communication costs due to model size, domain shift across different clinical sites (non-IID data), and the inherent gap between general-purpose vision-language features and specific medical pathologies.

To address these issues, this paper introduces FACMIC (Federated Adaptative CLIP Model), a framework designed to adapt CLIP for medical image classification efficiently and robustly within a federated environment.

The FACMIC Framework

FACMIC optimizes the use of large-scale Vision-Language Models (VLMs) through three core innovations:

1. Lightweight Feature Attention

Rather than fine-tuning the massive image and text encoders of CLIP, FACMIC keeps these parameters frozen. Instead, it introduces a lightweight, 5-layer feature attention module. This module computes an attention mask using a Hadamard product, allowing the model to selectively focus on relevant medical features—such as specific lesion characteristics—within the broad feature space of CLIP. Because only this small module is updated and shared with the central server, communication overhead is drastically reduced compared to full-model fine-tuning.

2. Privacy-Preserving Domain Adaptation

To mitigate the "domain shift" caused by varying equipment and protocols at different hospitals, FACMIC employs Local Domain Adaptation (DA). The framework utilizes Local Maximum Mean Discrepancy (LMMD) to align feature distributions across different client sites.

To maintain privacy, clients cannot directly compare their data. FACMIC solves this by using a global set of unlabeled public images as a common "anchor." This reference set allows each client to align its local distribution to a shared standard without ever exposing sensitive patient data to other nodes.

3. Pseudo-Labeling for Unlabeled Data

Since the global reference set is unlabeled, FACMIC utilizes a pseudo-labeling strategy. The model generates high-confidence predictions for the reference data, which are then used to calculate the domain adaptation loss, ensuring the alignment process is guided by relevant class-specific information.

Experimental Evaluation

The researchers evaluated FACMIC across four distinct experimental setups to test its accuracy, efficiency, and generalization:

  • Brain Tumor (BT): A four-class MRI dataset (glioma, meningioma, no tumor, pituitary tumor).
  • Skin Cancer (SC): Nine disease classes from the International Skin Imaging Collaboration (ISIC).
  • Real Multi-Source Skin Cancer: A complex dataset combining SC, HAM10000, and ISIC2019 to simulate the variance found in real-world multi-hospital collaborations.
  • Generalization Test (BT2): An entirely separate brain tumor dataset (comprising figshare, SARTAJ, and Br35H) used to evaluate the model's performance on completely unseen data sources.

Results and Key Insights

FACMIC consistently outperformed established federated learning algorithms, including FedAVG, FedProx, and MOON, across all benchmarks.

  • Superior Accuracy: On the Brain Tumor dataset, FACMIC achieved a 15.40% improvement over the next best federated method. In the multi-source skin cancer scenario, it improved accuracy by 12.13%.
  • Efficiency and Convergence: The model reached high accuracy levels in significantly fewer communication rounds than its competitors. This rapid convergence is critical for practical deployment in resource-constrained medical networks.
  • Robust Generalization: One of the most striking results was the model's performance on the unseen BT2 dataset. Without any additional tuning, the model trained on the original BT data achieved 94.42% accuracy on the new data, demonstrating that FACMIC learns robust, transferable medical features rather than simply memorizing site-specific noise.

Conclusion

FACMIC demonstrates that Vision-Language Models like CLIP can be effectively adapted for specialized medical tasks without the need for massive computational or communication resources. By combining frozen encoders with a lightweight attention mechanism and a clever "anchor-based" domain adaptation strategy, FACMIC provides a scalable, privacy-preserving path forward for high-performance medical image classification.

Future work will explore the sensitivity of domain adaptation to batch sizes and the potential of applying this framework to other emerging Vision-Language architectures beyond CLIP.

Summary updated

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
SC · skin cancer datasetFACMICACC (Average)57.41%+4.03 vs baselinesplit: test · rounds=50 · evaluation=global-testing
Source quote
L137: Ours │ \textBF{82.74} │ \textBF{56.78} │ \textBF{82.23} │ \textBF{58.47} │ \textBF{81.73} │ \textBF{56.78} │ \textBF{82.23} │ \textBF{57.62} │ \textBF{82.23} │ 57.41 │ \textBF{72.37} │ \textBF{63.61}
Real datasetFACMICACC72.37%+12.13 vs baselinesplit: test · rounds=50 · evaluation=global-testing
Source quote
L137: Ours │ \textBF{82.74} │ \textBF{56.78} │ \textBF{82.23} │ \textBF{58.47} │ \textBF{81.73} │ \textBF{56.78} │ \textBF{82.23} │ \textBF{57.62} │ \textBF{82.23} │ 57.41 │ \textBF{72.37} │ \textBF{63.61}
Reported baseline / comparator measurements (3)
BenchmarkMethodMetricScoreProtocol / Evidence
BT · brain tumor datasetFedCLIP baselineACC (Average)67.19%split: test · rounds=100 · evaluation=global-testing
Source quote
L136: FedCLIP{} │ 68.78 │ 53.38 │ 66.24 │ 55.93 │ 67.26 │ 54.23 │ 66.50 │ 50.0 │ 67.19 │ 53.38 │ 58.43 │ 51.17
SC · skin cancer datasetFedCLIP baselineACC (Average)53.38%split: test · rounds=50 · evaluation=global-testing
Source quote
L136: FedCLIP{} │ 68.78 │ 53.38 │ 66.24 │ 55.93 │ 67.26 │ 54.23 │ 66.50 │ 50.0 │ 67.19 │ 53.38 │ 58.43 │ 51.17
Real datasetFedAVG baselineACC60.24%split: test · rounds=50 · evaluation=global-testing
Source quote
L132: FedAVG │ 66.24 │ 48.30 │ 66.49 │ 49.15 │ 64.21 │ 54.23 │ 68.52 │ 49.15 │ 66.36 │ 50.21 │ 60.24 │ 50.96
BibTeX
@inproceedings{wu2024facmic,
  author = {Yihang Wu and Christian Desrosiers and Ahmad Chaddad},
  title = {{FACMIC: Federated Adaptative CLIP Model for Medical Image Classification}},
  booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year = {2024},
  doi = {10.1007/978-3-031-72390-2\_50},
}
Figure