You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/local/lib/python3.8/dist-packages/art/attacks/evasion/lowprofool.py:159: RuntimeWarning: divide by zero encountered in power
self.importance_vec * self.importance_vec * perturbations * np.power(np.abs(perturbations), norm - 2)
/usr/local/lib/python3.8/dist-packages/art/attacks/evasion/lowprofool.py:159: RuntimeWarning: invalid value encountered in multiply
self.importance_vec * self.importance_vec * perturbations * np.power(np.abs(perturbations), norm - 2)
...
...
ValueError: Input contains NaN, infinity or a value too large for dtype('float32').
From RuntimeWarning: divide by zero encountered in power,
In LowProFoolL307-L313 , the attack model initialized the perturbation with np.zero
Expected behavior
The attack model should also generate adversarial examples succuessfully.
System information (please complete the following information):
Windows 11
Python 3.8
ART 1.12.2
scikit-learn 1.0.2
The text was updated successfully, but these errors were encountered:
ZhipengHe
changed the title
art.attack.evasion.LowProFool encounter bugs when using L_1-norm art.attack.evasion.LowProFool encounter bugs when using $\ell_1-norm$
Dec 14, 2022
ZhipengHe
changed the title
art.attack.evasion.LowProFool encounter bugs when using $\ell_1-norm$ art.attack.evasion.LowProFool encounter bugs when using L_1-norm (or 0<p<2)
Dec 14, 2022
Hi @ZhipengHe Thank you very much for the detailed description of the issue! Please apologize my delayed response. It looks like the issue is that if in the last code segment in our message above for norm < 2 will result in 1 / perturbations^abs(norm). This creates the division by zero error of any element of perturbations is zero. I think for norm < 2 we would have to add a check that perturbations has to be larger than zero at all times.
Describe the bug
When using$p \in (0, 2)$ , the attack model will report ValueError.
art.attack.evasion.LowProFool
method, if I set parameternorm
in the range ofTo Reproduce
Steps to reproduce the behavior:
norm>=2
ornorm='inf'
, the attack model works well. For example,Result is :
0<norm<2
, the attack model doesn't work. For example,Error:
From
RuntimeWarning: divide by zero encountered in power
,In
LowProFool
L307-L313 , the attack model initialized the perturbation withnp.zero
In
LowProFool
L148-L171 , when0< norm <2
, it will encounterdivide by zero
error.Expected behavior
The attack model should also generate adversarial examples succuessfully.
System information (please complete the following information):
The text was updated successfully, but these errors were encountered: