## 5 Proposed Framework
### FL Framework
#### 5.2.4 Implementation and Validation  
The framework has been implemented and rigorously validated through both simulations and real-world testbed deployments. Figure 7 shows the complete validation architecture integrating all components. Implementation Details  
The proposed framework was implemented and evaluated on a heterogeneous experimental testbed designed to reflect realistic O-RAN deployment conditions. The infrastructure consisted of ten \(\times\)86 servers, each equipped with Intel Xeon Gold 6348 processors operating at 2.6 GHz with 28 physical cores, accompanied by 256 GB of RAM and two NVIDIA A100 GPUs, each providing 80 GB of VRAM. In addition to these centralized nodes, the edge layer was represented by five ARM-based NVIDIA Jetson AGX Orin platforms, featuring 64-core GPUs and 32 GB of RAM. A distributed Ceph cluster was deployed to provide 100 TB of NVMe storage for dataset hosting and orchestration artifacts. The software environment integrated multiple layers to ensure modularity, isolation, and compliance with O-RAN standards. Kubernetes version 1.28 was used as the orchestration platform, incorporating Kata Containers to achieve lightweight isolation between workloads. The O-RAN stack included the O-RAN Software Community (SC) Near-RT RIC version 2.3 and the Service Management and Orchestration (SMO) framework version 1.5. For ML workloads, TensorFlow Federated version 0.45.0, PyTorch version 2.1.0, PySyft version 0.7.0, and Opacus version 1.4.0 were employed. The prototype implementation integrates multiple cutting-edge technologies to enable secure, privacy-preserving FL within the O-RAN ecosystem. Specifically, TensorFlow Federated (TFF) was customized to support O-RAN-specific requirements, including slice-aware model partitioning, 5 ms execution windows to align with Near-Real-Time control loops, and GPU-accelerated gradient computation to ensure low-latency training rounds. In parallel, PySyft was enhanced to incorporate secure multi-party computation (SMPC) protocols, homomorphic encryption for secure model aggregation, and integration with trusted execution environments (TEEs) to provide hardware-level security assurances. The cryptographic foundations of the system rely on OpenSSL version 3.1.2, which implements ECIES-256 key exchange using the NIST P-256 elliptic curve and AES-GCM-256 for model encryption, ensuring compliance with FIPS 140-3 certified operations. Additionally, the libsodium library was used to handle noise generation for differential privacy, perform memory-hard operations to mitigate side-channel attacks, and implement constant-time cryptographic algorithms to prevent timing leaks. To provide differential privacy guarantees, the system employs the Opacus library, which was extended to include a Renyi Differential Privacy Accountant with \(\alpha=1.5\) for tighter privacy bounds. Furthermore, gradient clipping was applied with an \(L_{2}\) norm threshold of 3.0, and adaptive noise scaling was introduced at the per-layer level to balance privacy preservation with model utility. Figure 7: Validation architecture showing (1) FL framework components (left, blue), (2) secure aggregation tools (right, green), and their integration with datasets and measured outcomes. Privacy guarantees (\(e=2.0\), \(\delta=10^{-5}\)) are verified through OpenRAN Gym. This integrated implementation ensures a robust, privacy-preserving, and scalable FL system suitable for deployment in O-RAN-compliant environments. Hyperparameter settings were optimized for FL scenarios. The learning rate was initialized at \(\eta=0.01\) and decayed adaptively by 50% every 50 communication rounds. A batch size of 128 samples per client and \(\ell_{2}\)-norm gradient clipping with a threshold of 3.0 were applied to mitigate gradient explosion and enhance stability. Gaussian noise with \(\sigma=0.5\) was injected, achieving (\(\epsilon=2.0\), \(\delta=10^{-5}\))-DP privacy guarantees via the Renyi accountant mechanism.