Federated Foundation Model for GI Endoscopy Images

Alina Devkota, Annahita Amireskandari, Joel Palko, Shyam Thakkar, Donald Adjeroh, Xiajun Jiang, Binod Bhattarai, Prashnna K. GyawaliarXiv 2025 · DOI

Introduction

Artificial Intelligence (AI) holds significant promise for the early detection of gastrointestinal (GI) cancers and abnormalities. However, clinical implementation is often stymied by two primary bottlenecks: the high cost of expert data labeling and the existence of data silos created by strict privacy regulations like HIPAA and GDPR. These regulations prevent hospitals from pooling raw patient data, often resulting in models trained on small, localized datasets that fail to generalize across different clinical settings.

This research introduces Federated Foundation Models (FFMs) for GI endoscopy. By integrating self-supervised learning with a federated framework, the authors enable collaborative model training across institutions without the need to share sensitive raw images. This approach aims to bridge the gap between local training (safe but limited) and centralized training (performant but privacy-risky).

Methodology: Federated Pre-training and Fine-tuning

The proposed framework utilizes a two-stage approach to build a robust AI system while maintaining data privacy.

1. Federated Self-Supervised Pre-training

The core of the FFM is a Masked Autoencoder (MAE) architecture. During pre-training, the model is presented with images where 60% of the pixels are masked. The model's objective is to reconstruct these missing patches, forcing it to learn the complex visual structures of GI anatomy without requiring human-provided labels. This process is distributed across multiple simulated hospital "clients" using Federated Learning algorithms (e.g., FedAvg, FedAdam), where only model weight updates—not raw data—are transmitted to a central server.

Overview of the Federated Foundation Model (FFM) framework, illustrating the transition from federated pre-training to task-specific downstream fine-tuning.

2. Downstream Task Adaptation

Once the foundation model is established, it is fine-tuned for specific clinical tasks by adding specialized "heads" for classification, object detection, and semantic segmentation. This stage requires significantly less labeled data and computational time compared to training from scratch, typically taking only 1–4 hours on standard hardware.

Experimental Setup and Datasets

The study utilized four major datasets to simulate a multi-institutional environment:

  • Pre-training (Unlabeled): HyperKvasir (87,970 images) and Kvasir-Capsule (37,876 images) were distributed across five client nodes and one server node.
  • Fine-tuning (Labeled): Gastrovision was used for a 27-class abnormality classification task, while EDD2020 supported lesion detection and segmentation tasks.

The researchers specifically evaluated the model's performance under heterogeneous data conditions, reflecting real-world scenarios where different hospitals possess varying quantities and types of endoscopic imagery (e.g., capsule endoscopy vs. standard colonoscopy).

Key Results and Performance Analysis

The Federated Foundation Model (specifically the FedFoundAvg variant) consistently outperformed local training (the "Lower Bound") and closely approached the performance of centralized training (the "Upper Bound").

Radar charts comparing downstream task performance (Classification, Object Detection, Segmentation) across different training methods and data distributions.
  • Classification: FFM reached 78.0% accuracy, a marked improvement over the 69.1% achieved by local training, nearing the centralized benchmark of 81.3%.
  • Object Detection: The model achieved a mean Average Precision (mAP) of 18.649, significantly higher than the 14.008 achieved locally.
  • Segmentation: In heterogeneous settings, the FFM achieved a Dice Score of 0.6909. Notably, in some metrics, the federated approach outperformed the centralized model, suggesting that the distributed nature of federated learning may provide a beneficial regularization effect.

Discussion and Future Directions

The success of the MAE approach demonstrates that models can learn critical clinical features simply by reconstructing corrupted images, drastically reducing the reliance on expert annotations. Furthermore, the FFM proved robust even when data was unevenly distributed across institutions.

Despite these promising results, the authors note that real-world performance may vary due to differences in camera hardware and lighting conditions not fully captured in simulated silos. Future work will focus on scaling the foundation model to larger, more diverse multi-institutional datasets and addressing the communication overhead associated with synchronizing large-scale models across networks.

Summary updated

Abstract

Gastrointestinal (GI) endoscopy is essential in identifying GI tract abnormalities in order to detect diseases in their early stages and improve patient outcomes. Although deep learning has shown success in supporting GI diagnostics and decision-making, these models require curated datasets with labels that are expensive to acquire. Foundation models offer a promising solution by learning general-purpose representations, which can be finetuned for specific tasks, overcoming data scarcity. Developing foundation models for medical imaging holds significant potential, but the sensitive and protected nature of medical data presents unique challenges. Foundation model training typically requires extensive datasets, and while hospitals generate large volumes of data, privacy restrictions prevent direct data sharing, making foundation model training infeasible in most scenarios. In this work, we propose a FL framework for training foundation models for gastroendoscopy imaging, enabling data to remain within local hospital environments while contributing to a shared model. We explore several established FL algorithms, assessing their suitability for training foundation models without relying on task-specific labels, conducting experiments in both homogeneous and heterogeneous settings. We evaluate the trained foundation model on three critical downstream tasks--classification, detection, and segmentation--and demonstrate that it achieves improved performance across all tasks, highlighting the effectiveness of our approach in a federated, privacy-preserving setting.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Downstream classification (homogeneous split)FedFoundAvgAccuracy78.0%Image Classification · fine-tuned · data-distribution=homogeneous
Source quote
L333: FedAvg │ \uline{78.0} │ \uline{18.649} │ 37.561 │ \uline{17.335} │ \uline{17.318} │ 0.6301 │ 0.6239
Object detection (homogeneous split)FedFoundAvgmAP18.649Object Detection · fine-tuned · data-distribution=homogeneous
Source quote
L333: FedAvg │ \uline{78.0} │ \uline{18.649} │ 37.561 │ \uline{17.335} │ \uline{17.318} │ 0.6301 │ 0.6239
Downstream classification (heterogeneous split)FedFoundAvgAccuracy77.8%Image Classification · fine-tuned · data-distribution=heterogeneous-non-iid
Source quote
L358: FedAvg │ 77.8 │ 20.353 │ 43.307 │ 18.465 │ 11.756 │ 0.6909 │ 0.6842
Object detection (heterogeneous split)FedFoundAvgmAP20.353Object Detection · fine-tuned · data-distribution=heterogeneous-non-iid
Source quote
L358: FedAvg │ 77.8 │ 20.353 │ 43.307 │ 18.465 │ 11.756 │ 0.6909 │ 0.6842
Instance segmentation (heterogeneous split)FedFoundAvgDSC0.6909Instance Segmentation · fine-tuned · data-distribution=heterogeneous-non-iid
Source quote
L358: FedAvg │ 77.8 │ 20.353 │ 43.307 │ 18.465 │ 11.756 │ 0.6909 │ 0.6842
BibTeX
@misc{devkota2025federated,
  author = {Alina Devkota and Annahita Amireskandari and Joel Palko and Shyam Thakkar and Donald Adjeroh and Xiajun Jiang and Binod Bhattarai and Prashnna K. Gyawali},
  title = {{Federated Foundation Model for GI Endoscopy Images}},
  year = {2025},
  eprint = {2505.24108},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.24108},
}
Figure