Are Multilingual BERT models robust? A Case Study on Adversarial Attacks for Multilingual Question Answering

Sara Rosenthal, Mihaela A. Bornea, Avirup SilarXiv 2021

Introduction

Multilingual BERT (mBERT) has become a cornerstone for cross-lingual natural language processing, enabling "zero-shot" transfer from high-resource languages like English to others. However, the robustness of these models is a critical concern. Previous research demonstrated that monolingual English models are "brittle": adding a single, semantically irrelevant adversarial "distractor" sentence to a passage can cause performance to drop by half. This study investigates whether mBERT inherits or even amplifies these vulnerabilities in a multilingual context.

Methodology: The Multilingual AddSent Attack

To evaluate mBERT, the authors adapted the AddSent framework into a five-step pipeline designed to generate deceptive distractors in multiple languages.

  1. Markup: Identify the question's focus (e.g., "What artist...") using dependency parsing and Named Entity Recognition (NER).
  2. Convert: Transform the question into a declarative statement template (e.g., "The artist <ANSWER> created...").
  3. Generate: Produce four types of adversarial statements:
  4. RARQ: Random Answer, Random Question entity.
  5. RAOQ: Random Answer, Original Question entity (the most deceptive).
  6. NARQ: No Answer, Random Question entity.
  7. NAOQ: No Answer, Original Question entity.
  8. Translate: Use machine translation to convert these English statements into the target languages.
  9. Insert: Randomly place the distractor into the original text passage.
The five-step pipeline for generating multilingual adversarial distractors, from question parsing to final insertion.

Experimental Setup

The study utilized three primary datasets:

  • SQuAD v1.1: The standard English QA dataset for initial training.
  • MLQA (Multilingual Question Answering): A benchmark with parallel QA examples in seven languages (English, German, Spanish, Arabic, Hindi, Vietnamese, and Chinese).
  • MT-SQuAD: A machine-translated version of SQuAD used to facilitate multilingual adversarial training.

Results and Discussion

The experiments revealed several critical insights into mBERT's internal biases and vulnerabilities.

mBERT Fragility and the RAOQ Attack

mBERT proved significantly more fragile than its monolingual counterpart. As shown in the results, the Random Answer Original Question (RAOQ) strategy was devastating. By retaining the original entities from the question, the attack tricks the model's attention mechanism into prioritizing the distractor over the actual context.

Performance of BERT and mBERT under various adversarial attacks. mBERT's F1 score on the MLQA test set drops from 80.4 to 11.8 under the RAOQ attack.

Language Biases

The model exhibited a strong "English Bias," where distractors in English were more likely to fool the model regardless of the context language. Additionally, a "Question-Language Synergy" was observed: the model is most vulnerable when the distractor is in the same language as the question, suggesting it specifically searches for answers in the language of the query.

Defending the Model

The authors demonstrated that Adversarial Training—including these distractors in the training set—can significantly mitigate these issues. By using machine-translated data for defense (MT-mBERT), they recovered most of the lost performance, bringing F1 scores back to near-original levels.

Conclusion

This study highlights a massive gap between how transformer models "read" and how humans understand context. While mBERT is a powerful tool, its reliance on surface-level patterns and language-specific cues makes it highly susceptible to adversarial manipulation. However, the success of adversarial training suggests that these models can be hardened for more reliable global applications. Future work may involve more sophisticated natural language generation to create even more challenging distractors and exploring robustness in low-resource languages.

Summary updated

BibTeX
@misc{rosenthal2021are,
  author = {Sara Rosenthal and Mihaela A. Bornea and Avirup Sil},
  title = {{Are Multilingual BERT models robust? A Case Study on Adversarial Attacks for Multilingual Question Answering}},
  year = {2021},
  eprint = {2104.07646},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.07646},
}
Figure