Fooling the Textual Fooler via Randomizing Latent Representations

Duy C. Hoang, Quang H. Nguyen, Saurav Manchanda, MinLong Peng, Kok-Seng Wong +1 more
10/2/2023
cs.CLcs.AI

No official code found. Best implementation: mail-research/AdvFooler-text-defender (2 stars, GPL-3.0, last commit 2024-07-22).

Abstract

Despite outstanding performance in a variety of NLP tasks, recent studies have revealed that NLP models are vulnerable to adversarial attacks that slightly perturb the input to cause the models to misbehave. Among these attacks, adversarial word-level perturbations are well-studied and effective attack strategies. Since these attacks work in black-box settings, they do not require access to the model architecture or model parameters and thus can be detrimental to existing NLP applications. To perform an attack, the adversary queries the victim model many times to determine the most important words in an input text and to replace these words with their corresponding synonyms. In this work, we propose a lightweight and attack-agnostic defense whose main goal is to perplex the process of generating an adversarial example in these query-based black-box attacks; that is to fool the textual fooler. This defense, named AdvFooler, works by randomizing the latent representation of the input at inference time. Different from existing defenses, AdvFooler does not necessitate additional computational overhead during training nor relies on assumptions about the potential adversarial perturbation set while having a negligible impact on the model's accuracy. Our theoretical and empirical analyses highlight the significance of robustness resulting from confusing the adversary via randomizing the latent space, as well as the impact of randomization on clean accuracy. Finally, we empirically demonstrate near state-of-the-art robustness of AdvFooler against representative adversarial word-level attacks on two benchmark datasets.

View on arXivView PDF

Code Implementations(1)

GPL-3.0

AdvFooler is a defender that fools the Textual Adversarial Attacker (The Fooler) via Randomizing Latent Representations

20PythonMay 30, 20242 years agoGPL-3.0

Similar Papers

Cite this paper

@article{hoang2023fooling,
  title  = {Fooling the Textual Fooler via Randomizing Latent Representations},
  author = {Duy C. Hoang and Quang H. Nguyen and Saurav Manchanda and MinLong Peng and Kok-Seng Wong and Khoa D. Doan},
  year   = {2023},
  eprint = {2310.01452},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.01452v2}
}

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/2310.01452.svg)](https://codeofpaper.com/paper/2310.01452)

Discussion