Skip to main content

Property Inference Attacks

In this repository, we propose a modular framework to run Property Inference Attacks on Machine Learning models.

Documentation

Installation

You can get this package directly from pip:

python -m pip install propinfer

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.

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

Metadata

Release files for propinfer 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for propinfer 1.3.0
File Size Uploaded Provenance
propinfer-1.3.0.tar.gz 15.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for propinfer 1.3.0
File Interpreter ABI Platform
propinfer-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 32.1 kB

Release files / propinfer-1.3.0.tar.gz

Download URL propinfer-1.3.0.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d18eebfeba2a967650c5dc0ff412cfd9b0a7da910480c50b622f976945b1f2ed
BLAKE2b-256 checksum
How to use checksums
f53d2459f0f5f373dc17f38cc8c066312ff48542bdbc1f06a53be3cb8d1fb1b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

Release files / propinfer-1.3.0-py3-none-any.whl

Download URL propinfer-1.3.0-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c21c36946759c118d7d99825b3576a702b53ed0026a878aedcec0801a1f54d97
BLAKE2b-256 checksum
How to use checksums
212d310f97557d5bc2f688bea9a9708b84dde36bbd15ea8d482635b4f173e0f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

Security for propinfer 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page