Abstract
Modern Large Language Models (LLMs) demonstrate remarkable multilingual capabilities, yet the internal mechanisms governing language selection and processing remain poorly understood. This study identifies specific neurons in decoder-based LLMs that function as "language switches." By manipulating less than 1% of these neurons, we can steer model generation toward a target language or significantly enhance translation performance without additional fine-tuning.
Introduction
While encoder models like BERT have been extensively studied for their multilingual representations, decoder-based models—the backbone of current generative AI—present a more complex challenge. These models must not only encode semantic concepts but also decode them into specific linguistic structures. This research investigates whether LLMs utilize language-universal neurons or dedicated language-specific clusters, and explores the potential for controlling output through direct neuron intervention.
Methodology
The study analyzed three major model families: XGLM, BLOOM, and Llama2 (ranging from 560M to 15B parameters) across six languages: English, German, French, Spanish, Chinese, and Japanese. To identify language-specific neurons, the researchers employed an Average Precision (AP) statistical approach. By comparing neuron activations across "positive" (target language) and "negative" (other languages) sentence sets, they identified neurons that consistently fired for specific languages.
The intervention process involves identifying top-k (strongly activated) and bottom-k (strongly suppressed) neurons for a language. During inference, these neurons' outputs are overridden with fixed values, effectively forcing the model into a specific linguistic state.
Key Insights: The Architecture of Multilingualism
A primary finding is the "U-shaped" distribution of language-specific neurons across model layers. These neurons are heavily concentrated in the initial and final layers, while the middle layers remain largely language-agnostic.
- Input/Output Specialization: The first layers likely transform language-specific inputs into universal semantic representations, while the final layers translate these abstract concepts back into target-specific syntax and vocabulary.
- Semantic Core: The middle layers appear to handle "core thinking" or semantic processing independent of language.
- Extreme Specificity: There is minimal overlap (<5%) between neuron sets for different languages, even for linguistically related pairs like French and Spanish.
Experimental Results
Interventions yielded significant control over model behavior across several benchmarks including PAWS-X and FLORES-200:
- Unconditional Generation: Starting from a blank [BOS] token, intervention increased target language generation probability from near-zero to over 90% in many models (e.g., BLOOM-1b7 for French rose from 13% to 98%).
- Translation Enhancement: For Llama2-7b, intervening in German neurons during English-to-German tasks improved the BLEU score from 2.6 to 17.7.
- Prompt Robustness: Interventions successfully guided models even when prompts were ambiguous or lacked explicit language instructions.
Conclusion
Identifying language-specific neurons provides a new lens for understanding and controlling LLMs. These findings suggest pathways for more efficient model compression—by pruning unnecessary language-specific neurons—and novel fine-tuning strategies that target the language-agnostic middle layers to improve general reasoning across all supported languages.
Summary updated