Skip to main content
QUICK REVIEW

[Paper Review] Randomized Substitution and Vote for Textual Adversarial Example Detection.

Xiaosen Wang, Yifeng Xiong|arXiv (Cornell University)|Sep 13, 2021
Adversarial Robustness in Machine LearningComputer Science27 references7 citations
TL;DR

This paper proposes Randomized Substitution and Vote (RS&V), a novel, architecture-agnostic method for detecting textual adversarial examples by randomly replacing words with synonyms and aggregating predictions via voting. RS&V outperforms existing detection methods while preserving high accuracy on clean inputs, leveraging the disruption of adversarial word interdependencies through random synonym substitution.

ABSTRACT

A line of work has shown that natural text processing models are vulnerable to adversarial examples. Correspondingly, various defense methods are proposed to mitigate the threat of textual adversarial examples, e.g. adversarial training, certified defense, input pre-processing, detection, etc. In this work, we treat the optimization process for synonym substitution based textual adversarial attacks as a specific sequence of word replacement, in which each word mutually influences other words. We identify that we could destroy such mutual interaction and eliminate the adversarial perturbation by randomly substituting a word with its synonyms. Based on this observation, we propose a novel textual adversarial example detection method, termed Randomized Substitution and Vote (RS&V), which votes the prediction label by accumulating the logits of k samples generated by randomly substituting the words in the input text with synonyms. The proposed RS&V is generally applicable to any existing neural networks without modification on the architecture or extra training, and it is orthogonal to prior work on making the classification network itself more robust. Empirical evaluations on three benchmark datasets demonstrate that RS&V could detect the textual adversarial examples more successfully than the existing detection methods while maintaining the high classification accuracy on benign samples.

Motivation & Objective

  • To address the vulnerability of text classification models to adversarial examples generated via synonym substitution.
  • To develop a detection method that does not require model retraining or architectural changes.
  • To disrupt adversarial word interdependencies by randomizing synonym substitutions, thereby exposing perturbations.
  • To achieve high detection performance while maintaining strong accuracy on benign inputs.
  • To provide a general-purpose, orthogonal defense mechanism compatible with any pre-trained neural network.

Proposed method

  • The method generates k perturbed versions of the input text by randomly substituting each word with one of its synonyms.
  • For each perturbed sample, the model produces logits, which are aggregated across all k samples.
  • A voting mechanism selects the final prediction label based on the accumulated logits from the k samples.
  • The method exploits the fact that adversarial perturbations rely on coordinated word-level changes, which are disrupted by random substitutions.
  • The approach is applied post-inference and requires no model fine-tuning or architectural modifications.
  • The detection decision is made by analyzing the consistency of predictions across the k randomized samples.

Experimental results

Research questions

  • RQ1Can random synonym substitution effectively disrupt adversarial word interdependencies in textual adversarial examples?
  • RQ2Can prediction voting over randomly substituted samples improve detection performance compared to existing methods?
  • RQ3Does the proposed method maintain high accuracy on benign inputs while detecting adversarial examples?
  • RQ4How generalizable is the RS&V method across different neural network architectures and datasets?
  • RQ5Can RS&V serve as an orthogonal, plug-and-play defense without requiring model retraining?

Key findings

  • RS&V achieves superior detection performance on three benchmark datasets compared to existing detection methods.
  • The method maintains high classification accuracy on clean, non-adversarial inputs, indicating minimal performance degradation.
  • The approach is effective across various pre-trained neural network models without requiring architectural changes or retraining.
  • Randomized substitution successfully disrupts adversarial word interactions, making perturbations more detectable.
  • The voting mechanism based on k randomized samples enhances robustness to adversarial noise.
  • Empirical results confirm that RS&V is orthogonal to existing robustness techniques, such as adversarial training.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.