## 4 Algorithms
### Global Aggregation and Cloud-Level Feedback  
Algorithm 3 illustrates the global aggregation process, wherein the server receives aggregated models, denoted as \(w_{e}\), along with metadata such as participation frequencies \(p_{e}\) and quality scores \(q_{e}\) from each edge node \(e\). While previous stages focus on handling local and edge-level variability, the global aggregation stage further refines the model by emphasizing reliability and quality across the entire network of participating edge nodes.  
The core of this process is the computation of a reliability score \(v_{e}\) for each edge node. Drawing upon established participation metrics \(p_{e}\) and quality indicators \(q_{e}\), the algorithm forms a weighted average where \(\beta\) controls the relative importance of participation frequency versus quality. Higher \(v_{e}\) values correspond to edge nodes that consistently contribute updates of higher quality or maintain stable and frequent participation. By weighting each edge node's aggregated model \(w_{e}\) by \(v_{e}\), the global model \(w_{global}\) becomes more robust to outliers and intermittent contributors, ultimately improving the convergence and generalization performance of the federated-learning system.  
```
1:Output: Global model \(w_{global}\), feedback for edge nodes \(\{v_{e}\}\)
2:Output: Global model \(w_{global}\)
3:\(w_{global}\gets 0\)
4:for each edge node \(e=1,\ldots,E\)do
5:\(v_{e}\leftarrow\beta p_{e}+(1-\beta)q_{e}\)
6:\(w_{global}\gets w_{global}+v_{e}w_{e}\)
7:endfor
8:\(w_{global}\leftarrow\frac{w_{global}}{\sum_{e=1}^{E}v_{e}}\)
9: Distribute \(w_{global}\) to all edge nodes
10: Send feedback \(v_{e}\) to edge nodes \(e\), including recommended adjustments for aggregation intervals and participation weight adjustments
```  
**Algorithm 3** Global Aggregation and Cloud-Level Feedback  
Upon completing the aggregation, the global model \(w_{global}\) is normalized by dividing by the sum of the weights \(\sum_{e=1}^{E}v_{e}\). This normalization ensures a stable reference scale for subsequent training rounds, making the global model both statistically meaningful and numerically well-conditioned. The refined global model is then disseminated back to the edge nodes, providing them with a synchronized, high-quality baseline from which to initiate subsequent local training rounds.  
In addition to redistributing \(w_{global}\), the central server also returns feedback \(v_{e}\) to each edge node. These feedback values, along with recommended adjustments for local parameters (such as aggregation intervals or participation weights), guide edge nodes in calibrating their local and asynchronous aggregation processes. This iterative feedback loop creates a positive cycle: as edge nodes refine their behavior and improve their contributions, the global model strengthens, providing better guidance and baselines for future local training. Over time, this dynamic process fosters a more stable, efficient, and high-performing federated-learning ecosystem.  
The computational complexity at this global stage primarily reflects the cost of decrypting the received aggregated models and performing weighted summations. Decryption overhead scales linearly with the number of edge nodes \(E\) and the model size \(L\), resulting in \(O(E\cdot L)\) complexity. The aggregation step itself--applying weights \(v_{e}\) and summing across \(E\) nodes--also incurs \(O(E\cdot L)\) operations. Space complexity remains on the order of \(O(L)\), as the server temporarily stores each model and associated metadata before integrating them into the global model. Overall, this complexity profile remains tractable for cloud-level servers, which typically have more abundant computational and storage resources than edge nodes or IoT devices.