mlsanityData to 7 Oct 2026

Interpreting Context Look-ups in Transformers: Investigating Attention-MLP Interactions

arXiv 2402.15055 ↗First posted 23 Feb 2024cs.CL cs.AI cs.LGcited by 11

Not on the map. Why?

Abstract (arXiv)

Understanding the inner workings of large language models (LLMs) is crucial for advancing their theoretical foundations and real-world applications. While the attention mechanism and multi-layer perceptrons (MLPs) have been studied independently, their interactions remain largely unexplored. This study investigates how attention heads and next-token neurons interact in LLMs to predict new words. We propose a methodology to identify next-token neurons, find prompts that highly activate them, and determine the upstream attention heads responsible. We then generate and evaluate explanations for the activity of these attention heads in an automated manner. Our findings reveal that some attention heads recognize specific contexts relevant to predicting a token and activate a downstream token-predicting neuron accordingly. This mechanism provides a deeper understanding of how attention heads work with MLP neurons to perform next-token prediction. Our approach offers a foundation for further research into the intricate workings of LLMs and their impact on text generation and understanding.

Key facts. Cited by 11 papers in the map (data through 7 Oct 2026). Builds on 20 of its 38 references that are in the map. First posted on arXiv 23 Feb 2024.

Builds on

20 of 38 references.

References · 20

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2022Locating and Editing Factual Associations in GPTcited by 2,609
  4. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
  5. 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,734
  6. 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,307
  7. 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
  8. 2022Mass-Editing Memory in a Transformercited by 976
  9. 2022In-context Learning and Induction Headscited by 930
  10. 2019Attention is not Explanationcited by 916
  11. 2021Knowledge Neurons in Pretrained Transformerscited by 590
  12. 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 522
8 more
  1. 2019Is Attention Interpretable?cited by 387
  2. 2023Finding Neurons in a Haystack: Case Studies with Sparse Probingcited by 328
  3. 2017Learning to Generate Reviews and Discovering Sentimentcited by 147
  4. 2021An Interpretability Illusion for BERTcited by 94
  5. 2023Detecting Edit Failures In Large Language Models: An Improved Specificity Benchmarkcited by 62
  6. 2023Explaining How Transformers Use Context to Build Predictionscited by 42
  7. 2023The Larger They Are, the Harder They Fail: Language Models do not Recognize Identifier Swaps in Pythoncited by 29
  8. 2023Neuron to Graph: Interpreting Language Model Neurons at Scalecited by 26

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 4; 2025: 3; 2026: 4.

11 papers.