-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to apply secml_malware to my multiclass malconv classifier? #24
Comments
Hello! First, thank you for using my library! :)
For black-box approaches, the process is similar, you would need to include the target class. Otherwise, I'll schedule the feature, and I'll code in the meantime. Let me know if this helped! |
Your reply helps a lot! I'am doing the implementation now. It looks like a hard job due to my poor coding skill (: . But I will try my best. If I encounter problems, I will contact you. Thank you so much! |
When modifying c_fast_gradient_sign_evasion for multilevel, do we need to keep the binary cross entropy or change it to a regular cross entropy loss? And if so, would we want to only want to turn on the bit that corresponds to the target class and leave the rest of the classes as zeros? |
Well, it depends on which loss function you want to use. |
I am happy to help with this if you need it. I am just wondering what is the best way to keep the semantics of attacks the same. If I was to use BCE, would I need change line 48 of c_fast_gradient_sign_evasion.py such that it would be malware_class = torch.ones(y.shape) and malware_class[target_y] = 0 or malware_class = torch.zeros(y.shape) and malware_class[target_y] = 1? |
The semantics do not change, it is just the loss function that varies the loss landscape of the attack. |
ah ok. I will wait for you to make the needed changes then. I appreciate your help! |
Hi @zangobot , I am using the malconv to deal with the malware family classification problem. It's a Multi-classification tasks so I modify the malconv's last fc layer's out_features dimension and I train the malconv from scratch. If I want to apply secml_malware library to attack the multiclass malconv, what should I do?
Thanks in advance :)
The text was updated successfully, but these errors were encountered: