Azure / counterfit

a CLI that provides a generic automation layer for assessing the security of ML models
MIT License
805 stars 129 forks source link

Unable to Load from Config.json #38

Open jiansuozhe opened 2 years ago

jiansuozhe commented 2 years ago

Hello @moohax,

I found that I cannot load the framework info from Config.json when loading framework. Could you please tell me how to deal with this problem? Thank you.

WeChat Screenshot_20220417232612

moohax commented 2 years ago

This is just a warning. You can optionally provide a configuration file that will set defaults or limit the attacks that get loaded. Otherwise, everything will load dynamically, checkout art.py to see how everything gets loaded.

jiansuozhe commented 2 years ago

Hello @moohax,

I am trying to add new attacks to the old version of Counterfit (There is no extraction attack and inference attack in the old version). Could you please give me some tips?

For instance, I consulted the config file in the new Counterfit version and tried to create a new file for utilizing Functionally Equivalent Extraction attack from ART in the old version. Could you please tell me if I need to add some new information in the file? Thank you. WeChat Screenshot_20220428023650 WeChat Screenshot_20220428024236

jiansuozhe commented 2 years ago

@moohax,

To add extraction attack into the old version, I modified some functions in targets.py and run_scan_utils.py. Could you please tell me if I need to modify other modules? Thank you.

jiansuozhe commented 2 years ago

WeChat Screenshot_20220428044635 Does it mean I have to add num_neurons into FunctionallyEquivalentExtraction.py? Thank you.

jiansuozhe commented 2 years ago

@moohax

moohax commented 2 years ago

@jiansuozhe It's a property of the FEE attack in ART. Been a while since I've looked, what version are you running?

You'll want to add it to the BlackboxWrapper, where ever that is...which I know isn't helpful. Let me know a version number :)