Parallel Data Mining and Quality Control › Back-Translation and Synthetic Parallel Data
Language AI HandbookAll chapters Mining recovers candidate bitext that already exists. Back-translation constructs additional pairs from monolingual text on the target side. Translate each target sentence into the source language with a backward model, then pair the generated source with the original target.
Sennrich, Haddow, and Birch (2016) reported gains from this approach on their English–German and Turkish-to-English neural translation tasks. Two properties matter when choosing how to use it.
- Additional coverage. Target-side monolingual data can add vocabulary and domains that are scarce in the available bitext.
- Synthetic source cues. The decoding strategy changes the generated sources. Caswell et al. (2019) found that tagging those sources could deliver gains similar to adding noise in their experiments.
The direction matters. To train a source-to-target system with back-translation, generate source-language sentences from authentic target text. Forward translation generates target-language sentences from authentic source text, which changes the supervision the model receives.
The loss with back-translated data
The training objective becomes a weighted combination:
where:
- : the authentic bitext
- : the synthetic bitext produced by the backward model
- : the weight that controls the mix of synthetic and authentic data
You can control the influence of synthetic examples with the loss weight, with the frequency at which the sampler draws them, or with both.
For authentic pairs, synthetic pairs, and , divide the weighted loss by when that sum is positive. Drawing a synthetic pair with probability and sampling uniformly within each group gives the same expected normalized loss. Finite training runs can still see different examples, batches, and gradients. Tune the mixture on held-out authentic bitext for the intended domain.
Variants
Several refinements matter at scale.
- Iterative back-translation. Train translation systems on earlier synthetic pairs, then use the updated backward model to generate new pairs. Hoang et al. (2018) reported gains in their tested settings. Evaluate each round against the previous model before using its output for another round.
- Tagged back-translation. Caswell et al. (2019) prepend a special tag to synthetic source sentences so the forward model can distinguish them from authentic sources.
- Online versus offline. Offline back-translation generates the synthetic corpus before training. Online back-translation generates examples during training and can use an updated backward model, with additional generation work during training.
- Quality filtering. Inspect synthetic pairs for adequacy, length, and language. Calibrate any cutoffs on samples from the generation setup because the sources can differ from ordinary mined text.
The quality of the backward system matters. In the English–German experiments of Hoang et al. (2018), synthetic data from the weakest backward systems provided no benefit over the corresponding baseline. Track each translation direction on held-out authentic pairs, since improving one round or direction gives no guarantee about the next.
A data augmentation technique in which a target-side monolingual sentence is translated into the source language by a backward model, producing a synthetic source-target pair for training. Gains depend on the ratio of synthetic to authentic data and on the quality of the backward model.
A toy lexical coverage filter
Use a fixed word lookup as a small stand-in for backward translation. Its coverage is visible by construction: an out-of-dictionary word produces <unk>. For this example the fraction of recognized words measures only dictionary coverage. It cannot check word order or whether the generated English carries the same meaning.
PythonIn [21]Expand
de_mono = [
"Die Katze saß auf der Matte.",
"Wo ist der Bahnhof?",
"Ich hätte gerne eine Tasse Kaffee, bitte.",
"Das Wetter ist heute wunderschön.",
"Die Regierung kündigte heute neue Maßnahmen an.",
]
de_to_en_toy = {
"die": "the",
"katze": "cat",
"saß": "sat",
"auf": "on",
"der": "the",
"matte": "mat",
"wo": "where",
"ist": "is",
"bahnhof": "train station",
"ich": "i",
"hätte": "would like",
"gerne": "gladly",
"eine": "a",
"tasse": "cup",
"kaffee": "coffee",
"bitte": "please",
"das": "the",
"wetter": "weather",
"heute": "today",
"wunderschön": "beautiful",
}
def toy_backtranslate(sent: str) -> tuple[str, float]:
tokens = [word.strip(".,!?") for word in sent.lower().split()]
tokens = [word for word in tokens if word]
translated = [de_to_en_toy.get(word, "<unk>") for word in tokens]
coverage = (
sum(word in de_to_en_toy for word in tokens) / len(tokens)
if tokens
else 0.0
)
return " ".join(translated), coverage
backtranslations = [toy_backtranslate(sentence) for sentence in de_mono]
bt_df = pd.DataFrame(
{
"german": de_mono,
"back_translated_english": [output for output, _ in backtranslations],
"dictionary_coverage": [coverage for _, coverage in backtranslations],
}
)
bt_df["keep"] = bt_df["dictionary_coverage"].ge(0.8)| german | back_translated_english | dictionary_coverage | keep | |
|---|---|---|---|---|
| 0 | Die Katze saß auf der Matte. | the cat sat on the mat | 1.000 | True |
| 1 | Wo ist der Bahnhof? | where is the train station | 1.000 | True |
| 2 | Ich hätte gerne eine Tasse Kaffee, bitte. | i would like gladly a cup coffee please | 1.000 | True |
| 3 | Das Wetter ist heute wunderschön. | the weather is today beautiful | 1.000 | True |
| 4 | Die Regierung kündigte heute neue Maßnahmen an. | the <unk> <unk> today <unk> <unk> <unk> | 0.286 | False |
The dictionary recognizes every word in the first four sentences and two of the seven words in the fifth. With the example cutoff of , the fifth pair is rejected. High coverage only verifies that the decoder used known entries. To run a two-leg round-trip check on real back-translated data, translate the synthetic source forward into the original target language and compare the resulting sentence with the original target. Treat agreement as one signal of consistency, since both models can share errors.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!