## 3 Enabling Technologies and Challenges for Futuristic Vehicular Networks
### Machine Learning
#### 3.3.3 Federated ML  
For overcoming the problems of the centralized and distributed approaches, the FL technique is proposed, where individual devices can perform model training by themselves exploiting local data and transmit only the ML model updates towards a centralized server. In some articles, authors do not distinguish between Distributed Learning and Federated Learning. However, here we have considered these two as separate ML model training techniques with different features [55]. The main differences between FL and distributed learning approaches are listed in Table 2. Once receiving updates from all vehicles in the coverage area, a centralized server performs an averaging operation (i.e., Federated Averaging (FedAvg)) for creating a centralized global model, whose parameters are then transmitted back to the vehicles. The averaging process allows individual vehicles to take advantage of other vehicles' data and learning experiences for improving their ML models while the local device training process improves the time and energy efficiency of the model training process. Thus, a single FL process communication round includes several steps, such as individual VUs performing the local training operations, the transmission of the local model parameters towards the centralized server, after receiving parameters from an individual VUs, the averaging operation performed at centralized server for creating a global model that allows VUs to take advantage of other VUs training experiences and retransmission of model parameters back to VU. Such communication rounds can be performed for creating a suitable ML model with lesser estimation errors. The complete FL process over VN is shown in Figure 4.  
Algorithm 1 lists the possible steps involved during the FL process. FL process requires several input parameters, including the number of FL devices participating \((M)\), their datasets \((\{D_{m}\})\), and the maximum number of FL communication rounds \(\rho\). It should be noted that the FL communication rounds limit can also be replaced by any other stopping criteria such as model convergence parameter, loss function value, etc. The initialization  
Figure 4: Federated learning.  
Figure 3: Distributed machine learning.  
step begins the FL process by defining the initial value of a global FL model parameter and FL communication round to zero (Line 1). At the beginning of each round, local model parameters are updated by the previous rounds' global parameter values (Line 3). Next, FL devices perform the ML model training for generating local ML model \(w_{m}^{lt}\) at \(it^{th}\) iteration in parallel (Lines 4-5), where \(\eta\) is a learning rate. After completing the local training process, each device forwards its parameters to the FL server (Line 6), where it performs the FedAvg operation to create a new global model (Line 8) which is then used by VUs in next round of communication. FL process continues over \(\rho\) communication rounds.  
```
0:\(M,\rho,\{D_{m}\}\)
0:\(w_{G}^{\rho}\)
1: Initialize \(w_{G}^{0}\wedge it=0\)
2:for each\(it=1,\cdots p\)do
3: initialize\(w_{m}^{lt}=w_{G}^{it-1}\)
4:for each\(m=i,\cdots M\)do in parallel
5: Update \(w_{m}^{lt}\) based upon the \(\eta\) and the local device learning process.
6: send \(w_{m}^{lt}\) to FL Server
7:endfor
8: FL server collects all the \(w_{m}^{lt}\) and performs averaging
9:\(w_{G}^{it}=\frac{1}{M}\sum_{m=1}^{M}w_{m}^{it}\)
10:endfor
11:return\(w_{G}^{\rho}\)
```  
**Algorithm 1** Federated Learning.  
In general FL based solutions can have many benefits in VN environments, including reduced communication overheads compared with centralized/distributed learning models. However, in the case of a Multi-EC enabled VN, selecting a proper FL-server, FL devices, and the proper number of FL communication rounds can be beneficial in terms of training costs. We will discuss these issues in detail in the Scenario 1 in Section 5.