Rhys Gould (@rgould0) header
Rhys Gould (@rgould0) profile picture

1st year CS PhD at UC Berkeley

Joined December 2023
Photo by Rhys Gould (@rgould0)Photo by Rhys Gould (@rgould0)Photo by Rhys Gould (@rgould0)Photo by Rhys Gould (@rgould0)Photo by Rhys Gould (@rgould0)Photo by Rhys Gould (@rgould0)
How do LLMs represent sequences? We find they use a single attention head to map ‘one’ to ‘two’, ‘Tuesday’ to ‘Wednesday’, and ‘June’ to ‘July’! 🧵➡️Our new mechinterp paper studies these ‘successor heads’, and finds they act on shared numerical structure in token embeddings!
4
24
7
148
24,750
…but while they do a lot of incrementation, (a) we couldn’t easily characterise their behaviour on a quarter of examples (b) some successor heads are even polysemantic! e.g. Pythia-1.4B’s successor head also predicts acronyms… (“abstract base class (” → “ABC”)
2
7
992
Work done with @euan_ong (many thanks for their help with all parts of this project), @George_Ogden42 and @ArthurConmy. Paper: arxiv.org/abs/2312.09230
1
14
809
Successor heads (mostly) do incrementation in the wild! Finally, on natural language datasets, we find successor heads are important in contexts involving incrementation (e.g. predicting the next number in a numbered list)…
1
1
4
2,222
…and beyond SAEs, we find more evidence that these ‘mod-10 features’ are important (and generalise to different tasks) through linear probes and MLP0 neuron analysis!
1
5
845
Sequence token embeddings have compositional structure! How could one attention head perform all these tasks? We find that the indices of sequence tokens are stored in a shared numeric subspace — e.g. ‘April’ = v_4 + v_Month ‘Tuesday’ = v_2 + v_Day
1
2
15
2,727
Sequence token embeddings have ‘mod-10 features’! But that’s not all! Using sparse autoencoders (@HoagyCunningham @AnthropicAI), we find ‘mod-10 features’ f_i, active in sequence tokens whose index is i mod 10😯 e.g. f_3 is active in tokens ‘3’, ‘13’, ‘March’, ‘Wednesday', …
1
1
15
2,092
Successor heads form across different models! We looked for attention heads (satisfying the circuit above) in Pythia, LLaMA2 & GPT2 models from 31M to 12B parameters. Surprisingly, most of these models have a single successor head with good performance on all succession tasks!
1
1
9
2,581