How a Bilingual LM Becomes Bilingual: Tracing Internal Representations with Sparse Autoencoders

Tatsuro Inaba, Go Kamoda, Kentaro Inui, Masaru Isonuma, Yusuke Miyao, Yohei Oseki, Yu Takagi, Benjamin Heinzerling

TL;DR

This paper investigates how bilingual language models develop their internal representations, finding that they first learn languages separately and then gradually align them, particularly in mid-layers and larger models. By using sparse autoencoders (SAEs) not just for analysis but also for intervention, they demonstrate that injecting bilingual representations into mid-training models significantly boosts performance, highlighting the critical role of cross-lingual understanding.

What Problem Does This Paper Address?

Large Language Models (LLMs) have shown impressive multilingual capabilities, but the process by which they achieve this remains unclear. Specifically, researchers want to understand:

  • Do LLMs learn each language in isolation before attempting to align them?
  • Where in the model's architecture (which layers) does this cross-lingual alignment emerge?
  • How does the model's size influence this alignment process?

Answering these questions is crucial for understanding model scalability and the emergence of generalization abilities. This paper aims to shed light on these internal mechanisms by tracing the development of bilingual representations.

Methods

The core of this research relies on Sparse Autoencoders (SAEs), specifically a variant called TopK-SAE. SAEs are neural networks trained to reconstruct their input, but with a constraint that only a small subset of their "hidden" units (features) are activated. This sparsity makes the learned features more interpretable.

Here's how they used SAEs:

  • Decomposition: They trained SAEs on the internal representations of a bilingual LLM at different stages of its training, across various layers and model sizes. This allowed them to extract and analyze individual features.
  • Analysis: They developed metrics to classify features as "English-specific," "Japanese-specific," or "Bilingual." They also quantified semantic coherence using Token Entropy, Semantic Entropy, and Monosemanticity.
  • Intervention: Crucially, they went beyond analysis. They extracted "bilingual" features from a fully trained model using an SAE and then injected these features back into the intermediate representations of a mid-training model. This allowed them to directly test the impact of bilingual representations on model performance.

Datasets

The study used the LLM-jp Corpus v3, a large dataset containing 1.7 trillion tokens across English, Japanese, code, Korean, and Chinese. For training the SAEs, they specifically utilized subsets of the Japanese and English Wikipedia data from this corpus.

Key Insights and Ideas

  • Two-Stage Learning: LLMs don't magically become bilingual. They first develop distinct representations for each language and then begin to align them. This suggests a developmental process rather than simultaneous learning.
  • Mid-Layers are Key: Bilingual alignment isn't uniformly distributed. The mid-layers of the model appear to be the primary site where cross-lingual semantics are consolidated.
  • Size Matters: Larger models show a stronger tendency to develop bilingual alignments, suggesting that scale plays a significant role in fostering cross-lingual understanding.
  • Bilingual Features are Powerful: The intervention experiments revealed that simply adding bilingual features (extracted from a mature model) to a less mature model significantly improves its performance in both languages. This highlights that these learned bilingual representations are not just descriptive but functionally important.

Key Results

  • Early Training: Features are largely "mixed" and lack semantic coherence, activated by tokens from both languages without clear patterns. Monosemanticity is low.
  • Mid-Training: Features become more language-specific, with high monosemanticity within each language.
  • Late Training: A resurgence of "mixed" features occurs, but now with high monosemanticity, indicating the emergence of true bilingual semantic alignment.
  • Layer-wise Trends: Mid-layers show a clear pattern of developing bilingual alignment, while lower layers tend to be more polysemantic (handling many meanings) and upper layers focus on longer contextual spans.
  • Intervention Impact: Adding bilingual representations to a mid-training model led to significant improvements in perplexity (lower is better) and COMET-22 scores (higher is better) for both English and Japanese, outperforming the addition of monolingual representations. For example, adding bilingual representations reduced perplexity by 0.21 (all languages) compared to baseline, while adding English-specific features only reduced it by 0.07.

Limitations and Future Work

  • Language Pair Specificity: The study focused on English and Japanese. The findings might not generalize to all language pairs, especially those with different typological characteristics.
  • SAE Interpretability: While SAEs are powerful tools, recent research has raised concerns about their reliability and interpretability. The analysis is based on an approximation of internal representations due to imperfect reconstruction accuracy.
  • Future Work: The authors suggest extending this approach to a wider range of language pairs and combining SAEs with other analytical methods for a more robust understanding. They also propose that designing training schedules that encourage bilingual knowledge acquisition in later pre-training stages could be beneficial.

Summary updated

BibTeX
@misc{inaba2025how,
  author = {Tatsuro Inaba and Go Kamoda and Kentaro Inui and Masaru Isonuma and Yusuke Miyao and Yohei Oseki and Yu Takagi and Benjamin Heinzerling},
  title = {{How a Bilingual LM Becomes Bilingual: Tracing Internal Representations with Sparse Autoencoders}},
  year = {2025},
  eprint = {2503.06394},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.06394},
}
Figure