Language Arithmetics: Towards Systematic Language Neuron Identification and Manipulation
Daniil Gurgurov, Katharina Trinley, Yusser Al Ghussin, Tanja Baeumel, Josef van Genabith, Simon Ostermann
TL;DR
The paper investigates language-specific neurons in multilingual LLMs to understand internal language representations and enable controllable language use. It introduces Language Activation Probability Entropy (LAPE) to identify language-specific neurons and presents a minimally invasive additive intervention, termed language arithmetics, to steer outputs toward a target language without fine-tuning. Empirically, language-specific neurons concentrate in mid-to-late layers, with non-Latin scripts showing stronger specialization and limited cross-language overlap, while typologically related languages share neurons. Across five multilingual tasks, additive interventions outperform activation-replacement approaches, yielding notable gains in translation, QA, NLI, and comprehension, and revealing internal fallback mechanisms when dominant languages are suppressed. The study demonstrates a principled, interpretable method for neuron-level multilingual control with practical implications for improving cross-language performance and controllability in LLMs, while outlining avenues for broader evaluation and model-scale exploration.
Abstract
Large language models (LLMs) exhibit strong multilingual abilities, yet the neural mechanisms behind language-specific processing remain unclear. We analyze language-specific neurons in Llama-3.1-8B, Mistral-Nemo-12B, and Aya-Expanse-8B & 32B across 21 typologically diverse languages, identifying neurons that control language behavior. Using the Language Activation Probability Entropy (LAPE) method, we show that these neurons cluster in deeper layers, with non-Latin scripts showing greater specialization. Related languages share overlapping neurons, reflecting internal representations of linguistic proximity. Through language arithmetics, i.e. systematic activation addition and multiplication, we steer models to deactivate unwanted languages and activate desired ones, outperforming simpler replacement approaches. These interventions effectively guide behavior across five multilingual tasks: language forcing, translation, QA, comprehension, and NLI. Manipulation is more successful for high-resource languages, while typological similarity improves effectiveness. We also demonstrate that cross-lingual neuron steering enhances downstream performance and reveal internal "fallback" mechanisms for language selection when neurons are progressively deactivated. Our code is made publicly available at https://github.com/d-gurgurov/Language-Neurons-Manipulation.
