Skip to content

[EMNLP 2020] "T3: Tree-Autoencoder Constrained Adversarial Text Generation for Targeted Attack" by Boxin Wang, Hengzhi Pei, Boyuan Pan, Qian Chen, Shuohang Wang, Bo Li

AI-secure/T3

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

T3

This is the official code base for the EMNLP 2020 paper, "T3: Tree-Autoencoder Constrained Adversarial Text Generation for Targeted Attack".

This repo contains the code to attack both classification models (self-attentive models and BERT) and question answering models (BiDAF and BERT). We put our attack code in each folders.

You may use our code to attack other NLP tasks.

Note

Before using our T3(Sent), a tree-based autoencoder needs to be trained in a large corpus.

Train Tree-based Autoencoder

We trained our tree-based autoencoder on the Yelp review training dataset.

Related code can be found SAM-attack/my_generator/. Before training, each sentence in the training set should be parsed by Stanford CoreNLP Parser to get its dependency structures.

We also provide our pre-trained tree auto-encoder checkpoint here.

Contributions

We welcome all kinds of contribution by opening a pull request. If you have questions, please open an issue for discussion.

About

[EMNLP 2020] "T3: Tree-Autoencoder Constrained Adversarial Text Generation for Targeted Attack" by Boxin Wang, Hengzhi Pei, Boyuan Pan, Qian Chen, Shuohang Wang, Bo Li

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published