Commit graph

152 commits

Author SHA1 Message Date
Maya Anderson
23db8b5668 Add the new citation to the main README
Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2023-03-20 11:32:52 +02:00
Maya Anderson
c53b7b0de7 Fix README.
Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2023-03-20 11:32:52 +02:00
Maya Anderson
c71f8f6e2f Fix references in README
Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2023-03-19 15:24:54 +02:00
Maya Anderson
89bc9f0989 Return a more specific class in calculate_privacy_score(). Add more type hints and comments. Make method static.
Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2023-03-19 15:24:54 +02:00
Maya Anderson
4c7cad86df Fix README references, and those in other comments
Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2023-03-19 10:34:56 +02:00
Maya Anderson
ab42e064a4 Add to .gitignore to ignore csv and png files generated during tests
Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2023-03-17 11:46:05 +02:00
Maya Anderson
52b6c58944 Add a short-running test to exercise various manager options
Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2023-03-17 11:46:05 +02:00
Maya Anderson
d77cdf0da3 Add README
Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2023-03-17 11:46:05 +02:00
Maya Anderson
39dc8026e6 Rename attack reference from mgr to attack
Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2023-03-17 11:46:05 +02:00
Maya Anderson
80bec0c45b Add a risk score to the base class DatasetAttackScore, so that every implementation could set it based on its specific values.
Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2023-03-17 11:46:05 +02:00
Maya Anderson
8a4df5a4a2 Additional review comments - moved result to score base class
Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2023-03-13 00:30:18 +02:00
Maya Anderson
4988fea08c Rename DatasetAttackPerRecordKnnProbabilities => DatasetAttackMembershipKnnProbabilities
Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2023-03-09 23:17:37 +02:00
Maya Anderson
a122976807 Address review comments - make dataset_name optional, fix filename. Fix score serialization - don't serialize the result.
Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2023-03-09 22:49:57 +02:00
Maya Anderson
3ae64054f8 Unite the interface so that the main method assess_privacy always returns a score, but the score may also contain an attack result, which can be further analyzed
Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2023-03-08 15:15:00 +02:00
Maya Anderson
69a9a8fa2b Rename and move knn_learner in attack strategy utils for readability according to review
Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2023-03-08 10:31:09 +02:00
Maya Anderson
185d9b9664 Fix share calculation, and find only 1 KNN per sample for it
Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2023-03-08 00:27:16 +02:00
Maya Anderson
e5f6089b23 Rename gan_leaks=>per_record_knn_probabilities and holdout=>whole_dataset_knn_distance
Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2023-03-08 00:27:16 +02:00
Maya Anderson
e7e725ea80 Address review comments:
extract common code, add comments, change ellipsis to pass

Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2023-03-08 00:27:16 +02:00
Maya Anderson
4a024d8d1e Add matplotlib to requirements
Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2023-03-06 11:01:08 +02:00
Maya Anderson
3f9271b225 Add Dataset assessment module
Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2023-03-06 10:01:45 +02:00
abigailgold
c153635e4d
Welcome contributions in readme (#69)
Signed-off-by: abigailt <abigailt@il.ibm.com>
2023-01-11 19:10:43 +02:00
abigailgold
d52fcd0041
Formatting (#68)
Fix most flake/lint errors and ignore a few others

Signed-off-by: abigailt <abigailt@il.ibm.com>
2022-12-25 15:13:57 +02:00
andersonm-ibm
b47ba24906 Create CI test workflow using GitHub Actions
Run Lint and PyTest on Python 3.8

Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2022-12-21 11:42:08 +02:00
abigailt
a76c3d2714 Fix random state to make tests pass
Signed-off-by: abigailt <abigailt@il.ibm.com>
2022-12-21 09:51:49 +02:00
abigailt
ba88bc09ba Add option for non-stratified split in minimizer
Signed-off-by: abigailt <abigailt@il.ibm.com>
2022-12-21 09:23:19 +02:00
Maya Anderson
89bdcfc00e Prepare project for CI: cleanup dependencies, fix test data location, cleanup assert.
Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
2022-12-20 16:00:36 +02:00
abigailt
805a489201 Add method to get predict function from blackbox classifier, add loss and optimizer params for pytorch models to generate shadow models
Signed-off-by: abigailt <abigailt@il.ibm.com>
2022-11-09 14:42:55 +02:00
abigailt
44d012857f Add loss and optimizer as properties
Signed-off-by: abigailt <abigailt@il.ibm.com>
2022-10-19 17:29:40 +03:00
abigailgold
1385f31dcf
Merge pull request #58 from IBM/pytorch_wrapper
Wrapper for Pytorch models
2022-08-02 17:23:46 +03:00
abigailt
64038f76f9 Merge with main 2022-08-01 18:12:03 +03:00
abigailt
dc5cc793ee Merge with main 2022-08-01 18:11:34 +03:00
abigailt
a9e2a35e18 Add support for xgboost XGBClassifier (#53) 2022-07-28 17:21:24 +03:00
olasaadi
74ce92acc4 fix 2022-07-26 18:37:44 +03:00
abigailt
a13415ad67 Externalize BlackboxClassifier dataset (x and predictions) 2022-07-25 16:31:45 +03:00
abigailt
fb534f7a0f BlackboxClassifier based on predictions to work with DatasetWithPredictions 2022-07-25 16:31:45 +03:00
abigailt
77a6e08c8e Keras regression support 2022-07-24 18:45:50 +03:00
Ron Shmelkin
521a2ccda9
add art to requirements.txt 2022-07-24 15:34:04 +03:00
Ron Shmelkin
15d7008224
remove self from array2numpy and array2torch_tensor functions 2022-07-24 15:32:09 +03:00
Ron Shmelkin
c77e34e373
update pytorch wrapper to use torch loaders
fix tests
and dataset style
2022-07-24 14:31:47 +03:00
olasaadi
fdc6005fce add validation set 2022-07-22 01:01:45 +03:00
olasaadi
65388da605 fix docstring 2022-07-20 18:39:53 +03:00
olasaadi
c2c7a01078 fix bug 2022-07-20 18:36:58 +03:00
olasaadi
6f69f5557b fix bug 2022-07-20 18:29:48 +03:00
olasaadi
3bf26b67d2 fix 2022-07-20 17:36:00 +03:00
abigailt
a7d156660e Wrap predict method in BlackBoxClassifierPredictMethod to avoid exception in ART when supplied method returns scalars 2022-07-20 13:33:19 +03:00
abigailt
1cc73b3da1 Check for mismatch between model output type and actual output 2022-07-20 13:33:19 +03:00
abigailt
bc7ab0cc7f Add model type to blackbox classifier (#49) 2022-07-20 13:33:19 +03:00
olasaadi
4973fbebc6 fix 2022-07-19 21:16:39 +03:00
abigailt
bc28f7f26a Return None where no predictions are available 2022-07-12 09:47:32 +03:00
abigailgold
00f9c16863
Support additional use cases for data (#46)
* Make ART black box classifier not apply preprocessing to data
* Add option to store predictions (in addition to x,y) in Dataset and Data classes
2022-07-11 14:28:09 +03:00