My first time asking a question in stack. I have been trying to generate adversarial examples using FGSM and projected gradient methods using Cleverhans 4.0.0. However, the adversarial output turns out to be identical to after compiling the following:
adv_fgsm_example = fast_gradient_method(model, original_input, eps=0.3, np.inf, targeted=False)
The model is a simple 4-layer NN implemented in the same fashion as those in the tutorial. The original_input is a 100x57 numpy array with values(float) between 0 and 1.
# Select an input index to visualize
input_index = 99
# 'original_sample' and 'adv_fgsm_example' are numpy arrays that can be indexed
original_features = original_input[input_index].numpy()
adversarial_features = adv_fgsm_example[input_index].numpy()
With the following return proving the adversarial output is identical to input.
array([ True, True, True, True, True, True, True, True, True,
True, True, True, True, True, True, True, True, True,
True, True, True, True, True, True, True, True, True,
True, True, True, True, True, True, True, True, True,
True, True, True, True, True, True, True, True, True,
True, True, True, True, True, True, True, True, True,
True, True, True])
Does anyone know the reason to this?
I've tried with pgm but with the same result