\section{Introduction}

\IEEEPARstart{P}{rostate} cancer is the second most common cancer and the fifth leading cause of cancer death in men \cite{sung2021global}. Generally, the golden standard for solid tumor diagnostics is the examination of Hematoxylin \& Eosin-stained (H\&E) Whole-Slide Images (WSIs) \cite{lu2015automated, schirris2022deepsmile, chikontwe2022feature}. Diagnosis and Gleason grading of prostate cancer WSIs is crucial for clinical management and treatment of cancer \cite{kartasalo2021artificial, bulten2021artificial}. Expressly, Gleason grading is widely acknowledged as the most reliable method to evaluate the degree of prostate cancer invasion \cite{delahunt2012gleason, silva2020going, short2019gleason}. However, the interobserver and intraobserver variability of the Gleason scores are inevitable, and thus, it can lead to under- or over-treatment of patients in practical scenarios \cite{kartasalo2021artificial, GEORGE2022262}. In addition, manual diagnostic labeling of pathological images is time-consuming and expensive \cite{campanella2019clinical, wang2022sclwc, wang2023retccl, xiang2023automatic}.

Artificial intelligence (AI) has recently been increasingly applied to pathological image diagnosis. Pioneering studies show AI can provide accurate, low-cost, and scalable solutions by automating the analysis of patient data \cite{kartasalo2021artificial, bulten2021artificial, bulten2022artificial, bulten2020automated, cui2021artificial}. Many previous studies \cite{campanella2019clinical, bulten2020automated, perincheri2021independent, nagpal2020development, pantanowitz2020artificial, mun2021yet} have verified the effectiveness of AI models in prostate cancer diagnosis and Gleason grading tasks. However, artificial intelligence requires a large amount of data for training to achieve better performance. One critical practice is to utilize more data sets to make the AI model more robust \cite{muti2021development, echle2020clinical, saldanha2022swarm}. Hence, a typical operation is to collect data from multiple centers (e.g., medical centers and hospitals) and train AI models through centralized learning. However, the transmission of massive and sensitive patient data between clinics, hospitals, and other medical institutions will not only invade patient privacy but may also violate relevant data protection laws. Also,  there are technical obstacles, including data transfer efficiency and storage requirements \cite{cui2021artificial, saldanha2022swarm, pati2022federated}.

Federated learning (FL) describes a novel paradigm in which models are trained only by sharing model parameter updates from decentralized data \cite{pati2022federated, liu2021federated, li2020federated, xu2021federated, sheller2020federated}. Data retention locally can effectively solve the problem of excessive data transmission, and data ownership \cite{rieke2020future}. 
By sharing model parameters instead of private data of multiple centers directly, federated learning is promising for applications with sensitive data.
In general, the training methods of federated learning can be divided into two types, (1) primary server and (2) peer-to-peer \cite{lu2022federated}. The main difference is whether a primary server is included to collect the model parameters of each client. The scalability of the primary server is better because each client only communicates with the server during training and does not need to communicate with each other.
FL holds great promises on sensitive data analytics in various areas of healthcare \cite{xu2021federated}. Examples include electronic health records (EHR) \cite{brisimi2018federated, boughorbel2019federated, huang2019patient, min2019predictive, duan2020learning},  IoT(Internet of Things) in healthcare \cite{chen2020fedhealth, brophy2021estimation}, drug discovery \cite{choudhury2019predicting, chen2021fl, xiong2022facing} and medical image analysis (e.g., X-ray,  Ultrasound, CT, MRI, PET, WSIs)  \cite{yan2021experiments, feki2021federated, lee2021federated, dou2021federated, florescu2022federated, guo2021multi, stripelis2021scaling, shiri2021federated, andreux2020siloed, adnan2022federated}.
Although federated learning has shown certain advantages on gigapixel WSIs \cite{andreux2020siloed, wang2023generalizable, baid2022federated, ogier2023federated}, some significant challenges, for example, the robustness towards the considerable heterogeneity among WSIs with a wide range of morphology variations, remain unsolved.

Heterogeneity of data distribution across different centers, i.e., each local model having non-identically and independently distributed (Non-IID) data,  is a crucial challenge in federated learning \cite{kairouz2021advances}. However, the divergence of training and test data distribution degrades the robustness of the model greatly \cite{de2022mitigating}. 
Some studies have progressed in the following aspects to mitigate the heterogeneity problem.
(1) Variance reduction. The main improvement in this field is balancing the data distribution obtained by clients from other clients \cite{ahn2022communication} to achieve the purpose of reducing variance (e.g., parameters, update directions, or feature representations among local models \cite{nguyen2022federated}). (2) Global model update. When the model parameters are aggregated, adaptive optimization \cite{mcmahan2017communication, li2021fedrs, gao2022feddc} or personalized optimization \cite{hanzely2021personalized} is adopted to accelerate model convergence and enhance the robustness of the model. However, these improvements cannot address FL's heterogeneity in histopathological images.

Combining the characteristics of pathological WSIs, we propose a federated contrastive learning framework (FCL) for attention contrast between the local client model and the central server model to increase consistency. This way,  the model's generalization ability is improved to unseen data.
In addition, although federated learning keeps data locally, there is still the risk of leaking private information when transferring parameters to the server  \cite{wu2022adaptive, wang2022safeguarding}. We use differential privacy (DP)  \cite{dwork2006our} as a way to add up protections  \cite{zhao2022cork}. 
Most of the existing improvements are proposed and verified on a limited number of small-size image datasets (e.g., MNIST, CIFAR10, CIFAR100, EMNISTL, Tiny ImageNet) \cite{nguyen2022federated, li2021fedrs, gao2022feddc, li2021model}. We collect a large-scale clinical dataset containing 19,635 WSIs from different centers to validate the proposed model. Test on prostate cancer diagnosis and Gleason grading results in clinical-grade performance. 

Our main contributions are summarized as follows:

(1) We design a federated contrastive learning framework (FCL) for large-scale pathology images. In this framework, we demonstrate that federated learning can be effectively applied to pathological images to preserve privacy and avoid excessive data transmission while achieving clinical-grade accuracy.

(2) To solve the problem of heterogeneity among federated learning clients, we propose a contrastive attention algorithm. It enhances the model's generalization ability by maximizing the consistency of attention between the local client and server models. We use differential privacy to further alleviate the privacy leakage problem during parameter transfer and verify the robustness of FCL.

(3) We collect a large-scale clinical prostate cancer dataset containing 19,635 WSIs from different centers with heterogenous data distribution to validate prostate cancer diagnosis and Gleason grading tasks. In addition to the in-domain validation set, the diagnostic task verifies the model's generalization on two external independent datasets, and the Gleason grading task verifies on an external independent dataset.


\section{Related works}
This section reviews federated learning and contrastive learning and their applications in healthcare, especially in medical image analysis.

\subsection{Federated learning}
After the federated learning framework FedAvg \cite{mcmahan2017communication} was proposed by Google, it has been further developed in various challenging directions, especially for Non-IID and unbalanced properties.

