Skip to content

Lost in Translation: Generating Adversarial Examples Robust to Round-Trip TranslationLost In Translation: Generating Adversarial Examples Robust to Round-Trip Translation

arXiv· arXiv:2307.12520· ICASSP 2023· Neel Bhandari, Pin-Yu ChenRV College of Engineering; IBM ResearchIndexed by this site · 27 days ago· Originally publishedAttacks

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

The authors state that 6 textual adversarial attacks fail on average 66% of the time after round-trip translation, and propose NMT-Text-Attack, which makes attacks 100% robust to the user-selected language.

Threat modelThe attacker generates adversarial examples against a sentiment classification victim model (BERT), requiring that the examples remain adversarial after round-trip translation; the method is attack-agnostic, requires access to only one NMT model, and integrates translation intervention into existing attack pipelines. The paper does not explicitly use the terms white-box/black-box to describe the threat model.

Questions
Whether textual adversarial examples remain effective after round-trip translation is largely unexplored; the authors state that round-trip translation is widely used for quality assurance in critical fields such as healthcare and law, and that the robustness of existing attacks under it needs to be tested.
Methods
Proposes the attack-agnostic NMT-Text-Attack: during the word substitution stage of the original attack, it performs round-trip translation of candidate sentences through k languages, keeps only candidates that remain adversarial after translation, and then applies the original attack's constraints to select the best one.
Experiments and results
The authors state that for the 6 attacks on MR, after round-trip translation through at least 1 language, an average of 66% of samples fail; NMT-Text-Attack guarantees 100% robustness for the user-selected language, with a success rate on average about 30% lower than the original attack, and on average 20% higher on unseen languages.
Limitations and future work
The paper does not specifically discuss limitations. Experimental coverage: the victim model is only BERT, the datasets are MR and Yelp with 1000 test samples each, the translation languages are French, German, and Spanish, and the main results report the intervention effects only for three attacks: TextFooler, TextBugger, and PWWS.
Experimental setupBERT · Rotten Tomatoes Movie Reviews (MR)、Yelp Polarity · Success Rate、非鲁棒样本比例 et al.
Evaluated models
BERT
Benchmarks
Rotten Tomatoes Movie Reviews (MR)Yelp Polarity
Metrics
Success Rate非鲁棒样本比例USE 余弦相似度Jaccard SimilarityBERT ScoreBLEU Score% Words Perturbed
AI summaryNone of the 6 state-of-the-art textual adversarial attack samples retained their attack effectiveness after round-trip translation. The researchers propose an intervention method that incorporates machine translation into the adversarial example generation process, making the generated adversarial examples more robust to round-trip translation. The authors point out that finding adversarial examples robust to translation helps identify deficiencies shared by language models across languages and advances research on multilingual adversarial attacks.

