#195 · Primary category: MLOps & Evaluation

OpenAttack

adversarial-attacks adversarial-example natural-language-processing nlp pytorch

An Open-Source Package for Textual Adversarial Attack.

Project last updated:07/20/23

GitHub Stars

777

Forks

128

Contributors

22

License

MIT

Why we included this project

OpenAttack is a Python toolkit for testing how easily a text classifier can be fooled. It handles the whole adversarial workflow, from preprocessing input and talking to the victim model to generating perturbed examples and scoring the results, so you can run established attack methods against a model you already have, whether that is a fine-tuned BERT from Hugging Face or a custom classifier you wrap yourself. It ships with several built-in attack baselines and victim models, and it works in both English and Chinese, which makes it a quick way to get a robustness baseline without writing attack code from scratch. The examples it generates can also feed into adversarial training to harden a model, so the package works as a research and evaluation tool rather than just a one-off attack script.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category