Language-Specific Neurons: The Key to Multilingual Capabilities in Large Language Models

Tianyi Tang, Wenyang Luo, Haoyang Huang, Dongdong Zhang, Xiaolei Wang +3 more
2/26/2024
cs.CL

No official code found. Best implementation: RUCAIBox/Language-Specific-Neurons (91 stars, last commit 2024-12-23).

Abstract

Large language models (LLMs) demonstrate remarkable multilingual capabilities without being pre-trained on specially curated multilingual parallel corpora. It remains a challenging problem to explain the underlying mechanisms by which LLMs process multilingual texts. In this paper, we delve into the composition of Transformer architectures in LLMs to pinpoint language-specific regions. Specially, we propose a novel detection method, language activation probability entropy (LAPE), to identify language-specific neurons within LLMs. Based on LAPE, we conduct comprehensive experiments on several representative LLMs, such as LLaMA-2, BLOOM, and Mistral. Our findings indicate that LLMs' proficiency in processing a particular language is predominantly due to a small subset of neurons, primarily situated in the models' top and bottom layers. Furthermore, we showcase the feasibility to "steer" the output language of LLMs by selectively activating or deactivating language-specific neurons. Our research provides important evidence to the understanding and exploration of the multilingual capabilities of LLMs.

View on arXivView PDF

Code Implementations(1)

9114PythonFeb 6, 20241 years ago

Similar Papers

Cite this paper

@article{tang2024languagespecific,
  title  = {Language-Specific Neurons: The Key to Multilingual Capabilities in Large Language Models},
  author = {Tianyi Tang and Wenyang Luo and Haoyang Huang and Dongdong Zhang and Xiaolei Wang and Xin Zhao and Furu Wei and Ji-Rong Wen},
  year   = {2024},
  eprint = {2402.16438},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.16438v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.16438.svg)](https://codeofpaper.com/paper/2402.16438)

Discussion