Rethinking Textual Adversarial Defense for Pretrained Language ModelsRethinking Textual Adversarial Defense for Pre-trained Language Models
The paper proposes a general textual adversarial defense framework based on an anomaly detector and randomization, achieving post-attack accuracy comparable to or higher than specialized defenses without knowing the specific attack. The framework uses the anomaly detector to define an anomaly-degree constraint, causing existing attacks to generate more natural and harder-to-detect adversarial examples; under this constraint, the success rates of existing attacks drop substantially, and the authors therefore argue that the robustness of pretrained language models is not as fragile as prior research claimed. The authors also find that four types of randomization can invalidate a large number of textual adversarial examples, and point out that future attack research needs to find ways to bypass detection and randomization; hard-to-detect adversarial examples are the real risk facing pretrained language models.