Translate your gibberish: black-box adversarial attack on machine translation systems

Andrei Chertkov, Olga Tsymboi, Mikhail Pautov, Ivan V. Oseledets

TL;DR

Researchers have developed a novel black-box adversarial attack that fools major commercial translation systems—Google, DeepL, and Yandex—using nonsensical "gibberish" inputs. By employing a gradient-free tensor-based optimizer, they generated Russian character strings that look like junk to humans but trigger these AI models to produce coherent, often unrelated, English sentences that fail to translate back correctly.

What Problem Does This Paper Address?

Most adversarial attacks on Natural Language Processing (NLP) focus on "imperceptibility"—making tiny changes like swapping a synonym or adding a typo that a human wouldn't notice but a machine would trip over.

This paper tackles a different, more bizarre phenomenon: hallucinations. The authors investigate why state-of-the-art Machine Translation (MT) systems sometimes produce perfectly fluent, meaningful output when given complete gibberish as input. This isn't just a curiosity; it represents a significant robustness gap. If a system can be coaxed into "translating" nonsense into a specific command or offensive phrase, it poses a security risk and undermines user trust.

Methods

The authors treat the translation systems as "black boxes," meaning they have no access to the underlying model weights or architectures. To find the "gibberish" that breaks these systems, they used a two-stage optimization process:

  1. Finding "Hallucinogens": They searched for 7-letter Russian character combinations that are highly unlikely in natural language (high perplexity) but result in English translations that are highly likely (low perplexity).
  2. The Optimizer (PROTES): The core technical contribution is the use of PROTES, a global optimization method based on low-rank Tensor-Train (TT) decomposition. This allows the researchers to efficiently search the massive discrete space of possible character combinations without needing gradients.
  3. Scoring with GPT-2: They used a pre-trained GPT-2 model to calculate the "perplexity" (a measure of how "natural" a string of text is) for both the Russian input and the English output.
  4. Loss Function: The goal was to maximize the difference between the perplexity of the translation and the source text, essentially hunting for the "sweet spot" where input looks like noise but output looks like signal.
Fig. 1: Proposed approach for the search of the “hallucinogens”.

Datasets

The study did not use standard static datasets. Instead, it targeted the live, industrial-scale APIs of:

  • DeepL Translator
  • Google Translate
  • Yandex Translate

The researchers limited their optimizer to a budget of just 1,000 translation requests per search to demonstrate the efficiency of their attack.

Key Insights and Ideas

  • Instability Points: The "hallucinogens" found by the optimizer often correspond to "instability points" in the MT models. When these gibberish words are combined into phrases, the resulting English translation might look perfect, but the system's internal state is so fragile that it cannot translate the phrase back into the original language correctly.
  • Gibberish as a Trigger: Unlike traditional attacks that modify existing text, this approach generates "trigger" sequences from scratch.
  • Cross-System Vulnerability: All three major translators were susceptible, though they produced different types of errors. For example, DeepL was particularly prone to "back-translation" failures, where a meaningful English output would translate back into Russian as an empty string or total garbage.

Key Results

The researchers successfully generated "Top-33" lists of hallucinogens for each translator.

  • DeepL: The Russian string быелръъ (nonsense) translates to "formerly."
  • Google: The string ъувщжёь translates to "Knight."
  • Yandex: The string здблоьп translates to "hello."

More impressively, they composed these into longer adversarial phrases. As shown in the figures below, long strings of Russian gibberish can result in complex English sentences.

Fig. 2: Composition of hallucinogens for DeepL translator. Fig. 4: Composition of hallucinogens for Yandex translator.

The most striking result is the back-translation failure. In Figure 7, a long sequence of gibberish translates to a coherent English sentence about company employees, but when that English sentence is fed back into the translator, it returns an empty result.

Fig. 7: Backtranslation results for the attack text “рыьдяно рыьдяно фйвьжиы рыьдяно жьрэиэф щосющйе рыьдяно жцчыщцй фйвьжиы гбьъьиэ зсзгвлэ бгаьъэы рыьдяно ккзёйьи ктлтксь бфзскйт щосющйе пдлешйщ мжвлвфж рыьдяно гзйкщчж зсзгвлэ гзйкщчж гзйкщчж гбьъьиэ оощвишн гзйкщчж чёхёшьч пдлешйщ жцчыщцй жаьйщсч ъоэсйьл чёхёшьч бреощее ъйлбмфь ктлтксь бфзскйт щосющйе пдлешйщ мжвлвфж рыьдяно гзйкщчж чъръ- пьм чъръпьм ъйлбмфь пдлешйщ быншийя ощуъиъв ыьбэъхс”. The resulting Russian translation is empty.

Limitations and Future Work

  • Reproducibility: Commercial MT systems are constantly updated. The authors noted that Google Translate updated its version during their study, making some results difficult to reproduce in newer browser versions.
  • Manual Selection: While the generation was automated, the authors hand-selected the most "expressive" or "funny" examples from the optimizer's output for the paper.
  • Defense Mechanisms: The paper identifies the vulnerability but does not propose a specific defense. Future work could involve using these adversarial examples to "adversarially train" MT systems, making them more robust to out-of-distribution, nonsensical inputs.

Summary updated

Abstract

Neural networks are deployed widely in natural language processing tasks on the industrial scale, and perhaps the most often they are used as compounds of automatic machine translation systems. In this work, we present a simple approach to fool state-of-the-art machine translation tools in the task of translation from Russian to English and vice versa. Using a novel black-box gradient-free tensor-based optimizer, we show that many online translation tools, such as Google, DeepL, and Yandex, may both produce wrong or offensive translations for nonsensical adversarial input queries and refuse to translate seemingly benign input phrases. This vulnerability may interfere with understanding a new language and simply worsen the user's experience while using machine translation systems, and, hence, additional improvements of these tools are required to establish better translation.
BibTeX
@misc{chertkov2023translate,
  author = {Andrei Chertkov and Olga Tsymboi and Mikhail Pautov and Ivan V. Oseledets},
  title = {{Translate your gibberish: black-box adversarial attack on machine translation systems}},
  year = {2023},
  eprint = {2303.10974},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2303.10974},
}
Figure