\section{Introduction}

Large LMs based on the Transformer architecture~\cite{NIPS2017_3f5ee243} have become increasingly popular since GPT~\cite{radford2018improving} and BERT~\cite{devlin-etal-2019-bert} were introduced, prompting the creation of many large LMs pretrained on English text \cite{NEURIPS2019_dc6a7e65,clark2020electra,NEURIPS2020_d6f1dd03,ram-etal-2021-shot}. There is a tendency towards training larger and larger models~\cite{brown2020language,fedus2021switch} while the main focus is on the English language. Recent work has called attention to the costs associated with training increasingly large LMs, including environmental and financial cost~\cite{strubell-etal-2019-energy, bender2021dangers}. If training large LMs for English is already costly, it is prohibitively expensive to train new, similarly powerful models to cover other languages.

One approach to address this issue is creating massively multilingual models
~\cite{devlin-etal-2019-bert,conneau-etal-2020-unsupervised,xue-etal-2021-mt5} trained on a concatenation of texts in many different languages. These models show strong natural language understanding capabilities in a wide variety of languages, but suffer from what \citet{conneau-etal-2020-unsupervised} call the \textit{curse of multilinguality}: beyond a certain number of languages, overall performance decreases on monolingual as well as cross-lingual tasks. Consistent with this finding, \citet{nozza2020mask} observe that monolingual LMs often outperform massively multilingual models. This might be attributed to superior quality of monolingual tokenizers over their multilingual counterparts~\cite{rust-etal-2021-good}. It is thus desirable to train monolingual models in more languages. Training monolingual models in non-English languages is commonly done by training a new model with randomly initialized parameters~\cite{antoun-etal-2020-arabert, louis2020belgpt2,martin-etal-2020-camembert,rekabsaz2019regularization}. However, to train a model with capabilities comparable to that of an English model in this way, presumably a similar amount of compute to what was used to train the English model would be required.

To address this issue, we introduce WECHSEL{},\footnote{Word Embeddings Can Help initialize Subword Embeddings in a new Language.} a novel method to transfer monolingual language models to a new language. WECHSEL{} uses multilingual static word embeddings between the source language and the target language to initialize model parameters. WECHSEL{} first copies all inner (non-embedding) parameters of the English model, and exchanges the tokenizer with a tokenizer for the target language. Next, in contrast to prior work doing random initialization~\cite{de-vries-nissim-2021-good}, the token embeddings in the target language are initialized such that they are close to semantically similar English tokens by mapping multilingual static word embeddings to subword embeddings. The latter step is particularly important considering that token embeddings take up roughly 31\% of the parameters of RoBERTa~\cite{liu2019roberta} and roughly 33\% of the parameters of GPT2~\cite{radford2019language}. Intuitively, semantically transferring embeddings instead of randomly initializing one third of the model should result in improved performance. Our parameter transfer provides an effective initialization in the target language, requiring significantly fewer training steps to reach high performance than training from scratch. As multilingual static word embeddings are available for many languages \cite{bojanowski2017enriching}, WECHSEL{} is widely applicable.

We conduct our experiments on RoBERTa and GPT-2 as representative models of encoder and decoder language models, respectively. We transfer the English RoBERTa model to four languages (French, German, Chinese and Swahili), and the English GPT-2 model to the same four plus another four very low-resource languages (Sundanese, Scottish Gaelic, Uyghur and Malagasy). We evaluate the transferred RoBERTa models on Named Entity Recognition (NER), and Natural Language Inference (NLI) tasks in the respective languages. The transferred GPT-2 models are evaluated in terms of Language Modelling Perplexity (PPL) on a held-out set. We compare WECHSEL{} with randomly initialized models (denoted as FullRand{}), as well as the recently proposed TransInner{} method which only transfers the inner (non-embedding) parameters~\cite{de-vries-nissim-2021-good}. All mentioned models are trained under the same conditions (around 4 days on a TPUv3-8). We also compare our model with models of comparable size trained from scratch under significantly larger training regimes, in particular CamemBERT~\cite{martin-etal-2020-camembert} (French), GBERT$_\mathrm{Base}$~\cite{chan-etal-2020-germans} (German), and BERT$_\mathrm{Base}$-Chinese~\cite{devlin-etal-2019-bert}.

