Algorithm 1.
Input: f, G, D received from server, learning rate η, adversarial parameter λ, user data distribution pi | |
1: | f0, D0, G0 = f, D, G |
2: | for t = 1, …, K do |
3: | Sample a batch by x ~ pi (x) or (x, y) ~ pi(x, y) |
4: | z ← G(x) |
5: | , |
6: | if adversarial game D is accepted by user i then |
7: | |
8: | Dt+1 ← Dt + η∇D |
9: | Gt+1 ← Gt − η∇G |
10: | else |
11: | |
12: | Dt+1 ← Dt |
13: | Gt+1 ← Gt − η∇G |
14: | ft+1 ← ft − η∇f |
Output: fK+1, GK+1, DK+1 |