Unveiling Language-Specific Features in Large Language Models via Sparse Autoencoders

Boyi Deng, Yu Wan, Yidan Zhang, Baosong Yang, Fuli Feng
5/8/2025
cs.CL

Official code: Aatrox103/multilingual-llm-features (8 stars, last commit 2025-05-27).

Abstract

The mechanisms behind multilingual capabilities in Large Language Models (LLMs) have been examined using neuron-based or internal-activation-based methods. However, these methods often face challenges such as superposition and layer-wise activation variance, which limit their reliability. Sparse Autoencoders (SAEs) offer a more nuanced analysis by decomposing the activations of LLMs into a sparse linear combination of SAE features. We introduce a novel metric to assess the monolinguality of features obtained from SAEs, discovering that some features are strongly related to specific languages. Additionally, we show that ablating these SAE features only significantly reduces abilities in one language of LLMs, leaving others almost unaffected. Interestingly, we find some languages have multiple synergistic SAE features, and ablating them together yields greater improvement than ablating individually. Moreover, we leverage these SAE-derived language-specific features to enhance steering vectors, achieving control over the language generated by LLMs. The code is publicly available at https://github.com/Aatrox103/multilingual-llm-features.

View on arXivView PDF

Code Implementations(1)

83PythonMay 19, 20251 years ago

Similar Papers

Cite this paper

@article{deng2025unveiling,
  title  = {Unveiling Language-Specific Features in Large Language Models via Sparse Autoencoders},
  author = {Boyi Deng and Yu Wan and Yidan Zhang and Baosong Yang and Fuli Feng},
  year   = {2025},
  eprint = {2505.05111},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.05111v2}
}

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

Discussion