Skip to main content

Tools for the statistical disclosure control of machine learning models

Project description

License Latest Version DOI codecov Python versions

AI-SDC

A collection of tools and resources for managing the statistical disclosure control of trained machine learning models. For a brief introduction, see Smith et al. (2022).

Content

  • aisdc
    • attacks Contains a variety of privacy attacks on machine learning models, including membership and attribute inference.
    • preprocessing Contains preprocessing modules for test datasets.
    • safemodel The safemodel package is an open source wrapper for common machine learning models. It is designed for use by researchers in Trusted Research Environments (TREs) where disclosure control methods must be implemented. Safemodel aims to give researchers greater confidence that their models are more compliant with disclosure control.
  • docs Contains Sphinx documentation files.
  • example_notebooks Contains short tutorials on the basic concept of "safe_XX" versions of machine learning algorithms, and examples of some specific algorithms.
  • examples Contains examples of how to run the code contained in this repository:
    • How to simulate attribute inference attacks attribute_inference_example.py.
    • How to simulate membership inference attacks:
      • Worst case scenario attack worst_case_attack_example.py.
      • LIRA scenario attack lira_attack_example.py.
    • Integration of attacks into safemodel classes safemodel_attack_integration_bothcalls.py.
  • risk_examples Contains hypothetical examples of data leakage through machine learning models as described in the Green Paper.
  • tests Contains unit tests.

Documentation

Documentation is hosted here: https://ai-sdc.github.io/AI-SDC/

Quick Start

Development

Clone the repository and install the dependencies (safest in a virtual env):

$ git clone https://github.com/AI-SDC/AI-SDC.git
$ cd AI-SDC
$ pip install -r requirements.txt

Then run the tests:

$ pip install pytest
$ pytest .

Or run an example:

$ python -m examples.lira_attack_example

Installation / End-user

PyPI package

Install aisdc (safest in a virtual env) and manually copy the examples and example_notebooks.

$ pip install aisdc

Then to run an example:

$ python attribute_inference_example.py

Or start up jupyter notebook and run an example.

Alternatively, you can clone the repo and install:

$ git clone https://github.com/AI-SDC/AI-SDC.git
$ cd AI-SDC
$ pip install .

This work was funded by UK Research and Innovation Grant Number MC_PC_21033 as part of Phase 1 of the DARE UK (Data and Analytics Research Environments UK) programme (https://dareuk.org.uk/), delivered in partnership with HDR UK and ADRUK. The specific project was Guidelines and Resources for AI Model Access from TrusTEd Research environments (GRAIMATTER).­ This project has also been supported by MRC and EPSRC [grant number MR/S010351/1]: PICTURES.

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

aisdc-1.0.6.tar.gz (99.8 kB view details)

Uploaded Source

Built Distribution

aisdc-1.0.6-py3-none-any.whl (82.1 kB view details)

Uploaded Python 3

File details

Details for the file aisdc-1.0.6.tar.gz.

File metadata

  • Download URL: aisdc-1.0.6.tar.gz
  • Upload date:
  • Size: 99.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for aisdc-1.0.6.tar.gz
Algorithm Hash digest
SHA256 594ad19b3f0d3d36d577f5588817cb6ef77b804e43b3c62f83be888b3cdbb991
MD5 bd73ce564805cd58a311caf06744b24e
BLAKE2b-256 ddc42d2021fd7c2b372b0c45368fda85dc55e1dcb4a2d5ac9294c9c1006db29c

See more details on using hashes here.

File details

Details for the file aisdc-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: aisdc-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 82.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for aisdc-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d32fc08c06e05fc672bb516c487fe477dc3ad5e8ac9e9d092697ac43d0898731
MD5 30b53cd07bfd1a28ecebcfd0e9a4bfb5
BLAKE2b-256 e3fa13089c7f3e32418204345e66341d1d932b588f5b48c1ebbf0079a4c01a4d

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