papers / sparseautoencoder2023
Next task →
Research Papers/Interpretability and evaluation/Towards Monosemanticity: Decomposing Language Models with Dictionary Learning
Interpretability and evaluation · #3 · emerging

Towards Monosemanticity: Decomposing Language Models with Dictionary Learning

Anthropic interpretability team · 2023 · Anthropic research report

1. Research problem

Individual neurons in language models respond to many unrelated concepts, making it hard to interpret representations one unit at a time.

2. Motivation

The authors wanted to find a basis in which features are closer to monosemantic, so that activations correspond to understandable concepts.

3. Previous approaches

Neuron-level visualization and probing studied polysemantic units; sparse coding had been proposed conceptually but not applied at this scale.

4. Core contribution

Trained sparse autoencoders on transformer residual-stream activations to decompose polysemantic activations into a larger dictionary of sparse, more interpretable features.

5. Mathematical formulation

Learn an encoder and decoder with an L1 sparsity penalty so each activation vector is represented as a sparse combination of dictionary columns, reconstructed with low error.

6. Methodology

Apply dictionary learning to activations of a small transformer, inspect high-activating examples for learned features, and compare with neuron-level baselines.

7. Architecture

Sparse autoencoder with a hidden dictionary much larger than the residual-stream dimension; studied in a small one-layer transformer.

8. Experimental setup

Feature case studies and sparsity-reconstruction tradeoff measurements.

9. Datasets

Small transformer trained on a filtered web-like text corpus.

10. Results

Found features corresponding to interpretable concepts such as code syntax, proper nouns, or semantic classes, more specific than individual neurons.

11. Limitations

Demonstrated on small models; many features remain hard to interpret; L1 penalties can create dead or split features; scaling is expensive.

12. Critical analysis

A concrete step toward a feature basis for mechanistic interpretability, but feature quality and completeness are still unsolved.

13. Implementation tasks

  • 1.Train a sparse autoencoder on residual-stream activations of a small model.
  • 2.Inspect top-activating examples for several learned features and label them.
  • 3.Sweep the L1 coefficient to measure the sparsity-reconstruction tradeoff.

14. Follow-up work

  • 1.Sparse Autoencoders Find Highly Interpretable Features in Language Models
  • 2.In-context Learning and Induction Heads (Olsson et al., 2022)

15. Open research questions

  • 1.Is there a canonical feature basis for a given model?
  • 2.How can feature quality be evaluated without human inspection?
16. Reproduce it. Record the hypothesis, configuration, dataset, metrics and discrepancies in the Experiment Tracker. A reproduction is not complete until you have run the experiments, performed at least one ablation and documented the differences from the reported numbers.