To alleviate the Non-IID problem, FedProx \cite{litian2020federated} improved FedAvg by adding a proximal end to the local objective function, which helped enhance the method's stability. 
ComFed \cite{nguyen2022federated} utilized client-side variance reduction techniques to facilitate server aggregation and global adaptive update techniques to accelerate learning.  
FedRS \cite{li2021fedrs} proposed ``Restricted Softmax" to restrict the update of missing class weights in the local process. 
In FedDif \cite{ahn2022communication}, local models were diffused in the network to learn data distributions they had not experienced before global aggregation. After sufficient diffusion iterations, each local model accumulated the personalized data distributions of different used and obtained a similar effect to the training IID data.
FedDC \cite{gao2022feddc} introduced a lightweight modification in the local training phase. Each client utilized an auxiliary local drift variable to track the gap between local and global model parameters.
Although the above methods have contributed to solving the Non-IID problem, the disadvantage is that they are only verified on ordinary natural images and are not suitable for large-scale pathological images in medical images.

FL has been proven to be effective and efficient by many studies in healthcare.
Dou \textit{et al.} \cite{dou2021federated} demonstrated the feasibility of a federated learning approach to detect COVID-19-related CT abnormalities with external validation in a multinational study. Internal and external independent datasets validate the generalization ability of the model.
Guo \textit{et al.} \cite{guo2021multi} proposed a cross-site MR image reconstruction modeling that aligns the learned intermediate latent features between different source sites with the distribution of latent features at the target sites.
Pati \textit{et al.} \cite{pati2022federated} applied FL to rare disease diagnosis involving data from 71 sites across six continents to generate an automated tumor boundary detector for rare glioblastoma. Which fully demonstrates the effectiveness and practicality of federated learning.


\begin{figure*}[!ht] 
    \setlength{\abovecaptionskip}{-0.1cm} 
    \setlength{\belowcaptionskip}{-0.1cm} 
\centering
\includegraphics[width=1\textwidth]{framework_compressed.pdf}
\caption{The framework of feature extraction and model training process for federated contrastive learning model on pathological images. Federated learning can keep data locally on the client and perform patch-level segmentation and feature extraction of tissue regions on pathological images locally. We crop the WSIs image into a patch image of $224 \times 224$ size, then use the Swin Transformer with convolution to extract features and keep the features locally as the input for subsequent network model training. When each client trains the model, it transmits the model parameters to the central server. The server performs a weighted average after collecting all client model parameters and then distributes the updated parameters of the central server model to all clients for the next round of training. In addition, we further protect the dataset using differential privacy, adding random noise when the model parameters are aggregated to the server. Finally, to address the problem of unbalanced data distribution between clients, we also use attention comparison to improve the consistency between the server and client models. The robustness and accuracy of the final training model are thus improved.
}
\label{Fig1}
\end{figure*}


In addition, a few studies have demonstrated that FL can play a role in histopathological images.
Saldanha \textit{et al.} \cite{saldanha2022swarm} used the FL model to predict BRAF mutation status and microsatellite instability from hematoxylin and eosin (H\&E)-stained colorectal cancer pathology sections. Seyedeh \textit{et al.} \cite{hosseini2022cluster} and Ming \textit{et al.} \cite{lu2022federated} both used FL and differential privacy to prove the effectiveness of FL in protecting medical privacy data on the public dataset TCGA.
To explore the issue of fairness among participants. Hosseini \textit{et al.} \cite{hosseini2023proportionally} proposed proportional fair federated learning (Prop-FFL) and verified the effectiveness of Prop-FFL on two pathological datasets. 
FL research applied to histopathological images currently has a common shortcoming: the diversity of data needs to be increased. Most of them are verified on public data sets, seriously lacking the verification results on actual clinical data.

\subsection{Contrastive learning(CL)}

Contrastive learning has been a successful paradigm for visual representation learning. Based on seminal frameworks like SimCLR \cite{chen2020simple} and MoCo \cite{he2020momentum},  more researchers are pushing the frontier of contrastive learning with great effort. The key idea of contrastive learning is discrimination, that is, reducing the distance between different augmented view representations of the same image (i.e., positive pairs), whereas increasing the distance between augmented view representations of different images (i.e., negative pairs) \cite{li2021model, krishnan2022self}.

In healthcare, previous work has found performance improvements when contrasting learning is applied to specific domains such as electronic health records (EHR) \cite{wanyan2021contrastive, li2022multi}, human activity recognition (HAR) \cite{tang2020exploring}, electrocardiography (ECG) \cite{diamant2022patient} and medical image analysis \cite{vu2021medaug, chaitanya2020contrastive, azizi2021big, li2021dual, wang2023retccl}.

For histopathology images, a few studies also apply CL to improve performance.
Wang \textit{et al.}  \cite{wang2023retccl} developed a CL-based backbone model to reduce the number of potential false-negative samples by integrating multiple sub-memories and population-level discrimination for training under the assumption of traditional contrastive learning.
Yan \textit{et al.} \cite{yan2022deep} employed a deep clustering algorithm to maximize the similarity between instance and cluster projection representations via contrastive learning while simultaneously learning semantic features and generating initial clusters from unlabeled WSIs patches.
Zhu \textit{et al.} \cite{zhu2022murcl} proposed a novel multi-instance reinforced contrastive learning framework (MuRCL) to deeply mine the intrinsic semantic relations of different patches to advance WSIs classification.
Fashi \textit{et al.} \cite{fashi2022self} proposed a fully supervised contrastive learning setting to increase the robustness of representations for WSIs classification and search for pretexts and downstream tasks.
However, these contrastive learning methods focus on feature representation and have yet to be tested on large-scale, diverse histopathology image datasets. Therefore, we extend this idea to federated model training beyond visual representation.


\section{Methods}

In this section, we overview the proposed federated contrastive learning framework (FCL) as shown in \textbf{Fig. \ref{Fig1}}. First, the operation performed is that each client uses the CTransPath \cite{wang2022transformer} feature extractor to obtain the features of the local dataset and save them. Then, under the FCL framework, AttMIL \cite{ilse2018attention}, a weakly supervised model with an attention mechanism, is used for diagnosis and Gleason grading on gigapixel WSIs of prostate cancer, which can not only protect patient privacy but also improve the model trained on single client data performance.
We propose an inter-model contrastive learning idea to solve the Non-IID challenge. Although the data distribution of each local client is not balanced, FCL can also correct this deviation, making the model achieve the optimal result.

\subsection{Data preprocessing}
Histopathology images at high resolution are time-consuming to analyze and affected by complex background and interference factors \cite{linkon2021deep}. The key to data processing is to crop the WSIs into small sizes that can be fed into the deep learning model. However, the background region needs to be removed because the background region does not contain informative content. We cropped patches ($224\times 224$ pixels) without overlap in regions of substantial tissue using the Otsu thresholding method \cite{4310076}. Then, we used the CTransPath \cite{wang2022transformer} feature extractor to obtain the features of each patch and aggregated the features of all patches in a WSI to save them together. Unlike the ImageNet pre-trained model, the CTransPath extractor is pre-trained on various histopathology datasets.

\subsection{Weakly-supervised learning on WSIs}
We employ a weakly supervised model AttMIL \cite{ilse2018attention} with an attention mechanism for diagnosis and Gleason grading on gigapixel WSIs of prostate cancer and use it as the basis for performing federated learning.

A weakly supervised learning model is developed at each local site to make WSIs classification. 
Each model contains a projection module $f_{pro}$, an attention module $f_{att}$, and a prediction layer $f_{pre}$. The projection module consists of contiguous, trainable, fully-connected layers that project fixed feature embeddings obtained using a pre-trained feature encoder into a more compact feature space of histopathology images specific to the selected disease model. The first fully-connected layer $\bm{W_1} \in \mathbb{R}^{512 \times 768}$, further compresses the 768-dimensional patch-level features $\bm{z}_k$ into a 512-dimensional vector $\bm{h}_k = \bm{W}_1\bm{z}_{k}^{\top }$, all $N$ patch-level $\bm{h}_k$ of a WSI constitute $\bm{H} \in \mathbb{R}^{N \times 512}$.

