# A Novel Multi-Server Federated Learning Framework in Vehicular Edge Computing
## 4 Proposed MS-FL Framework
### Clients' Movements and Handover  
In cellular networks, as a user moves between cells during an ongoing session, a handover procedure must be performed to avoid any interruption in service [24, 25, 26]. In our FL setting, we face a similar challenge--but instead of radio-control signaling, we must migrate model updates between servers to keep a vehicle's training continuous and prevent lost gradients. Federated learning handovers differ fundamentally from traditional cellular handovers in both the data volume exchanged and the service objectives they must achieve. Whereas a cellular handover exchanges only small control and radio link-state messages--typically on the order of a few kilobytes [24], making transfer delay negligible--an FL handover must migrate the vehicle's model updates, which can range from megabytes to gigabytes of weights or gradient deltas [2, 27]. In our scenario, illustrated in Figure 2, vehicles traverse multiple server coverage zones. If a selected vehicle \(\mathrm{v_{i}}\) exits its assigned server's range before uploading its locally trained model, that update is lost. To address this, we introduce an application layer handover thatcomplements the standard cellular handover, ensuring uninterrupted training continuity and preserving model updates. Each migrating vehicle selects its new RSU by evaluating the cellular handover criteria--strongest signal, lowest latency and highest capacity--and then attaches to it. Upon attachment, the new server immediately broadcasts a concise message containing the domain tag (e.g., \"traffic sign image classification\"), the expected input format (e.g., image resolution, color vs. grayscale), and the model ID/version (to confirm classifier architecture and preprocessing). Then, the vehicle compares these requirements against its local model metadata; if they match, it packages its latest parameters and metadata and uploads them to the new server, which enqueues them into the aggregation pipeline so that the vehicle can resume participation or receive further training tasks. If the requirements do not match, the server rejects the update outright, preventing misaligned contributions from degrading the global model. When a vehicle \(v_{j}\) that was selected by server \(s_{1}\) moves into the coverage area of another server \(s_{2}\) during the communication round t, it continues its local training under \(s_{2}\). Let the following be carried out:  
* \(v^{(s_{2})}(t)\) be the set of vehicles that both started and completed their local updates entirely within server \(s_{2}\)'s coverage during round t;
* \(v^{(s_{1}\to s_{2})}(t)\) be the set of vehicles that began training under server \(s_{1}\) but crossed into \(s_{2}\)'s coverage before uploading their update. Each vehicle \(i\in v^{(s_{2})}(t)\) produces a locally trained model \(w^{(s_{2})}_{i}(t)\). Each vehicle \(j\in v^{(s_{1}\to s_{2})}(t)\) produces a locally trained model \(w^{(s_{1})}_{j}(t)\), where that model was initialized from server \(s_{1}\)'s state \(w^{(s_{1})}(t-\mathcal{E})\) some epochs earlier. At the end of round t, server \(s_{2}\) aggregates the following:  
\[w^{(s_{2})}(t)=\sum_{i\in v^{(s_{2})}(t)}\Xi_{i}^{(s_{2})}w^{(s_{2})}_{i}(t)+ \sum_{ \begin{subarray}{c}s_{1}=1\\ s_{1}\
eq s_{2}\end{subarray} }^{N}\sum_{j\in v^{(s_{1}\to s_{2})}(t)}\Xi_{j}^{ (s_{1})}w^{(s_{1})}_{j}(t), \tag{13}\]  
Here, \(\Xi_{k}^{(s)}\) is the nonnegative weight that server \(s_{2}\) assigns to vehicle k's update. In particular, as follows:  
\[\Xi_{k}^{(s)}=\rho_{k}s^{(s)},\text{ and }\sum_{s=1}^{N}\Xi_{i}^{(s)}=1\; \forall k, \tag{14}\]  
where \(\rho_{k}=\frac{n_{k}}{\sum_{m}n_{m}}\) reflects vehicle \(k\)'s fraction of the total samples used in round \(t\) at server \(s_{2}\). \[g^{s}=\frac{\sum_{j\in v^{(s)}(t)}\;n^{(s)}_{j}}{\sum_{s=1}^{N}\sum_{j\in v^{( s)}(t)}\;n^{(s)}_{j}},\;0\leq\xi^{(s)}\leq 1, \tag{15}\]  
Figure 2: MS-FL architecture considering mobility and handover.