TL;DR
This paper investigates how large language models adapt when learning new languages sequentially, a scenario known as continual learning under language shift. They find that while learning new languages generally improves performance on them (forward transfer), performance on previously learned languages can degrade (backward transfer), with the severity depending on language similarity and data contamination. This work offers crucial insights for building more efficient and robust multilingual AI systems.
What Problem Does This Paper Address?
The current paradigm for training large language models (LLMs) involves massive pre-training on vast datasets. However, as new data, especially from new languages, becomes available, retraining these models from scratch is prohibitively expensive. Continual learning offers a solution by enabling models to update their knowledge with new data while retaining previously learned information. This paper specifically tackles the challenge of "language shift," where the new data comes from a different language than the model was initially trained on. This is a particularly interesting case of distribution shift because languages can be vastly different, leading to complex interactions between learned knowledge. The authors aim to understand how the order of learning languages and the characteristics of these languages affect both the model's ability to learn new languages (forward transfer) and its ability to retain knowledge of previously learned languages (backward transfer).
Methods
The researchers employ a standard GPT architecture, similar to that used in models like GPT-SW3, and experiment with three model sizes: 126M, 356M, and 1.3B parameters. Their core methodology involves training these models sequentially on different languages. They start with a monolingual English model and then incrementally add data from Danish, Icelandic, and Norwegian in various orders. For each new language added, the model's parameters are initialized from the previous stage's checkpoint and updated using a standard next-step prediction objective.
To analyze the transfer effects, they systematically vary the order of language introduction. They also introduce two types of metrics to quantify language similarity:
- URIEL language vectors: These capture linguistic features like syntax, phonetics, and phonology.
- Token Distribution Similarity (TDS): A novel data-driven metric that measures the similarity in token frequencies between language corpora.
Language contamination, the presence of text from one language in another's training data, is also quantified using a fastText language identification model.
Datasets
The study utilizes subsets of the Nordic Pile corpus for training. The specific datasets used per language are detailed in Table 1, including sources like "The Pile," "Wiki," "mc4," "oscar," and "Gigaword" corpora. Validation and test sets for each language consist of 51K samples. For comparison, they also train monolingual models on each language and a joint multilingual model trained on the concatenation of all languages.
Key Insights and Ideas
- Forward Transfer is Generally Positive and Language-Independent: When a model learns a new language, it generally performs better on that new language than a monolingual model trained from scratch. This positive effect seems to hold regardless of the specific language or its position in the learning sequence.
- Backward Transfer is Complex and Order-Dependent: The ability of the model to retain knowledge of previously learned languages is highly sensitive to the order in which new languages are introduced and the specific languages involved. This can lead to either positive (improvement) or negative (degradation) transfer.
- Language Similarity Matters, But Not Always as Expected: While syntactic similarity and token distribution similarity (TDS) show some correlation with transfer effects, they don't fully explain the observed patterns. For instance, phonetic similarity proved uninformative. Icelandic consistently causes negative transfer, which is linked to its low similarity and minimal contamination in other corpora.
- Language Contamination is a Key Driver of Transfer: The presence of English text in Danish and Norwegian corpora explains why these languages perform well on English. Conversely, Icelandic's lack of contamination in other corpora contributes to its negative transfer effects.
- Model Size Doesn't Change Transfer Patterns, But Improves Performance: Increasing model size consistently reduces overall test loss across all languages. However, it does not fundamentally alter the observed forward or backward transfer patterns, suggesting that architectural capacity alone doesn't solve the core challenges of continual learning under language shift.
Key Results
- Forward Transfer: Consistently positive across languages and model sizes, with diminishing returns as more languages are learned.
- Backward Transfer: Highly variable. Icelandic consistently leads to negative transfer (forgetting) on English. Danish generally leads to positive transfer on English. Norwegian shows mixed results, sometimes positive, sometimes negative.
- Model Size: Increasing model size from 126M to 1.3B parameters leads to an average drop in test loss by 8% and 11% respectively. However, forgetting patterns remain largely the same across model sizes.
- Language Contamination: English text contamination in Danish and Norwegian corpora explains their competitive performance on English. Icelandic's low contamination in other corpora is linked to its negative transfer.
Limitations and Future Work
The authors acknowledge that the assumption of a readily available multilingual tokenizer might be unrealistic for low-resource languages. They also note that while their findings provide insights, a single factor doesn't fully explain all observed transfer patterns, suggesting a complex interplay of contamination and linguistic similarity.
Future work could involve exploring a larger and more diverse set of languages to assess the generality of these findings. A long-term goal is to leverage these insights to design more efficient continual learning language models that minimize negative transfer, thereby reducing the computational cost of pre-training.
Summary updated