If we take the first two $ \bm{U}_a \in \mathbb{R}^{256 \times 512}$, and $\bm{V}_a \in \mathbb{R}^{256 \times 512}$, of the attention network together as the attention backbone shared by all classes, then the attention network can be split into n parallel attention branches $\bm{W}_{a,1}, ..., \bm{W}_{a,n} \in \mathbb{R}^{1 \times 256}$. Similarly, construct $n$ parallel independent classifiers $\bm{W}_{c,1}, ... , \bm{W}_{c,n}$ to score each class-specific slide level representation. The resulting attention score for the kth patch of the mth class is $a_{k,m}$, computed by \eqref{eqn1}. The slide-level feature representation is aggregated by the attention score distribution of the $m^{th}$ class, denoted as $h_{slide,m}\in \mathbb{R}^{1\times 512}$ by \eqref{eqn2}.

\begin{equation}\label{eqn1}
a_{k,m}= \frac{\exp \left\{{W_{a,m}}(\tanh(V_ah_{k}^{\top})\odot \rm{sigm}(\bm{U}_ah_{k}^{\top}) )\right\}}{\sum_{j=1}^{N}\exp \left\{{W_{a,m}}(\tanh(V_ah_{j}^{\top})\odot \rm{sigm}(\bm{U_a}h_{j}^{\top}) )\right\}}
\end{equation}

\begin{equation}\label{eqn2}
h_{slide,m} = \sum_{k=1}^{N}a_{k,m}h_k
\end{equation}

The corresponding unnormalized slide-level score $s_{slide,m}$ is computed from the classification layer $\bm{W}_{c,m} \in \mathbb{R}^{1 \times 512}$ by $s_{slide,m} = \bm{W}_{c,m}h_{slide,m}^{\top}$. In inference, the predicted probability distribution for each class is computed by applying the softmax function to the slide-level prediction scores.

\subsection{Federated learning on WSIs}\label{sec3.3}
\subsubsection{Federated contrastive learning}

Inspired by contrastive learning, we propose FCL, a new method for attention-based comparison between server-side and client-side in federated learning based on FedAvg \cite{mcmahan2017communication} and weakly supervised learning. It introduces only lightweight and effective modifications in client-side training. Each client will train a relatively personalized model when doing local training because of data heterogeneity. The global model trained by the server learns a much better representation than the local model. The goal of FCL is to enhance the learning and generalization ability of the client-side model by increasing the consistency between the \textit{attention} learned by the client-side model and the \textit{attention} learned by the server-side model.

The loss of the local model contains two parts. The first part is the typical loss (e.g., cross-entropy loss) in supervised learning, which is denoted as $\mathcal{L}_{CE}$ in this paper. The second part is the contrastive loss between the attention scores of client-side models and the server-side model, denoted as $\mathcal{L}_{FCL}$. Assuming that the predicted probability value of the classification model is $logits$, the label is $y$, and the attention scores of the local model and the server model are $A_{local}$ and $A_s$, respectively. Then the total loss can be expressed as:

\begin{equation}
\mathcal{L} = \mathcal{L}_{CE}(logits,y) + \bm{\mu} \mathcal{L}_{FCL}(A_{local},A_{s}),
\end{equation}
\begin{equation} 
 \mathcal{L}_{FCL} = KL[P(\bm{X})\parallel Q(\bm{X})]=\sum_{x \in X}^{}[P(x)\log\frac{P(x)}{Q(x)}],
\end{equation}

where $\bm{\mu}$ is the hyperparameter that controls the weight of the attention contrastive loss. $\mathcal{L}_{FCL} $ is the Kullback-Leibler divergence \cite{joyce2011kullback}, which measures the similarity between two probability distributions.

\subsubsection{Federated contrastive learning with differential privacy}

