Multilingual Question Answering

Machine Learning
Introduced by
Multiple groups; popularised via mBERT (Devlin et al., 2019) and XLM-R (Conneau et al., 2020)
Year
2018–2020
Type
Extractive / generative QA across multiple languages
Family
Deep learning / NLP / CV

What does it do?

Multilingual question answering (QA) lets a model read a passage and answer questions in several languages.

A common approach is to fine-tune a cross-lingual pretrained transformer, such as mBERT or XLM-R, on an annotated QA dataset in one language and then apply it to other languages with zero-shot or few-shot transfer. It underlies many multilingual reading-comprehension and open-domain QA systems.

The intuition behind the method

Multilingual pretrained encoders such as mBERT and XLM-R are trained on text from many languages, and their representations appear to carry information shared across those languages. Fine-tuning on a QA dataset in one language can therefore transfer some ability to locate answers to other languages seen during pretraining, which can reduce the need for annotated data in every target language. The reasons for this transfer are debated: Artetxe et al. (2020) report that a shared vocabulary and joint training are not strictly necessary, since a monolingual model with a newly learned embedding matrix for each new language was competitive with mBERT on XQuAD.

History

Interest in cross-lingual QA grew after multilingual BERT (mBERT) appeared in 2018–2019. Artetxe et al. (2020) note that multilingual BERT has been shown to generalise in a zero-shot cross-lingual setting. XLM-R followed with further multilingual pretraining. Benchmarks from 2020, including XQuAD (Artetxe et al., 2020) and TyDi QA (Clark et al., 2020), standardised cross-lingual evaluation. Generative sequence-to-sequence models have since extended QA beyond span extraction.

When to use it

Choose multilingual QA when questions and passages occur in several languages, annotated QA data is scarce for some of them, or one deployed model must cover all of them. It suits multilingual knowledge bases, support content in several languages, and research on lower-resource languages where zero-shot or few-shot transfer is the only practical option. Avoid it when all queries are in one language: a monolingual model does not share capacity with other languages and is usually the natural first choice. Also consider a domain-specific monolingual pipeline when the domain is narrow and target-language annotation is affordable, since per-language fine-tuning on in-domain data is likely to be more accurate; compare candidates on held-out data before deciding.

Limitations and considerations

  • Multilingual models trade capacity across languages; per-language performance is typically lower than dedicated monolingual models.
  • Low-resource languages with limited pretraining text remain significantly weaker than high-resource ones.
  • Computational cost is high: large cross-lingual transformers require GPU resources for both training and inference.
  • Cross-lingual transfer degrades for typologically distant languages or scripts absent from the pretraining corpus.
  • Evaluation benchmarks often focus on extractive span prediction; open-ended or generative QA across languages is less standardised.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Enables QA across dozens of languages with a single model, greatly reducing engineering overhead.
  • Zero-shot cross-lingual transfer allows deployment in languages with little or no labelled data.
  • Strong off-the-shelf performance when built on large pretrained models such as XLM-R Large.
  • Standardised benchmarks (XQuAD, TyDi QA) support reproducible comparison across systems.
  • Both extractive and generative (seq2seq) formulations are available for different answer formats.
  • Can be further specialised by continued pretraining on target-language text before fine-tuning.

Applications

  • Multilingual customer support chatbots that extract answers from product documentation in multiple languages.
  • Cross-lingual academic search systems answering research questions from papers in different languages.
  • Government and public-sector knowledge bases serving multilingual populations.
  • Low-resource language NLP research using zero-shot or few-shot cross-lingual transfer.
  • Multilingual fact-checking pipelines that retrieve and verify claims across language boundaries.
  • Educational technology platforms delivering personalised QA in students' native languages.

How it works

How it works

1

The question and passage are joined with special separator tokens and split into subword units by the backbone's tokeniser. Multilingual backbones use one vocabulary covering many languages, so a single tokenisation pipeline can process each supported language without language-specific preprocessing. The subword scheme differs between backbones (mBERT uses WordPiece), so tokenisation should be checked for every target language.

2

