adversarial-robustness-toolbox
adversarial-robustness-toolbox copied to clipboard
Update utils.py
Use a different algorithm for norm=1, based on exponential distribution.
Description
A sample point is generated by a L1-normalized vector (in dimenion nb_dims + 1) of IID unit-exponential variables, then dropping the additional dimension and flipping signs randomly.
Fixes # (issue)
Type of change
Please check all relevant options.
- [v] Improvement (non-breaking)
- [v] 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.
- [ ] Test A
- [ ] Test B
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
Codecov Report
Merging #1805 (aa8f4d3) into dev_1.12.0 (5c97a8a) will increase coverage by
0.05%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## dev_1.12.0 #1805 +/- ##
==============================================
+ Coverage 85.39% 85.44% +0.05%
==============================================
Files 274 274
Lines 23857 23858 +1
Branches 4262 4261 -1
==============================================
+ Hits 20373 20386 +13
+ Misses 2422 2411 -11
+ Partials 1062 1061 -1
Impacted Files | Coverage Δ | |
---|---|---|
art/utils.py | 75.33% <100.00%> (+0.04%) |
:arrow_up: |
art/estimators/certification/abstain.py | 90.90% <0.00%> (-9.10%) |
:arrow_down: |
...poison_mitigation/neural_cleanse/neural_cleanse.py | 84.21% <0.00%> (-6.15%) |
:arrow_down: |
art/estimators/poison_mitigation/strip/strip.py | 94.44% <0.00%> (-5.56%) |
:arrow_down: |
art/defences/detector/poison/activation_defence.py | 83.23% <0.00%> (-0.29%) |
:arrow_down: |
art/attacks/evasion/sign_opt.py | 86.86% <0.00%> (+0.36%) |
:arrow_up: |
art/attacks/evasion/boundary.py | 93.97% <0.00%> (+1.20%) |
:arrow_up: |
...timators/poison_mitigation/neural_cleanse/keras.py | 92.36% <0.00%> (+13.88%) |
:arrow_up: |