## 4 Discussion
### Federated Learning Overview  
FL is a technique to develop a robust quality shared global model with a central aggregate server from isolated data among many different clients. In a healthcare application scenario, assume there are \(K\) nodes where each node \(k\) holds its respective data \(\mathcal{D}_{k}\) with \(n_{k}\) total number of samples. These nodes could be a healthcare wearable device, an internet of health things (IoHT) sensor, or a medical institution data warehouse. The FL objective is to minimize loss function given total data \(n=\sum_{k=1}^{K}n_{k}\) and trainable machine learning weight vectors with \(d\) parameters \(w\in R^{d}\) using Equation (1):  
\[\min_{w\in R^{d}}F(w)=\sum_{k=1}^{K}\frac{n_{k}}{n}F_{k}(w)\text{ where }F_{k}(w)=\frac{1}{n_{k}}\sum_{x_{i}\in\mathcal{D}_{k}}f_{i}(w) \tag{1}\]  
where \(f_{i}(w)=\updownarrow(x_{i},y_{i};w)\) denotes the loss of the machine learning model made with parameter \(w\). For instance, [PERSON] et al. [19] used the categorical cross-entropy loss function to update the model parameters on the binary classification of patient mortality. In addition, [PERSON] et al. [53] used the soft dice loss function for the COVID-19 region segmentation application. In 2016, the basic concept of data parallelism in FL namely federated averaging (FedAvg) algorithm, was introduced by [PERSON] et al. [16]. As stated in the FedAvg algorithm, every communication round \(t\) consists of four phases. Firstly, the aggregate server initializes a global model with initial weights \(w_{t}^{g}\), then shared with a group of clients \(S_{t}\) (medical nodes in our case), which was picked randomly with a fraction of \(C\in\{0,1\}\). Secondly, each client \(k\in S_{t}\), after received a global model \(w_{t}^{g}\) from the server, the client conducts local training steps with epoch \(E\) on minibatch \(b\in B\) of \(n_{k}\) private data points. The local model parameters are updated with local learning rate \(\eta\) and optimized by minimizing loss function \(\mathcal{L}(.)\). Thirdly, once client training is completed, the client \(k\) sends back its local model \(w_{t+1}^{k}\) to the server. Finally, after receiving the local model \(w_{t+1}^{k}\) from all selected groups of clients \(S_{t}\), the aggregate server updates the global model \(w_{t+1}^{g}\) by averaging of local model parameters using Equation (2):  
\[w_{t+1}^{g}\leftarrow\sum_{k=1}^{K}\alpha_{k}\times w_{t+1}^{k} \tag{2}\]  
where \(\alpha_{k}\) is a weighting coefficient to indicate the relative influence of each node \(k\) on the updating function in the global model, and \(K\) is the total nodes that participated in the training process. Choosing the proper weighting coefficient \(\alpha_{k}\) in the averaging function can help improve the global model's performance (as discussed in Section 4.3.2 non-IID mitigation methods). The entire FL procedure is described in Algorithm 1. FL has differentiated from the standard collaborative learning in the following properties: (1) training is carried out across a vast number of many client nodes, and communication speed between the client nodes and the aggregate server is slow; (2) the central aggregate server does not have a control to individual nodes or devices, and full participation of all nodes is unrealistic because there are inaccurate devices that do not respond to the server; (3) in real-world case scenario, data distribution is nonindependent and identically distributed (non-IID). Non-IID data distribution means that each node has a different distribution pattern from the other node. These properties are shown when the first proposed of FL algorithm is applied for mobile keyboard prediction [16; 17]. However, these properties are different when FL is implemented in the healthcare area. First, the FL training is carried out across a limited number of healthcare nodes from 2 to 100 as listed in Table 2, and communication speed between healthcare participants and the aggregate server is usually reliable.