Not All Language Model Features Are One-Dimensionally Linear

Joshua Engels, Eric J. Michaud, Isaac Liao, Wes Gurnee, Max Tegmark
5/23/2024
247 citations
cs.LG

Official code: JoshEngels/MultiDimensionalFeatures (95 stars, Jupyter Notebook, MIT, last commit 2024-11-27).

Abstract

Recent work has proposed that language models perform computation by manipulating one-dimensional representations of concepts ("features") in activation space. In contrast, we explore whether some language model representations may be inherently multi-dimensional.

Show full abstract

We begin by developing a rigorous definition of irreducible multi-dimensional features based on whether they can be decomposed into either independent or non-co-occurring lower-dimensional features. Motivated by these definitions, we design a scalable method that uses sparse autoencoders to automatically find multi-dimensional features in GPT-2 and Mistral 7B. These auto-discovered features include strikingly interpretable examples, e.g. circular features representing days of the week and months of the year. We identify tasks where these exact circles are used to solve computational problems involving modular arithmetic in days of the week and months of the year. Next, we provide evidence that these circular features are indeed the fundamental unit of computation in these tasks with intervention experiments on Mistral 7B and Llama 3 8B, and we examine the continuity of the days of the week feature in Mistral 7B. Overall, our work argues that understanding multi-dimensional features is necessary to mechanistically decompose some model behaviors.

View on arXivView PDF

Code Implementations(1)

MIT

Code for reproducing our paper "Not All Language Model Features Are Linear"

9513Jupyter Notebook, PythonMay 20, 20242 years agoMIT

Similar Papers

Cite this paper

@article{engels2024language,
  title  = {Not All Language Model Features Are One-Dimensionally Linear},
  author = {Joshua Engels and Eric J. Michaud and Isaac Liao and Wes Gurnee and Max Tegmark},
  year   = {2024},
  eprint = {2405.14860},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.14860v3},
  journal = {ICLR 2024 2024}
}

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

Discussion