-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Randomised smoothing fix #1678
Randomised smoothing fix #1678
Conversation
Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
Codecov Report
@@ Coverage Diff @@
## dev_1.10.2 #1678 +/- ##
==============================================
- Coverage 88.13% 87.94% -0.19%
==============================================
Files 259 259
Lines 21349 21397 +48
Branches 3789 3800 +11
==============================================
+ Hits 18816 18818 +2
- Misses 1592 1625 +33
- Partials 941 954 +13
|
Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
This pull request introduces 2 alerts when merging 048aab5 into 084e976 - view on LGTM.com new alerts:
|
art/estimators/certification/randomized_smoothing/randomized_smoothing.py
Outdated
Show resolved
Hide resolved
art/estimators/certification/randomized_smoothing/randomized_smoothing.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @GiulioZizzo Thank you very much for noticing this issue and fixing it with your pull request! I have made a few very minor comments on ordering imports and adding comments. What do you think?
…moothing.py Co-authored-by: Beat Buesser <49047826+beat-buesser@users.noreply.github.com> Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
Co-authored-by: Beat Buesser <49047826+beat-buesser@users.noreply.github.com> Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
Co-authored-by: Beat Buesser <49047826+beat-buesser@users.noreply.github.com> Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
Co-authored-by: Beat Buesser <49047826+beat-buesser@users.noreply.github.com> Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
4ac6a5d
to
1fd6ac0
Compare
Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
This pull request introduces 2 alerts when merging f6b4f91 into 67fa652 - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @GiulioZizzo Thank you very much!
Description
The old implementation of randomised smoothing only added noise once to the data. We now add a new noise draw each time the data is seen. For torch and tensorflow we implement a slightly modified version of the normal fitting procedure which uses noise. For numpy we call
fit
with epoch=1 for the required amount.We add warnings to the user to be careful with the use of pre-processors as we are adding the noise after their application for torch/tensorflow and before their application for numpy. In either case, the use of pre-processors could cause the expected certification radius to vary.
Fixes #1617
Type of change
Please check all relevant options.
Testing
existing tests for randomized smoothing pass
Test Configuration:
Checklist