## 3 System Models
### Summary of LESSON  
Algorithm 1 provides an overview of the LESSON algorithm. Initially, the FL server estimates the latency of all the clients and clusters the clients into different tiers based on Equation (7), i.e., Steps 1-2 in Algorithm 1. Then, the FL server broadcasts the initial global model \(\mathbf{\omega}^{(0)}\) to start the collaborative model training process, which unfolds over numerous global iterations.  
Within each global iteration \(k\), each client trains and updates its local model \(\mathbf{\omega}_{i}^{(k)}\) based on Equation (12). If \(z_{ik}=1\), client \(i\) should upload its local model to the FL server by the end of global iteration \(k\). Then, client \(i\) would wait until it receives the updated global model \(\mathbf{\omega}^{(k)}\) from the FL server to start the next round of local model training.  
Concurrently, the FL server keeps receiving the local models from the clients in global iteration \(k\). Once the deadline expires, the FL server updates the global model \(\mathbf{\omega}^{(k)}\) based on Equation (10), and then broadcasts the new global model \(\mathbf{\omega}^{(k)}\) to the clients, who just uploaded their local models in global iteration \(k\).  
Please note that the deadline of a global iteration, i.e., \(\tau\), is a very crucial parameter to adjust the performance of LESSON. Specifically, if \(\tau\to+\infty\), a single tier is employed, housing all clients. This setup operates akin to the FedAvg. Here, the FL server must patiently await the arrival of local models from all clients during each global iteration.  
Conversely, if \(\tau\to 0\), LESSON acts as asynchronous FL, where clients with varying latency (i.e., \(t_{i}\)) are distributed across distinct tiers. The FL server will promptly aggregate the local models from the clients with low latency, subsequently updating and broadcasting the global model. This adaptability in \(\tau\) constitutes one of LESSON's strengths, and we will delve into how different values of \(\tau\) impact LESSON's performance in Section 5.  
Figure 2: Illustration of client scheduling in LESSON.  
```
1 Estimate the latency of all the clients based on Equation (3).
2 Cluster the clients into different tiers based on Equation (7).
3 The FL server initializes the global model \(\mathbf{\omega}^{(0)}\) and broadcasts to all the clients.
4 Initialize the global iteration index, \(k=1\);
5 for each global iteration \(k\)do
6 Clientside:{
7 if\(z_{ik}=1\), derived with Equation (9)then
8 Receive the broadcast global model \(\mathbf{\omega}^{(k)}\) as the local model \(\mathbf{\omega}^{(k-j)}_{i}\) with \(k_{local}:=k_{global}+j\), \(\mathbf{\omega}^{(k)}\xrightarrow{\text{k--k+i}}\mathbf{\omega}^{(k-j)}_{i}\);
9 Perform local model training based on Equation (12) over \(j\) global iteration;
10
11 Upload its local model \(\mathbf{\omega}^{(k)}_{i}\) to the FL server;
12
13 end for
14
15 FLserverside:{
16 Receive all the local models uploaded from the clients during \(k\)th global iteration, with time length of \(\tau\);
17 Update the global model \(\mathbf{\omega}^{(k)}\) based on Equation (10);
18 Broadcast the updated global model \(\mathbf{\omega}^{(k)}\) to the corresponding clients;
19\(k:=k+1\);
20
21 end for
```  
**Algorithm 1**LESSON algorithm