# Towards Mobile Federated Learning with Unreliable Participants and Selective Aggregation
## 2 Background and Related Work  
The federated learning concept aims to build a machine learning model based on data distributed across multiple sites [10]. It offers clients the ability to collaboratively train a common model without sharing personal data stored on their devices [8,11]. FL consists of two processes: model training and model inference. Typically, in an FL framework there are two main players: clients/workers/parties who contribute to the training of the model, and the server where the aggregation and update of the global model is performed. Thus, model training consists of sharing information between the workers and the server. However, the training data can never be shared. On the other hand, during the inference phase, the model is trained based on new data. Lastly, FL provides a mechanism to distribute the benefit of the whole process through all the collaborative parties. As described in [11,12], FL is a framework for building ML models that can be characterized by the following features:  
* Two or more parties are interested in jointly creating an ML model. Each party has some data that will be used as input to train the model;
* It is imperative that during model training, the data kept by each party never leave that party;
* The locally trained model can be partially transferred from one party to another under an encryption scheme, so that other parties cannot reproduce the training data of a particular party;
* Theoretically, the performance of the resulting model is a reasonable approximation of an ideal ML model built using data from all parties. More technically, let \(\mathcal{N}=\{1,\dots,N\}\) be the set of \(N\) parties, each of which has a private dataset \(D_{i\in\mathcal{N}}\). Each data owner \(i\) uses its dataset \(D_{i}\) to train a local model \(w_{i}\). The local model parameters are then forwarded to the FL server. All collected local model parameters \(\mathbf{w}=\cup_{i\in\mathcal{N}}\mathbf{w}_{i}\) are then aggregated to create a global model \(W_{G}\)[13]. The conventional architecture of an FL system is illustrated in Figure 3. In that system, the parties jointly train an ML model with the assistance of an aggregate server. It is assumed that all parties involved in the process are trustworthy, which means that they use their private data to perform the training and pass the locally obtained model parameters to the FL server in each training round. Evidently, this assumption may not be practical, as discussed further ahead. Typically, the FL process involves the following three steps [13]. * Step 1 (task initialization): The FL server determines the training assignment, i.e., the application goal and the corresponding data requirements. Moreover, the server determines the hyperparameters of the global model and the training process. Finally, the server transmits the initialized global model \(\mathbf{w}_{G}^{0}\) to the selected parties. * Step 2 (local model training and update): Following the global model \(\mathbf{W}_{G}^{t}\), where \(t\) represents the current iteration index, each party individually uses its local data to update the local model parameters \(\mathbf{w}_{i}^{t}\). The purpose of a party \(i\) in iteration \(t\) is to find ideal parameters \(\mathbf{w}_{i}^{t}\) that minimize the loss function \(L(\mathbf{w}_{i}^{t})\), for example, \[\mathbf{w}_{i}^{t^{*}}=arg\min_{\mathbf{w}_{i}^{t}}L(\mathbf{w}_{i}^{t}).\] (1) Then, the local model parameters are sent to the FL server. Step 3 (global model aggregation and update): the FL server aggregates the local models received from all selected parties and sends the updated model parameters \(\mathbf{w}_{G}^{t+1}\) back to the participants. Steps 2-3 are repeated until the global loss function converges or a desired training accuracy is achieved, i.e.,  
\[L(\mathbf{w}_{G}^{t})=\frac{1}{N}\sum_{i=1}^{N}L(\mathbf{w}_{i}^{t}). \tag{2}\]  
The FL training process can be applied to several ML models using the stochastic gradient descent (SGD) method.