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

Support regression models in several inference attacks #1272

Merged

Conversation

GalHorowitz
Copy link
Contributor

Description

  • New Scikitlearn regression wrapper, ScikitlearnDecistionTreeRegressor moved to art.estimators.regression
  • Added a fixture for the diabetes regression dataset from scitkitlearn
  • _estimator_requirements now supports tuples to represent unions
  • MembershipInferenceBlackBox now supports regression models (when input_type='loss')
  • AttributeInferenceBlackBox and MembershipInferenceBlackBox now support regression models
  • Two new notebooks to demonstrate membership and attribute inference on regression models
  • New attribute inference baseline that uses the true label, used for evaluating attribute inference attacks

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

All unit tests pass.

Test Configuration:

  • OS: MacOS 11.4
  • Python version: 3.8.11

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-commenter
Copy link

codecov-commenter commented Aug 16, 2021

Codecov Report

Merging #1272 (7863d30) into dev_1.8.0 (bc6aa61) will decrease coverage by 15.47%.
The diff coverage is 69.67%.

Impacted file tree graph

@@              Coverage Diff               @@
##           dev_1.8.0    #1272       +/-   ##
==============================================
- Coverage      81.30%   65.83%   -15.48%     
==============================================
  Files            227      229        +2     
  Lines          19300    19488      +188     
  Branches        3502     3539       +37     
==============================================
- Hits           15691    12829     -2862     
- Misses          2309     5580     +3271     
+ Partials        1300     1079      -221     
Impacted Files Coverage Δ
...ference/attribute_inference/true_label_baseline.py 26.66% <26.66%> (ø)
...acks/inference/attribute_inference/meminf_based.py 76.62% <50.00%> (-10.22%) ⬇️
art/estimators/regression/scikitlearn.py 73.40% <73.40%> (ø)
...attacks/inference/attribute_inference/black_box.py 71.42% <75.00%> (-16.64%) ⬇️
...ttacks/inference/membership_inference/black_box.py 78.42% <82.75%> (-9.15%) ⬇️
art/estimators/scikitlearn.py 91.66% <90.47%> (-8.34%) ⬇️
art/utils.py 73.40% <94.73%> (-0.69%) ⬇️
art/attacks/attack.py 91.85% <100.00%> (-1.85%) ⬇️
.../attacks/inference/attribute_inference/__init__.py 100.00% <100.00%> (ø)
...ute_inference/white_box_lifestyle_decision_tree.py 77.77% <100.00%> (+0.41%) ⬆️
... and 49 more

@lgtm-com
Copy link

lgtm-com bot commented Aug 16, 2021

This pull request introduces 5 alerts and fixes 1 when merging 4129a2f into e637029 - view on LGTM.com

new alerts:

  • 4 for Module is imported with 'import' and 'import from'
  • 1 for Module is imported more than once

fixed alerts:

  • 1 for Non-callable called

@lgtm-com
Copy link

lgtm-com bot commented Aug 16, 2021

This pull request introduces 5 alerts and fixes 1 when merging 81cb991 into e637029 - view on LGTM.com

new alerts:

  • 4 for Module is imported with 'import' and 'import from'
  • 1 for Module is imported more than once

fixed alerts:

  • 1 for Non-callable called

@@ -35,6 +35,7 @@
ClassGradientsMixin,
ClassifierMixin,
)
from art.estimators.regression.scikitlearn import ScikitlearnDecisionTreeRegressor
Copy link
Collaborator

Choose a reason for hiding this comment

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

@beat-buesser Are you sure that ScikitlearnDecisionTreeRegressor should be used within the get_trees method of ScikitlearnGradientBoostingClassifier?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@abigailgold Yes, I think that should be correct. It looks like the trees of the ensemble in sklearn.ensemble.GradientBoostingClassifier are of type DecisionTreeRegressor in https://github.com/scikit-learn/scikit-learn/blob/2beed55847ee70d363bdbfe14ee4401438fba057/sklearn/ensemble/_gb.py#L195

@lgtm-com
Copy link

lgtm-com bot commented Aug 17, 2021

This pull request introduces 5 alerts and fixes 1 when merging 868f965 into e637029 - view on LGTM.com

