# Federated Learning and Its Role in the Privacy Preservation of IoT Devices
## 5 Roles of FL in Privacy-Preserving
### Learning at the Edge with Federated Computing  
A high-performance application has resulted from the association of FL with edge computing. Edge and cloud computing can meet the demand for cloud capacity and facilities at the network's edge. In this context, FL has observed the introduction of a 4G/5G edge computing platform for vehicles [115]. This model results from a federated investigation of real-world datasets from significant electric vehicle (EV) manufacturers. Customization for the driver, asynchronous performance, and safety protection are all benefits of this strategy. Moreover, using Smart IoT in custom-made FL will minimize the adverse effects of heterogeneity in many ways. At the same time, the FL-based frameworks should efficiently utilize the limited bandwidth. At the same time, the authors need to integrate DL methods with FL frames and mobile device programs. This will make mobile edge computing more efficient. In distributed training, the existing FL startup mode accepts processing points to coordinate a local training prototype. This result is in the formation of FL, which depends on the most focused types and the maximum bandwidth of the server. However, participants transmit user information immediately to the cloud, posing a risk of privacy violations. Consequently, like decentralized training, federated training requires participants and servers to work together to train a single machine learning algorithm. Every participant has exchanged local measurements with the central service that gathers all distributions and provides the outcomes to every other participant to accelerate the model's optimization. In the end, the service where every user would have the best service specifications is used. Compared to centrally controlled training, federated training eliminates the chance of privacy issues becoming violated. FL focuses on the problem of supervised machine learning, mapping input data \(U_{i}\) to output labels \(V_{i}\). The input-output (\(U_{i}\), \(V_{i}\)) pair size is (\(n\), \(n+1\)). For the loss function \(f_{i}(L)\), which assesses how well a model predicts an ith sample using model \(L\), FL tries to optimize using the following objective function. \(\text{Min}\,f(L)\), where  
\[f(L)=\frac{1}{n}\sum\limits_{i=1}^{n}f(U_{i},V_{i},\ L)\] \[f(L)=\frac{1}{n}f_{i}(L)\]  
It is necessary to alter the objective function because the training data are scattered over several remote clients, much like in FL. It is known as \(\left\lvert\,\,\,\right\rvert\) when a client k receives a partition from the whole dataset \(P\). \(nk=\left\lvert\,\,\,\right\rvert\) data samples are held by each of the \(K\) clients participating in the FL. \[f(L)=\sum\limits_{i=1}^{k}\frac{nk}{n}Pk(L)\]  
where  
\[Pk(L)=\frac{1}{nk}\sum\limits_{i=1}^{k}f_{i}(L)\]  
In Fl, there are two distinct phases of existence. There are epochs at the local and global levels. As opposed to how often the training algorithm is executed in a client's dataset, the number of times a whole federated round is completed is known as a global epoch. The server sends all clients a baseline model (abbreviated as w) to begin training. Each client's model is updated using their local data and it is trained for local epochs. As a result, \(L\), a client model, will receive and communicate modifications to the server. Based on the sample size, the server computes the weighted average of client updates for the next training cycle. Globally federated Fed Averaging will have completed one round. Because it would be costly to communicate each client's gradient update for each round of training, local epoch training is used to reduce communication costs on the client's side. As a decentralized machine learning solution, FL is often referred to as a decentralized training system. On the other hand, network power distribution between nodes is very similar to that of the data center. The author of [116] proposes that the bandwidth between sites can increase the communication speed. It starts by sharing gossip and network bandwidth information.