## 3 Federated Learning for Space-Air-Ground Integrated Networks
### Privacy-Preserving Federated Learning
#### 3.5.3 Global Model Aggregation at the Central Server
\(\theta_{\text{max}}\) and \(\theta_{\text{min}}\) are the set maximum and minimum values allowed for model updates, which are determined by calculating the standard deviation of all device-uploaded model updates. Assuming that the model \(\theta_{\text{local},k}\) uploaded by each device has a certain distribution range, a reasonable clipping range can be defined by calculating the standard deviation of the model parameters, specifically expressed as follows:  
\[\sigma=\sqrt{\frac{1}{K}\sum\limits_{k=1}^{K}\left\|\theta_{\text{local},k}- \theta_{\text{avg}}\right\|_{2}^{2}} \tag{53}\]  
where \(K\) is the number of edge devices participating in aggregation, \(\theta_{\text{local},k}\) represents the local model update uploaded by device \(k\), \(\theta_{\text{avg}}\) is the weighted average of all model updates uploaded by devices participating in federated learning, and \(\|\cdot\|_{2}\) represents the Euclidean distance. The minimum value allowed for model updates \(\theta_{\text{min}}\) is set as follows:  
\[\theta_{\text{min}}=\theta_{\text{avg}}-3\sigma \tag{54}\]  
The maximum value allowed for model updates \(\theta_{\text{max}}\) is set as follows:  
\[\theta_{\text{max}}=\theta_{\text{avg}}+3\sigma \tag{55}\]  
Here, three times the standard deviation is used as the upper and lower limits. Based on statistical principles, assuming that model updates follow a normal distribution, three times the standard deviation covers most reasonable model updates. Considering that in typical situations, some edge nodes may be anomalous while others are not, to facilitate global model aggregation, \(\theta_{\text{local},k}\) is used to represent the unified local model update of edge nodes, specifically expressed as follows:  
\[\theta_{\text{local},k}\)\({}^{\prime}= \begin{cases}\theta_{\text{local},k}^{\text{trimmed}},&\text{if }\mathcal{A}(\theta_{\text{local},k})=1\\ \theta_{\text{local},k},&\text{otherwise}\end{cases}  \tag{56}\]  
In privacy-preserving federated learning for integrated space-air-ground integrated networks, the weight \(w_{k}\) of edge node \(k\) is used to measure the importance or contribution of each edge node in global model aggregation. Weight calculation primarily depends on the device's data volume and priority, ensuring that devices with better network quality and larger data volumes can make greater contributions to the global model update during model aggregation. The calculation formula for \(w_{k}\) is as follows:  
\[w_{k}=\frac{P_{\text{priority},k}\cdot n_{k}}{\sum\limits_{i=1}^{K}P_{\text{ priority},i}\cdot n_{i}+\epsilon_{w}} \tag{57}\]  
where \(K\) is the number of edge devices participating in aggregation, \(n_{k}\) represents the data volume uploaded by edge node \(k\), \(\epsilon_{w}\) is a small constant used to prevent division-by-zero errors, and \(P_{\text{priority},k}\) represents the upload priority of edge node \(k\). The calculation of priority \(P_{\text{priority},k}\) depends more on the device's network stability, latency, and data volume, with the calculation formula as follows:  
\[P_{\text{priority},k}=\frac{n_{k}\cdot(1-p_{k}^{\text{loss}})}{d_{k}+ \epsilon_{P}} \tag{58}\]  
where \(n_{k}\) represents the data volume uploaded by device \(k\), which is the size of the model update uploaded by that device. \(p_{k}^{\text{loss}}\) is the packet loss rate of device \(k\), indicating the quality of the network connection between the device and the edge node. \(d_{k}\) representsthe communication delay between device \(k\) and the central server, and \(\epsilon_{P}\) is a constant to prevent division by zero. In privacy-preserving federated learning for integrated space-air-ground integrated networks, global model aggregation is the core step of the entire federated learning process. The purpose of global aggregation is to aggregate local model updates uploaded from various devices into a global model for use in the next round of training. Global model aggregation weights the local updates of each device according to its contribution.