## 2 Background
### Federated Learning  
An FL approach for iterative model averaging, known as FedAvg, was proposed in [35]. FedAvg operates using a subset of clients rather than the entire network. Each client trains its model on local data and sends the model update to a centralized server, avoiding the need to transmit raw data. The server then aggregates the received model updates through averaging to create a new global model. This process is repeated for several rounds until the convergence criterion is met. While FedAvg decreases the data shared compared to traditional centralized approaches, it still incurs significant communication costs, as multiple rounds are required to reach consensus. Local updates may also cause FedAvg to drift from the solutions of the global objective [43; 44; 45; 46; 47]. Furthermore, FedAvg faces scalability challenges and may struggle to adapt to the dynamic conditions of IoT networks. Finally, its reliance on the standard arithmetic mean for model aggregation makes it vulnerable to corruption and outliers [48; 49]. An FL scenario for an IoT network comprises \(N\) nodes (device) and a centralized location for final processing--a base-station or sink node. FL can be mathematically formulated as a distributed optimization problem for the global loss function \(f_{FL}\), where \(\frac{min}{\omega}\)\(\frac{1}{k}\sum_{n=1}^{N}\sum_{k=1}^{k_{n}}f_{k}(\omega)\), among which \(\omega\) is the global model weights and total data points stored in each device, respectively. FedAvg is being chosen to showcase the FL mathematical model [35]. As described earlier, FedAvg is based in principle on averaging the local stochastic gradient decent (SGD), as shown in Algorithm 1[35]. The server chooses a subset of nodes to participate in the process and distributes the recent model to the all selected nodes. Each node updates its own local model upon receiving the global model from the server and performs the SGD Algorithm. The nodes forward their updated local model to the server, and subsequently, the server develops new global models by calculating a weighted total of all obtained local models [49]. In the beginning, the global model (\(\omega_{0}\)) is initialized. In each round (\(t\)), nodes are randomly selected by the server by controlling the fraction of clients (\(C\)) on each round to form a subset (\(S_{t}\)), and the current global model \(\omega_{t}\) is distributed to all nodes in \(S_{t}\). All selected nodes in \(S_{t}\) operate in parallel, where each node updates its own local model with the shared model \(\omega_{t}^{k}\leftarrow\omega_{t}\). In parallel, each node computes its local gradient of descent, as shown in Algorithm 1, step 13. Clients communicate their local mode \(\omega_{t+1}^{k}\) to the server, whereby the server then computes the weighted sum of all received local models to generate the new global model \(\omega_{t+1}\). ```
1:Aggregation Server
2:Initialize \(\omega_{0}\)
3:for each round \(t\)=1,2...do
4:for each round \(t\)=1,2...do
5:\(\omega^{t}\leftarrow\) ClientUpdate(\(i\),\(\omega_{t}\))
6:\(\omega_{t+1}\leftarrow\sum_{i=1}^{n}\omega_{t+1}\)
7:endfor
8:endfor
9:ClientUpdate(\(i\),\(\omega\)): //Run on client \(i\)
10:for each local epoch \(e\) from \(0\),...,\(E-1\)do
11:for each minibatch \(b\) of size \(B\)do
12:\(\omega_{e+1}\leftarrow\omega_{e}-\eta\
abla f_{i}(\omega_{e}\),\(b)\)
13:endfor
14:endfor
15:return \(\omega_{e}\) to server
```  
**Algorithm 1** FedAvg Algorithm. In [50], the authors propose federated proximal (FedProx), a weighted aggregation approach that enhances robustness and efficiency in managing the heterogeneity of IoT devices. FedProx incorporates a proximal regularization term into the objective function, which penalizes deviations from the global model. This encourages local updates to remain close to the global model while still adapting to local data. However, FedProx has several limitations, including the following:  
* **Increased Complexity**: the computational of proximal terms can lead to longer training durations.