Codebase for the ACL 2023 paper: "White-Box Multi-Objective Adversarial Attack on Dialogue Generation" (PDF).
pip install -r requirements.txt
python train_seq2seq.py --model_name_or_path facebook/bart-base --dataset blended_skill_talk --output_dir results/bart-base
python train_clm.py --model_name_or_path microsoft/DialoGPT-small --dataset empathetic_dialogues --output_dir results/dialogpt-small
python attack.py --attack_strategy structure --model_name_or_path results/bart-base --dataset blended_skill_talk
python attack.py --attack_strategy FD --model_name_or_path results/bart-base --dataset empathetic_dialogues
python eval.py --file ${FILE} --orig_model bart-base --victim_model dialogpt-small --dataset BST --out_dir logging
Please cite the paper in your publications if you find this repo useful:
@inproceedings{li2023white,
title={White-Box Multi-Objective Adversarial Attack on Dialogue Generation},
author={Li, Yufei and Li, Zexin and Gao, Yingfan and Liu, Cong},
booktitle={Annual Meeting of the Association for Computational Linguistics (ACL)},
year={2023}
}
Our implementation is based on OpenAttack. We would like to thank the authors for their open source code.