Results show that models initialized with WECHSEL{} outperform randomly initialized models and models initialized with TransInner{} across all languages and all tasks, for both RoBERTa and GPT-2. In addition, strong performance is reached at a fraction of the training steps of other methods. Our contribution is summarized as follows.

\begin{itemize}
  \item We propose WECHSEL{}, a novel method for transferring monolingual language models to a new language by utilizing multilingual static word embeddings between the source and the target language.
 
  \item We show effective transfer of RoBERTa and GPT-2 using WECHSEL{} to four and eight languages, respectively, achieved after minimal training effort.
 
  \item We release more effective GPT-2 and RoBERTa models than previously published non-English models, achieved under our more efficient training setting. Our code and models are publicly available at \href{https://github.com/cpjku/wechsel}{\nolinkurl{github.com/cpjku/wechsel}}.
 
\end{itemize}







In the following, we review related work in Section~\ref{sec:related_work}. We introduce the WECHSEL{} method in Section~\ref{sec:methodology}, followed by explaining the experiment setup in Section~\ref{sec:experimental_design}. We show and discuss results in Section~\ref{sec:results}.

\section{Related Work}
\label{sec:related_work}

\paragraph{Large Language Models.} Training Language Models is usually done in a self-supervised manner i.\,e.  deriving labels from the training text instead of needing explicit annotations. One optimization objective is Masked Language Modelling \cite[MLM]{devlin-etal-2019-bert}, where randomly selected tokens in the input are replaced by a special \verb|[MASK]| token, and the task is to predict the original tokens. Another common objective is Causal Language Modelling (CLM), where the task is to predict the next token. These two objectives highlight a fundamental distinction between language models: models can be trained as encoders (e.g. with MLM) or as decoders (e.g. with CLM).

Instead of words, the vocabulary of recently proposed language models commonly consists of subwords~\cite{clark2020electra, liu2019roberta, devlin-etal-2019-bert}.



\paragraph{Multilingual representations.} 

There has been a significant amount of work in creating multilingual static word embeddings. A common method is learning embeddings from scratch using data in multiple languages~\cite{luong-etal-2015-bilingual,duong-etal-2016-learning}.
Alternatively, multilinguality can be achieved by aligning existing monolingual word embeddings using a bilingual dictionary, so that the resulting embeddings share the same semantic space~\cite{xing-etal-2015-normalized,joulin-etal-2018-loss}. Recent studies improve on this by reducing (or completely removing) the need for bilingual data~\cite{artetxe-etal-2017-learning,artetxe-etal-2018-robust,lample2018word}.

Beside static word embeddings, multilinguality is also well studied in the area of contextualized representations. One approach to learn multilingual contextualized representations is through training a model on a concatenation of corpora in different languages. Some models created based on this approach are mBERT~\cite{devlin-etal-2019-bert}, XLM-R~\cite{conneau-etal-2020-unsupervised} and mT5~\cite{xue-etal-2021-mt5}, trained on text in 104, 100, and 101 languages, respectively. As shown by \citet{pires-etal-2019-multilingual}, a multilingual model such as mBERT can enable cross-lingual transfer by using task-specific annotations in one language to fine-tune the model for evaluation in another language. Despite the benefits, recent studies outline a number of limitations of massively multilingual LMs. \citet{wu-dredze-2020-languages} empirically show that in mBERT 
``the 30\% languages with least pretraining resources perform worse than using no pretrained language model at all''. \citet{conneau-etal-2020-unsupervised} report that beyond a certain number of languages in the training data, the overall performance decreases on monolingual as well as cross-lingual tasks. These studies motivate our work on introducing an efficient approach for creating effective monolingual LMs for more languages.

\paragraph{Cross-lingual transfer of monolingual LMs.} Studies in this area can be divided into two categories:

\begin{itemize}
    \item \textbf{Bilingualization of a monolingual LM} is concerned with extending a model to a new language while preserving its capabilities in the original language. \citet{artetxe-etal-2020-cross} approach this problem by replacing the tokenizer and relearning the subword embeddings, while freezing other (non-embedding) parameters. Such a model becomes bilingual, since the initial tokenizer and embeddings can be used for tasks in the source language, while the new tokenizer and embeddings can be used for tasks in the target language. Thus, a model can be finetuned on annotated task data in the source language, and then zero-shot transferred to the target language. \citet{tran2020english} follow a similar approach, while instead of randomly initializing embeddings, they utilize static word embeddings to initialize embeddings in the target language close to semantically similar English tokens. They then continue training the model on an English text corpus as well as on the target language in order to preserve model capabilities in English.
   
    
    \item \textbf{Creating a new monolingual LM in the target language} is, in contrast, concerned with transferring a model from a source to a target language without the necessity to preserve its capabilities in the source language. \citet{zoph-etal-2016-transfer} and \citet{nguyen-chiang-2017-transfer} show that cross-lingually transferring a machine translation model can improve performance, especially for low-resource languages. \citet{zoph-etal-2016-transfer} use embeddings of random tokens in the original vocabulary to initialize token embeddings in the new vocabulary, while \citet{nguyen-chiang-2017-transfer} utilize vocabulary overlap between the source and target language. More recently, \citet{de-vries-nissim-2021-good} follow a similar approach to the one of \citet{artetxe-etal-2020-cross} for transferring a GPT-2 model to a new language. \citet{de-vries-nissim-2021-good} add an additional step, where they train the entire model for some amount of steps to allow adapting to the target language beyond the lexical level. We refer to the method of \citet{de-vries-nissim-2021-good} as TransInner{} and consider it as a baseline in our experiments.
   
\end{itemize}

Our WECHSEL{} method belongs to the second category. WECHSEL{} can be seen as an extension to the method proposed by \citet{tran2020english} with the goal of creating a new monolingual LM instead of bilingualizing the LM. This allows removing the constraints imposed by the need to preserve the model's capabilities in the source language. In addition, we generalize the semantic subword mapping done by \citet{tran2020english} to consider an arbitrary number of semantically similar subword with an arbitrary temperature. We are the first to show that a cross-lingually transferred model can outperform monolingual models which have been trained extensively from scratch in the target language, while requiring substantially less computational resources.

\section{Methodology}
\label{sec:methodology}

To initialize the model in the target language, we copy the inner (non-embedding) parameters from the source model. Our goal, then, is given the tokenizer $T^s$ in the source language with vocabulary ${\mathbb{U}}^s$, the corresponding token embeddings ${\bm{E}}^s$, and a tokenizer $T^t$ in the target language with vocabulary ${\mathbb{U}}^t$, to find a good initialization of the embeddings ${\bm{E}}^t$ by using ${\bm{E}}^s$. To this end, we use existing bilingual word embeddings enriched with subword information, containing a set of words and subword n-grams in the source and target language and their aligned vectors. We denote the set of words and n-grams in the source and target language as $\sV$$^{s}$ and $\sV$$^{t}$ respectively, and the aligned static embeddings as \wordembeddings{s} and \wordembeddings{t}. In Appendix~\ref{appendix:no_subword_information} we consider an alternative method if no subword information is available in the bilingual word embeddings.

First, independently for both languages, we compute static subword embeddings for tokens in the tokenizer vocabulary in the same semantic space as the static word embeddings (Section \ref{section:subword-embedding-computation}). This results in subword embeddings \subwordembeddings{s} and \subwordembeddings{t} for the source and target language, respectively. Next, we use \subwordembeddings{s} and \subwordembeddings{t} to compute the semantic similarity of every subword in ${\mathbb{U}}^s$ to every subword in ${\mathbb{U}}^t$. Using these semantic similarities, we initialize the embeddings in ${\bm{E}}^t$ through a convex combination of embeddings in ${\bm{E}}^s$ (Section \ref{section:similarity-based}). By applying WECHSEL, the vectors of ${\bm{E}}^t$ are in the same semantic space as ${\bm{E}}^s$, where a subword in the target language is semantically similar to its counterpart(s) in the source language. These steps are summarized in Figure \ref{fig:flow} and explained in more detail in the following. 

\begin{figure}[t]
\hspace*{-0.15cm}\includegraphics[width=7.8cm]{flow}
\caption{Summary of our WECHSEL{} method. We show \textcolor{blue}{inputs}, \textcolor{orange}{intermediate results} and \textcolor{teal}{outputs}.}
\centering
\label{fig:flow}
\end{figure}

\subsection{Subword Embedding Computation}
\label{section:subword-embedding-computation}

The process of mapping word embeddings to subword embeddings is done individually for the source and the target language. Given a tokenizer $T$ with vocabulary ${\mathbb{U}}$ and embeddings \wordembeddings{}, the goal is to find subword embeddings \subwordembeddings{} for subwords in ${\mathbb{U}}$ in the same semantic space as \wordembeddings{}. To this end, we decompose subwords in ${\mathbb{U}}$ into n-grams and compute the embedding by taking the sum of the embeddings of all occuring n-grams, equivalent to how embeddings for out-of-vocabulary words are computed in fastText~\cite{bojanowski2017enriching}.

\[
{\bm{u}}_{x} = \sum_{g \in {\mathbb{G}}^{(x)}} {\bm{w}}_{g}
\]
where ${\mathbb{G}}^{(x)}$ is the set of n-grams occuring in the subword $x$ and ${\bm{w}}_{g}$ is the embedding of the n-gram~$g$. Subwords in which no known n-gram occurs are initialized to zero.

\subsection{Subword similarity-based Transfer}
\label{section:similarity-based}
Applying the previous step to both source and target language results in the subword embeddings \subwordembeddings{s} and \subwordembeddings{t} over the subword vocabularies ${\mathbb{U}}^s$ and ${\mathbb{U}}^t$, respectively. Our aim is to leverage these embeddings to find an effective transformation from ${\bm{E}}^s$ to ${\bm{E}}^t$. We first compute the cosine similarity of every subword $x \in {\mathbb{U}}^t$ to every subword $y \in {\mathbb{U}}^s$, denoted as $s_{x,y}$.
\[
s_{x,y} = \frac{{\bm{u}}^{t}_{x} {{\bm{u}}^{s}_{y}}^T}{\|{\bm{u}}^{t}_{x}\|\|{\bm{u}}^{s}_{y}\|}
\]

We now exploit these similarities to initialize embeddings in ${\bm{E}}^t$ by a convex combination of embeddings in ${\bm{E}}^s$. In particular, each subword embedding in ${\bm{E}}^t$ is defined as the weighted mean of the $k$ nearest embeddings in ${\bm{E}}^s$ according to the similarity values. The weighting is done by a softmax of the similarities with temperature $\tau$.
\[
{\bm{e}}_{x}^{t} = \frac{\sum_{y \in \mathcal{J}_x} {\exp{(s_{x,y}/\tau)} \cdot {\bm{e}}_{y}^{s}}}{\sum_{y' \in \mathcal{J}_x} \exp{(s_{x,y'}/\tau)}}
\]
where $\mathcal{J}_x$ is the set of $k$ neighbouring subwords in the source language. Subword embeddings for which \subwordembeddings{t} is zero are initialized from a random normal distribution $\mathcal{N}(\mathbb{E}[{\bm{E}}^s], \mathrm{Var}[{\bm{E}}^s])$.

