Three stages
1. Rule-based translation (RBMT)
- Direct: a bilingual dictionary with simple reordering rules.
- Transfer-based (Transfer): syntactic analysis of the source, then structural transfer rules, then generation in the target.
- Interlingua-based (Interlingua): a language-independent representation of meaning.
They are summed up by the "Vauquois triangle": the higher we go in analysis, the fewer transfer rules are needed and the harder the analysis becomes. Accurate in narrow domains, and very expensive to build.
2. Statistical translation (SMT)
From the noisy channel rule: \hat{e} = \arg\max_e P(f \mid e)\, P(e). Then phrase-based translation (Koehn et al., 2003):
- Word alignment in the parallel corpus (IBM models with EM).
- Phrase table extraction: pairs of segments consistent with the alignment, with their probabilities.
- A log-linear model that combines: translation probabilities in both directions, the target language model (n-gram), the reordering model and a length penalty, with weights tuned on a development set to maximize BLEU.
- Decoding with beam search over partial hypotheses.
The open-source Moses toolkit dominated for about a decade.
3. Neural translation (NMT)
Seq2Seq with attention, then the transformer, which became the standard. A single model learns end to end, with much higher fluency. But its errors are "fluent": it may drop part of the meaning or add what is not in the source (hallucination) in grammatically correct sentences, which is more dangerous because it is harder to detect.
Core techniques in neural translation
- Shared subword tokenization between source and target (BPE or SentencePiece).
- Back-translation (Sennrich et al., 2016): translation models need pairs, but monolingual text is far more plentiful. We train a reverse model (target → source), use it to translate monolingual target text, and add the resulting pairs (generated source, authentic target) to training. The model improves because the target side it learns to generate is authentic.
- Sequence-level distillation: a large model generates translations on which a small model is trained.
Multilingual translation
- Johnson et al. (2017) introduced a single model for many languages, with a token at the start of the input that specifies the target language (
<2ar>). It demonstrated zero-shot translation between pairs it was not trained on directly. - NLLB (NLLB Team, 2022): a model for more than 200 languages, including MSA and several Arabic dialects, with the FLORES-200 evaluation benchmark and mixture-of-experts models. One of its goals is low-resource languages.
- OPUS-MT (Tiedemann & Thottingal, 2020): hundreds of open models for specific language pairs, trained on the OPUS corpora, that run locally.
- General large models now translate well for high-resource languages, but evaluate them on your domain and dialect.
Challenges of translation with Arabic
- Rich morphology: one Arabic word = several English words (“فسيكتبونها” = and they will write it), so word alignment is harder, and pre-segmentation was useful in SMT.
- Word order: VSO in Arabic versus SVO in English, the adjective after the noun, and the idafa construction.
- Gender and number: translating into Arabic requires deciding the addressee's gender and agreeing verbs, adjectives and the dual; "you are a doctor" → “أنتَ طبيب” or “أنتِ طبيبة”? This is a known source of gender bias when the system defaults to the masculine.
- Dialects: most parallel data is in MSA (UN documents, news), while users write in dialects. Resources include MADAR (parallel sentences in the dialects of 25 cities).
- Proper names and how they are spelled, as well as numbers, dates and direction in mixed text.
- Domain bias: the United Nations Parallel Corpus (Ziemski et al., 2016) is huge and high quality but very formal, so a model trained on it alone translates everyday conversation in a documentary style.
Evaluating translation
- chrF, COMET and BLEU (via SacreBLEU), as in the generation metrics lesson.
- Human evaluation with adequacy and fluency criteria, or with the MQM framework, which classifies errors (omission, addition, terminology error, grammatical error) by severity.
- Evaluate on a test set from your domain; performance on news does not predict performance on medical or dialectal texts.
Try it: in the Translation module, type a short Arabic sentence and notice the word-by-word dictionary translation and the reordering and morphology problems that appear in it; they show exactly what statistical and then neural translation solved.
