Investigating and Scaling up Code-Switching for Multilingual Language Model Pre-Training

Zhijun Wang, Jiahuan Li, Hao Zhou, Rongxiang Weng, Jingang Wang +5 more
4/2/2025
cs.CL

No official code found. Best implementation: NJUNLP/SynCS (8 stars, last commit 2025-04-22).

Abstract

Large language models (LLMs) exhibit remarkable multilingual capabilities despite the extreme language imbalance in the pre-training data. In this paper, we closely examine the reasons behind this phenomenon, focusing on the pre-training corpus. We find that the existence of code-switching, alternating between different languages within a context, is key to multilingual capabilities. We conduct an analysis to investigate code-switching in the pre-training corpus, examining its presence and categorizing it into four types within two quadrants. We then assess its impact on multilingual performance. These types of code-switching data are unbalanced in proportions and demonstrate different effects on facilitating language transfer. To better explore the power of code-switching for language alignment during pre-training, we investigate the strategy of synthetic code-switching. We continuously scale up the synthetic code-switching data and observe remarkable improvements in both benchmarks and representation space. Extensive experiments indicate that incorporating synthetic code-switching data enables better language alignment and generalizes well to high, medium, and low-resource languages with pre-training corpora of varying qualities.

View on arXivView PDF

Code Implementations(1)

NJUNLP/SynCSCommunity100%
80Shell, PythonApr 2, 20251 years ago

Similar Papers

Cite this paper

@article{wang2025investigating,
  title  = {Investigating and Scaling up Code-Switching for Multilingual Language Model Pre-Training},
  author = {Zhijun Wang and Jiahuan Li and Hao Zhou and Rongxiang Weng and Jingang Wang and Xin Huang and Xue Han and Junlan Feng and Chao Deng and Shujian Huang},
  year   = {2025},
  eprint = {2504.01801},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.01801v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.01801.svg)](https://codeofpaper.com/paper/2504.01801)

Discussion