Sharing Matters: Analysing Neurons Across Languages and Tasks in LLMs

Weixuan Wang, Barry Haddow, Minghao Wu, Wei Peng, Alexandra Birch

TL;DR

Researchers have discovered that multilingual Large Language Models (LLMs) rely on a small, elite group of "all-shared" neurons to process information across different languages. Deactivating these few neurons—which often make up less than 10% of the total—can crash model performance by over 80%, proving that multilingual intelligence is anchored in a universal internal representation rather than language-specific silos.

What Problem Does This Paper Address?

While LLMs are impressively multilingual, we don't really know how they do it at a mechanical level. Most "mechanistic interpretability" research (the study of how individual model components contribute to behavior) has focused almost exclusively on English.

Existing multilingual studies often use a simple binary: neurons are either "language-specific" or "language-agnostic." The authors argue this is too coarse. They set out to fill this gap by creating a fine-grained classification system to see how neurons behave across different tasks (like reasoning vs. fact-checking) and different languages (from English to Thai).

Methods

The authors propose a 4-way neuron classification based on how neurons in the Feed-Forward Networks (FFNs) respond to the same semantic input translated into different languages:

  1. All-shared: Active for the input regardless of the language.
  2. Partial-shared: Active for a subset of languages.
  3. Specific: Active exclusively for one language.
  4. Non-activated: Inactive for that specific input across all languages.
Figure 1: A comparison of neuron analysis with differ- ent type designs in multilingual settings with the same semantic input, in which we define four types of neu- rons in one layer of LLM.

To measure a neuron's importance, they used two primary metrics:

  • Generation Impact Score (GIS): Measures a neuron's overall contribution to the model's output weighting.
  • Correctness Impact Score (CIS): Measures how much a neuron specifically pushes the model toward the correct answer.

They also performed ablation studies, where they systematically "turned off" these different groups of neurons to observe the resulting performance drop.

Datasets

The study evaluated several model backbones (BLOOMZ-7B, Llama2-7B-Chat, XGLM) across nine languages (en, de, es, fr, ru, th, tr, vi, zh) using three distinct tasks:

  • XNLI: Natural Language Inference (reasoning).
  • Fact Probing (mParaRel): Testing factual knowledge (e.g., "The capital of France is...").
  • Cross-lingual Knowledge Editing (MzsRE): Assessing how models update and transfer new facts across languages.

Key Insights and Ideas

  • The "All-Shared" Backbone: The "all-shared" neurons are the heavy lifters. Even though they are relatively few, they consistently have the highest impact on both general generation and final correctness.
  • Layer-wise Evolution: Neuron sharing isn't uniform. Sharing typically peaks between layers 5 and 10. The authors hypothesize that early layers handle low-level lexical patterns, middle layers learn "universal" abstract concepts, and final layers specialize in task-specific nuances.
  • Task Sensitivity: Neuron activation is highly task-dependent. For example, "Fact Probing" relies much more on language-specific neurons than reasoning tasks like XNLI. This suggests that while logic might be universal in LLMs, factual "memory" is more tied to the language in which it was learned.
  • Counter-intuitive Language Similarity: Surprisingly, languages from the same family (like German and French) don't necessarily share more neurons than distant ones (like German and Chinese). This suggests LLMs develop their own internal "interlingua" that doesn't strictly follow human linguistic history.
  • Instruction Tuning Promotes Sharing: Models that underwent instruction finetuning (like BLOOMZ) showed a higher proportion of all-shared neurons compared to their base versions, suggesting that teaching a model to follow instructions helps it align its internal representations across languages.

Key Results

The quantitative impact of the "all-shared" neurons is staggering. In the Cross-lingual Knowledge Editing task for BLOOMZ-7B:

  • Deactivating all-shared neurons (only 8.71% of total neurons) caused a macro-average accuracy drop of 87.39%.
  • In contrast, deactivating non-activated neurons (a massive 73.22% of the total) only dropped performance by 42.8%.
  • In Fact Probing, deactivating a tiny sliver of all-shared neurons (0.28%) led to a 50.31% performance crash.
GIS scores showing that all-shared neurons (green line) have a disproportionately high impact in later layers.

Limitations and Future Work

  • Model Scale: The study primarily looked at models up to 7B parameters. Whether these patterns hold (or become even more sparse) in 70B+ models remains an open question.
  • In-Context Learning (ICL): The authors found that providing few-shot examples improved performance but did not significantly change which neurons were activated. They suggest ICL might change the composition of how neurons are used rather than invoking new ones, a topic for future study.
  • Language Coverage: While nine languages is a good start, the study lacks representation from extremely low-resource languages where "sharing" might look very different.

Summary updated

BibTeX
@misc{wang2024sharing,
  author = {Weixuan Wang and Barry Haddow and Minghao Wu and Wei Peng and Alexandra Birch},
  title = {{Sharing Matters: Analysing Neurons Across Languages and Tasks in LLMs}},
  year = {2024},
  eprint = {2406.09265},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.09265},
}
Figure