Skip to main content

Modular framework to run Property Inference Attacks on Machine Learning models.

Project description

Property Inference Attacks

We propose a modular framework to run Property Inference Attacks on Machine Learning models.

Documentation

Installation

Please note that PyTorch is required to run this framework. Please find installation instructions corresponding to you here.

Usage

This framework is made modular for any of your experiments: you simply should define subclasses of Generator and Model to represent your data source and your evaluated model respectively.

From these, you can create a specific experiment configuration file. We suggest using hydra for your configurations, but parameters can also be passed in a standard dict.

Alternatively, you can extend the Experiment class.

Threat models and attacks

White-Box

In this threat model, we have access to the model's parameters directly. In this case, [1] defines three different attacks:

  • Simple meta-classifier attack
  • Simple meta-classifier attack, with layer weights' sorting
  • DeepSets attack

They are respectively designated by the keywords Naive, Sortand DeepSets.

Grey- and Black-Box

In this threat model, we have only query access to the model (we do not know its parameters). In the scope of the Grey-Box threat model, we know the model's architecture and hyperparameters - in the scope of Black-Box we do not.

For the Grey-Box case, [2] describes two simple attacks:

  • The Loss Test (represented by the LossTest keyword)
  • The Threshold Test (represented by the ThresholdTest keyword)

[3] also proposes a meta-classifier-based attack, that we use for both the Grey-Box and Black-Box cases: these are respectively represented by the GreyBox and BlackBox keywords. For the latter case, we simply default on a pre-defined model architecture.

Unit tests

The framework is provided with a few, simple unit tests. Run them with:

python -m unittest discover

to check the correctness of your installation.

Running an experiment

To run an experiment, you have to instanciate an Experiment object using a specific Generator and Model, and then run both targets and shadows before performing an attack.

It is possible to provide a list as a model hyperparameter: in that case, the framework will automatically optimise between the given options.

References

[1] Karan Ganju, Qi Wang, Wei Yang, Carl A. Gunter, and Nikita Borisov. 2018. Property Inference Attacks on Fully Connected Neural Networks using Permutation Invariant Representations. In Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security (CCS '18). Association for Computing Machinery, New York, NY, USA, 619–633. DOI:https://doi.org/10.1145/3243734.3243834

[2] Anshuman Suri, David Evans. 2021. Formalizing Distribution Inference Risks. 2021 Workshop on Theory and Practice of Differential Privacy, ICML. https://arxiv.org/abs/2106.03699

[3] Wanrong Zhang, Shruti Tople, Olga Ohrimenko. 2021. Leakage of Dataset Properties in Multi-Party Machine Learning. https://arxiv.org/abs/2006.07267

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

propinfer-1.1.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

propinfer-1.1.0-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file propinfer-1.1.0.tar.gz.

File metadata

  • Download URL: propinfer-1.1.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for propinfer-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c4a77f3c9af3a4977f14d9709f6f576b310930a52d977c136730a75deed824a0
MD5 8ef11c92031fcabafb3743d1cb85ac0e
BLAKE2b-256 65fbf8d3464661e9ab5be285cc142e617158807245b496b449c2a4970f79c404

See more details on using hashes here.

File details

Details for the file propinfer-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: propinfer-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for propinfer-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c0935c938e42ebc1fb1aab090e6a6ae81400b11494bd195dd81c9d976a0ff7fa
MD5 cc19a2f58ff086a946beb90963d93f30
BLAKE2b-256 f1cb8f922306ed816b426f36f36340ad449cf1f65c60e219abae55fd4a944744

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page