## 3 Federated Learning for Space-Air-Ground Integrated Networks
### Privacy-Preserving Federated Learning
#### 3.5.3 Global Model Aggregation at the Central Server  
In privacy-preserving federated learning for integrated space-air-ground integrated networks, global aggregation at the central server is a critical step used to integrate local model updates from various edge nodes, resulting in a new global model. Before performing global aggregation, the central server receives local model updates from multiple edge nodes. These local updates are obtained after edge nodes aggregate the local model parameters uploaded from connected terminal devices (such as satellites, unmanned aerial vehicles, ground equipment, etc.). Prior to aggregation, the central server first performs anomaly detection on the received local models to ensure that anomalous updates do not excessively influence the global model. Anomalous updates typically originate from device failures, communication issues, or malicious behavior. The server determines whether an update is anomalous by detecting differences between the model update uploaded by each edge node and those from other nodes. The anomaly detection method \(\mathcal{A}(\theta_{\text{local},k})\) is expressed as follows:  
\[\mathcal{A}(\theta_{\text{local},k})= \begin{cases}1,&\text{if }\left\|\theta_{ \text{local},k}-\theta_{\text{avg}}\right\|_{2}>\epsilon_{\text{threshold}}\\ 0,&\text{otherwise}\end{cases}  \tag{50}\]  
where \(\mathcal{A}(\theta_{\text{local},k})\) indicates whether the model update from device \(k\) is anomalous. This value is binary, with 1 indicating that the device's model update is considered anomalous, and 0 indicating that the device's model update is normal. \(\theta_{\text{local},k}\) represents the local model update uploaded by device \(k\). \(\|\cdot\|_{2}\) represents the Euclidean distance, measuring the degree of difference between the local model update \(\theta_{\text{local},k}\) from device \(k\) and the global average model update \(\theta_{\text{avg}}\). This distance measures the degree to which the local update deviates from the global model; the larger it is, the more likely the model update uploaded by the device is anomalous. \(\epsilon_{\text{threshold}}\) is the anomaly detection threshold, used to determine whether a model update deviates beyond the acceptable range from the global model. \(\theta_{\text{avg}}\) is the weighted average of all model updates uploaded by devices participating in federated learning. This value serves as a reference benchmark for the global model and as a basis for determining whether a device's model update is anomalous. The calculation formula for \(\theta_{\text{avg}}\) is as follows:  
\[\theta_{\text{avg}}=\frac{1}{K}\sum_{k=1}^{K}\theta_{\text{local},k} \tag{51}\]  
where \(K\) is the number of devices participating in the aggregation. Once anomalies are detected, the central server employs robust aggregation techniques to handle anomalous updates. Compared to the weighted average method, the clipping method can effectively prevent anomalous updates from affecting the global model, especially when there are significant differences in model updates, thereby ensuring the robustness of the global model. The model anomaly update processing based on the clipping method is expressed as follows:  
\[\theta_{\text{local},k}^{\text{trimmed}}=\text{clip}(\theta_{\text{local},k},\theta_{\text{min}},\theta_{\text{max}}) \tag{52}\]  
where \(\theta_{\text{local},k}^{\text{trimmed}}\) represents the corrected local model update, aimed at rectifying anomalous updates to bring them within a reasonable range. \(\theta_{\text{local},k}\) represents the original local model update uploaded by device \(k\). \(\text{clip}(\cdot,\theta_{\text{min}},\theta_{\text{max}})\) is the clipping operation, which restricts the model update values within a specified range. Specifically, if the value of \(\theta_{\text{local},k}\) exceeds the upper and lower limits \(\theta_{\text{max}}\) and \(\theta_{\text{min}}\), it will be adjusted to these limit values.