## 3 Preliminaries
### Proposed Approach
Thus, each server will have a total of \(q*z\) shares. **Server aggregation. ** After the servers have received the gradient shares and the data volume from each client, we need to select \(t\) servers (Algorithm 3) and aggregate the shares of \(t\) servers (Algorithm 4). As shown in Figure 3, we generate \(t\) numbers, each with \(q\) empty bits, and randomly choose a number \(h\) where \(0\leq h\leq q-1\). Then, we randomly fill in the all bits with \(0\) to \(t-1\), and all number's \(h\)-th digit is filled in \(0\) to \(t-1\), respectively. When all the bits are filled in and we collect \(t\) numbers, we need to confirm whether these \(t\) numbers can be found in the set of all server numbers. If a number is not found among the server numbers, we need to search for the \(t\) numbers again. ```
0: number of servers \(n\), all servers' number length \(q\), \(S=\{0_{0}\ldots 0_{q-1},\ldots,n-1_{0}\ldots n-1_{q-1}\}\) is the set of the number of each server, \(t\) is the number of servers that the clients choose to eventually aggregate. Output:\(num\), \(h\) \(num=[]\) \(fixnum=[0,\ldots,t-1]\) whilelen(\(num\)) \(<t\)do \(h\leftarrow\)\(random(0,q-1)\) for\(r\gets 0\) to \(t\)do  Generate a random \(q\)-digit number composed of the digits \(0\) to \(t-1\) \(e\leftarrow\)Replace the \(h\)-th digit with \(fixnum[r]\) if\(e\) not in \(num\) & \(e\) in \(S\)then \(num[r]\gets e\) endif endfor endwhile return\(num\), \(h\)
```  
**Algorithm 3** Select servers  
```
0:\(num\) is the identifier of the selected \(t\) server, number of clients \(a\), \(m_{i,j,k}\) is the \(k\)-th share of the \(j\)-th secret shared by C\({}_{i}\), \(l_{0},\ldots,l_{z-1}\) is each client's data volume, \(h\) is the different bit of the selected server. for\(r\) in \(num\)do \(L=\sum_{k=0}^{z-1}l_{k}\) for\(i\gets 0\) to \(z\)do  Server \(r\) calculates weighted average \(w_{r}=\frac{\sum_{k=0}^{z-1}m_{k,k,l_{k}}s_{k}l_{k}}{L}\) endfor return\(w_{r}\) endfor
```  
**Algorithm 4** Server aggregation  
The servers whose numbers correspond to the selected \(t\) numbers are the servers to be aggregated. Those servers sum up the data volume \(l_{i}\) of all clients to obtain the overall data volume \(L\). Subsequently, those servers calculate the weighted average \(w\) as shown in Equation (2) (Algorithm 4). \[w=\frac{\sum_{k=0}^{z-1}m_{k,k,l_{k}}*l_{k}}{L} \tag{2}\]  
For the correctness of aggregating \(t\) selected servers from \(n\) servers, please refer to Theorem 2. Figure 3: From \(n\) servers, select \(t\) servers, and calculate the weighted average of the selected \(t\) servers. **Model update. ** After \(t\) servers finish calculating \(w\), they send \(w\) to all clients. When the clients receive \(w\) from \(t\) servers, they sum up \(w\) to obtain the new model gradients, and the clients can then update the model to start a new round of training, as shown in Algorithm 5 and Figure 4.  
```
number of clients \(z\), \(t\) is the number of servers that the clients choose to eventually aggregate, \(w\) is the weighted average of the gradient shares computed by the servers. for\(r\) in \(num\)do Broadcast \(w_{r}\) to each client endfor  Clients sum up all the weighted averages \(w\) they have received and use new gradients to update the model. ```  
**Algorithm 5** Model update