TL;DR
This paper introduces a novel method to categorize neurons in multilingual Large Language Models (LLMs) based on their activation patterns across different languages and tasks. They discover that "all-shared" neurons are crucial for accurate response generation, and that instruction-tuning can increase neuron sharing, leading to better multilingual performance.
What Problem Does This Paper Address?
While multilingual LLMs have shown impressive capabilities, their internal workings, especially how they handle multiple languages, remain largely a black box. Most research on LLM interpretability has focused on monolingual settings, leaving a significant gap in understanding cross-lingual mechanisms. Specifically, it's unclear how much of a model's internal representation is shared across languages and how this sharing interacts with different tasks. This paper aims to bridge this gap by analyzing neuron activations in multilingual LLMs across various tasks and languages.
Methods
The core of this research is a fine-grained classification of neurons within the Feed-Forward Network (FFN) blocks of LLMs. For a given input and its translations across multiple languages, neurons are categorized into four types:
- All-shared neurons: Activated for all language inputs.
- Partial-shared neurons: Activated for inputs in a subset of languages.
- Specific neurons: Activated exclusively for inputs in one language.
- Non-activated neurons: Never activated for any input.
To understand the importance of these neuron types, the authors employ two key techniques:
- Deactivation Experiments: They selectively deactivate neurons of each type and observe the impact on model performance across various tasks.
- Neuron Contribution Metrics: They use the Generation Impact Score (GIS) to measure a neuron's overall contribution to generating an answer and the Correctness Impact Score (CIS) to assess its influence on producing a correct answer.
Datasets
The study utilizes several multilingual datasets for evaluation:
- XNLI: A natural language inference dataset with 5000 items across multiple languages.
- Fact Probing: A multilingual factual knowledge dataset (mParaRel) adapted for predicting capital cities.
- Cross-lingual Knowledge Editing (KE): A multilingual question-answering dataset (MzsREis) used in two scenarios: editing in English and testing in other languages (EN → ALL), and vice-versa (ALL → EN).
These tasks were performed across nine languages: English (en), German (de), Spanish (es), French (fr), Russian (ru), Thai (th), Turkish (tr), Vietnamese (vi), and Chinese (zh).
Key Insights and Ideas
- "All-shared" neurons are critical: These neurons, active across all languages, are vital for accurate response generation. Deactivating them leads to significant performance drops.
- Instruction tuning boosts sharing: Instruction-tuned LLMs (like BLOOMZ-7B) show a higher proportion of "all-shared" neurons compared to their foundational counterparts (like BLOOM-7B), suggesting that instruction tuning encourages greater cross-lingual alignment.
- Language similarity doesn't always dictate neuron sharing: Surprisingly, languages from the same family don't necessarily exhibit higher neuron sharing than those from different families. This suggests that linguistic relatedness isn't the sole driver of shared representations.
- Task and LLM influence activation patterns: Neuron activation patterns are not static; they vary significantly depending on the specific task, the LLM architecture, and the language being processed.
- "All-shared" neurons are key for correctness: Beyond just generating output, "all-shared" neurons are particularly important for ensuring the correctness of the generated answers.
Key Results
- Deactivating "all-shared" neurons resulted in performance declines of up to 87.39% on the Cross-lingual KE task.
- Even though "all-shared" neurons often constitute a small percentage of the total neurons (e.g., 0.28% in Fact Probing), their impact is disproportionately large.
- The Generation Impact Score (GIS) and Correctness Impact Score (CIS) consistently showed "all-shared" neurons having the highest scores, indicating their significant role in both generation and accuracy.
- Instruction-finetuned models like BLOOMZ-7B demonstrated a higher percentage of "all-shared" neurons compared to base models like BLOOM-7B.
Limitations and Future Work
- Language Similarity Nuance: The paper notes that while "all-shared" neurons are important, the relationship between language similarity and neuron sharing is complex and not always straightforward. Further investigation into this phenomenon is suggested.
- Model Scale: The study acknowledges that the limited scale of some models tested might affect the reliability of certain findings, particularly regarding scale law effects.
- In-Context Learning: The paper briefly explores in-context learning (ICL) and observes that while ICL improves performance, it doesn't significantly alter neuron activation patterns. The authors suggest future work to explore if ICL leads to better neuron activation composition rather than just invoking more neurons.
- Code Release: The authors have released their code to encourage further research in this area.
Summary updated