Low-Resource Turkic Translation: Synthetic Data and Adapter Fine-Tuning
This article examines low-resource Turkic translation under limited parallel data. It covers data scale, agglutinative morphology, and orthographic variation; describes a pivot-based synthetic data pipeline with filtering and language tags; compares unified training with adapter fine-tuning; and summarizes experimental controls, result interpretation, deployment steps, and operational risks.
I. Problem Scope
Low-resource Turkic translation has three main difficulties.
The first is data scale. Bashkir parallel corpora contain about 1.19 million sentence pairs, and Chuvash about 190,000. The figures do not specify counting methodology or data source. Before citing them, verify the corpus version and confirm the deduplication method.
The second is morphology. Turkic languages are mostly agglutinative: a root can take multiple suffixes for case, person, tense, and voice. A single root can have many variants, and training samples rarely cover all combinations.
The third is orthography and dialect differences. Some languages have undergone orthographic adjustment, and old and new spellings are mixed in corpora, adding noise for the model. Regional expression conventions also differ.
These three factors do not fully explain gaps in translation quality. Training objectives, decoding strategies, and test-set quality also affect results. This article therefore discusses only two questions: how to obtain usable additional training data, and how to train a stable model with limited data.
The study covers five language pairs: Russian–Kazakh, Russian–Kyrgyz, Russian–Bashkir, English–Tatar, and English–Chuvash. About 2.45 million training samples were constructed for each pair. With uniform sample sizes, comparisons across languages are more credible, and results better reflect the effect of the training method itself.
Training multiple language pairs together has another benefit. Several Turkic languages and Russian use Cyrillic and have absorbed many Russian loanwords. Knowledge learned in one language may transfer to related languages.
II. Synthetic Data: Pivot Translation and Filtering
2.1 Pivot Chain
When a language pair lacks direct parallel corpora, a high-resource intermediate language can be used for pivot translation. This article starts from English, translates to Russian, and then translates from Russian into each Turkic language. English-to-Russian translation quality is usually higher, so the chain starts from the stronger end.
A pivot chain has an inherent risk: errors accumulate with each translation step. Errors in Russian propagate to all downstream Turkic languages. Filtering must therefore exist and cannot be omitted.
The whole pipeline has five steps, and each step must define inputs, outputs, and failure handling.
- Collect English monolingual sentences. The input is raw text; the output is a list of non-empty, deduplicated sentences. If an encoding error occurs, skip the file and log the filename.
- Translate English to Russian. The input is an English sentence; the output is a Russian sentence. On API timeout, retry by batch. Batches that still fail are logged for later rerun.
- Translate Russian to each Turkic language. The input is a Russian sentence; the output is the target-language translation. Discard any batch whose returned count does not match the input count.
- Assemble sentence pairs and attach language tags.
- Filter the pairs using the rules in Section 2.2.
The code below implements steps 1 to 4. The translation API is provided by the caller; confirm the service’s terms before use.
from dataclasses import dataclassfrom typing import Callable, Iterable# Source-side language for each pair. For Russian-to-Turkic directions,# Russian is the source; for English-to-Tatar and English-to-Chuvash,# English remains the source.SOURCE_SIDE = {"kk": "ru", "ky": "ru", "ba": "ru", "tt": "en", "cv": "en"}@dataclassclass ParallelPair:src: str # Source sentencetgt: str # Target sentencelang: str # Target language code, e.g. "ba"en: str # Original English sentence for traceabilitysynthetic: bool = True# mt(texts, src_lang, tgt_lang) returns a list of translations# with the same length as the input.TranslateFn = Callable[[list[str], str, str], list[str]]def pivot_translate(en_sentences: Iterable[str],mt: TranslateFn,target_langs: list[str],batch_size: int = 64,) -> list[ParallelPair]:en_list = [s.strip() for s in en_sentences if s and s.strip()]pairs: list[ParallelPair] = []for start in range(0, len(en_list), batch_size):batch_en = en_list[start:start + batch_size]try:batch_ru = mt(batch_en, "en", "ru")except Exception as exc:print(f"[warn] en->ru failed, batch start {start}: {exc}")continueif len(batch_ru) != len(batch_en):print(f"[warn] en->ru returned mismatched count, batch start {start}")continuefor lang in target_langs:try:batch_tgt = mt(batch_ru, "ru", lang)except Exception as exc:print(f"[warn] ru->{lang} failed, batch start {start}: {exc}")continueif len(batch_tgt) != len(batch_ru):print(f"[warn] ru->{lang} returned mismatched count, batch start {start}")continuefor en, ru, tgt in zip(batch_en, batch_ru, batch_tgt):src = en if SOURCE_SIDE.get(lang) == "en" else rupairs.append(ParallelPair(src=src, tgt=tgt, lang=lang, en=en))return pairs
2.2 Filtering Checklist
Filtering determines the usable upper bound of synthetic data. The table below lists checks and suggested starting thresholds. These values are starting points for tuning, not validated optima; adjust them on the development set.
| Check | Method | Starting threshold |
|---|---|---|
| Language identification | Check the target side with a language-ID model | Target-language confidence ≥ 0.8 |
| Length ratio | Target character count divided by source character count | Between 0.5 and 2.0 |
| Verbatim copy | Source and target are identical | Remove directly |
| Exact deduplication | Hash each sentence pair | Keep only one copy of duplicates |
| Near deduplication | Use MinHash to find near duplicates | Set similarity threshold based on development-set performance |
| Entity preservation | Compare numbers, URLs, and proper nouns | Discard if the two sides do not match |
| Manual spot check | Randomly sample each language pair | 200 sentences per pair; if error rate exceeds 5%, revisit the translation API and parameters |
Language identification must be confirmed first. Open-source language-ID models may not cover smaller languages such as Chuvash and Bashkir. If coverage is insufficient, replace the model, or use it only as a coarse filter combined with manual spot checks.
The code below implements language identification, length ratio, verbatim copy, and exact deduplication.
import hashlibfrom typing import CallableLangIdFn = Callable[[str], tuple[str, float]] # Returns (language code, confidence)def filter_pairs(pairs: list[ParallelPair],lang_id: LangIdFn,min_conf: float = 0.8,min_ratio: float = 0.5,max_ratio: float = 2.0,) -> list[ParallelPair]:seen: set[str] = set()kept: list[ParallelPair] = []for p in pairs:src, tgt = p.src.strip(), p.tgt.strip()if not src or not tgt or src == tgt:continueratio = len(tgt) / len(src)if not (min_ratio <= ratio <= max_ratio):continuelabel, conf = lang_id(tgt)if label != p.lang or conf < min_conf:continuekey = hashlib.sha256(f"{src}\t{tgt}".encode("utf-8")).hexdigest()if key in seen:continueseen.add(key)kept.append(p)return kept
2.3 Language-Tag Design
A multilingual model needs to know which language to output. A common approach is to prepend a target-language tag to the source sentence, for example <2ba> source text. Each target language has its own tag, added to the vocabulary as a special symbol.
There are three design rules. First, tags must be exactly consistent between training and inference. Second, use unified language codes; this article uses ISO 639-style codes: Kazakh kk, Kyrgyz ky, Bashkir ba, Tatar tt, and Chuvash cv. Third, if reverse directions are also trained, such as Turkic-to-Russian, design separate tags for direction to avoid confusing the model.
Tags also address a hidden problem. Without tags, the model may randomly switch output among related languages such as Russian and Kazakh, amplifying language mixing in synthetic data.
III. Unified Training and Adapter Fine-Tuning
The two strategies start from different assumptions. Unified training mixes data from all language pairs and trains one model. Adapter fine-tuning freezes a pretrained multilingual backbone and trains a small module for each language pair.
The table below compares them along several dimensions. The conclusions are qualitative judgments; validate specific effects on your own data.
| Dimension | Unified training | Adapter fine-tuning |
|---|---|---|
| Trained parameters | All parameters | Only adapters and normalization layers |
| Storage | One full model per training run | One backbone plus multiple small adapters |
| Language transfer | Shared vocabulary and loanwords; stronger transfer | Relies on backbone knowledge; transfer depends on the backbone |
| Interference risk | High-resource pairs may suppress low-resource pairs | Language pairs are isolated from each other |
| New language pairs | Usually requires retraining | Train only a new adapter; existing weights stay unchanged |
| Capacity ceiling | Limited by overall model size | Small adapter capacity; distant languages may underfit |
| Suitable scenarios | Many related pairs with unified data management | Frequent pair changes and limited deployment resources |
The core of an adapter is a bottleneck structure: down-projection, up-projection, and a residual connection. The code below gives a minimal implementation. The up-projection weights are initialized to zero, so the model output exactly matches the original backbone at the start of training.
import torch.nn as nnclass Adapter(nn.Module):def __init__(self, d_model: int, r: int = 64):super().__init__()self.down = nn.Linear(d_model, r)self.act = nn.GELU()self.up = nn.Linear(r, d_model)nn.init.zeros_(self.up.weight)nn.init.zeros_(self.up.bias)def forward(self, x):return x + self.up(self.act(self.down(x)))def freeze_except_adapters(model: nn.Module) -> None:# Parameter names must match the model implementation; for example,# adapter modules may contain "adapter" in their names.for name, param in model.named_parameters():param.requires_grad = ("adapter" in name) or ("layer_norm" in name)trainable = sum(p.numel() for p in model.parameters() if p.requires_grad)print(f"Trainable parameters: {trainable}")
The adapter fine-tuning steps are as follows.
- Load a pretrained multilingual model as the backbone.
- Insert an Adapter after the output of each encoder and decoder layer, and name the module so that it contains
"adapter". - Call
freeze_except_adaptersto freeze backbone parameters. - Train on the data for one language pair. Start with a learning rate such as 1e-4, and make the final choice based on development-set performance.
- Save one adapter file per language pair. At inference time, load the backbone and then load the adapter for the corresponding language pair.
- When adding a new language pair, train only the new adapter; existing adapters remain unchanged.
Adapter size is determined by bottleneck dimension r and the number of layers. The file is much smaller than a full model, but the exact size depends on model configuration and should be based on the actual saved file.
IV. Experimental Setup and Result Interpretation
When comparing the two methods, controlling variables is essential. The following points should be kept consistent.
- The training sample size for each language pair is the same: about 2.45 million in this study.
- Use the same pretrained backbone and the same tokenizer.
- Use the same training hyperparameters, training steps, and early-stopping rules.
Test-set requirements are stricter than other settings. The test set must be real human-translated parallel data and must not contain synthetic pairs. If synthetic data is mixed into the test set, scores can be inflated because of similarity in machine-translation style, and conclusions will be distorted. The development set should also be separated from training data.
Report both chrF and BLEU. Their behavior on smaller languages is not identical, and relying on a single metric can lead to misjudgment. Results should be listed by language pair, not only as an average. Averages can hide regressions in some language pairs.
Whether a difference is reliable needs testing. Paired bootstrap resampling can estimate confidence intervals for the difference between two systems. If the difference is near zero, do not draw a conclusion.
At least three ablation experiments are recommended.
- Synthetic data versus no synthetic data, to determine whether synthetic data actually helps.
- Filtering versus no filtering, to determine the effect of filtering rules.
- Language tags versus no language tags, to determine whether tags reduce language mixing.
The following judgments can guide result interpretation. If synthetic data improves development-set scores but not test-set scores, check for data leakage and whether synthetic data is overly close to the development-set distribution. If adapters lag clearly behind unified training on distant language pairs, try increasing the bottleneck dimension or unfreezing several top layers. If unified training drops on high-resource language pairs, interference is occurring, and sampling ratios across language pairs should be adjusted.
V. Deployment Steps and Risks
The following order is recommended for deployment.
- Inventory real parallel corpora and record the source, license, and counting methodology for each file.
- Run the full pipeline on a small sample of about 10,000 sentences per language pair and track the filtering rate at each step. If the filtering rate is abnormal, check the translation API and language-ID model first.
- Decide language tags and vocabulary, and fix them before training.
- Train a unified-training baseline and an adapter version separately.
- Evaluate on a real human test set and perform significance testing.
- Save model versions, data hashes, filtering parameters, and tag definitions. These records are prerequisites for reproducing results.
The following risks require attention before deployment.
- Service terms risk: the terms of commercial machine translation services may restrict using translated output to train models or limit redistribution. Read the terms before use and confirm whether such use is allowed. Services that have not been confirmed should not be connected to the pipeline.
- Copyright risk: English monolingual corpora may contain copyrighted text. Confirm the scope of authorization before using them for synthesis and training.
- Privacy risk: if corpora contain personal information, de-identify it before sending it to external translation APIs.
- Error propagation: errors in Russian within the pivot chain propagate to all Turkic languages. Spot checks should specifically inspect Russian intermediate results.
- Machine-translation style bias: the model may learn machine-translation phrasing, causing real translation quality to be overestimated. Human-translated test sets are the only reliable criterion.
- Traceability: every sentence pair should be marked as synthetic or not, and the original English sentence should be retained. This makes it possible to locate and remove related data quickly when problems arise.
