[Paper Review] On Adversarial Examples for Character-Level Neural Machine Translation
The paper introduces white-box gradient-based adversarial attacks for character-level NMT, showing they’re stronger than black-box attacks in untargeted, controlled, and targeted settings, and demonstrates that adversarial training improves robustness.
Evaluating on adversarial examples has become a standard procedure to measure robustness of deep learning models. Due to the difficulty of creating white-box adversarial examples for discrete text input, most analyses of the robustness of NLP models have been done through black-box adversarial examples. We investigate adversarial examples for character-level neural machine translation (NMT), and contrast black-box adversaries with a novel white-box adversary, which employs differentiable string-edit operations to rank adversarial changes. We propose two novel types of attacks which aim to remove or change a word in a translation, rather than simply break the NMT. We demonstrate that white-box adversarial examples are significantly stronger than their black-box counterparts in different attack scenarios, which show more serious vulnerabilities than previously known. In addition, after performing adversarial training, which takes only 3 times longer than regular training, we can improve the model's robustness significantly.
Motivation & Objective
- Motivate the study of worst-case failures in character-level neural machine translation (NMT).
- Develop white-box adversarial attacks using differentiable text-edit operations to exploit model gradients.
- Propose controlled and targeted attack types to manipulate translations beyond simply reducing BLEU.
- Demonstrate that adversarial training can significantly improve model robustness with modest training overhead.
Proposed method
- Extend the HotFlip gradient-based framework to a broader set of text edits (flip, swap, delete, insert) for character-level inputs.
- Represent textual edits as input-space vectors and use first-order derivatives to rank candidate changes by their impact on the loss J(x, y).
- Apply one-shot greedy/beam-search strategies to generate adversarial examples efficiently.
- Define controlled attacks that target specific words to be removed and targeted attacks that replace a word with another, using tailored loss objectives.
- Introduce one-shot adversarial training to accelerate robustness training, achieving about 3x slowdown relative to standard training.
- Utilize a TED talks parallel corpus (German/Czech/French to English) with character-level NMT architecture (char convs, highway nets, RNN decoders) and evaluate with BLEU.
Experimental results
Research questions
- RQ1How do white-box adversarial attacks compare to black-box attacks in untargeted, controlled, and targeted settings for character-level NMT?
- RQ2Can gradient-based edits effectively remove or replace specific words in translations without extensively altering the rest of the output?
- RQ3Does adversarial training with white-box adversaries improve robustness to both white-box and black-box perturbations?
- RQ4What are efficient strategies (one-shot, greedy, beam search) to generate adversarial examples under realistic budget constraints (e.g., percent of characters changed)?
Key findings
- White-box adversaries substantially outperform black-box attackers, especially in controlled and targeted scenarios.
- Controlled attacks can mute a specific word by maximizing the loss on the target word, sometimes replacing it with UNK, with higher success than black-box methods.
- Targeted attacks (second-most or higher ranked word replacements) show lower success rates but remain significantly stronger for white-box methods than black-box ones.
- Adversarial training with white-box examples improves BLEU robustness on adversarial inputs, with ensemble approaches offering broad protection across noise types.
- One-shot attack strategies enable competitive robustness improvements with minimal training slowdown (about threefold).
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.