\section{Experiment Design}
\label{sec:experimental_design}

We evaluate our method by transferring the English RoBERTa~\cite{liu2019roberta} and the English GPT-2 model~\cite{radford2019language} to French, German, Chinese and Swahili. We refer to these languages as \textit{medium-resource languages}. In addition, we study the benefits of our method on four \textit{low-resource languages}, namely Sundanese, Scottish Gaelic, Uyghur and Malagasy.

We evaluate WECHSEL-RoBERTa{} by fine-tuning on XNLI \cite{conneau2018xnli}, and on the balanced train-dev-test split of WikiANN \cite{rahimi-etal-2019-massively, pan-etal-2017-cross} to evaluate NLI and NER performance, respectively. The hyperparameters used for fine-tuning are reported in Appendix~\ref{appendix:hyperparameters}. GPT-2 is evaluated by Perplexity (PPL) on a held-out set from the same corpus on which the model was trained on. Due to the difficulty of extrinsic evaluation on low-resource languages, we only train GPT-2 models in these languages, and evaluate their performance intrinsically via Language Modelling Perplexity on a held-out set.
We use the pretrained models $\textrm{RoBERTa}_{\mathrm{Base}}$ with 125M parameters, and the small GPT-2 variant with 117M parameters provided by HuggingFace's Transformers~\cite{wolf-etal-2020-transformers} in all experiments. 

