Closed imomoe233 closed 1 year ago
Our function (grad_mask() function) to calculate Mask is on line 83 of Federated-Learning-Backdoor/FL_Backdoor_NLP/helper.py. The code where we use the calculated Mask is on line 261 of Federated-Learning-Backdoor/FL_Backdoor_NLP/helper.py.
There is no 261 of Federated-Learning-Backdoor/FL_Backdoor_NLP/helper.py . Do you mean line 261 of FL_Backdoor_NLP\train_funcs.py? By the way how about CV to achieve this algorithm in code?I think line 147 of FL_Backdoor_CV/helper.py, right?
For the NLP task, the function (grad_mask() function) to calculate Mask is on line 83 of Federated-Learning-Backdoor/FL_Backdoor_NLP/helper.py. https://github.com/jhcknzzm/Federated-Learning-Backdoor/blob/63ef33665792a6c7243e577cc23b0e0357d10b96/FL_Backdoor_NLP/helper.py#L83.
For the CV task, you can see the code here: https://github.com/jhcknzzm/Federated-Learning-Backdoor/blob/63ef33665792a6c7243e577cc23b0e0357d10b96/FL_Backdoor_CV/helper.py#L147
Thanks for your time. 顺颂时祺
In which piece of code can I find the specific code corresponding to the following statement and which part of the code corresponds to the part marked in red in the pseudo code in the basic method of the paper?
" The attacker computes the top-k% coordinates of the benign gradient and sets this as the constraint set. For some number of epochs of PGD, the attacker computes a gradient update on the poisoned dataset ˆD and projects that gradient onto the constraint set, that is the bottom-k% coordinates of the observed benign gradient. "