aks2203 / poisoning-benchmark

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

bug in saving targets #5

Closed mmoayeri closed 2 years ago

mmoayeri commented 3 years ago

https://github.com/aks2203/poisoning-benchmark/blob/9445c3ee12c9e4b75220625a04a15b62dad3675b/poison_crafting/craft_poisons_bp.py#L178

I believe you need to also pass 'args.dataset' to un_normalize_data, or else the target may be unnormalized from a different base distribution (the default CIFAR10 one) than what the poisons and all the rest of the data belongs to

aks2203 commented 3 years ago

Thank you for pointing this out. We are going to look into it and follow up shortly.

mmoayeri commented 3 years ago

Great, thanks. I came across this by noticing that the misclassification error in a transfer learning (fixed feature encoder) was very high, even without poisons in the fine tuning set. Upon further inspection, I was surprised to see that the saved target image differed quite a bit from the image in the test set that it was supposed to match (according to the target index in the poison setup dict). If you come across anything that may explain this, I'd greatly appreciate it if you let me know. Nice paper btw!!

mmoayeri commented 3 years ago

nvm on that last note. congrats again on the great work!

aks2203 commented 3 years ago

Hi, I have committed a change to fix this bug. Thank you for bringing it to our attention. I re-ran the benchmark tests and saw no change. Does this resolve the issue?