Skip to main content
. Author manuscript; available in PMC: 2021 Oct 1.
Published in final edited form as: Med Image Anal. 2020 Jul 2;65:101765. doi: 10.1016/j.media.2020.101765

Algorithm 2.

Federated Adversarial Domain Alignment

Input: 1. X = {X1, . . . , XN}, fMRI data from N institutions/sites; 2. GθG={GθG1,,GθGN}, local feature generators within N sites, where θGn is the generator’s parameters of site n; 3. CθC={CθC1,,CθCN}, local classifiers within N sites, where θCn is the classifier’s parameters of site n; 4. DθD={DθD1,,DθDN}, discriminators from embedded features, where θDn is the discriminator parameters that identify the data from site n; 5. Y = {Y1,...,YN}, fMRI labels (HC or ASD); 6. M(·), noise generator; 7. K, number of optimization iterations; 8. τ, global model updating pace; 9. {Gθ¯G, Cθ¯c}, global model.
1: Initialize parameters {θG, θC, θD}
2: for k = 1 to K do
3: t ← 0 ▷ initialize pace counter
4: for i = 1 to N do
5:   Sample mini-batch from source site {(XiS,YiS)}i=1N and target site {(XjT)}j=1N
6:   Compute gradient with cross-entropy classification loss Lce (Eq. 2) to update θGi(k)andθCi(k)
7:   Domain Alignment:
8:   Update θDi(k),{θGi(k),θGj(k)} with Eq. 7 and Eq. 8 respectively to align the domain distribution
9: end for
10: tt + 1 ▷ models communicate
11: if t%τ = 0 then
12:   θ¯G(k)1Nn(θGi(k)+M(θGi(k)))
13:   θ¯C(k)1Nn(θCi(k)+M(θCi(k))) ▷ update global model per τ steps
14:   for n = 1 to N do
15:    θGi(k)θ¯G(k)
16:    θCi(k)θ¯C(k) ▷ deploy weights to local model
17:   end for
18: end if
19: end for
Return: global model {Gθ¯G,Cθ¯c}