Amulet is a Python machine learning (ML) package to evaluate the susceptibility of different risks to security, privacy, and fairness.
Project description
Amulet
Amulet is a Python machine learning (ML) package to evaluate the susceptibility of different risks to security, privacy, and fairness. Amulet is applicable to evaluate how algorithms designed to reduce one risk may impact another unrelated risk and compare different attacks/defenses for a given risk.
Amulet builds upon prior work titled “SoK: Unintended Interactions among Machine Learning Defenses and Risks” which appears in IEEE Symposium on Security and Privacy 2024. The SoK covers only two interactions and identifies the design of a software library to evaluate unintended interactions as future work. Amulet addresses this gap by including eight different risks each covering their own attacks, defenses and metrics.
Amulet is:
- Comprehensive: Covers the most representative attacks/defenses/metrics for different risks.
- Extensible: Easy to include additional risks, attacks, defenses, or metrics.
- Consistent: Allows using different attacks/defenses/metrics with a consistent, easy-to-use API.
- Applicable: Allows evaluating unintended interactions among defenses and attacks.
Built to work with PyTorch, you can incorporate Amulet into your current ML pipeline to test how your model interacts with these state-of-the-art defenses and risks. Alternatively, you can use the example pipelines to bootstrap your pipeline.
Requirements
Note: The package requires the CUDA version to be 11.8 or above for PyTorch 2.2
Install poetry
python3 -m venv .poetry_venv
. .poetry_venv/bin/activate
or . .venv/bin/activate.fish
python -m pip install --upgrade pip
pip install poetry
deactivate
Consider setting .poetry_venv/bin/poetry config virtualenvs.create false
to prevent poetry from creating its own venv.
Main venv
To create the virtual environemnt:
python3 -m venv .venv
To activate it:
source .venv/bin/activate
or if using fish . .venv/bin/activate.fish
Then, to install the dependencies:
.poetry_venv/bin/poetry install
DISCLAIMER: Installing pytorch
with poetry
is still weird but should work.
Using poetry
(Inside your .venv
);
when you add or modify any dependencies in pyproject.toml
, run .poetry_venv/bin/poetry lock --no-update
to rebuild the dependency graph.
Then run .poetry_venv/bin/poetry install
to install the dependencies.
pre-commit
There're some pre-commit hooks configured for this project.
Also, poetry
installs pre-commit
as a dev dependency.
Run pre-commit install
for consistent development.
Getting Started
Test installation
To test your installation, please run amulet/examples/get_started.py. This script also serves as a starting point to learn how to use the library.
Learn More
For more information on the basics about the library, please see the Getting Started guide.
To see the attacks, defenses, and risks (modules) that Amulet implements, please refer to the Module Heirarchy (link TBD) in the Tutorial (link TBD).
For each module, please see amulet/examples for implementations of pipelines that include recommendations on how to run each module.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file amuletml-0.1.0.tar.gz
.
File metadata
- Download URL: amuletml-0.1.0.tar.gz
- Upload date:
- Size: 45.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.6 Linux/5.15.0-119-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 668d795687667bafa8b6cc39a2b733e17a0bbf36f785405cff972406c589d242 |
|
MD5 | 36cfd51703e21f0876609e18ad1bc0b6 |
|
BLAKE2b-256 | d85ca9d3992efe4ff9aebd556b0296b57e527b6a530ada90198e759af98d1003 |
File details
Details for the file amuletml-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: amuletml-0.1.0-py3-none-any.whl
- Upload date:
- Size: 67.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.6 Linux/5.15.0-119-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91b03e5adf3f75d1f97844a6bb17c762c5da6fd4d78666f524eafcd80a1fb9ce |
|
MD5 | 15a19e6d74ef8046a054b65cb32df338 |
|
BLAKE2b-256 | d25c4399420594282cd6c65a05e92b2a71b1333f0efed0e614655f6edde24b57 |