Introduction
Neural Machine Translation (NMT) models often struggle with real-world noise, such as typos or grammatical errors, despite high performance on clean datasets. To address this brittleness, researchers employ adversarial data augmentation—generating difficult examples to improve model robustness. However, a significant challenge exists: "white-box" attacks can alter the original meaning of the text, while "black-box" random noise may not be challenging enough. This paper proposes a "doubly-trained" framework that generates adversarial samples that are both challenging and meaning-preserving.
Methodology: The Doubly-Trained Framework
The core of the proposed approach is a three-step pipeline that utilizes a forward translation model (Source $\rightarrow$ Target) and a backward model (Target $\rightarrow$ Source) to anchor the semantic content during the attack phase.
1. Constrained Attack
The system uses pretrained forward and backward models sharing a single source-language embedding layer. A joint loss function is defined as: $$\mathcal{L} = -\lambda\mathcal{L}_1 + (1 - \lambda)\mathcal{L}_2$$ Here, $-\lambda\mathcal{L}_1$ maximizes the error of the forward model (the attack), while $(1 - \lambda)\mathcal{L}_2$ minimizes the error of the backward model (the semantic constraint). Backpropagating this loss updates the source embeddings, moving "adversarial" tokens closer to original tokens in vector space.
2. Perturbation Step
Using the optimized embeddings, adversarial sentences are generated. Tokens are either replaced by their "most similar" neighbor in the updated embedding space or deleted entirely based on a set probability.
3. Augmentation Training
The forward NMT model is fine-tuned using these adversarial samples as augmented training data, improving its ability to handle noisy inputs.
Experimental Setup and Results
The framework was evaluated on three language pairs using WMT datasets: Chinese-English (zh-en), German-English (de-en), and French-English (fr-en).
To test robustness, synthetic noisy test sets were created with random deletions (RD) and replacements (RP) at levels from 10% to 30%. The "Dual" models consistently demonstrated superior robustness, showing significantly lower performance degradation ($\Delta$Metric) compared to baselines.
For example, on the zh-en test set with 30% random deletions, the baseline BLEU score dropped by 63%, whereas the Dual-NLL model's drop was limited to 56%. In replacement scenarios (RP30), the improvement was even more stark: the baseline dropped 25%, while the Dual-NLL model dropped only 12%.
Key Insights
- Semantic Guarding: The backward model acts as a "police" for the adversarial attack, ensuring that gradient-based perturbations result in meaningful confusion rather than gibberish.
- Shared Embeddings: Forcing the forward encoder and backward decoder to share the same source embedding allows gradient updates from both models to compete in the same representation space.
- Loss Objectives: Simple Negative Log-Likelihood (NLL) was found to be sufficient for word-level adversarial updates, performing comparably to more complex sentence-level metrics like BLEU or COMET.
Limitations
While effective, the method introduces computational overhead by requiring the simultaneous training of two models. Additionally, the current focus is on token-level noise (deletion/replacement) rather than higher-level structural noise like word-order swaps. Future research may explore "natural" noise found in social media or OCR outputs to further validate the framework's real-world applicability.
Summary updated