Where Fine-Tuning Loses a Language: Typology-Predicted Layer Mixing for Zero-Shot Transfer

Multilingual models such as mBERT and XLM-R are usually fine-tuned on English and then applied to other languages by reading off their final layer. The final layer is the most compressed stage of the network, and fine-tuning pushes it further toward whatever the English training task needed. This proposal tests a specific hypothesis. The information a target language needs, but that the final layer throws away, depends on how that language is built. For a morphologically rich or verb-final language, the useful structure may survive only in lower or middle layers. For a language close to English, the last layer may already be enough. If this holds, the depth a model should read from is a property of the target language's grammar, and it can be predicted from a typological database before any labeled data in that language exists.

The practical payoff is zero-shot transfer to languages with no task data. The plan is to learn a small function that maps a language's expert-coded grammatical features (from Grambank or URIEL, databases recording properties such as word order, case marking and affixation) to a weighting over the backbone's layers. That weighting is then applied to languages and language families never seen in training. The scientific payoff is a map of the loss itself: per task and per language, how much of what is recoverable in the best layer is gone by the last one, and whether that gap tracks typological distance from the fine-tuning language.

Core Claim

Hierarchical feature loss in multilingual transfer is not uniform across languages. The gap between the best intermediate layer and the final layer grows with the target's typological distance from the source language, most visibly on structural tasks such as tagging and parsing. The shape of that gap is predictable enough from fine-grained typological features that a layer mixture predicted from typology alone should beat three alternatives on held-out language families: a single global mixture, the final layer, and a mixture that infers the language from the input text.

What the literature establishes, and what it leaves open

Two lines of evidence motivate the claim.

The first concerns where structure lives in depth. The emergent-typology work shows that multilingual models organize languages along linguistic lines, but at different depths depending on what is measured:

These studies use different models and metrics, and none of them turns its depth findings into a transfer method. We use them as motivation, not as a method.

The second line concerns what reading from more than the last layer buys. From the hierarchical-feature-loss literature:

The closest existing work sits at the intersection, and it constrains the design:

On the typology side, three papers supply the method:

The new element is the conjunction of three things none of these papers combine: depth, language-specific typology, and zero-shot prediction for unseen families.

Research Program

The first stage is diagnostic. We fine-tune XLM-R base and mBERT on English task data for four tasks: Universal Dependencies part-of-speech tagging, Universal Dependencies dependency parsing, WikiANN named entity recognition, and XNLI inference. We freeze the fine-tuned model and train a lightweight probe on each layer, using a small labeled target sample used only for analysis. For every target language and task this gives a depth profile: probe accuracy as a function of layer.

The quantity of interest is the final-layer loss, defined as best-layer accuracy minus last-layer accuracy. We regress it on Grambank-derived distance from English, script difference, and pretraining data size. Pretraining size matters because Evaluating morphological typology in zero-shot cross-lingual transfer finds pretraining presence is the dominant factor in transfer loss (−25.9 points). Typology must explain variance beyond it for the claim to stand.

The second stage is the method. For a language with typology vector $t$, a small network $g$ outputs weights over the $L+1$ hidden states $h_0,\dots,h_L$ of the backbone, and the task head reads the mixture

$$\tilde h = \sum_{\ell=0}^{L} \alpha_\ell(t)\, h_\ell, \qquad \alpha(t) = \mathrm{softmax}(g(t)),$$

where $\alpha_\ell(t)$ is the weight on layer $\ell$.

We train $g$ in a multi-source setting. Labeled task data comes from a set of source languages, and each example is mixed using its own language's weights $\alpha(t)$. At test time, $g$ is applied to the typology vector of a held-out language.

To stop $g$ from simply memorizing family identity, splits are leave-one-family-out: every language of the test family is absent from training. As a cheaper variant, we also fit a regression from typology to the per-language best mixtures found in stage one on development languages.

The mixer adds only on the order of a thousand parameters. This matters because extra computation is a known cost of multi-layer fusion. It also keeps the comparison with LayerAgg honest: any gain comes from conditioning, not capacity.

Baselines

The naive reference point is final-layer fine-tuning: the standard recipe of fine-tuning the backbone and reading its last layer, run on the same source data, seeds and tuning budget. On MultiATIS++ with mBERT, the LayerAgg paper reports this at 83.4% intent accuracy and 57.3% slot F1 (Data Augmentation and Learned Layer Aggregation for Improved Multilingual Language Understanding in Dialogue).

The second baseline is a global scalar mix: one learned softmax over layers shared by all languages. This is exactly our model with $g$ replaced by a constant. It is the ablation that isolates typology conditioning, and our method must beat it on held-out families to justify itself.

