Course Project for COMS 6998-10: Robustness and Security in ML Systems, Spring 2020 at Columbia University.
Group members:
- Weifan Jiang (wj2301)
- Haoxuan Wu (hw2754)
Please install dependencies including stanford NLP with English models, keras-preprocessing, google cloud translation API (may need to set up an account and provide credit card information), and tensorflow version 1 (our project is incompatible with version 2 or greater), etc.
Other dependencies can be downloaded following prompt.
Please download this zip file from google drive (Columbia account required), and unzip it in the root of repository.
Our implementation of the Sentence-level genetic algorithm with salency analysis, along with other helper functions is in sentence_level_genetic_attack.py
. Please change the envrionmental variables in the script accordingly (dataset name, google cloud API credentials, etc.).
A demostration on how to use our attack is in sentence_level_genetic_attack_demo.ipynb
. The example model used is a WordCNN trained with imdb dataset. sentence_level_genetic_attack_demo.pdf
is the result of the notebook exported to pdf.
-
Report for project at:
report/Sentence_Level_Adversarial_Attack_on_Natural_Language_Processing_Models.pdf
The pretrained models and preprocessing of input data are from Alzantot Et Al.. Our forked version of their original repo is here.