Probing the Emergence of Cross-lingual Alignment during LLM Training (2024)

Abstract: Multilingual Large Language Models (LLMs) achieve remarkable levels of zero-shot cross-lingual transfer performance. We speculate that this is predicated on their ability to align languages without explicit supervision from parallel sentences. While representations of translationally equivalent sentences in different languages are known to be similar after convergence, however, it remains unclear how such cross-lingual alignment emerges during pre-training of LLMs. Our study leverages intrinsic probing techniques, which identify which subsets of neurons encode linguistic features, to correlate the degree of cross-lingual neuron overlap with the zero-shot cross-lingual transfer performance for a given model. In particular, we rely on checkpoints of BLOOM, a multilingual autoregressive LLM, across different training steps and model scales. We observe a high correlation between neuron overlap and downstream performance, which supports our hypothesis on the conditions leading to effective cross-lingual transfer. Interestingly, we also detect a degradation of both implicit alignment and multilingual abilities in certain phases of the pre-training process, providing new insights into the multilingual pretraining dynamics.

## introduction language models (lms) pre-trained on unlabelled multilingual texts show remarkable performance in zero-shot cross-lingual transfer @xcite @xcite . in fact, fine-tuning a multilingual lm on annotated data for a downstream task in a source language allows it to perform inference in other target languages, too-although often with varying degrees of degradation @xcite @xcite . surprisingly, this occurs even when the vocabularies of two languages have a null intersection, i.e., no tokens are shared @xcite . similarly, if the model scale is sufficiently large, llms are able to perform cross-lingual transfer through in-context learning with few examples in the source language @xcite . this implies that lms can implicitly align lexica and grammar between languages even in the absence of explicit parallel data. to explain this ability, previous work showed that multilingual lms can encode texts from different languages into language-agnostic representations @xcite and that grammatical functions are encoded in the same subsets of neurons @xcite . nevertheless, the existing literature mainly examined the final model upon convergence. thus, they fail to explain how cross-lingual alignment emerges during self-supervised pre-training and how this impacts zero-shot cross-lingual transfer in downstream tasks. hence, our study aims to explore the dynamics of cross-lingual alignment throughout pre-training, discovering trends such as those shown in figure 1 . first, we adopt a reliable intrinsic metric for crosslingual alignment, namely the extent to which morphosyntactic features (e.g., number for nouns or tense for verbs) tend to activate the same subnetwork within lms. this implies that the more two languages are aligned, the higher the overlap of the subsets of neurons encoding their information. we speculate that the degree of alignment tends to increase during pre-training, and that this facilitates the emergence of zero-shot transfer capabilities. to corroborate this hypothesis, we calculate the correlation between intrinsic metrics of alignment and cross-lingual downstream task performance. to identify neuron overlap at different stages of pre-training, we rely on intrinsic probing @xcite . specifically, we probe several checkpoints of bloom @xcite , a prominent multilingual lm. this also allows us to compare the emergence of cross-lingual alignment at different model scales, from small (560m) to medium-sized (1.7b) lms. to measure the relation between implicit alignment and downstream performance, we evaluate the zero-shot cross-lingual transfer ability of these checkpoint models on part-of-speech tagging in 11 languages from universal dependencies (ud; @xcite and natural language inference in 7 languages (xnli; @xcite . we find a statistically significant, strong correlation between neuron overlap and downstream performance across all model scales. furthermore, we report a somewhat unexpected finding: both metrics do not grow monotonically during pre-training; rather, they may experience severe drops both in the middle and at the end of pre-training in smaller model scales. ## intrinsic probing we first aim to identify the subnetworks that each language activates within llms. to this end, we employ the latent variable model proposed by @xcite for intrinsic probing, which can identify the subset of specific dimensions within a representation that encodes the information for a particular linguistic feature. formally, given a dataset since we are interested in probing the subset of most informative neurons c, we introduce a latent variable c ⊆ d in the probe p θ (π | h): to estimate the parameters θ, directly optimising its log-likelihood in equation ( 1 ) is intractable since it requires marginalising over all possible ksized subsets c of d, which grow as d k . thus, we optimise its variational lower bound instead: after having trained the probe model p θ (π | h) on the morphosyntactic category π, we determine the most informative subset c ⋆ by maximising the posterior: ## experimental setup models. we conduct the following experiments on bloom (bigscience @xcite , an open-access autoregressive multilingual lm that is jointly trained on data from 46 natural languages and 13 programming languages. the list of covered languages and their iso codes is available in appendix a.1. in particular, we consider three model sizes: 560m, 1b1, and 1b7, with 6, 8, and 4 valid intermediate model checkpoints, respectively. 3 both the checkpoints of bloom 560m and bloom 1b1 spread evenly from 1k to 600k global training steps, and bloom 1b7 ranges from 1k to 300k, where the global batch size is increased from 256 to 512. moreover, bloom models with different sizes are trained on an equivalent amount of tokens-which is around 341 billion from the roots corpus (laurençon et al., 2022)-and share the same tokenizer. all these configuration designs allow us to consistently study their training trajectories across scales. we studied the cross-lingual ability of bloom through two metrics: (i) neuron overlap between languages (section 3.1); (ii) zero-shot cross-lingual transfer performance on xnli and on pos tagging (section 3.2), which require multilingual semantic and syntactic knowledge, respectively. in the next section, we will report how these metrics change across pre-training steps and how they correlate with each other. ## conclusions in this paper, we probe a collection of checkpoint models of bloom to study the dynamics of multilingual pretraining. by experimenting with three model sizes, we observe that the subset of neurons encoding linguistic features tends to increase their overlap across languages throughout pretraining. nevertheless, we also detect severe drops that occur at different points in the training process, especially at smaller model scales, instead of a steady increase in the extent of alignment. moreover, we corroborate the hypothesis that the shared neurons are tightly connected with the zero-shot cross-lingual transfer ability of multilingual llms: the same sub-networks are activated at inference time and updated during fine-tuning, which contributes to the cross-lingual generalisation ability of lms. this assumption is further confirmed across model scales by observing a high correlation between neuron overlap and downstream task performance in syntactic and semantic tasks. hence, our work contributes to understanding how multilingual lms implicitly align information across languages even in the absence of parallel data.