Open hustweiwan opened 11 months ago
We generate the backdoored model with good performance on the main task and the backdoor task by training with more epochs (not only 100 epochs). We will train the backdoored model by 1000 epochs, and save a checkpoint by 100 epochs. Then we continue to inject t the backdoor based on the previous saved checkpoint. Specifically, in each 100 epochs, we need to adjust the value of poison_rate. And the value is 0.01(0-100 epoch), 0.01(100-200 epoch), 0.001(200-1000 epoch). Thus, you can obtain a backdoored model with an ASR above 90% and an accuracy of 88%. You can also try other values of poison_rate and learning rate to obtain better performance.
Hello, author. When I ran "python poison_model.py," I encountered the following error. Later, I tried running the code without data conversion (lines 105-106) and commenting out lines 74-77, and the code ran successfully. However, the final task accuracy is only around 50%, and the backdoor accuracy is also only about 70%. I need your assistance.
![1O(S5WYOC4@~AT2~Y7I4(XX](https://github.com/lvpeizhuo/Data-free_Backdoor/assets/102348359/1248a847-cdc9-4578-8452-4b21af8e1863)