A pretrained cross-lingual transformer (such as mBERT or XLM-R) encodes the concatenated input into contextual token embeddings. Because pretraining covers many languages, semantically similar text in different languages tends to receive related representations, which is what makes transfer possible.

3

For extractive QA, a start head and an end head each apply a learned linear projection to the encoder outputs and a softmax over token positions, giving the probability that each token is the start or end of the answer. Training minimises the cross-entropy of the gold start and end positions. At inference, the highest-scoring contiguous span is returned, restricted to spans whose start does not come after their end and whose length does not exceed a maximum answer length. Datasets that include unanswerable questions need a separate no-answer score, because the span heads alone cannot abstain.

Formula
P(\text{start}=i) = \text{softmax}(W_s \mathbf{h}_i),\quad P(\text{end}=j) = \text{softmax}(W_e \mathbf{h}_j)
4

The model is fine-tuned on a labelled QA dataset, often English SQuAD or the multilingual TyDi QA benchmark, and then applied to test questions in other languages without further fine-tuning (zero-shot) or with a small amount of target-language supervision (few-shot). Target-language supervision often improves accuracy, and the size of the gain should be measured on held-out target-language data.

5

Predictions are scored with Exact Match (EM) and token-level F1 against the gold answers, computed separately for each language and then averaged. Benchmarks such as XQuAD and TyDi QA provide multilingual splits for comparison. XQuAD consists of SQuAD v1.1 paragraphs and questions translated into ten languages by professional translators, so cross-language score gaps may partly reflect translation quality. Compare scores only within the same benchmark.

Common pitfalls

  • Evaluating only on English test splits and reporting results as multilingual performance.
  • Fine-tuning on English only and assuming the model will generalise to all languages without validation on target languages.
  • Ignoring language-specific tokenisation issues that can silently degrade span extraction accuracy.
  • Reporting F1 without also reporting Exact Match, which is more sensitive to boundary errors.
  • Deploying without checking that target languages are adequately represented in the backbone model's pretraining vocabulary.

Frequently asked questions

Which backbone model should I use for multilingual QA?

XLM-R, especially its Large variant, is a widely used backbone for cross-lingual transfer. For generative answers, a multilingual sequence-to-sequence model is a natural option. If your target languages are few and closely related to high-resource languages, a lighter backbone such as mBERT may be enough. Compare candidates on held-out data in each target language.

Can I achieve good results with no target-language training data?

Zero-shot transfer from English-only fine-tuning can work reasonably well for languages close to English, but results usually drop for typologically distant or low-resource languages. Adding a small amount of labelled target-language data (few-shot fine-tuning) is generally worth testing, and its effect should be measured on a held-out target-language set.

How is multilingual QA evaluated?

The standard metrics are Exact Match (EM), the fraction of predictions that exactly match the gold answer, and token-level F1, which rewards partial matches. Results are typically reported per language and as an average across languages on benchmarks such as XQuAD or TyDi QA.

What is the difference between extractive and generative multilingual QA?

Extractive QA selects a contiguous span from the given passage as the answer. Generative QA produces a free-form answer string, which is more flexible but harder to evaluate and more computationally demanding. Many standard benchmarks are designed for extractive evaluation, while generative models such as mT5 can handle both styles.

Does multilingual QA work for languages not seen at fine-tuning time?

If a language is present in the backbone's pretraining corpus, zero-shot transfer is possible but may be weak. If a language is absent from pretraining, transfer is unlikely to be meaningful, and additional pretraining or adaptation is usually needed before fine-tuning.

Related methods

Sources

  1. Artetxe, M., Ruder, S., & Yogatama, D. (2020). On the cross-lingual transferability of monolingual representations. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (pp. 4623–4637). ACL.

    Open DOI reference
  2. Clark, J. H., Choi, E., Collins, M., Garrette, D., Kwiatkowski, T., Nikolaev, V., & Palomaki, J. (2020). TyDi QA: A benchmark for information-seeking question answering in typologically diverse languages. Transactions of the Association for Computational Linguistics, 8, 454–470.

    Open publication reference