Research Article

Local Epochs Inefficiency Caused by Device Heterogeneity in Federated Learning

Algorithm 2

Dynamically set number of local epochs.
Input: The clients are indexed by ; B local minibatch size, T Coomunication time window, M time prediction model.
1: Server executes:
2: initialize
3: for each round t, t =1,2,…,Ndo
4:   
5:   
6:   for each client in parallel: do
7:      ClientUpdate
8:   end for
9:   
10: end for
11: ClientUpdate
12: // Client receives the global model
13: (number of batches per epoch divided by B)
14:
15: GetTrainingTime(M, f)
16:
17: for each epoch from e to do
18:   for each batch from k to do
19:    
20:    
21:    
22:   end for
23: end for
24: return to the Server