Trusted-AI / adversarial-robustness-toolbox

Adversarial Robustness Toolbox (ART) - Python Library for Machine Learning Security - Evasion, Poisoning, Extraction, Inference - Red and Blue Teams

Home Page:https://adversarial-robustness-toolbox.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AdversarialTrainer parameter name missmatch

danielele77 opened this issue · comments

The problem occures when AdversarialTrainer is used with model, which is trained with Tensorflow/Keras >V2 and fit function is called on instance of AdversarialTrainer.

The problem is in AdversarialTrainer class fit() function in line 262, where is as paramared used nb_epochs, but this is not correct because Keras in older versions used nb_epoch so the Error is raised as you can see on screenshot below.
image

Keras has back support, but the correct parameter need to be used.
image

To Reproduce
Steps to reproduce the behavior: (see screenshot below)

  1. Create model
  2. Create KerasClassifier with model from step 1
  3. Create attack (e.g. FastGradientMethod)
  4. Create AdversarialTrainer with created attack from step 3 as parameter
  5. Call fit function on AdversarialTrainer instance

Expected behavior
The fit function is exectuted

Screenshots
image

System information (please complete the following information):

  • Ubuntu 20.04.6
  • Python version 3.8
  • ART version "1.16.0"
  • TensorFlow 2.10 / Keras 2.10

Hi @danielele77 Thank you very much for reporting this issue, we'll fix it as soon as possible. Please let me know if you would be interested to work on a solution for this issue.

Hi @danielele77 Thank you very much for reporting this issue, we'll fix it as soon as possible. Please let me know if you would be interested to work on a solution for this issue.

Hi @beat-buesser, thank your response. Due to my time availability, I am unfortunately not able to work on a solution to this problem.
Edit: Sorry, for updates of state of the problem