Automated Membership Inference Attacks: Discovering MIA Signal Computations using LLM Agents
Project description
Installation
To install automia:
python -m pip install -e ".[all]"
A sandbox environment (env.sh) that will be used to execute the generated MIAs should be installed with common computation packages (such as numpy, torch, scipy,..) and packages required to run the MIAs. We recommend to save the model's outputs (i.e., logits) using safetensor and read load to save computational cost each trial.
Running AutoMIA for a MIA setting:
-
Prepare a codebase template including
env.sh,template.py, andconfig.yaml. Example in (examples/bbllm/arxiv_pythia) -
Run vllm servers.
automiarequires two APIs (LLM and embedding) and then run automia
python -m automia.main --experiment-dir examples/bbllm/arxiv_pythia --timeout 300 --model-name qwen --base-url http://localhost:9800/v1 --provider vllm --embedding-model-name qwen-embedding --embedding-base-url http://localhost:9700/v1 --budget 100 --output-dir results/bbllm/arxiv
eval.pyandvis.pyare available to eval the top 10 MIAs and visualize the MIAs
python vis.py --output-dir results/bbllm/arxiv
A html file index.html will be written into results/bbllm/arxiv
python eval.py --template examples/bbllm/arxiv_pythia/template.py --output-dir results/bbllm/arxiv
A cvs file will be written into results/bbllm/arxiv
Please make sure the stored data is available to reload for our example template.py (line 135 in examples/bbllm/arxiv_pythia/template.py) by running generate.py scripts.
The template.py must have an argument of `output-dir`, create this output directory, and write the results into `mia-results.json` with 4 keys: "auc_score", "tpr_1_score", "tpr_5_score", "combined_score".
A detailed documents and step-by-step to reproceduce our paper's experiments will be available soon! Feel free to reach out to me at <email> or create issues.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file automia-0.0.1.tar.gz.
File metadata
- Download URL: automia-0.0.1.tar.gz
- Upload date:
- Size: 22.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
594bf20fe111ff69f6313b7d5196c811c8c329e4c2825043d4f965459b39b57f
|
|
| MD5 |
7fdcd75809b2fcdc431554c4d29353fc
|
|
| BLAKE2b-256 |
64ab19aeda1e76ca93f4d7b15ff6c93210a242dd324e3d9ed205e503195a1216
|
File details
Details for the file automia-0.0.1-py3-none-any.whl.
File metadata
- Download URL: automia-0.0.1-py3-none-any.whl
- Upload date:
- Size: 28.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46da806cdb523683c191113eb2cea11fff135bd315f9502d7591aa1449748dc2
|
|
| MD5 |
cdb7b94c846986db3d2ffd77ec837e2a
|
|
| BLAKE2b-256 |
a2eb389cb7ce6bae5537cb78e61b0d97f2ed12a2b563dffc376fd251b7062b21
|