Language Arithmetics: Towards Systematic Language Neuron Identification and Manipulation

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Gurgurov, Daniil, Trinley, Katharina, Ghussin, Yusser Al, Baeumel, Tanja, van Genabith, Josef, Ostermann, Simon
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866914132012302336
author Gurgurov, Daniil
Trinley, Katharina
Ghussin, Yusser Al
Baeumel, Tanja
van Genabith, Josef
Ostermann, Simon
author_facet Gurgurov, Daniil
Trinley, Katharina
Ghussin, Yusser Al
Baeumel, Tanja
van Genabith, Josef
Ostermann, Simon
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2507_22608
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Language Arithmetics: Towards Systematic Language Neuron Identification and Manipulation
Gurgurov, Daniil
Trinley, Katharina
Ghussin, Yusser Al
Baeumel, Tanja
van Genabith, Josef
Ostermann, Simon
Computation and Language
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.
title Language Arithmetics: Towards Systematic Language Neuron Identification and Manipulation
topic Computation and Language
url https://arxiv.org/abs/2507.22608