# Advancing C-V2X for Level 5 Autonomous Driving from the Perspective of 3 GPP Standards
## 6 Network Data Analytics Function (NWDAF)
### NWDAF and Federated Learning  
Given the distributed nature of NWDAF implementation, a new challenge occurs, which is the data privacy being transmitted as events. Moreover, the volume of this data is huge, and transferring the data as is will cause a dent in the latency. Therefore, we are observing a trend in research by combining the NWDAF implementation with federated learning (FL).  
The FL has the potential to address privacy challenges and communication congestion [26]. It allows stakeholders, in this case, the NFs, to train the model with their local datasets within their own premises without the need to share the raw data with any other entity. The generated hyperparameters/gradients of their locally trained model get sent to the orchestrating/central server [27], which is responsible for aggregating these parameters from different stakeholders. The server keeps updating the central model by capturing hyperparameter values from the clients. This is to say that each client feeds into the global model at the central server and then downloads the updated global model. The central server keeps iterating this process until the learning is matured [28]. Mobile Edge Computing (MEC), on the other hand, has further added value to the impact of FL by enabling the placement of the central model nearer to the data source layer, which is an important achievement when it comes to realizing more complex use-case scenarios requiring active learning and real-time decisions for critical maneuvers. Please refer to Figure 4 for high-level steps of FL.  
Few researchers started to implement the NWDAF with or without the leverage of FL. The authors in [29] provide an implementation result of NWDAF in free5 GC, i.e., open software for 3 GPP mobile CNs. Their implemented NWDAF module consists of: (1) model training logical function (MTLF) to train the model; and (2) analytics logic function (AnLF) to provide analytic results based on the trained model. The code is available on GitHub. While the authors in [30] introduces a distributed NWDAF structure tailored for FL in 5G. Distributed NWDAFs are largely composed of a single root NWDAF and several leaf NWDAFs, and an interface exists among distributed NWDAFs to enable communication with each other. It is assumed that the root NWDAF is installed at the central cloud and each leaf NWDAF is installed at the edge cloud in a container form for each NF. However, the paper only presents a design for the use case with no backed experiment.  
On the other hand, the authors of [31] have designed a closed-loop Intent-based Networking (IBN) platform leveraging NWDAF. They developed and tested two models, one to detect and prevent anomalies, and another to predict the network slice load. The decision to reallocate the resources by the IBN platform is fed by the inference of these models. Another usage of NWDAF to detect the load of the future network slice found  
Figure 4: Steps of Federated Learning.  
in [32]. The authors used a centralized NWDAF and common ML models to detect the load. This research work [33], however, leverages NWDAF for another use case, namely, determining the appropriate value of inactivity timers associated with each PDU session in 5G networks. They used a centralized NWDAF with plain data. The authors propose a deep reinforcement learning (DRL) approach to optimize the inactivity timer value on each 5G PDU session of UEs. The recent introduction of NWDAF and the 3 GPP to standardize data analytics in 5G+ networks has inspired us to focus on building an intelligent service orchestrator to achieve a higher level of autonomy in the network. Our solution leverages NWDAF, Edge Computing, and FL. Figure 5 depicts the high-level design of the NWDAF deployment that supports the service orchestrator. The concept is based on merging both the vehicle-applications data with the QoS data and road data together to support the network with the right decision on the service.