Since under limited training regimes such as ours, using a smaller corpus does not in general degrade performance~\cite{martin-etal-2020-camembert}, we use a subset of 4GiB from the OSCAR corpus for German, French and Chinese.
For the other languages, we use data from the CC-100 corpus \cite{conneau-etal-2020-unsupervised} which contains 1.6GiB, 0.1GiB, 0.1GiB, 0.4GiB and 0.2GiB for Swahili, Sundanese, Scottish Gaelic, Uyghur and Malagasy, respectively. To obtain aligned word embeddings between the source and the target language we use monolingual fastText word embeddings\footnote{https://fasttext.cc}
~\cite{bojanowski2017enriching}. We align these embeddings using the Orthogonal Procrustes method~\cite{schonemann1966generalized,artetxe-etal-2016-learning} with bilingual dictionaries from MUSE\footnote{https://github.com/facebookresearch/MUSE}~\cite{conneau2017word} for French, German and Chinese and a bilingual dictionary from FreeDict\footnote{https://freedict.org}~\cite{banski2009freedict} for Swahili. For the low-resource languages, we use bilingual dictionaries scraped from Wiktionary.\footnote{available at \href{https://github.com/cpjku/wechsel}{\nolinkurl{github.com/cpjku/wechsel}}}

We choose temperature $\tau=0.1$ and neighbors $k=10$ for WECHSEL{} by conducting a parameter search over a grid with varying values for $k$ and $\tau$ using linear probes (Appendix~\ref{appendix:grid_search}). We train tokenizers in the target languages using a vocabulary size of 50k tokens and byte-level BPE~\cite{radford2019language}. After applying WECHSEL{}, we continue training RoBERTa on the MLM objective and GPT-2 on the CLM objective. We compare against two baseline methods.
 \begin{itemize}
     \item \textbf{TransInner:} Randomly initializing ${\bm{E}}^t$ while transferring all other parameters from the English model as in \citet{de-vries-nissim-2021-good}. After training only embeddings for a fixed amount of steps while freezing other parameters, the entire model is trained for the remaining steps. In preliminary experiments reported in Appendix~\ref{appendix:choosing_baseline}, we compare the method by \citet{zoph-etal-2016-transfer} with TransInner{}, observing superior performance of TransInner{}, so we choose TransInner{} as the baseline for cross-lingual transfer in all our experiments.
     
     \item \textbf{FullRand:} Training from scratch in the target language, as is commonly done when training BERT-like or GPT-like models in a new language \cite{antoun-etal-2020-arabert, louis2020belgpt2, chan-etal-2020-germans, martin-etal-2020-camembert}.
 \end{itemize}

\input{tables/training_time}


\input{tables/roberta_results}

All models are trained for 250k steps with the same hyperparameters across all languages (reported in Appendix \ref{appendix:hyperparameters}). Training one model takes around 4 days on a TPUv3-8. For WECHSEL{} and FullRand{} we use a learning rate (LR) schedule with linear warmup from zero to the peak LR for the first 10\% of steps, followed by a linear decay to zero. For TransInner{}, we perform two warmup phases from zero to peak LR, once for the first 10\% of steps for training embeddings only, then again for the remaining steps while training the entire model.

In addition to the mentioned baselines trained under this setting, we compare the results of RoBERTa models with existing comparable models trained from scratch with more training effort. We consider the total number of tokens the model has encountered in the target language, computed as the product of batch size $\times$ sequence length $\times$ train steps (shown in Table \ref{table:training_time}) as a proxy for training effort. We evaluate the performance of CamemBERT~\cite{martin-etal-2020-camembert} (French), GBERT$_{\mathrm{Base}}$~\cite{chan-etal-2020-germans} (German), and BERT$_\mathrm{Base}$-Chinese~\cite{devlin-etal-2019-bert} as existing monolingual LMs,\footnote{To the best of our knowledge there is no monolingual model available for Swahili.} as well as XLM-R$_{\mathrm{Base}}$~\cite{artetxe-etal-2020-cross} as a high-performing multilingual LM. 


\section{Results}
\label{sec:results}


We present our results on transferring RoBERTa and GPT-2 from English to other languages, followed by analyzing training behavior. In Appendix~\ref{appendix:closest_tokens}, we provide a qualitative assessment of how well subword tokens are mapped between the source and the target languages.

\subsection{Transferring RoBERTa}

Table~\ref{table:roberta_results} reports the evaluation results of RoBERTa. As shown, models initialized with WECHSEL{} outperform models trained from scratch and models initialized with TransInner{} across all languages. Surprisingly, close relatedness of the source and target language is not necessary to achieve effective transfer, as e.\,g.  on NLI WECHSEL{} improves absolute accuracy by $7.15\%$, $6.31\%$, $6.94\%$ and $4.71\%$ over models trained from scratch for French, German, Chinese and Swahili, respectively.

\begin{figure*}[t]
\hspace*{-0.5cm}\includegraphics[width=16.5cm]{scores}
\caption{Test scores over training steps from fine-tuning RoBERTa models on NLI (using XNLI) and NER (using WikiANN). Perplexity on the held-out set over training steps of GPT-2 models. We evaluate every 12.5k steps.}
\centering
\label{fig:scores}
\end{figure*}

We observe that our parameter transfer-based model consistently outperforms the previously released LMs on both monolingual and multilingual settings, while these models benefit from much larger training resources in terms of computation time and corpus size. In particular, the results show an improvement over XLM-R$_{\mathrm{Base}}$ by an average 3.54\% accuracy for NLI and 1.14\% micro F1 score for NER. For NLI, we improve over the prior monolingual models by $1.55\%$, $3.15\%$ and $1.77\%$ absolute accuracy for French, German and Chinese, respectively. For NER, we observe improvements over monolingual models with $0.62\%$ and $0.26\%$ absolute micro F1 score improvement for French and German, respectively. For Chinese, the monolingual model BERT$_\mathrm{Base}$-Chinese still outperforms our method by $1.5\%$ absolute micro F1 score. We suspect that the discrepancy between NLI and NER is due to the limited training corpus size (max. 4GiB), while a larger corpus can potentially improve NER as more named entities appear~\cite{martin-etal-2020-camembert}.

\input{tables/gpt2_results}

\input{tables/low_resource_results}

The first two columns of Figure~\ref{fig:scores} show the performance of RoBERTa models on downstream tasks after each 12.5k training steps. Models initialized with WECHSEL{} reach high performance in significantly fewer steps than models initialized with FullRand{} or TransInner{}. 

We expect FullRand-RoBERTa{} to approach performance of the respective prior monolingual models when trained on the same amount of tokens.\footnote{It would presumably be slightly worse because we restrict training corpus size to 4GiB.}
For French, WECHSEL-RoBERTa{} outperforms CamemBERT after 10\% of training steps, reducing training effort by 64x. For German, WECHSEL-RoBERTa{} outperforms GBERT$_\mathrm{Base}$ after 10\% of training steps, reducing training effort by 39x. For Chinese, WECHSEL-RoBERTa{} outperforms BERT$_\mathrm{Base}$-Chinese on NLI, but does not 
outperform BERT$_\mathrm{Base}$-Chinese on NER.

\subsection{Transferring GPT-2}

\subsubsection{To Medium-Resource Languages}

Results on medium-resource languages are shown in Table~\ref{table:gpt_results}. Similar to the results for WECHSEL-RoBERTa{}, the GPT-2 models trained with WECHSEL{} consistently outperform the models trained from scratch and with TransInner{} across all languages.


The rightmost column of Figure~\ref{fig:scores} depicts the performance of GPT-2 models after each 12.5k training steps. Comparing the results across all languages throughout training, we observe a stronger dependence on similarity of the source to the target language than for downstream tasks such as NLI or NER. In particular, for French and German, WECHSEL{} is consistently better than TransInner{} and FullRand{} throughout the entire training, while for Chinese, a decrease in perplexity towards the end of training causes WECHSEL{} to surpass training from scratch.

\begin{figure}[h]
\includegraphics[width=7.9cm]{low_resource_scores}
\caption{Perplexity throughout training on low-resource languages. We evaluate every 2.5k steps and stop training if Perplexity on the held-out set does not improve for 10k steps.}
\centering
\label{fig:low_resource_scores}
\end{figure}

\subsubsection{To Low-Resource Languages}
Table~\ref{table:low_resource_results} reports the perplexity of Language Modelling on the low-resource languages. Again, we observe consistent improvements using WECHSEL{} on all languages. Furthermore, we find that the improvement from WECHSEL{} tends to increase as the amount of training data decreases by conducting a sensitivity analysis w.\,r.\,t.  the amount of available training data (Appendix \ref{appendix:ablation}).

In Figure \ref{fig:low_resource_scores} we report the performance of the low-resource LMs on the held-out set throughout training. One difference of the low-resource models with the ones trained on medium-resource languages is that the low-resource LMs are prone to overfitting, and require appropriate model selection even in the early steps of training. Notably, TransInner-GPT2{} takes more steps to overfit since all non-embedding parameters are frozen for the first 25k steps (c.\,f.  Section \ref{sec:experimental_design}).



\subsection{Is freezing necessary?}
\label{sec:freezing}

Previous work using the TransInner{} method freezes non-embedding parameters for a fixed amount of steps before training the entire model~\cite{de-vries-nissim-2021-good}. This is done to prevent catastrophic forgetting at the beginning of training. To evaluate if freezing non-embedding parameters is still necessary with our method, we conduct an additional experiment. We train a German GPT-2 model with WECHSEL{} and a model with TransInner{} without freezing any parameters, and the same models with freezing of non-embedding parameters for the first 10\% of steps. We match hyperparameters of the main experiments except training for 75k steps only. Based on the results shown in Figure \ref{fig:freezing}, we conclude that freezing is necessary when using TransInner{}, but there is no need for freezing when using WECHSEL{}

\begin{figure}[t]
\vspace*{-0.2cm}
\includegraphics[width=8cm]{freezing}
\caption{Comparison of German GPT-2 models trained with WECHSEL{} and TransInner{} between freezing non-embedding parameters at the start and not freezing any parameters.}
\centering
\label{fig:freezing}
\vspace*{-0.4cm}
\end{figure}

\section{Limitations and Potential Risks}

\vspace{-0.1cm}
\subsection{Limitations}

We conduct our experiments on up to eight languages, showing the benefits of our parameter transfer method to both medium- and low-resource languages. However, there are many more languages with diverse linguistic characteristics on which our WECHSEL{} method is not tested. This is a limitation forced by computational constraints, as we can not ascertain whether transfer to all other languages would result in similar improvements. In addition, our extrinsic evaluation is limited to two tasks (NLI and NER). While this choice is due to the limitations on the available collections in various languages, this evaluation does not necessarily provide a comprehensive view of language understanding tasks.

\vspace{-0.1cm}
\subsection{Risks}

It is well-known that existing LMs trained on English text encode societal biases~\cite{bolukbasi2016man,caliskan2017semantics,Rekabsaz0HH21}
 and stereotypes and using them in downstream tasks might lead to unfair treatment of various social groups~\cite{zerveas2022mitigating,krieg2022do,ganhoer2022mitigating,rekabsaz2021societal,melchiorre2021investigating,rekabsaz2020neural,elazar2018adversarial}. Since we propose a method to transfer the English LMs to new languages, it is highly probable that the existing biases are also transferred to the target LMs. We therefore advocate a conscious and responsible use of the transferred LMs in practice.



\section{Conclusion}

We introduce WECHSEL{}, an effective method to transfer monolingual language models to new languages. WECHSEL{} exploits multilingual static word embeddings to compute an effective initialization of subword embeddings in the target language. We conduct experiments by transferring RoBERTa and GPT-2 models from English to French, German, Chinese and Swahili, as well as English GPT-2 to four low-resource languages. The evaluation results show that the transferred RoBERTa and GPT-2 models are more efficient and effective than strong baselines, and consistently outperform prior monolingual models that have been trained for a significantly longer time. WECHSEL{} facilitates the creation of effective monolingual LMs for new languages with medium to low resources, particularly in computationally-limited settings. In addition, our work provides strong evidence towards the hypothesis by \citet{artetxe-etal-2020-cross} that deep monolingual language models learn abstractions that generalize across languages.

\section{Acknowledgments}

Research supported with Cloud TPUs from Google's TPU Research Cloud (TRC). We thank Andy Koh and Artus Krohn-Grimberghe for providing additional computational resources. The ELLIS Unit Linz, the LIT AI Lab, the Institute for Machine Learning, are supported by the Federal State Upper Austria. We thank the project INCONTROL-RL (FFG-881064). Research also supported in part by the NSF (IIS-1956221), the State of Upper Austria and the Austria's Federal Ministry of Education, Science, and Research through the project FAIRFLOW (LIT-2021-YOU-215).















