## 2 Background
### Federated Learning
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Feature** & **FedAvg** & **FedProx** & **FedBuff** \\ \hline Proposed by & [PERSON] et al., 2017 [35] & [PERSON] et al., 2020 [50] & [PERSON] et al., 2022 [51] \\ \hline \multirow{6}{*}{Short Description} & \multirow{6}{*}{\
\begin{tabular}{c} Averages local model \\ updates from clients to \\ train a global model. \\ \end{tabular} } & Modifies the optimization objective to handle non-IID data and client heterogeneity. Adds a proximal term to the objective to mitigate heterogeneity issues. & Introduces buffered aggregation to optimize communication and adapt to dynamic environments. Utilizes buffered aggregation to optimize communication and handle client variability. \\ \hline \multirow{6}{*}{
\begin{tabular}{c} Number of Rounds/Trips \\ \end{tabular} } & Moderate to high; struggles with non-IID data and slow convergence in heterogeneous setups. & Fewer rounds due to buffering mechanisms mitigating asynchronously and stragglers. & Similar to FedAvg; may slightly reduce rounds by addressing heterogeneity through regularization. \\ \hline \multirow{6}{*}{Accuracy} & High on IID data; decreases with non-IID data due to unbalanced contributions. & Improved over FedAvg in non-IID settings due to better synchronization. & Better than FedAvg for non-IID data; uses proximal terms to handle data heterogeneity effectively. \\ \hline \multirow{6}{*}{Scalability} & Scales well in ideal conditions but sensitive to communication and device heterogeneity. & Better scalability; asynchronous updates and buffering reduce overhead. & Similar to FedAvg; slightly more computation due to proximal term but handles heterogeneity better. \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of FedAvg, FedProx, and FedBuff federated learning algorithms. In comparison, FedProx, another federated learning method designed to handle data heterogeneity, stabilizes training by adding a proximal term to the loss function, penalizing updates that diverge too far from the global model. While FedProx generally requires more computational effort due to the proximal regularization, it improves accuracy in non-IID settings by providing a more stable convergence path. FedProx often reaches 50% or more accuracy in 300-350 rounds for non-IID data, making it slower than FedBuff but generally more stable in highly heterogeneous environments. Therefore, while FedBuff excels in communication efficiency, FedProx offers robustness to client and data heterogeneity at the cost of additional computational overhead. This study introduces an intermediate processing level where data are handled in-network at the cluster head level, aiming to reduce communication requirements and the number of rounds needed for convergence. As mentioned earlier, FL is a decentralized approach that emphasizes local data processing, enabling model updates to be exchanged among devices without sharing raw data [24]. FL operates on data that are often characterized as unbalanced, massively distributed, and non-IID [24]. Typically, FL training and recognition processes occur at two primary levels: the node level and the cloud level (or base-station level). Many studies emphasize the importance of enhancing edge (node-level) processing to decrease the number of communication rounds required [35; 52; 53]. In mesh ad-hoc network environments, where IoT devices can communicate with one another, leveraging in-network processing capabilities can further minimize the amount of data transmitted across the network, as demonstrated in this study.