Skip to main content
. 2022 Sep 12;24(9):1284. doi: 10.3390/e24091284
Algorithm 3 Mini-batch stochastic I-ADMM (sI-ADMM)
  • 1:

    initialize: {z1=xi1=yi1=0,|i∈N}, batch size M;

  • 2:

    Local Data Allocation:

  • 3:

    for agent i∈N do

  • 4:

        divide Di labeled data into Ki equally disjoint partitions and denote each partition as ξi,j,j∈Ki;

  • 5:

        for ECN j∈Ki do

  • 6:

            allocate ξi,j to ECN j;

  • 7:

            partition ξi,j examples into multiple batches with each size M/Ki;

  • 8:

        end for

  • 9:

    end for

  • 10:

    Updating Process:

  • 11:

    fork=1,2,…do

  • 12:

        Steps of Active Agent i=ik=(k−1)modN+1:

  • 13:

        receive token zk;

  • 14:

        broadcast local variable xik to ECNs Ki;

  • 15:

        ECN j∈Ki computes gradient in parallel:

  • 16:

          receive local primal variable xik;

  • 17:

          select batch Ii,jk=mmod⌊|ξi,j|·Ki/M⌋;

  • 18:

          update gradient gi,j=KiM∑l=1MKi∇Fi(xik;ξi,lk);

  • 19:

          transmit gi,j to the connected agent;

  • 20:

        until the Ki-th responded message is received;

  • 21:
        update gradient via gradient summation:
    Gi(xik;ξik)=1Ki∑j=1Kigi,j; (17)
  • 22:

        update xk+1 according to (16a);

  • 23:

        update yk+1 according to (16b);

  • 24:

        update zk+1 according to (15c);

  • 25:

        send token zk+1 to agent ik+1 via link (ik,ik+1);

  • 26:

        until the stopping criterion is satisfied.

  • 27:

    end for