Constrained attacks
Description
Constrained attacks is a framework for constraints adversarial examples unified across multiple constraints' domain. It currently supports a large diversity of constraints (linear and non-linear). We instantiated our framework with two attacks:
- MoEvA2: a multi-objective genetic based approach
- C-PGD: a gradient based approach extended from PGD (cite) to support domain constraints.
To learn more, check out our paper A Unified Framework for Adversarial Attack and Defense in Constrained Feature Space.
Installation
Using pip
pip install constrained-attacks
Dependencies
constrained-attacks requires:
- python = "~3.8"
- numpy = "^1.22.3"
- joblib = "^1.1.0"
- pymoo = "^0.5.0"
- tqdm = "^4.63.1"
- pandas = "^1.4.1"
Additional optional requirements for C-PGD are:
- tensorflow = "2.8"
- adversarial-robustness-toolbox[tensorflow] = "1.10"
Examples
You can find a usage example
- for MoEvA2: tests/attacks/moeva/test_moeva_run.py
- for C-PGD: tests/attacks/cpgd/test_pgd_run.py
- for the constraints definition: tests/attacks/moeva/url_constraints.py.
Citation
If you have used our framework for research purposes, you can cite our publication by:
BibTex:
@article{simonetto2021unified,
title={A unified framework for adversarial attack and defense in constrained feature space},
author={Simonetto, Thibault and Dyrmishi, Salijona and Ghamizi, Salah and Cordy, Maxime and Traon, Yves Le},
journal={arXiv preprint arXiv:2112.01156},
year={2021}
}
Metadata
Release files for constrained-attacks 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| constrained-attacks-0.1.1.tar.gz | 17.5 kB | Without provenance | Details for constrained-attacks-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| constrained_attacks-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for constrained_attacks-0.1.1-py3-none-any.whl |
Total release size: 41.8 kB
Release files / constrained-attacks-0.1.1.tar.gz
| Download URL | constrained-attacks-0.1.1.tar.gz |
|---|---|
| Size | 17.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13f8a362f35d7d22afe1eb01a324ed6d121cfc0808dcd798bd2eeb265938132a
|
|
BLAKE2b-256 checksum How to use checksums |
6187dee7ea48f0342357e172105f1f038cbbea15277d831e3019be2ac77e9a9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.8.10 Windows/10
|
Release files / constrained_attacks-0.1.1-py3-none-any.whl
| Download URL | constrained_attacks-0.1.1-py3-none-any.whl |
|---|---|
| Size | 24.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d090c1b925b4b18171f8d9281fdb88351de35afcb3202b3cd0c16c09c73d8a5a
|
|
BLAKE2b-256 checksum How to use checksums |
01171a945e42d7bcb7da9cb3a73c337877cab8825e6e44d6c2ae0fb488aa21b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.8.10 Windows/10
|
Security for constrained-attacks 0.1.1
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.