new alerts:

  • 4 for Module is imported with 'import' and 'import from'
  • 1 for Module is imported more than once

fixed alerts:

  • 1 for Non-callable called

@lgtm-com
Copy link

lgtm-com bot commented Aug 17, 2021

This pull request introduces 5 alerts and fixes 1 when merging edbc1af into e637029 - view on LGTM.com

new alerts:

  • 4 for Module is imported with 'import' and 'import from'
  • 1 for Module is imported more than once

fixed alerts:

  • 1 for Non-callable called

@lgtm-com
Copy link

lgtm-com bot commented Aug 23, 2021

This pull request introduces 5 alerts and fixes 1 when merging 434dbf6 into e637029 - view on LGTM.com

new alerts:

  • 4 for Module is imported with 'import' and 'import from'
  • 1 for Module is imported more than once

fixed alerts:

  • 1 for Non-callable called

@lgtm-com
Copy link

lgtm-com bot commented Aug 30, 2021

This pull request introduces 5 alerts and fixes 1 when merging 961d1ef into a3525e9 - view on LGTM.com

new alerts:

  • 4 for Module is imported with 'import' and 'import from'
  • 1 for Module is imported more than once

fixed alerts:

  • 1 for Non-callable called

Signed-off-by: GalHorowitz <gal@galhorowitz.com>
Signed-off-by: GalHorowitz <gal@galhorowitz.com>
Signed-off-by: GalHorowitz <gal@galhorowitz.com>
Signed-off-by: GalHorowitz <gal@galhorowitz.com>
Signed-off-by: GalHorowitz <gal@galhorowitz.com>
…model

Signed-off-by: GalHorowitz <gal@galhorowitz.com>
Signed-off-by: GalHorowitz <gal@galhorowitz.com>
Signed-off-by: GalHorowitz <gal@galhorowitz.com>
…tack

Signed-off-by: GalHorowitz <gal@galhorowitz.com>
… regression model

Signed-off-by: GalHorowitz <gal@galhorowitz.com>
Signed-off-by: GalHorowitz <gal@galhorowitz.com>
Signed-off-by: GalHorowitz <gal@galhorowitz.com>
Signed-off-by: GalHorowitz <gal@galhorowitz.com>
…yleDecisionTree

Signed-off-by: GalHorowitz <gal@galhorowitz.com>
Signed-off-by: GalHorowitz <gal@galhorowitz.com>
Signed-off-by: GalHorowitz <gal@galhorowitz.com>
@lgtm-com
Copy link

lgtm-com bot commented Aug 31, 2021

This pull request introduces 5 alerts and fixes 2 when merging 7b84061 into a3525e9 - view on LGTM.com

new alerts:

  • 4 for Module is imported with 'import' and 'import from'
  • 1 for Module is imported more than once

fixed alerts:

  • 1 for Non-callable called
  • 1 for Missing call to `__init__` during object initialization

@beat-buesser beat-buesser self-assigned this Sep 1, 2021
@beat-buesser beat-buesser added the enhancement New feature or request label Sep 1, 2021
@beat-buesser beat-buesser added this to Pull request open in ART 1.8.0 via automation Sep 1, 2021
@beat-buesser beat-buesser added this to the ART 1.8.0 milestone Sep 1, 2021
@lgtm-com
Copy link

lgtm-com bot commented Sep 10, 2021

This pull request introduces 5 alerts and fixes 2 when merging 7863d30 into bc6aa61 - view on LGTM.com

new alerts:

  • 4 for Module is imported with 'import' and 'import from'
  • 1 for Module is imported more than once

fixed alerts:

  • 1 for Non-callable called
  • 1 for Missing call to `__init__` during object initialization

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 @GalHorowitz Thank you very much for this great pull request adding support for regression models in inference attacks!

@beat-buesser beat-buesser merged commit 088e0d4 into Trusted-AI:dev_1.8.0 Sep 13, 2021
ART 1.8.0 automation moved this from Pull request open to Pull request done Sep 13, 2021
@GalHorowitz GalHorowitz deleted the inference_regression_models branch September 15, 2021 06:02
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
No open projects
ART 1.8.0
  
Pull request done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants