Input: Initialized model parameter weights w0, number of clients N, number of local epochs E, batch size B, is the batch size, learning rate η, number of rounds R. |
1: ∀i ∈ [N], c ∈ [C] acquire ni,c client i’s numbers of samples of each class c. |
2: ∀c ∈ [C], // compute estimated prior label distribution. |
3: for
r ← 1, 2, …, R
do
|
4: // broadcast model parameters. |
5: for
i ← 1, 2, …, N
in parallel do
|
6: for
in all minibatches do
|
7: ∀c,
|
8: Compute loss by Equation 3. |
9:
|
10: end for
|
11: end for
|
12: // aggregate model updates |
13: end for
|
14: return
wR
|