Sharing Matters: Analysing Neurons Across Languages and Tasks in LLMs

Weixuan Wang, Barry Haddow, Minghao Wu, Wei Peng, Alexandra Birch
6/13/2024
cs.CL

No official code found. Best implementation: weixuan-wang123/multilingual-neurons (4 stars, last commit 2024-10-19).

Abstract

Large language models (LLMs) have revolutionized the field of natural language processing (NLP), and recent studies have aimed to understand their underlying mechanisms. However, most of this research is conducted within a monolingual setting, primarily focusing on English. Few studies have attempted to explore the internal workings of LLMs in multilingual settings. In this study, we aim to fill this research gap by examining how neuron activation is shared across tasks and languages. We classify neurons into four distinct categories based on their responses to a specific input across different languages: all-shared, partial-shared, specific, and non-activated. Building upon this categorisation, we conduct extensive experiments on three tasks across nine languages using several LLMs and present an in-depth analysis in this work. Our findings reveal that: (i) deactivating the all-shared neurons significantly decreases performance; (ii) the shared neurons play a vital role in generating responses, especially for the all-shared neurons; (iii) neuron activation patterns are highly sensitive and vary across tasks, LLMs, and languages. These findings shed light on the internal workings of multilingual LLMs and pave the way for future research. We release the code to foster research in this area.

View on arXivView PDF

Code Implementations(1)

42Jupyter NotebookJun 12, 20242 years ago

Similar Papers

Cite this paper

@article{wang2024sharing,
  title  = {Sharing Matters: Analysing Neurons Across Languages and Tasks in LLMs},
  author = {Weixuan Wang and Barry Haddow and Minghao Wu and Wei Peng and Alexandra Birch},
  year   = {2024},
  eprint = {2406.09265},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.09265v3}
}

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

Discussion