Multilingual language models are supposed to place a sentence and its translation at roughly the same point in their internal space. In practice they do not. Each language occupies its own region, so a classifier fine-tuned on English sees a Swahili input as something like an out-of-distribution shift. Adversarial training teaches a model to keep its prediction when the input is nudged in the worst direction. It is a natural cure for that brittleness, and in one study it was the step that turned noisy cross-lingual augmentation into a real gain on XNLI. The catch is cost. Each training step runs an inner loop of several gradient-ascent steps through the entire network, and nearly all of that effort goes into perturbation directions that have nothing to do with language.
This note proposes making adversarial training cheap by aiming it where the cross-lingual problem actually lives. We would estimate, from unlabeled monolingual text, the few directions in a middle layer along which languages differ. The worst-case perturbation is then restricted to that low-dimensional "language subspace," with a size set by how far real languages sit from English. Under this restriction the worst-case perturbation has a closed form computed from a single gradient, and only the upper half of the network needs a second pass. The claim to test is concrete. On a frozen-lower-layer multilingual encoder, this one-step adversary should recover most of what multi-step embedding-space PGD buys for zero-shot transfer, at a fraction of the compute. It should also leave low-level syntactic features intact and harden the model against the shared-vocabulary shortcut that current transfer models rely on.
Core Claim
The perturbation set that matters for cross-lingual transfer is not an arbitrary norm ball around word embeddings. It is the set of shifts that changing the language produces in the representation. If that set is approximately a low-dimensional linear subspace at a middle layer, robustness to it can be trained with one extra partial backward pass instead of $K$ full forward-backward passes. The robustness should then carry over to real target-language inputs better than generic robustness does.
Three lines of evidence motivate this. Data Augmentation with Adversarial Training for Cross-Lingual NLI applies multi-step PGD in the word-embedding space of XLM-RoBERTa-base on top of reordering and paraphrase augmentation. It reaches 73.0% average XNLI accuracy against 69.1% for the vanilla model, and it explicitly acknowledges substantial added compute. AlignX and Middle-Layer Representation Alignment for Cross-Lingual Transfer in Fine-Tuned LLMs find an "align-then-diverge" pattern: language-agnostic meaning peaks in middle layers, while lower and upper layers carry language-specific form. That tells us which layer to perturb.
Two further papers constrain the design. AlignFreeze shows that realignment updates to lower layers destroy syntax: full realignment hurt mBERT NER in 19 languages, and front-freezing cut that to one. Our adversary therefore never touches or backpropagates into lower layers. Cross-Lingual Transfer Robustness to Lower-Resource Languages on Adversarial Datasets shows that transfer models lean on vocabulary shared with high-resource languages. They break when that vocabulary is replaced (its P3 and P5 perturbations), and the paper proposes no defense. That supplies a robustness test our method should pass.
Method
We fix a middle layer $l$ with hidden state $h \in \mathbb{R}^d$ for a token. Using unlabeled monolingual text in $m$ languages, we compute each language's mean hidden state $\mu_j$ at layer $l$. We take $U \in \mathbb{R}^{d \times k}$ to be an orthonormal basis for the top-$k$ principal directions of the differences $\mu_j - \mu_{\text{en}}$. The text comes from one side of OPUS-100, and it is disjoint from all evaluation sentences. No parallel pairs are needed.
The adversarial objective restricts the perturbation to this subspace:
$$\min_{\theta} \; \mathcal{L}\big(g_\theta(h),y\big) + \lambda \, \max_{\|z\|\le \epsilon} \mathcal{L}\big(g_\theta(h + Uz),y\big).$$
Here $g_\theta$ is the network above layer $l$, $y$ is the label, $\lambda$ weights the adversarial term, and $\epsilon$ is the budget. Linearizing the loss around $h$ gives the exact maximizer $z^* = \epsilon\, U^\top \nabla_h \mathcal{L} / \|U^\top \nabla_h \mathcal{L}\|$. This follows because maximizing a linear function over a $k$-dimensional ball points along the projected gradient.
That gradient is already available from the clean backward pass. The extra cost is one forward and backward pass through the layers above $l$ only. Multi-step PGD from embeddings, by contrast, costs $K$ passes through the whole model. The budget $\epsilon$ is not a free norm. We set it to a multiple $\alpha$ of the median observed shift $\|U^\top(\mu_j - \mu_{\text{en}})\|$, so the adversary moves a representation about as far as a real language change does.
Layers below $l$ stay frozen, following the front-freezing result. Above $l$ we train either fully or with LoRA adapters, the low-rank weight updates used by the middle-layer alignment paper.
Research Program
The work proceeds in three steps. First, a diagnostic: does a low-$k$ subspace actually capture language identity at the middle layer, and does $k$ need to grow for non-Latin scripts? SIB-200 reports that fragmented scripts such as Nkoo and Tifinagh behave very differently from other languages. We measure two quantities as $k$ varies: how much of the between-language variance $U$ explains, and how well a probe can predict language identity after projecting $U$ out.
Second, we build the training method and sweep layer $l$, rank $k$, and budget multiplier $\alpha$ on XNLI dev using English-only training data.
Third, we test transfer, robustness, preservation of lower-layer features, and compute cost against the baselines below.
The central scientific question is whether the "worst-case" part matters. Making a model invariant along a subspace could equally be achieved by random noise in that subspace, or by deleting the subspace. If either works as well, the contribution shrinks to a cheaper and simpler method. We would report that outcome as the finding.
Baselines
The naive reference point is plain English fine-tuning of XLM-RoBERTa-base with zero-shot evaluation, run with and without front-freezing. Freezing alone may explain part of any gain, so both versions are needed.
The strongest existing method is embedding-space PGD as in Data Augmentation with Adversarial Training for Cross-Lingual NLI. It is the only cited approach that uses adversarial training as the ingredient for XNLI transfer, and it reports 73.0% average accuracy against 69.1% for vanilla XLM-R-base. That 73.0 includes reordering and semantic augmentation, and the reordering step needs JW300 parallel data. For a fair test we therefore reproduce PGD without augmentation on the same English MultiNLI data, backbone, and hyperparameter-search budget as our method, and report its accuracy and GPU-hours. Where we can rebuild the augmented data, we also run both methods on top of it and compare against the published 73.0. Our method wins if it matches PGD's average accuracy within the run-to-run spread at one third or less of its training compute, or exceeds PGD on the distant-language subset (Swahili, Urdu, Thai, Hindi) at equal compute.
A cheaper adversarial baseline is single-step full-embedding FGSM, a one-gradient-step attack, with its norm tuned on the same budget. It costs about as much as our method, so it separates the effect of where the perturbation points from the effect of how many steps it takes.
The strongest non-adversarial competitor is middle-layer contrastive alignment with LoRA from Middle-Layer Representation Alignment for Cross-Lingual Transfer in Fine-Tuned LLMs. It reports +1.5 F1 overall and +3.8 F1 on the lowest-resource languages for Llama 3 on MASSIVE, but no absolute XNLI figure appears on Lacuna. We rerun it on XLM-R with Tatoeba pairs at matched compute. Because it consumes parallel data that our method does not use, matching it counts as a win.
Two ablations isolate the key ingredient. The first uses random Gaussian perturbations inside $U$ at the same norm. The second uses worst-case perturbations inside a random $k$-dimensional subspace.
Why not just…?
Why not just delete the language subspace instead of training against it? Projecting $U$ out of the middle-layer states costs nothing at training time and is a real threat. The align-then-diverge evidence from AlignX suggests upper layers still need language identity, so hard deletion should hurt tasks where output form depends on language. Token-level tasks such as NER and PoS tagging should suffer most. We run the deletion baseline on every benchmark. If it matches our method on XNLI and SIB-200 and only loses on token tasks, we will say the adversary is only needed for structured prediction.
Why not just use cheap one-step adversarial training in the embedding space? It may be that the step count, not the direction, is what matters. The FGSM baseline answers this directly at matched cost. Our hypothesis predicts that FGSM recovers less of PGD's gain on distant languages, because most of its budget is spent on directions unrelated to language shift. If FGSM matches us, the subspace adds nothing.
Why not just align representations with a contrastive loss on parallel sentences? That method works, as the middle-layer alignment paper reports. However, AlignFreeze warns that bringing vectors closer does not reliably improve downstream tasks, and the method requires parallel data that is scarce for the lowest-resource languages. Our method needs only monolingual means. The matched comparison, together with a version that estimates $U$ from as few as 1,000 monolingual sentences per language, settles whether parallel data is worth having.
Why not just translate the training or test data? XNLI found translate-test strong, with some languages above 70%. Translation, though, adds inference cost and fails where machine translation is weak. We report translate-train on XNLI as an upper reference rather than a competitor, since it uses target-language supervision our setting excludes.
Proposed Experiments
XNLI with XLM-RoBERTa-base is the main testbed. We report average and per-language accuracy, wall-clock time, and GPU-hours, with three seeds. SIB-200 tests breadth across 205 languages and the effect of script. The reported 92.1% English XLM-R accuracy and the 75.9% average figure from SIB-200 anchor the range. We split results by script and by language family, and check whether the subspace estimated from about 15 high-resource languages generalizes to unseen scripts.
WikiANN NER covers two questions: preservation of lower-layer features, measured as the number of languages that degrade relative to plain fine-tuning (the AlignFreeze measure), and robustness. For robustness we regenerate the P1–P5 perturbations of Cross-Lingual Transfer Robustness to Lower-Resource Languages on Adversarial Datasets on its 21 low-resource languages and measure how much F1 drops under P3 and P5. No absolute numbers are reported on Lacuna for P3 or P5, so all comparisons there are within our own runs. Universal Dependencies PoS tagging in Hebrew and Farsi, where AlignFreeze saw 2-point drops, serves as a second check that syntax survives.
Three checks decide the outcome. The first compares worst-case against random perturbation inside $U$ on the distant-language XNLI subset. If the two match, the adversarial framing fails. The second plots accuracy against GPU-hours for our method, FGSM, and PGD with $K \in \{3, 5, 10\}$. The claim holds only if our curve dominates PGD's. The third sweeps the layer $l$ from bottom to top. The method's rationale predicts a peak in the middle layers, mirroring the translation-retrieval peak reported for Llama 3. A monotone curve, or a peak in the lower layers, would mean the gain does not come from the language geometry we think it targets.
References
- Data Augmentation with Adversarial Training for Cross-Lingual NLI
- AlignX: Advancing Multilingual Large Language Models with Multilingual Representation Alignment
- Middle-Layer Representation Alignment for Cross-Lingual Transfer in Fine-Tuned LLMs
- AlignFreeze: Navigating the Impact of Realignment on the Layers of Multilingual Models Across Diverse Languages
- Cross-Lingual Transfer Robustness to Lower-Resource Languages on Adversarial Datasets
- XNLI: Evaluating Cross-lingual Sentence Representations
- SIB-200: A Simple, Inclusive, and Big Evaluation Dataset for Topic Classification in 200+ Languages and Dialects