TL;DR
The authors propose the Babel Tower Hypothesis, which reveals that LLMs learning a new language initially route its concepts through a single dominant language's internal knowledge system before gradually splitting into language-specific systems. Surprisingly, this transition often causes a performance decline in the new language, a finding the authors leverage to mathematically optimize pre-training data ratios and significantly boost overall multilingual performance.
What Problem Does This Paper Address?
While large language models (LLMs) display impressive multilingual capabilities, the underlying mechanics of how these capabilities develop during pre-training have largely been a black box. Most existing research looks at static, fully trained models rather than the dynamic process of language acquisition.
Understanding this learning curve is crucial. If we don't know how a model balances a dominant language (like English or Python) with a newly introduced language (like Swahili or PHP), we cannot intelligently curate pre-training data distributions. This paper addresses this gap by using code LLMs as a controlled experimental platform to track exactly how internal representations shift as a model learns new languages.
Methods
The researchers set up a controlled experiment: they took a monolingual LLM pre-trained on Python (the dominant language) and continually pre-trained it on a corpus of new target languages (PHP, C#, Go, and C++).
To peer inside the model's "brain" during this process, they employed two primary probing techniques:
- Working Language Detection (via Logit Lens): They analyzed intermediate layers to see what tokens the model was predicting internally before generating the final output. Because programming languages share many English keywords, they used unique built-in functions as identifiers (e.g., if the model internally predicted Python's
lenbefore outputting PHP'scount, it was actively working in Python). - Language Transferring Neurons: They tracked specific neurons that activate to transform inputs from one language space into another, measuring their activation patterns across different training stages.
Finally, they developed an optimization algorithm (Algorithm 1) that uses training loss as a proxy to estimate the ideal proportion of the dominant language system required to maximize cross-lingual transfer without triggering a performance drop.
Datasets
- Pre-training Corpus: Code data scraped from GitHub spanning five languages: PHP (23B tokens), C++ (28B tokens), C# (16B tokens), Go (11B tokens), and Python (11B tokens).
- Evaluation Benchmarks: The models were evaluated using HumanEval (translated across the target languages) and the MBXP benchmark execution framework to measure functional code generation correctness (Pass@1).
Key Insights and Ideas
The core contribution of the paper is the Babel Tower Hypothesis, which divides language acquisition into three distinct phases:
- The Translation Stage: Initially, performance in the new language spikes rapidly. The model doesn't have a dedicated system for the new language yet; it simply maps the new syntax directly onto the dominant language's robust knowledge base.
- The Transition Stage: As more data from the new language is introduced, the model begins building a dedicated, isolated internal system for it. Paradoxically, performance declines during this stage because the new language's emerging system is weaker and less mature than the dominant language system it was previously borrowing from.
- The Stabilization Stage: The internal systems stop shifting, and the new language relies entirely on its own independent, stabilized system.
The most counterintuitive "aha moment" here is that more data is not always better. For many lower-resource languages, forcing the model to build an independent knowledge system yields worse results than letting it rely on a strong dominant language via internal "translation."
Key Results
By tracking the exact moment performance peaks during the Translation Stage, the authors calculated optimized data ratios to prevent the model from entering the performance-degrading Transition Stage.
When training multilingual models from scratch using these optimized distributions, the results were striking:
- 1.3B Parameter Model: The optimized version achieved an average HumanEval score of 26.61 and MBXP score of 51.97, significantly outperforming the baseline model trained on the raw, unoptimized natural data distribution (25.03 HumanEval / 49.81 MBXP).
- 6.7B Parameter Model: The performance gains scaled up successfully, with the optimized model reaching 41.96 on HumanEval compared to the baseline's 38.31.
Limitations and Future Work
The primary limitation of this study is its scope: it was conducted entirely within the domain of programming languages using a Python-dominant model. While code provides an excellent, unambiguous testbed for tracking internal states (thanks to distinct syntax rules), natural human languages are far more nuanced, overlapping, and fluid.
The authors note that future work will focus on validating the Babel Tower Hypothesis within natural language processing (NLP) scenarios and scaling the data-optimization framework to massive, state-of-the-art LLMs.
Summary updated