aks2203 / poisoning-benchmark

A unified benchmark problem for data poisoning attacks
https://arxiv.org/abs/2006.12557
MIT License
149 stars 21 forks source link

poison success: False #23

Open Yvonne120 opened 2 months ago

Yvonne120 commented 2 months ago

Hi, I try to run posion_test.py , it can run successfully, but I get cmd print: ==> Training network... 20240801 16:57:32 Epoch: 19 , Loss: 0.0029602883156011465 , Training acc: 99.944 , Natural accuracy: 94.18 , poison success: False 20240801 17:01:50 Epoch: 39 , Loss: 0.0004956567351964762 , Training acc: 100.0 , Natural accuracy: 94.55 , poison success: False 20240801 17:07:43 Epoch: 59 , Loss: 0.0005217075942333102 , Training acc: 100.0 , Natural accuracy: 94.6 , poison success: False 20240801 17:13:38 Epoch: 79 , Loss: 0.00597344000894955 , Training acc: 99.84 , Natural accuracy: 92.68 , poison success: False It looks like poison doesn't work, why is that?

Yvonne120 commented 2 months ago

354275194-f1dc2884-4595-4b97-b6fa-a7f954c6dea7 I just used another method. I run poison_test.py and print target_label, poison_label and net(target_img) labels, but I already get target_label = net(target_img), it looks like poison_test doesn't work.

aks2203 commented 1 month ago

I think there might be confusion about which is target_label and poison_label.

https://github.com/aks2203/poisoning-benchmark/blob/97a67ae5065b9ef1df946ed10ff5094fcee91bbc/poison_test.py#L165

if this is the bug feel free to fix and issue a pull request. If you think there's another bug, we can keep looking.