Abstract
Neural Machine Translation (NMT) models have been shown to be vulnerable to adversarial attacks, wherein carefully crafted perturbations of the input can mislead the target model. In this paper, we introduce ACT, a novel adversarial attack framework against NMT systems guided by a classifier. In our attack, the adversary aims to craft meaning-preserving adversarial examples whose translations in the target language by the NMT model belong to a different class than the original translations. Unlike previous attacks, our new approach has a more substantial effect on the translation by altering the overall meaning, which then leads to a different class determined by an oracle classifier. To evaluate the robustness of NMT models to our attack, we propose enhancements to existing black-box word-replacement-based attacks by incorporating output translations of the target NMT model and the output logits of a classifier within the attack process. Extensive experiments, including a comparison with existing untargeted attacks, show that our attack is considerably more successful in altering the class of the output translation and has more effect on the translation. This new paradigm can reveal the vulnerabilities of NMT systems by focusing on the class of translation rather than the mere translation quality as studied traditionally.
Introduction
Adversarial attacks on artificial intelligence have traditionally focused on tricking classifiers—for instance, making an image model misidentify a school bus as a toaster. In the context of Neural Machine Translation (NMT), the stakes are arguably higher. If an attacker can subtly nudge a translation to change its entire meaning while keeping the source text looking normal, they create a potent vehicle for misinformation.
Most existing NMT attacks are either untargeted (aiming to lower translation quality) or targeted (forcing specific words into the output). This paper argues that these approaches often overlook semantic intent. If a translated news report flips from describing a "peaceful protest" to a "violent riot," the translation quality might remain high by traditional metrics like BLEU, but the semantic damage is catastrophic. The authors propose ACT (Altering Class of Translation), a framework designed to create "meaning-preserving" source perturbations that result in "meaning-altering" target translations.
The ACT Framework
The researchers propose ACT as a black-box attack that does not require access to the NMT model's internal weights. Instead, it utilizes an oracle classifier to guide the perturbation process.
ACT builds upon existing methods like TextFooler and BAE, which replace words with synonyms. However, it introduces a Dual-Goal Function:
- Translation Goal: The adversarial translation must be sufficiently different from the original (measured by BLEU or BLEURT).
- Classification Goal: The oracle classifier must predict a different class for the adversarial translation with high confidence, using raw logits to guide the search.
This approach ensures the attack is not just creating gibberish that tricks a classifier, but is actually misleading the NMT model into generating a semantically different output.
Experimental Results
The framework was evaluated using standard classification datasets—SST-2 and MR (sentiment analysis) and AG’s News (topic classification)—across models like Marian NMT and mBART50.
As shown in the results, ACT significantly outperforms existing untargeted attacks. For example, on the SST-2 dataset (En-Fr), ACT achieved an Attack Success Rate (ASR) of approximately 40%, whereas the best baseline, TransFool, only reached 10%. Furthermore, ACT-generated translations showed a much sharper decline in BLEU scores relative to the original translations, indicating a more profound impact on the intended meaning.
Discussion and Insights
A key finding of this research is that Quality is not equal to Correctness. Traditional untargeted attacks often fail to change the semantic category; they make translations "messy" but usually preserve the underlying sentiment. ACT proves that it is possible to maintain high-quality-looking text that is fundamentally wrong in its categorical meaning.
Human validation confirmed the stealthiness of the attack: while the classifier's predictions were flipped, the majority of adversarial source sentences still retained their original sentiment to human readers. This highlights a critical vulnerability in current NMT systems and provides a new "red-teaming" tool for developing more robust translation models that are resistant to semantic-flipping perturbations.
Summary updated