None of the 6 state-of-the-art textual adversarial attack samples retained their attack effectiveness after round-trip translation. The researchers propose an intervention method that incorporates machine translation into the adversarial example generation process, making the generated adversarial examples more robust to round-trip translation. The authors point out that finding adversarial examples robust to translation helps identify deficiencies shared by language models across languages and advances research on multilingual adversarial attacks.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Most existing textual adversarial attacks fail after round-trip translation; the authors propose an intervention method that makes attacks robust to round-trip translation.

    Core problem: adversarial examples generated by existing textual adversarial attacks mostly cease to be adversarial after round-trip translation; how to generate adversarial examples robust to round-trip translation.

    • Problem setting: The authors state that language models perform well on downstream tasks but remain vulnerable to adversarial example attacks; round-trip translation is used for grammatical error correction, translation quality evaluation, paraphrasing, etc., and serves as a quality assurance process in critical domains such as healthcare, law, and market search, so deployed models need to be tested against robust adversarial attacks.
    • Shortcomings of existing methods: The authors state that the effectiveness of adversarial examples across translation and the impact of machine translation on attack robustness are largely unexplored; existing works attacking NMT do not target round-trip translation and do not demonstrate attack-agnostic capability.
    • Core observation: The authors' experiments find that 6 state-of-the-art text attacks lose 66% performance on average after round-trip translation, and most generated examples become non-adversarial, so round-trip translation can serve as a cheap and effective defence (per the authors).
    • Proposed in the paper: NMT-Text-Attack, an intervention-based, attack-agnostic algorithm that integrates machine translation intervention into the adversarial example generation process to improve robustness to round-trip translation; the authors believe that finding model deficiencies shared across languages can advance research on multilingual adversarial attacks.
    • Threat model:
      • Attacker's goal: generate examples that are similar to the original text, fool the sentiment classification model, and remain adversarial after round-trip translation.
      • Attacker's knowledge and capability: the method is attack-agnostic and requires access to only one NMT model; it relies on existing attacks in the TextAttack library (e.g., synonym substitution, character-level perturbation).
      • Victim system: the sentiment classification model (BERT in the experiments), and the round-trip translation pipeline as a defence.
      • Success criterion: the example causes the victim model to misclassify, and remains misclassified after round-trip translation in the user-selected language.
  2. What related research exists?

    Related work falls into three categories: textual adversarial attacks, attacks against NMT, and applications of round-trip translation; the authors state that no one has done attack-agnostic attacks targeting round-trip translation.

    Textual adversarial attacks

    • Papernot et al. (2017)—white-box adversarial attack that repeatedly modifies the input text until it fools the classifier; the paper notes that this method does not preserve sentence semantics.
    • Ebrahimi et al. (2018) and Samanta and Mehta (2017)—gradient-based token-level modifications and important-word search; the paper notes that these methods are not scalable and lack robust performance.
    • Character substitution (Ribeiro et al., 2018), phrase substitution, word reordering—the paper notes that these techniques cannot preserve semantic consistency with the original input.
    • Jia et al. (2019)—adds distractor sentences in reading comprehension tasks; Jin et al. (2020) propose TextFooler, which generates adversarial examples based on token-level similarity and is subject to axioms; Lei et al. (2019) propose a paraphrase attack using discrete optimization; Garg and Ramakrishnan (2020) propose BAE, which uses a masked language model to generate natural adversarial examples.

    Adversarial attacks against NMT

    • Cheng et al. (2019)—uses gradient-based adversarial inputs to improve the robustness of NMT models.
    • Zhang et al. (2021)—proposes a black-box attack algorithm against NMT systems.
    • The paper notes that none of these works target round-trip translation, nor do they demonstrate attack-agnostic capability.

    Applications of round-trip translation

    • The paper lists round-trip translation as being used for grammatical error correction (Lichtarge et al., 2019; Madnani et al., 2012), evaluating machine translation models (Crone et al., 2021; Cao et al., 2020; Moon et al., 2020), paraphrasing (Guo et al., 2021), and question rewriting (Chu et al., 2020), and as a quality assurance process in domains such as healthcare, law, and market search.

    Baselines and benchmarks

    • The paper's experiments are based on 6 attacks in the TextAttack library (Morris et al., 2020): TextFooler, TextBugger, PWWS, Kuleshov, DeepWordBug, BAE; after intervention, the original attacks are compared as baselines. The datasets are Rotten Tomatoes Movie Reviews and Yelp Polarity.

    The authors position this paper as: targeting the unexplored scenario of round-trip translation, proposing an intervention-based method that can be plugged into any existing attack, distinct from prior NMT attacks that use a single attack or do not target round-trip translation.

  3. How does the paper address this problem?

    NMT-Text-Attack inserts a round-trip translation filter into the word-replacement stage of the original attack, keeping only candidates that remain adversarial after translation.

    Overall approach: embed machine translation as an intervention into the two-stage pipeline of existing attacks to generate adversarial examples robust to round-trip translation in the user-selected language. The method is named NMT-Text-Attack (Algorithm 1), attack-agnostic, requiring access to only one NMT model.

    Problem setting

    • Input: sentence S, true label Y, victim model V, machine translation model M, user-specified constraint C, and the attack A being integrated; output adversarial example Xadv.
    • The authors summarize a general template from Li et al. (2019), Jin et al. (2020), Ren et al. (2019), Garg and Ramakrishnan (2020), Gao et al. (2018): the first stage ranks word importance, the second stage performs word replacement and constraint evaluation; NMT-Text-Attack intervenes in the second stage.

    Stage one: word importance selection

    • Preprocess the input sentence (e.g., remove stop words), then analyze keywords using the attack's own method, which varies by attack, from input deletion to probability weighted word saliency; for example, TextFooler uses input deletion.
    • Sort in descending order of importance score to obtain the word list W.

    Stage two: word replacement and translation intervention

    • For each word in W, predict Top-K replacements and substitute them into the sentence one by one (Step 12).
    • Perform round-trip translation of the candidate sentence through k user-specified languages to obtain the translation candidate set T (Step 13).
    • Evaluate candidates in T with the victim model V, and remove samples that no longer remain adversarial after round-trip translation (Step 14); the authors state that this hard constraint guarantees the method is 100% robust to round-trip translation in the user-selected language.
    • Apply the original attack's constraint C (e.g., semantic similarity to the original text, part-of-speech preservation) to the remaining candidates, and select the best candidate by similarity to the original text.

    Key parameters and implementation

    • The replacement limit is set to 40 (15 for Kuleshov); experiments use 3 languages: French, German, Spanish.
    • The translation model is Opus-MT (via the EasyNMT library), a standard transformer architecture with 6 self-attention layers each in the encoder and decoder and 8 heads per layer; used for back-translation English→French/German/Spanish→English.
    • The victim model is pretrained BERT (12 attention heads, 110 million parameters); the specific constraints of each attack (similarity thresholds, swap mechanisms, etc.) directly use the TextAttack library defaults, see Appendix 6.4.

    Success criteria and evaluation

    • Attack success: the example causes the victim model to misclassify; robustness: misclassification is maintained after round-trip translation.
    • Non-robust proportion metric: Y = 1/N∑a=1N 1{at least k languages have ya ≠ ŷa}, i.e., the proportion of samples whose prediction changes after back-translation through at least k languages (y-axis of Figure 1).
    • Quality metrics: USE cosine similarity, Jaccard Similarity, BERT Score, BLEU, proportion of perturbed words.
  4. What experiments did the paper conduct?

    With BERT as the victim model on MR/Yelp: the 6 attacks fail on average 66% after round-trip translation, and after intervention, 100% robustness is guaranteed for the selected language.

    Experimental setup

    • Victim model: BERT (pretrained, 12 attention heads, 110 million parameters), used for sentiment analysis.
    • Datasets: Rotten Tomatoes Movie Reviews (MR) and Yelp Polarity, each with 1000 test samples randomly drawn.
    • Attacks: 6 from the TextAttack library: TextFooler, TextBugger, PWWS, Kuleshov, DeepWordBug, BAE.
    • Translation: Opus-MT (EasyNMT library), languages Spanish, German, French.
    • Metrics: attack success rate (relative to original attack = 100%), proportion of non-robust samples, USE/Jaccard/BERT Score similarity, BLEU, proportion of perturbed words.
    • Compute: Google Colab Tesla P100, 190 GPU hours in total; the paper does not report the number of repetitions or statistical tests.

    Main results

    Robustness of existing attacks to round-trip translation (Figure 1, MR dataset, 3 languages):

    ConditionResult (as reported by the authors)
    k=1 (at least 1 language)On average more than 66% of samples become non-adversarial
    k>1 (more language combinations)Defense effect decreases, but attack success rate still suffers a loss
    Most robust / least robustBAE is the most robust, TextFooler the least robust

    NMT-Text-Attack success rate (%, original attack success rate recorded as 100%, replacement limit=40, per Table 1):

    Swipe horizontally to read the table

    DatasetTextFooler+NMTTextBugger+NMTPWWS+NMT
    MR70.774.769.4
    Yelp60.071.468.8
    • The authors state that the intervention algorithm guarantees 100% robustness to round-trip translation in the user-selected language, at the cost of a success rate on average about 30% lower than the original attack.
    • The authors consider this loss reasonable: first, it buys the combination of 100% robustness and attack success; second, Figure 2 shows that raising the replacement limit increases the number of usable robust samples (the experimental limit is set to 40).
    • The authors state that the defense weakens when k>1 because, as the number of constraint languages increases, the probability that at least one language is robust for a given sample rises.

    Similarity and meaning preservation

    • Table 2 (Yelp and MR): before and after intervention, USE cosine similarity is mostly between 0.82–0.94 and BERT Score mostly between 0.92–0.97; the authors state that the algorithms differ little in meaning preservation and similarity, and that the intervention maintains the original attack's quality while improving robustness.
    • Exceptions: on Yelp, TextFooler+NMT has USE 0.82 and Jaccard 0.724, lower than the original TextFooler's 0.93/0.81; PWWS+NMT has Jaccard 0.645, lower than the original PWWS's 0.85.

    Ablation: generalization to unseen languages

    • Setup: TextFooler+NMT uses 2 "seen" languages as constraints and is tested on a third "unseen" language (Table 3).
    • Results: unseen Spanish 72.9% (original TextFooler 50.61), unseen German 74.08% (51.97), unseen French 67% (50.8); the authors state that after intervention the average is about 20% higher, indicating that the attack-agnostic intervention also improves performance on unseen languages.

    Other ablations and analyses

    • BLEU (Table 4): higher than the original attack after intervention in all cases, e.g., on MR TextFooler 0.37→0.48, TextBugger 0.47→0.62, PWWS 0.43→0.57; on Yelp PWWS 0.53→0.73.
    • Proportion of perturbed words (Table 4): generally higher after intervention, e.g., on Yelp TextFooler 41.43→56.27, PWWS 35.90→50.91; the authors consider this acceptable given the BLEU improvement and generalization to unseen languages.
    • Appendix 6.5 gives examples of samples before and after intervention and after back-translation, showing that original attack samples revert to the true label after back-translation while intervention samples keep the adversarial label.
  5. What are some points that can be further explored?

    The paper does not specifically discuss limitations; the experiments cover only BERT, two sentiment datasets, and three European languages.

    Limitations and future directions noted by the authors

    • The authors believe that finding adversarial examples robust to translation helps identify model deficiencies shared across languages and motivates further research on multilingual adversarial attacks (abstract, contribution list).
    • The authors state that NMT-Text-Attack can serve as an error diagnosing tool, combining with any existing text attack to check model robustness (Conclusion).
    • The paper has no Limitations section and does not explicitly list methodological limitations.

    Scope of experimental coverage

    • The victim model is only BERT (Section 4.1); the paper does not report experiments on other classification models.
    • The datasets are the MR and Yelp Polarity sentiment analysis tasks, each with 1000 random test samples (Section 4.1).
    • The translation languages are only French, German, and Spanish, and the translation model is only Opus-MT (Appendix 6.3).
    • The quantitative results of NMT-Text-Attack (Tables 1, 2, 4) report the intervention effects only for three attacks: TextFooler, TextBugger, and PWWS; the round-trip translation robustness comparison of the 6 attacks (Figure 1) has only an aggregate figure, with no per-attack numerical table.
    • The paper does not report the number of experimental repetitions, statistical significance tests, or human evaluation; the unseen-language experiments are only for TextFooler (Table 3).
  6. Summarize the main content of the paper

    The authors state that round-trip translation can break existing textual attacks, and that the proposed NMT-Text-Attack can generate adversarial examples that are 100% robust to the selected language.

    A study on the robustness of textual adversarial attacks: it examines whether adversarial examples generated by existing attacks remain effective after round-trip translation, and proposes an intervention-based improvement method.

    • Problem: The authors state that the effectiveness of adversarial examples across translation is largely unexplored, while round-trip translation is widely used for quality assurance in critical fields, so the performance of attacks under it needs to be tested.
    • Finding (defense perspective): On the MR dataset with BERT as the victim model, after round-trip translation through at least 1 language (French/German/Spanish), on average more than 66% of the examples from 6 TextAttack attacks (TextFooler, TextBugger, PWWS, Kuleshov, DeepWordBug, BAE) became non-adversarial (Figure 1); the authors state that round-trip translation is a cheap and effective defence, but the defense effect decreases when k>1.
    • Method: NMT-Text-Attack, attack-agnostic, requiring access to only one NMT model; in the word-replacement stage of the original attack, candidate sentences undergo round-trip translation through k languages, and only candidates that remain adversarial after translation are kept, then the best is selected according to the original attack's constraints.
    • Results: Guarantees 100% round-trip translation robustness for the user-selected language; success rates relative to the original attack (=100%) are 69.4–74.7% on MR and 60.0–71.4% on Yelp (Table 1), on average about 30% lower; similarity metrics are close to the original attack (Table 2).
    • Generalization: After intervention in TextFooler, success rates on unseen languages are 67%–74.08%, on average about 20% higher than the original TextFooler (Table 3); BLEU improves across the board, and the proportion of perturbed words is also higher (Table 4).
    • Authors' conclusion: A new set of high-quality textual adversarial examples robust to NMT exists; the method's attack-agnostic nature allows it to serve as a robustness checking tool for any existing attack and to advance research on multilingual adversarial attacks.
Read originalICASSP 2023