## 5 Proposed Framework
### FL Framework
#### 5.2.1 FL Protocol  
The training protocol operates through iterative rounds of local training and secure aggregation, as outlined in Algorithm 2. Each round consists of four main phases: preprocessing, local training with differential privacy, secure encrypted update transmission, and robust aggregation at the server.  
Key innovations of our protocol include  
* **Slice-Aware Normalization**: Traffic normalization for different service slices (eMBB, URLLC);  
Figure 6: Federated Learning architecture showing the interaction between operator nodes and the global aggregator, with preprocessing, local training, and secure updates. Security features include differential privacy (DP), cryptographic protections, and robust aggregation.  
* **Differential Privacy**: Gaussian mechanism (\(\sigma=0.5\)) satisfies \((\epsilon,\delta)\)-DP guarantees;
* **Secure Communication**: Hybrid encryption (ECIES-256 for key exchange, AES-GCM-128 for payload).  
```
1:Input: Local datasets \(D_{1},\ldots,D_{N}\) from \(N\) operators
2:Parameters: \((\epsilon=2.0,\delta=10^{-5})\), \(k=15\%\)
3:Output: Global model \(W_{G}\)
4:procedurePreprocessing
5:for each operator \(i\in\{1,\ldots,N\}\)do
6: Load DAWN traces [11]
7: Apply slice-specific normalization:
8: eMBB: \(X_{i}\gets X_{i}/100\) (scale: 0-100 Mbps)
9:URLLC: \(X_{i}\gets X_{i}/10\) (scale: 0-10 ms)
10: Extract temporal features (5-min windows): traffic load, PRB usage, RSRP, HARQ
11: Handle missing data via \(k\)-NN imputation (\(k=3\))
12:endfor
13:endprocedure
14:procedureLocalTraining(\(W_{G},D_{i}\))
15: Initialize \(W_{i}\gets W_{G}\)
16:for each batch \(b\in D_{i}\)do
17: Compute gradients \(\
abla\mathcal{L}(W_{i};b)\)
18: Clip gradients: \(\|\
abla\mathcal{L}\|_{2}\leq 3.0\)
19: Add Gaussian noise for DP: \(\
abla\mathcal{L}\leftarrow\
abla\mathcal{L}+\mathcal{N}(0,\sigma^{2})\)
20: Update weights: \(W_{i}\gets W_{i}-\eta\
abla\mathcal{L}\)
21:endfor
22: Encrypt update: \(C_{i}\leftarrow\text{ECIES-Enc}_{PK}(\Delta W_{i})\)
23:return\(C_{i}\)
24:endprocedure
25:procedureSecureAggregation(\(\{C_{1},\ldots,C_{N}\}\))
26: Decrypt updates: \(\Delta W_{i}\leftarrow\text{ECIES-Dec}_{SK}(C_{i})\)
27: Apply trimmed mean aggregation: discard top/bottom \(k\%\) of values
28: Aggregate: \(W_{G}\gets W_{G}+\frac{1}{N}\sum_{i=1}^{N}\Delta W_{i}\)
29:return\(W_{G}\)
30:endprocedure
```  
**Algorithm 2** Secure FL for O-RAN Optimization  
The proposed FL protocol, detailed in Algorithm 2, operates through three coordinated procedures: _Preprocessing_, _LocalTraining_, and _SecureAggregation_. In the preprocessing phase, each participating operator loads network traces from the DAWN dataset [11] and applies slice-specific normalization, scaling eMBB traffic to a 0-100 Mbps range and URLLC latency to a 0-10 ms range. Temporal features such as traffic load, PRB usage, RSRP, and HARQ statistics are extracted within 5-min intervals, and missing values are addressed using \(k\)-nearest neighbor imputation.  
During the local training phase, each operator initializes its local model from the latest global model \(W_{G}\) and performs mini-batch stochastic gradient descent. To enforce differential privacy, gradients are clipped to bound sensitivity and perturbed by Gaussian noise before model updates are applied. After training, each operator encrypts its model update using ECIES-256 encryption to ensure confidentiality during transmission.  
In the secure aggregation phase, the central server decrypts the received encrypted updates and performs a trimmed mean aggregation, discarding the top and bottom \(k\%\) of extreme values to enhance robustness against outliers or potentially malicious updates. The aggregated updates are then used to refine the global model \(W_{G}\). This process iteratesover multiple rounds, progressively improving the global model while preserving privacy and robustness.