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

BadDet Regional Misclassification Attack Bug Fix #2110

Merged
merged 3 commits into from
Apr 18, 2023

Conversation

f4str
Copy link
Collaborator

@f4str f4str commented Apr 18, 2023

Description

Upon further investigation of the BadDet attacks in the supplemental materials, the Regional Misclassification Attack (RMA) should be able to poison all bounding boxes regardless of the class type.

To address this bug/missing feature, the source_class parameter for BadDetRegionalMisclassificationAttack has been changed to additionally accept None (or just be left blank). Therefore, if no source is provided then all classes will be poisoned. Otherwise, if the source is provided then only that class will be poisoned. This will implement the missing feature and keep additional functionality for single class poisoning.

The BadDet demo in notebook/poisoning_attack_bad_det.ipynb has been updated to show this new feature.

Fixes #2111

Type of change

  • 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.

  • Updated the BadDet RMA test case with this new feature.

Test Configuration:

  • OS
  • Python version
  • ART version or commit number
  • TensorFlow / Keras / PyTorch / MXNet version

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: Farhan Ahmed <Farhan.Ahmed@ibm.com>
Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com>
Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com>
@beat-buesser beat-buesser self-requested a review April 18, 2023 17:43
@beat-buesser beat-buesser self-assigned this Apr 18, 2023
@beat-buesser beat-buesser added bug Something isn't working improvement Improve implementation labels Apr 18, 2023
@beat-buesser beat-buesser added this to the ART 1.14.1 milestone Apr 18, 2023
@codecov-commenter
Copy link

codecov-commenter commented Apr 18, 2023

Codecov Report

Merging #2110 (3607185) into dev_1.14.1 (30e513c) will increase coverage by 9.64%.
The diff coverage is 33.33%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Impacted file tree graph

@@              Coverage Diff               @@
##           dev_1.14.1    #2110      +/-   ##
==============================================
+ Coverage       75.97%   85.62%   +9.64%     
==============================================
  Files             297      297              
  Lines           26516    26516              
  Branches         4867     4867              
==============================================
+ Hits            20145    22703    +2558     
+ Misses           5325     2574    -2751     
- Partials         1046     1239     +193     
Impacted Files Coverage Δ
art/attacks/poisoning/bad_det/bad_det_rma.py 96.42% <33.33%> (ø)

... and 41 files with indirect coverage changes

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 @f4str Thank you very much! The changes look good to me.

@beat-buesser beat-buesser merged commit 9a5ad34 into Trusted-AI:dev_1.14.1 Apr 18, 2023
@f4str f4str deleted the bad-dets-bug branch April 18, 2023 21:03
@beat-buesser beat-buesser added this to Pull request done in ART 1.14.1 Apr 18, 2023
@beat-buesser beat-buesser linked an issue Apr 20, 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
bug Something isn't working improvement Improve implementation
Projects
No open projects
ART 1.14.1
Pull request done
Development

Successfully merging this pull request may close these issues.

Missing Feature for BadDet Regional Misclassification Attack
3 participants