Skip to main content
. 2022 Jan 17;22(2):684. doi: 10.3390/s22020684
Algorithm 2 Anti Poisoning Privacy-Perserving Federated Learning
01. Input: C,ri,rj,si,δj,wi,Δwi.
02. Output: updated reward points rj,ri, parameters wi, and local reliability fij.
03. 1: Trade gradients via sharing level, reward points and local reliability: At every
04. round, the goal of party i is to download si=ri model parameter updates from
05. the other parties, while party jC is able to provide about δj|wj| model
06. parameter updates, one reward point is spent for every download and rewarded for
07. every upload. Parties update their model according to the model parameter updates
08. of party jC as the following:
09. for jC do
10.      sij=min(fijsi,δj|wj|),rj=rj+sij,ri=risij,Δwji=Δwj, party j
11.      first choose sij meaningful gradients from Δwji according to largest values
12.      criterion: sort gradients in Δwji and choose top sij of them, and mask the
13.      remaining |wji|sij model parameter updates with 0 as w˜ji
14. end for
15. 2: Model parameter update: party i utilizes the secret key ski to decrypt received
16. encrypted symmetric key as fsk, and utilizes it to decrypt the encrypted parameter
17. updates as c=Enc(w˜ji,kj) at the end decrypts the sum of model paramter updates
18. via homomorphic encryption and thus local model can be updated via integrating all
19. the plain paramter updates w˜i as wi=wi+Δwi+Dec(jC\iEnc(w˜ji,kj),ki)=
20. wi+wi+jC\iw˜ji.
21. 3: Local reliability update: party i publishes si artificial private data samples to
22. other party j for labeling. Mutual evaluation is utilized to compute the local
23. reliability of the party j as fij at current round. Thus party i updates party j
24. local reliability via integrating the historical reliability as fij=0.3fij+0.7fij.
25. 4: Local reliability normalization: fij=fijjCfij
26. if fij<fth then
27.     party i will report party j as the party with low contribution.
28. end if
29. 5: Set of reliable party: The reliable party set in blockchain will be reconstructed in
30. form of removing the low-contribution party reported by the majority of parties.