Home

Awesome

Probability Weighted Word Saliency(PWWS)

This repository contains Keras implementations of the ACL2019 paper Generating Natural Language Adversarial Examples through Probability Weighted Word Saliency.

Overview

Dependencies

Usage

Result on pretrained model

runs/contains some pretrained NN models, the information of these models are showed as the following table.

We use these pretrained models to generate 1000 adversarial examples with PWWS.

If you want to use this model, rename the them or modify the paths to model in the .py files.

data_setneural_networktest_setclean_1000adv_1000sub_rateNE_rate
IMDBword_cnn88.792%86.2%5.7%3.933%21.395%
word_bdlstm87.472%86.8%2.0%4.206%11.094%
word_lstm88.420%89.8%10.4%6.816%6.548%
AG's Newsword_cnn90.526%89.0%13.2%12.308%30.877%
word_bdlstm90.711%89.3%12.9%13.494%27.227%
word_lstm91.829%91.4%18.1%18.102%27.374%
char_cnn88.224%88.5%20.0%11.979%23.241%
Yahoo! Answersword_cnn88.427%96.1%8.7%33.067%12.768%
word_bdlstm88.876%94.4%9.4%20.752%7.016%

Contact

Acknowledgments