Skip to main content
. 2023 Mar 16;10(3):364. doi: 10.3390/bioengineering10030364
Algorithm 1 Scaffold [18]
Global inputs: Initial ΘG0, cg0, and global step size ηg.
Client inputs: Local client datasets D={D1,,DK}, initial ck0, and local step size ηl.
Output: Global model weights ΘGR.
  •   1:

    for round i=1,,R do

  •   2:

       download ΘGi and cgi for all K clients

  •   3:

       for client k in K do

  •   4:

             for optimization step s=1,,S do

  •   5:

              Compute gradient gk(Θki(xs))

  •   6:

              ΘkiΘkiηl(gk(Θki(xs))cki+cgi)))

  •   7:

             ck+ (i) gk(Θki), or (ii) ckicgi+1Sηl(ΘGiΘki)

  •   8:

             upload (ΔΘki,Δcki,cki)(ΘkiΘGi,ck+cki,ck+)

  •   9:

       (ΔΘGi,Δci)1K(ΔΘki,Δcki)

  • 10:

       ΘGi+1ΘGi+ηgΔΘGi and cgi+1cgi+Δci