\begin{algorithm}[!ht]
    \SetKwData{Left}{left}\SetKwData{This}{this}\SetKwData{Up}{up}
    \SetKwFunction{Union}{Union}\SetKwFunction{FindCompress}{FindCompress}
    \SetKwInOut{Input}{input}\SetKwInOut{Output}{output}
    \caption{The FCL algorithm}
    \label{alg1}
    \KwIn{WSIs Data and weak annotation $ (\bm{X},\bm{Y}) $;}
    \KwOut{Global model $f_{server}$($f_s$);}
    \text{Initialize all model parameters} $\left \{ \bm{W^{0}_g},\bm{W^{0}_1},...,\bm{W^{0}_M} \right \}$ \;
    \small \tcp{\text{Training $K$ rounds}}
    \For{$k =1 $ \KwTo $K$ }{ 
        \small \tcp{ $M$ \text independent sites}
        \For{$i = 1 $ \KwTo $M$}{
            \small \tcp{$N_i$ \text {WSIs}}
            \For{$j = 1 $ \KwTo $N_i$}{ 
               
               
               
               
               
               
                \small \tcp{\text Local model projection}
                $\bm{H}_{i,j} = f_{pro}(\bm{X^{'}_{i,j}}) $ \;
                \small \tcp{\text Server model projection}
                $\bm{H}_{s} = f_{s,pro}(\bm{X^{'}_{i,j}})$ \; 
                \small \tcp{\text Local model attention}
                $\bm{A}_{i,j} = f_{att}(\bm{H}_{i,j})$ \;
                \small \tcp{\text Server model attention}
                $\bm{A}_{s} = f_{att}(\bm{H}_{s})$ \;
                \small \tcp{\text Feature representation of the WSI}
                $\bm{h}_{bag} = \rm{W\text{-}Ave} (\bm{A_{i,j}},\bm{H}_{i,j})$ \;
                \small \tcp{\text Output predicted value}
                $s_{i,j} = f_{pre}(\bm{h}_{bag_{i,j}}) $ \;
                \small \tcp{\text Calculate loss function}
                $\mathcal{L} = \mathcal{L}_{CE}({s}_{i,j}, Y_{i,j}) + \mu \mathcal{L}_{FCL}(\bm{A_{i,j}},\bm{A}_{s}) $ \;
               
                \small \tcp{\text Optimize model parameters}
                $\bm{W}_i  \leftarrow {\rm Opt}_i(\mathcal{L}, \bm{W}_i) $ \;
            }
       } 
        \small \tcp{\text Update server parameters}
        \small \tcp{$\gamma_i$: \text{weight coefficient}} 
        $\bm{W}_{s} \leftarrow \sum_{i}^{}\gamma_i(\bm{W}_i) + N_g(\bm{W}_i)$ \;
        \small \tcp{\text Update local model parameters}
        \For{$i = 1 $ \KwTo $M$}{
           
            $ \bm{W}_i \leftarrow \bm{W}_{s}$ \;
        } 
    }
    \text{return} $f_s$ 
\end{algorithm}

Based on the inspiration of data differential privacy, we apply this technology to the stage where the federated learning server receives each client model's parameters and add a certain degree of noise to the parameters of the client model. Finally, the proposed federated learning algorithm with contrastive learning and differential privacy is shown in \textbf{Algorithm \ref{alg1}}. In each round, the server sends the global model to all parties to complete local training. The local models are received from each party, and the global model is updated using a weighted average.

We denote the number of rounds of federated learning training as $K$. Please assume that the WSIs data and its weakly supervised labels are distributed over $M$ independent sites: $(\bm{X}, \bm{Y}) = \left\{ \left\{ (\bm{X}_{1,j}, Y_{1,j}) \right\},...,\left\{ (\bm{X}_{M,j}, Y_{M,j}) \right\} \right\}$, where $\left\{ (\bm{X}_{i,j}, Y_{i,j}) \right\} = \left \{ (\bm{X}_{i,1}, Y_{i,1}),...,(\bm{X}_{i, N_i}, Y_{i, N_i})  \right \}$ denotes the $N_i$ pair of WSIs data and the corresponding labels for the $i$th client site, $\bm{X}_{i,j}$ is a single WSI.  After data preprocessing and feature extraction, the data are represented as $(\bm{X}', \bm{Y}) = \left \{  \left \{(\bm{X}'_{1,j}, Y_{1,j}) \right \},..., \left \{(\bm{X}'_{M,j}, Y_{M,j})\right \}  \right \}$. The server-side model is $f_s$ and the local client's neural network model $\bm{f}_{site} = \left \{\bm{f}_1,..., \bm{f}_M \right \}$. Each model $\bm{f}_i$ contains a projection module $f_{i, pro}$, an attention module $f_{i, att}$, and a prediction layer $f_{i, pre}$. W-Ave: Use the attention scores predicted by all patches as weights to average the feature embeddings of all patches. The parameters of the local model are denoted as $\bm{W}_1,...,\bm{W}_M$, and the parameters of the global model are $\bm{W}_g$. ${\rm Opt}_i$ is an optimizer that updates the model parameters.
Suppose $N_g(\cdot)$ is a noise generator that can generate Gaussian random noise $\bm{z} \sim(0,{\alpha}^2 {\eta }^2) $, where $\bm{\alpha}$ is the noise level, and $\eta$ is the standard deviation of the neural network weight matrix.  


\section{Experiments and results}

This section introduces the datasets used in prostate cancer diagnosis and Gleason grading tasks. Then, we describe the detailed data distribution and experimental setup. Moreover, we validate the effectiveness of federated learning on diagnostic and Gleason grading tasks. Furthermore, we compared \textit{the difference in performance between FL and single-center models} and \textit{the difference in performance between FCL and FL}. Finally, to make the model results interpretable, we use a heatmap to plot the cancerous regions identified by the model.

\subsection{Datasets}
In this study, we investigated the diagnosis (2-level classification, i.e., benign or malign) and Gleason grading (6-level classification, i.e., ISUP 0, 1, 2, 3, 4, 5) of prostate cancer using the federated contrastive learning framework. For the prostate cancer diagnosis task, we used datasets from three hospitals and two public datasets for training, one private hospital dataset (QHD), and one public dataset (DiagSet-A) for testing. For the prostate cancer Gleason grading task, we used two private datasets, one public dataset for training and one private hospital dataset (NC) for testing. 
To demonstrate the effectiveness of the federated learning model, we first preprocessed the above datasets, increased the heterogeneity of the datasets, split the datasets with a large number of samples into multiple independent centers, and increased the number of client centers in the federated learning model. The distribution of data sets used in the cancer diagnosis task is shown in \textbf{Table \ref{tab1}}, and the proportion of positive data ranges from 21\% to 90\%. The data set distribution used by Gleason grading is shown in \textbf{Table \ref{tab2}}, and the categories of ISUP 0-5 are more unbalanced.

\begin{table}[!ht]
\renewcommand\arraystretch{1.2} 
		\setlength{\abovecaptionskip}{0.1cm}   
		\setlength{\belowcaptionskip}{-0.2cm}
\caption{Data Distribution  used for Cancer Diagnosis(x\% denotes the proportion of positive slides)}
\label{tab1}
\centering
\setlength{\tabcolsep}{5pt}
\begin{tabular}{p{15pt} p{50pt} p{50pt} p{35pt} p{35pt}}
\hline
Site  &  Dataset  & WSIs No.  & Train No. &  Val No. \\ \hline
0 & HB-1 & 1201 (21\%)  &   960  & 241 \\
1 & HB-2 & \enspace 844 (73\%) &  675  &  169   \\
2 & NC & \enspace 983 (90\%) &  786  &  197   \\
3 & DiagSet-B-a & 2313 (45\%) &  1850  &  463   \\ 
4 & DiagSet-B-b & 2313 (45\%) &  1850  &  463  \\ 
5 & PANDA-a & 5453 (65\%) &  4362  & 1091  \\ 
6 & PANDA-b & 5159 (81\%) &   4127 &   1032  \\ \hline
\end{tabular}
\end{table}

\begin{table*}[!ht]
\renewcommand\arraystretch{1.2} 
		\setlength{\abovecaptionskip}{0.1cm}  
		\setlength{\belowcaptionskip}{-1cm}
\caption{\label{tab2}Data Distribution used for cancer diagnosis(The x\% represents the proportion of each class in the total data volume)}
\setlength{\tabcolsep}{9pt}
\begin{tabular}{p{15pt} p{45pt} p{35pt} p{41pt} p{41pt} p{41pt} p{41pt} p{41pt} p{41pt}}
\hline
Site & Dataset & WSIs No. & ISUP-0& ISUP-1 &  ISUP-2 & ISUP-3 & ISUP-4 &  ISUP-5 \\
\hline
0 & HB-1 & 1201  & 952 (79.3\%)  & \enspace 18 (1.5\%)  & \enspace 17 (1.4\%) & \enspace 42 (3.5\%)  & \enspace 72 (6.0\%)  & 100 (8.3\%) \\

1 & HB-2   & \enspace 844  & 220 (26.1\%)  & 169  (20.0\%) & \enspace 88 (10.4\%) & 108 (12.8\%) & 125 (14.8\%)& 134 (15.9\%) \\

2 & PANDA-a1 & 2727 & 962 (35.3\%)  & 906 (33.2\%) & 334 (12.2\%) & 159 (5.8\%) & 241 (8.8\%) & 125 (4.6\%) \\

3 & PANDA-a2 & 2727 & 962 (35.3\%) & 907 (33.3\%)  & 334 (12.2\%)  & 158 (5.8\%) & 240 (8.8\%) & 126 (4.6\%) \\

4 & PANDA-b1 & 2580 & 484 (18.8\%) & 426 (16.5\%) & 338 (13.1\%) & 462 (17.9\%) & 384 (14.9\%) & 486 (18.8\%)  \\ 
5 & PANDA-b2 & 2579 & 483 (18.7\%) & 426 (16.5\%) & 337 (13.1\%) & 462 (17.9\%) & 384 (14.9\%) & 487 (18.9\%)  \\  \hline 
\end{tabular}
\end{table*}

\subsection{Experimental setups and evaluation metrics}

We use the loss functions and algorithmic models in each task from Section \ref{sec3.3}. For example, we simulated the federated learning experiment with 8 Tesla V100  GPUs, where each card was treated as an independent institution. 
We computed the validation metrics for each epoch to allow the model to converge to the best results. 
The best-performed model on the validation set was used for the final evaluation of the test set. For both tasks, we conducted experiments with three settings:

1. Local learning, where each institution trains its data independently.

2. Global learning by aggregating the datasets of all institutions and training a multicenter centralized model.

3. Federated learning by training the data of all institutions without sharing the datasets but only sharing the model parameters.



\begin{table}[!ht]
\renewcommand\arraystretch{1.2} 
		\setlength{\abovecaptionskip}{0cm}   
		\setlength{\belowcaptionskip}{0cm}
\caption{\label{tab3}Proportion of positive data} 
\setlength{\tabcolsep}{5pt}
{
\begin{tabular}{p{20pt} p{40pt} p{42pt} p{40pt} p{40pt}}
\hline
$ \alpha $ & DiagSet-B-a &DiagSet-B-b & PANDA-a & PANDA-b \\ \hline
 0.05 & 50/1000 & 50/1000  &75/1500  & 1425/1500         \\ 
 0.1  & 100/1000  & 100/1000  & 150/1500  & 1350/1500   \\ 
 0.3  & 300/1000 & 300/1000 & 450/1500  & 1050/1500    \\ 
 0.5  & 500/1000 & 500/1000 &  750/1500 & 750/1500    \\ \hline
\end{tabular}
}
\end{table}

For the diagnostic task, the data splits are shown in \textbf{Table \ref{tab3}}. 
The site: 0-2 remained unchanged. To verify the effect of data imbalance on the model, we split the dataset Site: 3-6 which has a large number of samples, into the positive proportion $\bm{\alpha} = \left \{0.05, 0.1, 0.3, 0.5 \right \}$. 
Thus, there are seven institutions in the simulation experiment of federated learning. The dataset of each institution is randomly divided into training and validation sets according to the ratio of 80\% and 20\%. Stratified sampling is used to separate the dataset in each center to maintain the consistency of the class balance between the training and validation sets. 
More importantly, to verify the robustness and generalization of the model on datasets that have not been seen before, we use datasets from two independent institutions for testing. 
For the Gleason grading task, we simulated a six clients federated learning model and used an independent dataset from a private institution for testing. 

On diagnostic and Gleason grading tasks, we evaluated the proposed federated contrastive learning model using a variety of classification metrics, including AUC of the ROC curve, F1 score, Acc, Recall, and Kappa score. In addition, we confirmed the feasibility of using differential privacy to protect WSIs data privacy.


\subsection{Results of diagnosis (Binary classification)}
In a diagnostic task, we compared models trained on data with varying degrees of heterogeneity. This degree is reflected in the proportion factor $\bm{\alpha} = \left \{0.05, 0.1, 0.3, 0.5 \right \}$ in Table  \ref{tab3}. Through experiments, we validate the performance of each local client model, FL model, FCL model, and centralized learning model on seven internal datasets and two external datasets (DiagSet-A and QHD).

 \subsubsection{Internal datasets}
 The experimental results on the validation set for the diagnosis task are shown in \textbf{Table
  \ref{tab_4}}. Due to the different proportions of categories in the diagnostic task, the local client model's overall performance is getting better with the increase of $\alpha$. When $\alpha$ is 0.05, the average Acc of the local clients (site: 0-6) model is only 80\%, and the average AUC is only 93\%. When $\alpha$ is 0.5, the average Acc of the local clients (site: 0-6) model reaches 87\%, and the average AUC reaches 95\%. 
  
  We found that federated learning models performed better than local client-side models. Compared with the results of every single center, the results of the federated contrastive learning model have a 2\%-4\% AUC improvement. The federated contrastive learning model results are slightly different from those of the centralized model, and the difference in AUC is within 1\%.

\begin{table}[!ht]
		\setlength{\abovecaptionskip}{-0.1cm}  
		\setlength{\belowcaptionskip}{0.1cm}
\renewcommand\arraystretch{1.1}	
\caption{\label{tab_4}The diagnostic model's performance on the validation set was reported as a five-fold mean}

\centering
\begin{tabular}{ccllll}
\toprule 
                &           & \textbf{AUC}   & \textbf{F1-score}  & \textbf{Acc}   & \textbf{Recall}   \\ 
\hline 
                         & Site 0    & 0.9487   & 0.8481   & 0.8325  & 0.7450   \\ 
       /                 & Site 1    & 0.9422   & 0.8973   & 0.8698  & 0.8981   \\ 
                         & Site 2    & 0.9410   & 0.8685   & 0.8174  & 0.9303   \\ 
\hline
                         & Site 3            & 0.9222  & 0.7917   & 0.7830  & 0.6633   \\ 
                         & Site 4           & 0.9385  & 0.7679   & 0.7620  & 0.6264   \\ 
                         & Site 5            & 0.9510  & 0.8999  & 0.8821 & 0.8426   \\ 
                         & Site 6             & 0.9312 & 0.8439  & 0.7716 & 0.9622   \\ 
\bm{$\alpha$}\textbf{=0.05}         & FL                 & 0.9620  & 0.9247  & 0.9083 & 0.8887   \\ 
                         & FL($z$=0.1)          & 0.9633 & 0.9248   & 0.9089 & 0.8855  \\ 
                         & FCL($\mu$=0.1)       & 0.9626 & 0.9260    & 0.9096 & 0.8936   \\ 
                         & FCL($\mu$=0.1,$z$=0.1) & \textbf{0.9635} & 0.9256   & 0.9099 & 0.8859   \\ 
                         & Centralized        & 0.9680  & 0.9291   & 0.9129 & 0.9022   \\ 

\hline
                         & Site 3           & 0.9402 & 0.8419   & 0.8273 & 0.7326   \\ 
                         & Site 4           & 0.9513 & 0.8177  & 0.8054 & 0.6965   \\ 
                         & Site 5           & 0.9487 & 0.9012   & 0.8838 & 0.8387   \\ 
                         & Site 6           & 0.9514 & 0.8830   & 0.8390  & 0.9555   \\ 
\bm{$\alpha$}\textbf{=0.1}              & FL               & 0.9691 & 0.9326   & 0.9179  & 0.8963   \\ 
                         & FL($z$=0.1)          & 0.9708 & 0.9304   & 0.9160  & 0.8876   \\ 
                         & FCL($\mu$=0.1)       & 0.9701 & 0.9343   & 0.9201  & 0.8976   \\ 
                         & FCL($\mu$=0.1,$z$=0.1) & \textbf{0.9715} & 0.9345   & 0.9204  & 0.8970\\ 
                         & Centralized        & 0.9762 & 0.9392   & 0.9251   & 0.9152   \\ 

\cline{2-6} 
\hline
                         & Site 3            & 0.9595 & 0.8583  & 0.8422 & 0.7566   \\ 
                         & Site 4             & 0.9436 & 0.8415  & 0.8269 & 0.7324  \\ 
                         & Site 5            & 0.9570  & 0.9176   & 0.8946 & 0.9257  \\ 
                         & Site 6            & 0.9566 & 0.9143   & 0.8898 & 0.9257   \\ 
\bm{$\alpha$}\textbf{=0.3}           & FL                 & 0.9725  & 0.9382   & 0.9245 & 0.9059   \\ 
                         & FL($z$=0.1)       & 0.9722 & 0.9341   & 0.9198  & 0.8977  \\ 
                         & FCL($\mu$=0.1)       & 0.9731  & 0.9420    & 0.9291 & 0.9099   \\ 
                         & FCL($\mu$=0.1, $z$=0.1) & \textbf{0.9743} & 0.9447   & 0.9318 & 0.9202   \\ 
                         & Centralized        & 0.9842 & 0.9511 & 0.9397 & 0.9265   \\ 
\hline
                         & Site 3            & 0.9522  & 0.8801   & 0.8634 & 0.7971  \\ 
                         & Site 4            & 0.9570  & 0.8934   & 0.8768 & 0.8202   \\ 
                         & Site 5            & 0.9572 & 0.8977   & 0.8596 & 0.9440   \\ 
                         & Site 6            & 0.9516  & 0.9144   & 0.8947 & 0.8873 \\ 
\bm{$\alpha$}\textbf{=0.5}              & FL               & 0.9671  & 0.9386   & 0.9242 & 0.9148   \\ 
                         & FL($z$=0.1)          & 0.9682 & 0.9357   & 0.9210 & 0.9087   \\ 
                         & FCL($\mu$=0.1)       & 0.9716 & 0.9435   & 0.9303 & 0.9201   \\ 
                         & FCL($\mu$=0.1,$z$=0.1) & \textbf{0.9718} & 0.9412   & 0.9269 & 0.9238   \\ 
                         & Centralized        & 0.9837 & 0.9540    & 0.9428 & 0.9371   \\
\bottomrule
\end{tabular}
\end{table}


\subsubsection{External datasets (DiagSet-A and QHD)}
WSIs can vary widely in morphological appearance due to differences in institutional standards and protocols for tissue processing, slide preparation, and digitization of pathological images. Therefore, it is important to generalize the model application to actual clinical data. We validate the robustness of the model using two external datasets. We found that models trained using federated learning on multiple institution data significantly improved the generalization performance of the models compared to models trained on single institution data. As seen in \textbf{Table \ref{tab4}}, taking $\alpha=0.5$ as an example (see Appendix \textbf{Table \ref{tab_s1}} for complete tables), both AUC and Acc are significantly improved in the diagnosis task. The average AUC of 7 clients is 95.59\% when the categories are relatively balanced, and our federated contrastive learning model achieves an AUC of 97.25\%. 

\begin{table}[!ht]
\renewcommand\arraystretch{1.1} 
		\setlength{\abovecaptionskip}{-0.1cm}   
		\setlength{\belowcaptionskip}{-1cm}
\centering
\caption{\label{tab4}The diagnostic model's performance on the test-1.1 (DiagSet-A) set was reported as a five-fold mean}
\begin{tabular}{ccccc} 
\toprule
                            &\textbf{AUC}   & \textbf{F1-score}  & \textbf{Acc}   & \textbf{Recall}    \\
\hline
                                 Site 0                & 0.9664 & 0.8888 & 0.8899 & 0.8281  \\
     
                                 Site 1                 & 0.9539 & 0.8742 & 0.8524 & 0.9647\\
                                 Site 2                  & 0.9544 & 0.7483 & 0.6440 & 0.9955\\ 
\hline
                                 Site 3                 & 0.9655 & 0.9027 & 0.9016 & 0.8590  \\
                                 Site 4                  & 0.9686 & 0.9045 & 0.9016 & 0.8766   \\
                                 Site 5                  & 0.9488 & 0.7174 & 0.5831  & 0.9955   \\
                                 Site 6                  & 0.9617 & 0.9193 & 0.9133 & 0.9295  \\
                                 FL                 & 0.9647 & 0.8957 & 0.8805  & 0.9647   \\
                                 FL($z$=0.1)          & 0.9661 & 0.9012 & 0.8875 & 0.9647  \\
                                 FCL($\mu$=0.1)       & \textbf{0.9718} & 0.8934 & 0.8782  & 0.9603  \\
                                 FCL($\mu$=0.1,$z$=0.1) & \textbf{0.9725} & 0.8915 & 0.8735 & 0.9779  \\
                                 Centralized        & 0.9697 & 0.9115 & 0.9086 & 0.8854  \\
\bottomrule
\end{tabular}
\end{table}

\subsection{Results of Gleason grading (Multiple classifications)}
Since there are relatively few datasets annotated with ISUP, we validate the performance of each local client model, FL model, FCL model, and centralized learning model on five internal datasets and an external dataset (NC).

\subsubsection{Internal datasets}
The experimental results on the validation set for the Gleason grading task are shown in \textbf{Table \ref{tab_6}}.
The increasing Kappa score and AUC trend in the Gleason grading task are also pronounced. Since there are six categories in the classification task (6-level classification, i.e., ISUP 0, 1, 2, 3, 4, 5), the uneven data distribution will have more impact on the model. The average Kappa of six clients (site: 0-5) is only 0.74, while the Kappa of the federated contrastive learning model reaches 0.85, an increase of 0.11. The advantages of federated learning are apparent when the number of data categories is more extensive and the degree of data imbalance is greater.


\begin{table}[!ht]
\renewcommand\arraystretch{1.1}	
		\setlength{\abovecaptionskip}{-0.1cm}   
		\setlength{\belowcaptionskip}{0.1cm}
\renewcommand\arraystretch{1.2}		
\caption{\label{tab_6}The Gleason grading model's performance on the validation set  was reported as a five-fold mean}
\centering
\begin{tabular}{ccccc}
\toprule
                        & \textbf{AUC}    & \textbf{F1-score}   & \textbf{Recall}  & \textbf{Kappa}   \\ \hline
Site 0                  & 0.7679 & 0.3699  & 0.4589  & 0.6491  \\
Site 1                  & 0.7989 & 0.4787  & 0.5040  & 0.6977  \\
Site 2                  & 0.8866 & 0.6176  & 0.6367  & 0.8094  \\
Site 3                  & 0.8716 & 0.5476  & 0.5772  & 0.7531  \\
Site 4                  & 0.8748 & 0.6007  & 0.6218  & 0.7633  \\
Site 5                  & 0.8684 & 0.5794  & 0.6122  & 0.7552  \\
FL                      & 0.9212 & 0.7158  & 0.7197  & 0.8494  \\
FL($z$=0.1)           & 0.9136 & 0.6877  & 0.6951  & 0.8444  \\
FCL($\mu$=0.1)          & \textbf{0.9214}  & 0.7201  & 0.7251  & \textbf{0.8535}  \\
FCL($\mu$=0.1, $z$=0.1) & 0.9126 & 0.6892   & 0.6969  & 0.8463  \\
Centralized             & 0.9373  & 0.7490   & 0.7515  & 0.8779  \\
\bottomrule
\end{tabular}
\end{table}

\begin{table}[!ht]
\renewcommand\arraystretch{1.1} 
		\setlength{\abovecaptionskip}{-0.1cm}  
		\setlength{\belowcaptionskip}{0 cm}
\caption{\label{tab_7}The Gleason grading model's performance on the test-2(NC) set  was reported as a five-fold mean}
\centering
\begin{tabular}{ccccc}
\toprule
                   &\textbf{AUC}    & \textbf{F1-score}   & \textbf{Recall}  & \textbf{Kappa}         \\
\hline
Site 0                  & 0.7540 & 0.3107 & 0.3581 & 0.5494  \\
Site 1                  & 0.7862 & 0.3652 & 0.3977 & 0.6142  \\
Site 2                  & 0.8259 & 0.4525 & 0.4954 & 0.7052  \\
Site 3                  & 0.8423 & 0.3242 & 0.3794 & 0.6346  \\
Site 4                  & 0.8186 & 0.3648 & 0.4292 & 0.6649  \\
Site 5                  & 0.8307 & 0.3326 & 0.4374 & 0.6936  \\
FL                      & 0.8435 & 0.4552 & 0.4954 & 0.7247  \\
FL($z$=0.1)             & 0.8513 & 0.4448 & 0.4944 & 0.7227  \\
FCL($\mu$=0.1)          & 0.8451 & 0.4403 & 0.4883 & \textbf{0.7298}\\
FCL($\mu$=0.1, $z$=0.1) & \textbf{0.8521} & 0.4376 & 0.4842 & \textbf{0.7342}  \\
Centralized             & 0.8365 & 0.4301 & 0.4638 & 0.7171  \\
\bottomrule
\end{tabular}
\end{table}


\begin{figure*}[!ht]
    \setlength{\abovecaptionskip}{0cm} 
    \setlength{\belowcaptionskip}{0cm} 
\centering 
\includegraphics[width=1\textwidth]{heatmap_compressed.pdf} 
\caption{Interpretability and visualization of federated contrast learning models. For randomly selected WSIs in both test sets, attentional heatmaps were generated using a model trained with federated learning of contrast attention-preserving privacy ($z$ = 0.1) at 20x magnification using $224 \times 224$ sized tissue blocks with 90\% spatial overlap. For each WSI, the attention scores of all patches predicted in the slides were transformed into percentiles, normalized to the range [0,1].}
\label{Fig.2}
\vspace{-0.3cm}
\end{figure*}

\subsubsection{External datasets (NC)}
The Kappa score is significantly improved on the Gleason grading task as seen in \textbf{Table \ref{tab_7}}. The average Kappa score of 6 clients in the Gleason grading task is 0.6437, and the Kappa score of the FCL reaches 0.7342. The Kappa of FL (Kappa=0.7247, 0.7227) and FCL (Kappa=0.7298, 0.7342) are even better than the centralized learning model (Kappa=0.7171).
After adding the inter-model attention comparison mechanism, the model's performance is better than that of the FL model. For example, FCL ($\mu$=0.1) improves the Gleason grading task by 0.5\% AUC and 0.5\%-1\% Kappa score over the FL model.


\subsection{Interpretability and Whole Slide Attention Visualization}
To validate and explain the ability of the proposed model to learn the morphological features of prostate cancer, we randomly selected WSIs from the test set. In addition, we generated heatmaps using the training stored model.
The heatmaps are shown in \textbf{Fig. \ref{Fig.2}}.
This is done by using a patch size of $224 \times 224$ and generating a heatmap based on an overlay of 90\%. Each patch's attention score is normalized to be between [0,1]. The patches with high attention scores correspond to image regions with high diagnostic relevance. Finally, RGB color maps (red: high attention, blue: low attention) were applied, and the heatmap was overlaid on the original WSIs display. We randomly selected WSIs in each of the two external datasets; the first row shows the results from DiagSet-A, and the second row shows the results from QHD. From left to right are the whole WSI, the heatmap of the entire WSI, the local patched image, and the heatmap of the patched image, respectively. Finally, the zoomed-in local patch image shows that our model can accurately identify and represent the cancer region.


\section{Conclusion and discussion}

Federated learning brings dawn to solve existing problems in the medical field through multiple clients collaboratively training network models without sharing original data.
There currently need to be more problems with using healthcare data sets. On the one hand, medical data are often scattered in various places and difficult to be shared because of their sensitivity. On the other hand, the amount of data for some rare diseases is so tiny that the dataset from a single medical institution often needs to meet the demand for AI model training. In addition, collaboration across regions or countries is becoming a trend in the context of global health. Further,  different countries often have unique laws and regulations related to data protection and are incredibly restricted in sharing original data. 

In this work, we apply federated learning to the diagnosis and Gleason grading of prostate pathology images, using prostate datasets from multiple hospitals, and validate the effectiveness of the federated learning model on the diagnosis and grading tasks. To address the existing problems with federated learning, we have made further improvements by using model attention comparison to improve the consistency between the server and client models, resulting in enhanced robustness and accuracy of the trained models. To avoid malicious clients learning to infer other clients' data from the model training process and to protect the privacy of model builders and data providers, we also add noise to the model using differential privacy to strike a balance between privacy protection and model performance.

In the future, we would like to apply federated learning medical diagnosis tasks to more medical scenarios. For example, it will play a role in collaborating with medical institutions across regions and applying federated learning to pathology image tasks and the global intelligent process of rare disease diagnosis. In addition, since this work was carried out in a simulation scenario, the issue of communication efficiency can be considered in a natural system in the future. In a federated learning environment, the training data is still distributed over many clients, each with unreliable and relatively slow network connections. Only by dealing with the problems of federated learning in terms of privacy, security, and communication efficiency can we bring more progress to the healthcare business.


\section*{Ethics approval and consent to participate}
The Research Ethics Committee of The Fourth Hospital of Hebei Medical University, China, approved this study.


\section*{Appendix}
\begin{table}[!ht]
\renewcommand\arraystretch{1}	
		\setlength{\abovecaptionskip}{-0.1cm}   
		\setlength{\belowcaptionskip}{0.1cm}
\setcounter{table}{0}
\renewcommand{\thetable}{S\arabic{table}} 
\caption{\label{tab_s1}The diagnostic model's performance on the  the test-1.1 set(DiagSet-A) was reported as a five-fold mean}
\centering

\setlength{\tabcolsep}{6pt}
{
\begin{tabular}{cccccc}

\toprule
              &            & \textbf{AUC}    & \textbf{F1-score}  & \textbf{Acc}  &\textbf{Recall}    \\ \hline
              & Site 0     & 0.9664 & 0.8888 & 0.8899 & 0.8281  \\
   /          & Site 1     & 0.9539 & 0.8742 & 0.8524 & 0.9647  \\
              & Site 2     & 0.9544 & 0.7483 & 0.6440 & 0.9955  \\ 
\hline
              & Site 3     & 0.9579 & 0.8134 & 0.8313 & 0.6916  \\
              & Site 4     & 0.9628 & 0.8888 & 0.8899 & 0.8281  \\
              & Site 5     & 0.9474 & 0.8741 & 0.8711 & 0.8414  \\
              & Site 6     & 0.9596 & 0.6964 & 0.5386 & 0.9955  \\
$\alpha$=0.05 & FL         & 0.9635 & 0.9079 & 0.8969 & 0.9559  \\
              & FL($z$=0.1)           & 0.9632 & 0.9156 & 0.9063 & 0.9559  \\
              & FCL($\mu$==0.1)       & 0.9666 & 0.9188 & 0.9110 & 0.9471  \\
              & FCL($\mu$==0.1,$z$=0.1) & \textbf{0.9674} & 0.9148 & 0.9063 & 0.9471  \\
              & Centralized             & 0.9670 & 0.9082 & 0.9063 & 0.8722  \\ 
\hline 
              & Site 3        & 0.9605 & 0.8940 & 0.8922 & 0.8546  \\
              & Site 4        & 0.9637 & 0.8737 & 0.8782 & 0.7929  \\
              & Site 5        & 0.9498 & 0.9126 & 0.9063 & 0.9207  \\
              & Site 6        & 0.9572 & 0.8712 & 0.8477 & 0.9691  \\
$\alpha$=0.1  & FL            & 0.9648 & 0.9204 & 0.9133 & 0.9427  \\
              & FL($z$=0.1)   & 0.9651 & 0.9135 & 0.9063 & 0.9251   \\
              & FCL($\mu$==0.1)         & 0.9678   & 0.9091    & 0.9016  & 0.9251                 \\
              & FCL($\mu$==0.1,$z$=0.1) & \textbf{0.9687} & 0.9164    & 0.9086   & 0.9427          \\
              & Centralized         m   & 0.9631   & 0.8619    & 0.8665  & 0.7841                 \\ 
\hline
              & Site 3        & 0.9663     & 0.9062    & 0.9016     & 0.8942                 \\
              & Site 4        & 0.9684     & 0.8803    & 0.8829     & 0.8105                 \\
              & Site 5        & 0.9541     & 0.8457    & 0.8103     & 0.9779                 \\
              & Site 6        & 0.9614     & 0.8912    & 0.8782     & 0.9383                 \\
$\alpha$=0.3  & FL            & 0.9651     & 0.8972    & 0.8852     & 0.9427                 \\
              & FL($z$=0.1)   & 0.9664     & 0.9121    & 0.9016     & 0.9603                 \\
              & FCL($\mu$==0.1) & 0.9710   & 0.9048    & 0.8946     & 0.9427                 \\
              & FCL($\mu$==0.1,$z$=0.1) & \textbf{0.9741} & 0.9063  & 0.8969    & 0.9383      \\
              & Centralized     & 0.9712   & 0.9162    & 0.9110     & 0.9162  \\ 
\hline 
              & Site 3        & 0.9655   & 0.9027    & 0.9016  & 0.8590                 \\
              & Site 4        & 0.9686   & 0.9045    & 0.9016  & 0.8766                 \\
              & Site 5        & 0.9488   & 0.7174    & 0.5831  & 0.9955                 \\
              & Site 6        & 0.9617   & 0.9193    & 0.9133  & 0.9295                 \\
$\alpha$=0.5  & FL            & 0.9647   & 0.8957    & 0.8805  & 0.9647                 \\
              & FL($z$=0.1)   & 0.9661   & 0.9012    & 0.8875  & 0.9647                 \\
              & FCL($\mu$==0.1)     & 0.9718         & 0.8934   & 0.8782    & 0.9603    \\
              & FCL($\mu$==0.1,$z$=0.1) & \textbf{0.9725} & 0.8915    & 0.8735     & 0.9779            \\
              & Centralized         & 0.9697         & 0.9115   & 0.9086    & 0.8854         \\
\bottomrule
\end{tabular}
}
\end{table}

\begin{table}[!ht]
\renewcommand\arraystretch{1}	
		\setlength{\abovecaptionskip}{-0.1cm} 
		\setlength{\belowcaptionskip}{0.1cm}
\renewcommand{\thetable}{S\arabic{table}}  
\caption{\label{tab_s2}The diagnostic model's performance on the  the test-1.2 set(QHD) was reported as a five-fold mean}
\centering
\begin{tabular}{cccccc} 
\toprule
       &        & \textbf{AUC}  & \textbf{F1-score}  & \textbf{Acc}  & \textbf{Recall}          \\ 
\hline
                  & Site 0      & 0.9636       & 0.9204      & 0.9150           & 0.8683        \\
 /                & Site 1      & 0.9805       & 0.8914      & 0.8653           & 0.9769        \\
                  & Site 2      & 0.9731       & 0.8201      & 0.7568           & 0.9792        \\ 
\hline
                  & Site 3     & 0.9727       & 0.8274       & 0.8326           & 0.7090         \\
                  & Site 4     & 0.9734       & 0.8769       & 0.8745           & 0.7898         \\
                  & Site 5     & 0.9769       & 0.8259       & 0.8313           & 0.7066         \\
                  & Site 6     & 0.9838       & 0.7234       & 0.5673           & 1.0000         \\
$\alpha$=0.05     & FL         & 0.9795       & 0.9439       & 0.9346           & 0.9722         \\
                  & FL(z=0.1)  & 0.9804       & 0.9491       & 0.9411           & 0.9699          \\
                  & FCL($\mu$=0.1)       & \textbf{0.9825}   & 0.9461   & 0.9372    & 0.9722      \\
                  & FCL($\mu$=0.1,z=0.1) & 0.9824            & 0.9379   & 0.9267    & 0.9769      \\
                  & Centralized          & 0.9788            & 0.9467   & 0.9385    & 0.9653       \\ 
\hline  
                  & Site 3        & 0.9718     & 0.9268      & 0.9215      & 0.8775              \\
                  & Site 4        & 0.9736     & 0.8866      & 0.8836      & 0.8036              \\
                  & Site 5        & 0.9766     & 0.9407      & 0.9333      & 0.9353               \\
                  & Site 6        & 0.9778     & 0.7487      & 0.6209      & 0.9976               \\
$\alpha$=0.1      & FL            & 0.9775     & 0.9426      & 0.9333      & 0.9676                \\
                  & FL(z=0.1)     & 0.9782     & 0.9553      & 0.949       & 0.9630                 \\
                  & FCL($\mu$=0.1)  & 0.9758   & 0.9486      & 0.9411      & 0.9607                  \\
                  & FCL($\mu$=0.1,z=0.1) & \textbf{0.9766}   & 0.9466      & 0.9385    & 0.9630      \\
                  & Centralized          & 0.9731            & 0.9477      & 0.9398    & 0.9630       \\ 
\hline  
                  & Site 3       & 0.9761     & 0.9247       & 0.9202      & 0.8661                 \\
                  & Site 4       & 0.9773     & 0.8953       & 0.8915      & 0.8198                 \\
                  & Site 5       & 0.9727     & 0.8782       & 0.8471      & 0.9745                 \\
                  & Site 6       & 0.9785     & 0.9442       & 0.9359      & 0.9584                 \\
$\alpha$=0.3      & FL           & 0.9788     & 0.9523       & 0.9451      & 0.9699                 \\
                  & FL(z=0.1)    & 0.9789     & 0.9490       & 0.9411      & 0.9676                 \\
                  & FCL($\mu$=0.1)   & \textbf{0.9801}  & 0.9500       & 0.9424      & 0.9653                 \\
                  & FCL($\mu$=0.1,z=0.1) & 0.9792       & 0.9239       & 0.9098      & 0.9676                 \\
                  & Centralized          & 0.9802       & 0.9501       & 0.9424      & 0.9676                 \\ 
\hline
                 & Site 3      & 0.9761        & 0.9129      & 0.9084    & 0.8475                 \\
                 & Site 4      & 0.9765        & 0.9323      & 0.9267    & 0.8914                 \\
                 & Site 5      & 0.9722        & 0.7386      & 0.6013    & 0.9953                 \\
                 & Site 6      & 0.9776        & 0.9512      & 0.9450    & 0.9468                 \\
$\alpha$=0.5     & FL          & 0.9765        & 0.9522      & 0.9451    & 0.9676                 \\
                 & FL(z=0.1)   & 0.9783        & 0.9478      & 0.9398    & 0.9653                 \\
                 & FCL($\mu$=0.1)  & \textbf{0.9796} & 0.9457    & 0.9372   & 0.9653                 \\
                 & FCL($\mu$=0.1,z=0.1) & 0.9762     & 0.9170    & 0.9006   & 0.9699                 \\
                 & Centralized          & 0.9766     & 0.9532    & 0.9464   & 0.9653                 \\
\bottomrule
\end{tabular}
\end{table}

\bibliographystyle{IEEEtran}
