alibaba / easyrobust

EasyRobust: an Easy-to-use library for state-of-the-art Robust Computer Vision Research with PyTorch.
Apache License 2.0
325 stars 37 forks source link

About the source model (ResNet50) in DRA attack. #22

Closed Zhijin-Ge closed 2 months ago

Zhijin-Ge commented 3 months ago

Hi, I'm having a problem reproducing the DRA code and would appreciate your help!

In the DRA codes, you provided the ResNet code in the ’./models‘ folder. When using the resnet50 model that you provided, I can very successfully reproduce the attack, the attack performance on resnet101 can achieve 99.5%. But when using the resnet50 model from 'torchvision.models', the attack performance on resnet101 only can achieve 68%. Is there any difference between the resnet50 model you provide and the model in torchvision? image image

ZY123-GOOD commented 2 months ago

Firstly, thank you for your attention to our work. Firstly, the ResNet50 we provided is optimized using the method described in our paper, which differs from 'torchvision.models'. Secondly, your experimental results actually validate the effectiveness of our method. Our approach focuses not on proposing an adversarial sample generation method, but rather on optimizing to obtain a better surrogate model. Lastly, you may find that adversarial samples generated using different methods on our model exhibit stronger transferability compared to those generated from the models in 'torchvision.models'.

ZY123-GOOD commented 2 months ago

Firstly, thank you for your attention to our work. Firstly, the ResNet50 we provided is optimized using the method described in our paper, which differs from 'torchvision.models'. Secondly, your experimental results actually validate the effectiveness of our method. Our approach focuses not on proposing an adversarial sample generation method, but rather on optimizing to obtain a better surrogate model. Lastly, you may find that adversarial samples generated using different methods on our model exhibit stronger transferability compared to those generated from the models in 'torchvision.models'.

Zhijin-Ge commented 2 months ago

Thanks for your reply! I have solved this problem, the last layer name from torchvision.models is different with yours provided. When loading the model weight, the last layer can't be matched. image

ZY123-GOOD commented 2 months ago

Wow, great job! You have a good ability to identify and solve problems. Wish you success in your research.