mlsanityData to 14 Oct 2026

Training Dynamics of Contextual N-Grams in Language Models

arXiv 2311.00863 ↗First posted 1 Nov 2023cs.LG cs.AI cs.CLcited by 7

Not on the map. Why?

Abstract (arXiv)

Prior work has shown the existence of contextual neurons in language models, including a neuron that activates on German text. We show that this neuron exists within a broader contextual n-gram circuit: we find late layer neurons which recognize and continue n-grams common in German text, but which only activate if the German neuron is active. We investigate the formation of this circuit throughout training and find that it is an example of what we call a second-order circuit. In particular, both the constituent n-gram circuits and the German detection circuit which culminates in the German neuron form with independent functions early in training - the German detection circuit partially through modeling German unigram statistics, and the n-grams by boosting appropriate completions. Only after both circuits have already formed do they fit together into a second-order circuit. Contrary to the hypotheses presented in prior work, we find that the contextual n-gram circuit forms gradually rather than in a sudden phase transition. We further present a range of anomalous observations such as a simultaneous phase transition in many tasks coinciding with the learning rate warm-up, and evidence that many context neurons form simultaneously early in training but are later unlearned.

Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Builds on 24 of its 35 references that are in the map. First posted on arXiv 1 Nov 2023.

Builds on

24 of 35 references.

References · 24

  1. 2022Locating and Editing Factual Associations in GPTcited by 2,691
  2. 2022Emergent Abilities of Large Language Modelscited by 2,512
  3. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
  4. 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,786
  5. 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,336
  6. 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,165
  7. 2022Toy Models of Superpositioncited by 971
  8. 2022In-context Learning and Induction Headscited by 964
  9. 2023Progress measures for grokking via mechanistic interpretabilitycited by 839
  10. 2022Discovering Latent Knowledge in Language Models Without Supervisioncited by 767
  11. 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 532
  12. 2020Fine-Tuning Pretrained Language Models: Weight Initializations, Data Orders, and Early Stoppingcited by 384
12 more
  1. 2023Finding Neurons in a Haystack: Case Studies with Sparse Probingcited by 334
  2. 2013Direct and Indirect Effectscited by 280
  3. 2018A mathematical theory of semantic development in deep neural networkscited by 186
  4. 2023The Hydra Effect: Emergent Self-repair in Language Model Computationscited by 156
  5. 2022Toward Transparent AI: A Survey on Interpreting the Inner Structures of Deep Neural Networkscited by 129
  6. 2023Explaining grokking through circuit efficiencycited by 111
  7. 2019BERTs of a feather do not generalize together: Large variability in generalization across models with similar test set performancecited by 89
  8. 2022Linear Connectivity Reveals Generalization Strategiescited by 56
  9. 2020Towards falsifiable interpretability researchcited by 53
  10. 2020Pretrained Language Model Embryology: The Birth of ALBERTcited by 30
  11. 2020LSTMs Compose (and Learn) Bottom-Upcited by 11
  12. 2023On the special role of class-selective neurons in early trainingcited by 5

Built on by

Cited by year

Citing papers per year: 2024: 7.

7 papers.