Abstract
The current state-of-the-art for few-shot cross-lingual transfer learning first trains on abundant labeled data in the source language and then fine-tunes with a few examples on the target language, termed target-adapting. Though this has been demonstrated to work on a variety of tasks, in this paper we show some deficiencies of this approach and propose a one-step mixed training method that trains on both source and target data with stochastic gradient surgery, a novel gradient-level optimization. Unlike the previous studies that focus on one language at a time when target-adapting, we use one model to handle all target languages simultaneously to avoid excessively language-specific models. Moreover, we discuss the unreality of utilizing large target development sets for model selection in previous literature. We further show that our method is both development-free for target languages, and is also able to escape from overfitting issues. We conduct a large-scale experiment on 4 diverse NLP tasks across up to 48 languages. Our proposed method achieves state-of-the-art performance on all tasks and outperforms target-adapting by a large margin, especially for languages that are linguistically distant from the source language, e.g., 7.36% F1 absolute gain on average for the NER task, up to 17.60% on Punjabi.
Introduction
In modern Natural Language Processing (NLP), high-performing models typically require vast amounts of labeled data, which is only available for a few high-resource languages like English. To extend support to low-resource languages (e.g., Punjabi or Yoruba), researchers rely on few-shot cross-lingual transfer.
The traditional paradigm, target-adapting, involves a two-step process: training on massive English datasets followed by fine-tuning on a handful (e.g., 5-10) of target-language examples. However, this approach suffers from significant flaws: it produces fragmented, language-specific models; it is prone to near-instant overfitting; and it often relies on large "development sets" for model selection, which contradicts the premise of a true few-shot scenario.
Methodology: Mixed Training and Gradient Surgery
We propose gradient-mix-train, a method that trains on the source language and all target languages simultaneously. This approach is powered by two key components:
- Mixed Training: By seeing source and target data in the same training run, the model retains general knowledge while adapting to language-specific nuances.
- Stochastic Gradient Surgery: When gradients from different languages conflict (indicated by negative cosine similarity), the algorithm projects the source gradient onto the normal plane of the target gradient. This ensures that updates from the high-resource source language do not hinder learning in the low-resource target language. To maintain efficiency, the model randomly samples one target language to "protect" during each training step.
Evaluation and Key Results
We evaluated our method using the XTREME-R benchmark across four tasks: Named-Entity Recognition (NER), Part-of-Speech Tagging (POS), Question Answering (TyDiQA-GoldP), and Natural Language Inference (XNLI).
Our method achieved state-of-the-art performance across the board. In the NER task, we observed an average absolute F1 gain of 7.36% over standard target-adapting. These gains were most pronounced in languages linguistically distant from English; for instance, Punjabi saw a massive 17.60% improvement.
Discussion: Stability and Practicality
A critical advantage of our approach is its stability. In few-shot scenarios, models often overfit to the tiny target sample almost immediately. While standard methods see performance drop sharply after a single epoch, our mixed-gradient approach remains stable over time.
Furthermore, our method is development-free. Because the training process is stable, we can use the English development set for model selection. This makes the few-shot claim realistic for production environments where large target-language validation sets are unavailable.
Conclusion
By resolving gradient conflicts and utilizing English as a pivot, we demonstrate that a single multilingual model can outperform specialized, language-specific models. This work provides a path toward more robust and practical cross-lingual transfer, especially for the world's most under-resourced languages.
Summary updated