This repository contains the implementations of the IJCAI-21 paper: BESA: BERT-based Simulated Annealing for Adversarial Text Attacks.
Our code can be easily tested by the command line like:
textattack attack --recipe bert-sa --model bert-base-uncased-imdb --num-examples 1000
This will attack BERT model on IMDB dataset using our BESA.
When using this code, or the ideas of BESA, please cite the following paper
@inproceedings{yang2021besa,
title={BESA: BERT-based Simulated Annealing for Adversarial Text Attacks},
author={Xinghao Yang and Weifeng Liu and Dacheng Tao and Wei Liu},
booktitle={Proceedings of the 30th International Joint Conference on Artificial Intelligence},
year={2021}
}
This code is based on the TextAttack framework.
Please contact Xinghao Yang or Wei Liu at firstname.lastname@uts.edu.au if you're interested to collaborate on this research!