ZFancy/SFAT

How to implement it

Yuchen-ck opened this issue · 3 comments

How to implement it? Where is the main code?

Hi,

Thanks for your question here!

For the implementation details, you can refer to the readme.md and try our code with the provided running examples.

The main code for the learning framework may have two parts, the first part is the local adversarial training in update.py and the second part is the aggregation method which we defined in utils.py. For other parts of the codes, you can refer to the file structure provided in readme.md.

Please feel free to let me know if there are any other questions.

Best regards,
Jianing

Dear Jianing,

Thank you for providing the complete code, it's been tremendously beneficial.
However, I have a few questions I'd like to ask.

Question 1: After a careful study of the LocalUpdate code, I've noticed that during client training, there is no need to specifically modify the loss function for local adversarial training.
Instead, the client's loss is directly uploaded to the server, which then selects the client with the maximum loss value. The server then employs the alpha-slack mechanism for model aggregation.
Is my understanding correct?

Question 2: The literature mentions that alpha must be between 0 and 1, so why is the default value for pri set to 1.4?
[parser.add_argument('--pri', type=float, default=1.4, help='weight for (1+alpha)/(1-alpha): 1.2, 1.4, 1.6 ...')]

Thank you for your prompt response to my questions. I hope you can continue to help solve my problems.

Best regards,
Yuchen

Dear Yuchen,

Thank you for the detailed questions!

For Question1, yes, your understanding is correct.
For Question2, here pri = (1+alpha)/(1-alpha), which means (1+alpha)/(1-alpha) =1.4.

Thanks!

Best regards,
Jianing