Home

Awesome

Lexical-AT

This is the codes of our paper: LexicalAT: Lexical-Based Adversarial Reinforcement Trainingfor Robust Sentiment Classification. The architecture of our Lexical-AT

Requirements

Training Examples

For CNN or LSTM

cd cnn_lstm
CUDA_VISIBLE_DEVIVES=0 bash sst_adv_cnn.sh

For Bert

Before executing the command below, you need to download the pretrained model and vocabulary of bert. The download url and other detailed information can be found in bert.

cd bert 
CUDA_VISIBLE_DEVICES=0 bash rt_adv_bert.sh

Note

Citation

If you use the above codes for your research, please cite our paper.