Despite the strong performance of current NLP models, they can be brittle against adversarial attacks. To enable effective learning against adversarial inputs, we introduce the use of rationale models that can explicitly learn to ignore attack tokens. We find that the rationale models can successfully ignore over 90% of attack tokens. This approach leads to consistent sizable improvements (∼10%) over baseline models in robustness on three datasets for both BERT and RoBERTa, and also reliably outperforms data augmentation with adversarial examples alone. In many cases, we find that our method is able to close the gap between model performance on a clean test set and an attacked test set and hence reduce the effect of adversarial attacks.
@article{arxiv.2205.11551,
title = {Learning to Ignore Adversarial Attacks},
author = {Yiming Zhang and Yangqiaoyu Zhou and Samuel Carton and Chenhao Tan},
journal= {arXiv preprint arXiv:2205.11551},
year = {2023}
}
Comments
EACL 2023, code is available at https://github.com/ChicagoHAI/rationalization-robustness