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
Is your feature request related to a problem? Please describe.
I was benchmarking the performance of some black-box attacks and noticed that the Square Attack issued about 50% duplicated queries. This occurs because most queries are sent twice in a subtle way; see the code below.
Describe the solution you'd like
Update the implementation to reuse the last prediction outputs.
I am happy to send a PR if you find this performance improvement useful.
Describe alternatives you've considered
N/A
Additional context
For example, x_adv is passed to self.estimator.predict at L347, and its subset x_robust = x_adv[sample_is_robust] is immediately passed to self.loss, which boils down to a duplicated call of self.estimator.predict on the same inputs.
Is your feature request related to a problem? Please describe.
I was benchmarking the performance of some black-box attacks and noticed that the Square Attack issued about 50% duplicated queries. This occurs because most queries are sent twice in a subtle way; see the code below.
Describe the solution you'd like
Update the implementation to reuse the last prediction outputs.
I am happy to send a PR if you find this performance improvement useful.
Describe alternatives you've considered
N/A
Additional context
For example,
x_adv
is passed toself.estimator.predict
at L347, and its subsetx_robust = x_adv[sample_is_robust]
is immediately passed toself.loss
, which boils down to a duplicated call ofself.estimator.predict
on the same inputs.adversarial-robustness-toolbox/art/attacks/evasion/square_attack.py
Lines 346 to 357 in 337a15f
The text was updated successfully, but these errors were encountered: