Adversarial Subword Regularization for Robust Neural Machine Translation

Jungsoo Park, Mujeen Sung, Jinhyuk Lee, Jaewoo Kang

Abstract

Modern Neural Machine Translation (NMT) systems rely on subword segmentation to handle large vocabularies and rare words. However, these models are often brittle, failing when encountering unfamiliar segmentations caused by typos or morphological variations. We present Adversarial Subword Regularization (ADVSR), a training method that improves NMT robustness by identifying and training on the most challenging subword segmentations. By using gradient-based adversarial selection rather than random sampling, ADVSR forces models to learn more resilient linguistic representations, leading to significant performance gains in both clean and noisy text environments.

Introduction

The standard approach in NMT involves breaking words into subword units using algorithms like Byte-Pair Encoding (BPE). While effective for reducing vocabulary size, this creates a dependency on specific segmentation patterns. If a word is segmented differently at test time—due to a typo or a rare grammatical inflection—the model often produces incorrect translations.

Existing methods like Subword Regularization (SR) attempt to mitigate this by exposing the model to multiple random segmentations during training. However, SR is task-agnostic; it relies on a unigram language model to sample segmentations based on frequency, often missing the "hard" cases that actually degrade translation quality.

The ADVSR Method

Adversarial Subword Regularization (ADVSR) shifts the paradigm from random sampling to adversarial selection. The process involves four key steps:

  1. Candidate Generation: A pool of possible subword segmentations is generated for each word using the SentencePiece toolkit.
  2. Gradient-Based Search: The method calculates the gradient of the translation loss function with respect to the subword embeddings.
  3. Adversarial Selection: ADVSR greedily selects the segmentation from the candidate pool that maximizes the current model's loss—effectively finding the "worst-case" input.
  4. Robust Training: During training, words are replaced with these adversarial segmentations with a probability $R$.

By operating directly on the discrete input space through gradient signals, ADVSR ensures the model becomes "segmentation invariant," learning to recognize word meaning regardless of how the word is sliced.

Experimental Evaluation

The authors evaluated ADVSR across three distinct scenarios:

  • Low-Resource Translation: Using IWSLT datasets for various language pairs (e.g., French, Arabic, Czech, Vietnamese to/from English).
  • Noisy Social Media Text: The MTNT dataset, featuring informal comments from Reddit (English-French).
  • Synthetic Typos: A controlled experiment using IWSLT17 (FR-EN) with varying levels of character-level noise (drops, replacements, insertions).

Results and Discussion

ADVSR consistently outperformed both standard BPE (BASE) and random Subword Regularization (SR) across all benchmarks.

Quantitative Performance and Robustness

In low-resource settings like Czech-to-English (CS→EN), ADVSR achieved a BLEU score improvement of 3.2 points over the baseline. On the noisy MTNT dataset, gains reached up to 2.3 BLEU points.

The most striking results appeared in the synthetic noise experiments. As the noise level increased, the performance gap between ADVSR and other methods widened significantly, demonstrating its superior robustness to input corruption.

Table showing BLEU scores across different noise levels (0.1 to 0.5). ADVSR maintains a significant lead as noise increases.

Qualitative Analysis

Qualitative examples highlight how ADVSR prevents "hallucinations" or translation failures caused by unusual segmentations. While BASE and SR models often struggle with rare morphological variants or slightly altered inputs, ADVSR-trained models correctly identify the underlying word and context.

Qualitative comparison of translation outputs. ADVSR (Ours) correctly translates the input while Base and SR models fail.

Conclusion

Adversarial Subword Regularization provides a powerful, task-aware mechanism for improving NMT robustness. By forcing models to confront their own weaknesses during training, ADVSR encourages the learning of deeper morphological features rather than surface-level subword shapes. While it introduces some computational overhead due to gradient calculations, the resulting gains in translation quality and noise resilience make it a compelling technique for real-world NMT applications.

Summary updated

BibTeX
@inproceedings{park2020adversarial,
  author = {Jungsoo Park and Mujeen Sung and Jinhyuk Lee and Jaewoo Kang},
  title = {{Adversarial Subword Regularization for Robust Neural Machine Translation}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.findings-emnlp.175},
}
Figure