Skip to main content
QUICK REVIEW

[Paper Review] Finding Neurons in a Haystack: Case Studies with Sparse Probing

Wes Gurnee, Neel Nanda|arXiv (Cornell University)|May 2, 2023
Topic ModelingComputer Science13 citations
TL;DR

The paper introduces sparse probing to locate individual neurons or sparse neuron subsets that encode human-interpretable features in LLM activations, analyzes how representations evolve with model scale, and presents case studies across multiple models and features.

ABSTRACT

Despite rapid adoption and deployment of large language models (LLMs), the internal computations of these models remain opaque and poorly understood. In this work, we seek to understand how high-level human-interpretable features are represented within the internal neuron activations of LLMs. We train $k$-sparse linear classifiers (probes) on these internal activations to predict the presence of features in the input; by varying the value of $k$ we study the sparsity of learned representations and how this varies with model scale. With $k=1$, we localize individual neurons which are highly relevant for a particular feature, and perform a number of case studies to illustrate general properties of LLMs. In particular, we show that early layers make use of sparse combinations of neurons to represent many features in superposition, that middle layers have seemingly dedicated neurons to represent higher-level contextual features, and that increasing scale causes representational sparsity to increase on average, but there are multiple types of scaling dynamics. In all, we probe for over 100 unique features comprising 10 different categories in 7 different models spanning 70 million to 6.9 billion parameters.

Motivation & Objective

  • Investigate how high-level human-interpretable features are represented in internal neuron activations of LLMs.
  • Develop and apply k-sparse probes to localize neurons responsible for specific features.
  • Examine how feature representations change with model scale and layer, revealing sparsity dynamics.
  • Provide case studies to illustrate superposition, monosemanticity, and the effects of scale on representations.

Proposed method

  • Train k-sparse linear classifiers (probes) on internal activations to predict input features.
  • Use adaptive thresholding and optimal sparse probing (OSP) to select top k neurons with high predictive power.
  • Compare probing methods and evaluate using precision, recall, F1, and MCC on held-out data.
  • Analyze activations in MLP layers (approx. 2/3 of parameters) of transformers to locate feature-related neurons.
(a) A monosemantic French neuron
(a) A monosemantic French neuron

Experimental results

Research questions

  • RQ1To what extent are high-level features represented by single neurons versus sparse combinations (superposition) in LLMs?
  • RQ2How does representational sparsity and the location of feature-aligned neurons change with model size and layer?
  • RQ3Do mid-layer neurons tend to be monosemantic for high-level contextual features while early layers show more superposition?
  • RQ4How reliable and interpretable are sparse probes in identifying feature-neuron pairs across diverse feature types?
  • RQ5What are the methodological considerations and potential confounds in probing neuronal representations?

Key findings

  • There exists both monosemantic neurons and polysemantic neurons that participate in superposition for many features.
  • Early layers show sparse combinations of neurons representing many features in superposition, while middle layers host seemingly dedicated neurons for higher-level contextual features.
  • As models scale, average representational sparsity increases, but different feature types follow different scaling dynamics.
  • Increasing model size yields more granular representations for some features and can reduce sparsity for others due to feature splitting or dedicated circuitry.
  • The study probes over 100 features across 7 models spanning 70M to 6.9B parameters, demonstrating the presence and dynamics of sparse representations.
(b) A polysemantic neuron activating on six unrelated $n$ -grams
(b) A polysemantic neuron activating on six unrelated $n$ -grams

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.