The Best Defense is Attack: Repairing Semantics in Textual Adversarial Examples

Heng Yang, Ke Li
5/6/2023
cs.CL

No confident code implementation found for this paper.

Abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{yang2023best,
  title  = {The Best Defense is Attack: Repairing Semantics in Textual Adversarial Examples},
  author = {Heng Yang and Ke Li},
  year   = {2023},
  eprint = {2305.04067},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.04067v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.04067.svg)](https://codeofpaper.com/paper/2305.04067)

Discussion