kohpangwei / data-poisoning-journal-release

17 stars 4 forks source link

generateAttackFnc.m seems incompatible with newer Matlab versions #2

Open SravB opened 3 years ago

SravB commented 3 years ago

Ah, sorry, that's an old file; please use the file in the README (generateAttackFnc.m). Thanks!

Originally posted by @kohpangwei in https://github.com/kohpangwei/data-poisoning-journal-release/issues/1#issuecomment-700429314

With reference to the above, I tried using the file (generateAttackFnc.m) as well but was having some difficulties (my Matlab version is 2016b).

Do you have an example of min-max attack generation with generateAttackFnc.m?

kohpangwei commented 3 years ago

Sorry for the late reply. Do you have more details with the error you encountered with generateAttackFnc.m? We used Matlab 2011b, so it might be because of Matlab version issues; sorry about that.

SravB commented 3 years ago

There wasn't one particular issue (once I resolve one, another seems to pop up) but like you've mentioned it seems to be due to general Matlab version issues (unfortunately my machine isn't compatible with versions prior to Matlab 2016).

I am wondering if there is any other way to run the code or if there's a Python interface for the min-max attack ? (for reference I was able to run the influence attack which was in Python but mainly was interested in running min-max)

kohpangwei commented 3 years ago

Yeah, sadly that does seem like Matlab version issues. For legacy reasons, we started with Matlab for that; we then started a Python version but found that it was significantly slower than the Matlab version despite using the same underlying optimization libraries, so we stuck with Matlab. You should be able to adapt the Minimizer class in Python to implement the min-max attack, but it would need some editing/fixing. Sorry for the trouble.