Giter Club home page Giter Club logo

ai-sdc's Introduction

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).

User Guides

A collection of user guides can be found in the 'user_stories' folder of this repository. These guides include configurable examples from the perspective of both a researcher and a TRE, with separate scripts for each. Instructions on how to use each of these scripts and which scripts to use are included in the README of the user_stories folder.

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 under Grant Numbers MC_PC_21033 and MC_PC_23006 as part of Phase 1 of the DARE UK (Data and Analytics Research Environments UK) programme (https://dareuk.org.uk/), delivered in partnership with Health Data Research UK (HDR UK) and Administrative Data Research UK (ADR UK). The specific projects were Semi-Automatic checking of Research Outputs (SACRO -MC_PC_23006) and Guidelines and Resources for AI Model Access from TrusTEd Research environments (GRAIMATTER - MC_PC_21033).­ This project has also been supported by MRC and EPSRC [grant number MR/S010351/1]: PICTURES.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.