Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallelization support in AutoAttack [JATIC-I2-IBM] #2258

Merged
merged 9 commits into from
Sep 13, 2023

Conversation

kieranfraser
Copy link
Collaborator

@kieranfraser kieranfraser commented Aug 25, 2023

Description

Adding parallelization (CPU) support for AutoAttack to facilitate identification of attack combinations with lowest perturbations whilst maximizing CPU usage.

Addresses elements of #618, fixes #2256

Type of change

Please check all relevant options.

  • Improvement (non-breaking)
  • Bug fix (non-breaking)
  • New feature (non-breaking)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Testing

Please describe the tests that you ran to verify your changes. Consider listing any relevant details of your test configuration.

  • tests/attacks/evasion/test_auto_attack.py - added test_generate_parallel

Test Configuration:

  • OS: macOS
  • Python version: 3.10
  • ART version or commit number: dev_1.16.0

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
@beat-buesser beat-buesser self-requested a review August 25, 2023 09:26
@beat-buesser beat-buesser self-assigned this Aug 25, 2023
@beat-buesser beat-buesser added the enhancement New feature or request label Aug 25, 2023
@beat-buesser beat-buesser added this to the ART 1.16.0 milestone Aug 25, 2023
…t for lower perturbation in parallel mode.

Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
@codecov-commenter
Copy link

codecov-commenter commented Sep 4, 2023

Codecov Report

Merging #2258 (b6595c9) into dev_1.16.0 (161c406) will increase coverage by 1.96%.
Report is 5 commits behind head on dev_1.16.0.
The diff coverage is 93.33%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Impacted file tree graph

@@              Coverage Diff               @@
##           dev_1.16.0    #2258      +/-   ##
==============================================
+ Coverage       83.87%   85.83%   +1.96%     
==============================================
  Files             318      318              
  Lines           28329    28356      +27     
  Branches         5157     5169      +12     
==============================================
+ Hits            23761    24340     +579     
+ Misses           3243     2708     -535     
+ Partials         1325     1308      -17     
Files Changed Coverage Δ
art/metrics/metrics.py 89.93% <ø> (ø)
art/attacks/evasion/auto_attack.py 91.81% <91.30%> (+7.37%) ⬆️
art/attacks/attack.py 92.90% <100.00%> (+0.05%) ⬆️
art/defences/trainer/adversarial_trainer.py 92.30% <100.00%> (+0.27%) ⬆️
art/estimators/classification/pytorch.py 86.36% <100.00%> (+0.51%) ⬆️

... and 17 files with indirect coverage changes

Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
@kieranfraser kieranfraser marked this pull request as ready for review September 4, 2023 15:49
Copy link
Collaborator

@beat-buesser beat-buesser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kieranfraser Thank you very much for adding the first multiprocessing feature to ART's attacks. I have added a few minor suggestions. Please let me know what you think!

art/attacks/evasion/auto_attack.py Outdated Show resolved Hide resolved
art/attacks/evasion/auto_attack.py Show resolved Hide resolved
art/attacks/evasion/auto_attack.py Outdated Show resolved Hide resolved
art/attacks/evasion/auto_attack.py Outdated Show resolved Hide resolved
art/attacks/evasion/auto_attack.py Outdated Show resolved Hide resolved
art/attacks/evasion/auto_attack.py Outdated Show resolved Hide resolved
art/attacks/evasion/auto_attack.py Show resolved Hide resolved
notebooks/attack_parallel_auto_attack.ipynb Show resolved Hide resolved
@beat-buesser beat-buesser merged commit 7f33be1 into Trusted-AI:dev_1.16.0 Sep 13, 2023
37 checks passed
@beat-buesser beat-buesser linked an issue Sep 22, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question: Is parallel attack support a useful feature within ART?
3 participants