On the Multilingual Ability of Decoder-based Pre-trained Language Models: Finding and Controlling Language-Specific Neurons

Takeshi Kojima, Itsuki Okimura, Yusuke Iwasawa, Hitomi Yanaka, Yutaka Matsuo
4/3/2024
cs.CL

No official code found. Best implementation: kojima-takeshi188/lang_neuron (21 stars, last commit 2024-06-24).

Abstract

Current decoder-based pre-trained language models (PLMs) successfully demonstrate multilingual capabilities. However, it is unclear how these models handle multilingualism. We analyze the neuron-level internal behavior of multilingual decoder-based PLMs, Specifically examining the existence of neurons that fire ``uniquely for each language'' within decoder-only multilingual PLMs. We analyze six languages: English, German, French, Spanish, Chinese, and Japanese, and show that language-specific neurons are unique, with a slight overlap (< 5%) between languages. These neurons are mainly distributed in the models' first and last few layers. This trend remains consistent across languages and models. Additionally, we tamper with less than 1% of the total neurons in each model during inference and demonstrate that tampering with a few language-specific neurons drastically changes the probability of target language occurrence in text generation.

View on arXivView PDF

Code Implementations(1)

218Shell, PythonMar 16, 20242 years ago

Similar Papers

Cite this paper

@article{kojima2024multilingual,
  title  = {On the Multilingual Ability of Decoder-based Pre-trained Language Models: Finding and Controlling Language-Specific Neurons},
  author = {Takeshi Kojima and Itsuki Okimura and Yusuke Iwasawa and Hitomi Yanaka and Yutaka Matsuo},
  year   = {2024},
  eprint = {2404.02431},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2404.02431v1}
}

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/2404.02431.svg)](https://codeofpaper.com/paper/2404.02431)

Discussion