The strongest existing competitor is LayerAgg itself. It is the only published multilingual method that aggregates all layers, and because its aggregator reads the input, it can in principle adapt to the language without being told typology. The paper reports that on MultiATIS++, LayerAgg raises mBERT to 84.3% intent accuracy and 60.1% slot F1, and reaches 86.3% intent accuracy and 64.6% slot F1 with XLM-R.

We will reimplement LayerAgg on our tasks, with the same backbone, source data, learning-rate sweep and number of seeds. We will also report our method on MultiATIS++ and xSID so that the comparison touches its original numbers. For held-out-family evaluation on UD tagging, UD parsing and WikiANN, we found no reported LayerAgg result on Lacuna, so our reimplementation is the reference.

We also run Soft Layer Selection's meta-learned layer rates on XNLI. That paper reports +0.4% average accuracy over the best layer-freezing configuration, and a 2.0% drop when the layer-wise rates are ablated (Soft Layer Selection with Meta-Learning for Zero-Shot Cross-Lingual Transfer).

For parsing, the typology-conditioned position generator is the relevant typology-aware comparison. It reports +4.1 LAS (labeled attachment score, the standard parsing accuracy metric) for seen languages and +1.2 LAS for zero-resource languages over universal positions (Typology Guided Multilingual Position Representations: Case on Dependency Parsing). Because its intervention sits at the input and ours at the readout, we also test the two combined.

An oracle per-language mixture, tuned on each test language's own development set, bounds what any layer-mixing method can achieve. A shuffled-typology control assigns each language another language's vector. If the shuffled vectors do as well as the real ones, typology is not doing the work.

Counting as beating the competition means a statistically reliable gain across seeds over both the global scalar mix and LayerAgg, averaged over held-out families on the structural tasks. The gains should also concentrate where stage one found the largest final-layer loss.

Why not just…?

Why not just use LayerAgg, which already sees the input and can infer the language? This is the real threat. An input-conditioned aggregator trained on many languages may learn language-appropriate mixtures without typology. Our bet is that this inference generalizes poorly to families absent from training, because the aggregator only ever saw the surface forms of training languages. A typology vector, by contrast, puts an unseen Bantu or Semitic language near its structural neighbors. The leave-one-family-out comparison settles this directly. If LayerAgg matches us there, the honest conclusion is that input conditioning suffices, and the contribution reduces to the stage-one map of typology-dependent loss.

Why not just pick the best single layer, or freeze the lower layers? Soft Layer Selection already found that the best manual freezing loses to learned layer-wise rates on XNLI. The mBERT probing work shows family-level structure peaking at layer 2, while semantic transfer relies on higher layers. A single cutoff cannot serve both. Stage one tests this within our tasks: if one layer is best for nearly all languages, the depth profiles will show it, and we would report that negative result.

Why not condition on learned language embeddings or family labels instead of typology? Language Embeddings for Typology and Cross-lingual Transfer Learning shows that embeddings learned without parallel data help zero-shot parsing, with an average of +3.4 UAS (unlabeled attachment score). A learned embedding does not exist for a truly unseen language without some text, and family labels are useless under leave-one-family-out splits. We nonetheless run both as alternative conditioning signals wherever they are defined. Grambank vectors must match or beat them for the typology claim to hold.

Why not just translate the test data into English? XNLI's own evaluation shows translate-test is strong, with a 3–6 point gap to English for the best translation methods (XNLI: Evaluating Cross-lingual Sentence Representations). We report it on XNLI as a ceiling. However, it does not apply to token-level parsing and tagging, and it presumes translation systems that many target languages lack.

Proposed Experiments

The first decisive check is whether final-layer loss is typology-dependent at all. After controlling for pretraining data size, Grambank distance from English should significantly predict the best-minus-last gap on UD tagging and parsing. We expect the largest gaps for introflexive languages (those that mark grammar by changing vowels inside a root, as Arabic and Hebrew do), given Evaluating morphological typology in zero-shot cross-lingual transfer reports they transfer below 50% on tagging while fusional-to-fusional transfer exceeds 80%. We expect weaker or no dependence on XNLI, which should draw on the shared middle layers.

The second check is held-out-family zero-shot accuracy on UD (POS accuracy, LAS), WikiANN (F1) and XNLI (accuracy). Here we compare the typology mixer against the final layer, the global mix, LayerAgg, the learned-embedding mixer, the shuffled control and the oracle. Success means closing a meaningful fraction of the gap between the global mix and the oracle on structural tasks, and doing so while the shuffled control does not.

The third check is whether the predicted mixtures are interpretable. Weights for high-morphology languages should shift toward the early and middle layers that the transcoder analysis links to reassembling fragmented subwords. Weights for word-order-divergent languages should shift toward the lower layers where the probing work finds structural signal. If the weights instead collapse to the same profile everywhere, the method is not doing what we claim, whatever its accuracy.