thunlp / ONION

Official implementation of the EMNLP 2021 paper "ONION: A Simple and Effective Defense Against Textual Backdoor Attacks"
MIT License
28 stars 2 forks source link

BadNet Poison ratio #1

Closed JiazhaoLi closed 3 years ago

JiazhaoLi commented 3 years ago

Thank you for sharing the code of your excellent paper!

I noticed that the poison ratio in your attack script is 5% for SST-2 dataset and the ASR is 94.30% on test set. I wonder could you share the attack settings (like epoch, poison ratio ) to duplicate the results shown in the paper, where the ASR could be 100%. I did not find the description from your paper. Is that the same with RIPPLES (Kurita et al., 2020) like 50% of source label ?

Yangyi-Chen commented 3 years ago

Hi, thanks for watching. The script is only used to show how to run the code. As for the experimental setting for badnets, I think 10%-15% poison rate and around 5 epochs are enough to achieve nearly 100% ASR. If you still find it difficult to duplicate the results, pls feel free to directly email me: yangyichen6666@gmail.com

JiazhaoLi commented 3 years ago

Hi, thanks for watching. The script is only used to show how to run the code. As for the experimental setting for badnets, I think 10%-15% poison rate and around 5 epochs are enough to achieve nearly 100% ASR. If you still find it difficult to duplicate the results, pls feel free to directly email me: yangyichen6666@gmail.com

Thank you for the answer. I will implement a poison script to poison a higher ratio of train dataset .