The Best Defense is Attack: Repairing Semantics in Textual Adversarial Examples
This work addresses the vulnerability of language models to adversarial attacks, offering a practical defense solution, though it appears incremental as it builds on existing adversarial detection and repair techniques.
The paper tackles the problem of adversarial attacks on pre-trained language models by introducing Rapid, a method that repairs semantics in adversarial examples, achieving effective performance across four public datasets.
Recent studies have revealed the vulnerability of pre-trained language models to adversarial attacks. Existing adversarial defense techniques attempt to reconstruct adversarial examples within feature or text spaces. However, these methods struggle to effectively repair the semantics in adversarial examples, resulting in unsatisfactory performance and limiting their practical utility. To repair the semantics in adversarial examples, we introduce a novel approach named Reactive Perturbation Defocusing (Rapid). Rapid employs an adversarial detector to identify fake labels of adversarial examples and leverage adversarial attackers to repair the semantics in adversarial examples. Our extensive experimental results conducted on four public datasets, convincingly demonstrate the effectiveness of Rapid in various adversarial attack scenarios. To address the problem of defense performance validation in previous works, we provide a demonstration of adversarial detection and repair based on our work, which can be easily evaluated at https://tinyurl.com/22ercuf8.