Skip to main content
QUICK REVIEW

[Paper Review] On Evaluation of Adversarial Perturbations for Sequence-to-Sequence Models

Paul Michel, Xian Li|arXiv (Cornell University)|Mar 15, 2019
Adversarial Robustness in Machine LearningComputer Science39 references15 citations
TL;DR

This paper proposes a meaning-preserving evaluation framework for adversarial perturbations in sequence-to-sequence models, particularly machine translation, by enforcing semantic equivalence between original and perturbed inputs. It demonstrates that standard attacks often fail to preserve meaning, introduces CharSwap constraints to improve semantic fidelity, and shows that adversarial training with these constrained attacks enhances robustness without harming standard performance.

ABSTRACT

Adversarial examples --- perturbations to the input of a model that elicit large changes in the output --- have been shown to be an effective way of assessing the robustness of sequence-to-sequence (seq2seq) models. However, these perturbations only indicate weaknesses in the model if they do not change the input so significantly that it legitimately results in changes in the expected output. This fact has largely been ignored in the evaluations of the growing body of related literature. Using the example of untargeted attacks on machine translation (MT), we propose a new evaluation framework for adversarial attacks on seq2seq models that takes the semantic equivalence of the pre- and post-perturbation input into account. Using this framework, we demonstrate that existing methods may not preserve meaning in general, breaking the aforementioned assumption that source side perturbations should not result in changes in the expected output. We further use this framework to demonstrate that adding additional constraints on attacks allows for adversarial perturbations that are more meaning-preserving, but nonetheless largely change the output sequence. Finally, we show that performing untargeted adversarial training with meaning-preserving attacks is beneficial to the model in terms of adversarial robustness, without hurting test performance. A toolkit implementing our evaluation framework is released at https://github.com/pmichel31415/teapot-nlp.

Motivation & Objective

  • To address the lack of semantic consistency in existing adversarial attacks on NLP models, particularly in sequence-to-sequence (seq2seq) settings.
  • To formalize a criterion for adversarial examples that are meaning-preserving on the source side but meaning-destroying on the target side.
  • To evaluate the effectiveness of automatic metrics like chrF in approximating human judgment of semantic similarity in adversarial perturbations.
  • To investigate whether constrained adversarial attacks improve robustness while maintaining standard performance.
  • To demonstrate the benefits of adversarial training using meaning-preserving attacks.

Proposed method

  • Proposes a framework that evaluates adversarial attacks based on source-side semantic preservation and target-side performance degradation.
  • Introduces a CharSwap-based constraint to gradient-based word substitution attacks to increase likelihood of meaning preservation.
  • Uses chrF as a proxy metric for human judgment of semantic similarity between original and perturbed inputs.
  • Employs a hybrid training objective with a hyperparameter α to balance original and adversarial examples during training.
  • Applies adversarial training using both unconstrained and CharSwap-constrained attacks to improve model robustness.
  • Validates results using automatic metrics (chrF, BLEU, METEOR) and compares them against human evaluation.

Experimental results

Research questions

  • RQ1To what extent do existing untargeted adversarial attacks on machine translation preserve the meaning of the source input?
  • RQ2Which automatic metric—BLEU, METEOR, or chrF—best correlates with human judgments of semantic similarity in adversarial perturbations?
  • RQ3Can adding constraints to adversarial attacks improve their semantic fidelity without reducing their effectiveness in degrading model output?
  • RQ4Does adversarial training using meaning-preserving attacks improve model robustness without degrading performance on clean data?
  • RQ5How does the trade-off between clean data and adversarial data during training affect model performance and robustness?

Key findings

  • The chrF metric shows significantly better correlation with human judgments of semantic similarity than BLEU or METEOR in evaluating adversarial perturbations.
  • Standard gradient-based attacks without constraints often fail to preserve meaning, as evidenced by low semantic similarity between original and perturbed inputs.
  • CharSwap-constrained attacks produce perturbations that are substantially more meaning-preserving while still effectively degrading model output.
  • Adversarial training with CharSwap-constrained attacks achieves superior robustness to similar attacks, with a 16.46 RDchrF score on the cs-en validation set (vs. 25.99 for unconstrained).
  • When α=1.0, the CharSwap-adv model maintains test performance (43.74 chrF on cs-en) comparable to the base model, while the unconstrained model drops to 41.38 chrF.
  • With α=0.5, the CharSwap-adv model achieves 44.57 chrF on cs-en and shows the best robustness (20.41 RDchrF), outperforming both the base and unconstrained models.

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.