Interpreting Context Look-ups in Transformers: Investigating Attention-MLP Interactions
Clement Neo, Shay B. Cohen, Fazl Barez
摘要
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.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper4
- Understanding Addition in TransformersPhilip Quirke, Fazl BarezICLR 2024 · 被引用 36 次
- Intrinsic Self-correction for Enhanced Morality: An Analysis of Internal Mechanisms and the Superficial HypothesisGuangliang Liu, Haitao Mao, Jiliang Tang, Kristen Marie JohnsonEMNLP 2024 · 被引用 21 次
- Capturing Polysemanticity with PRISM: A Multi-Concept Feature Description FrameworkLaura Kopf, Nils Feldhus, Kirill Bykov, Philine Lou Bommer 等NeurIPS 2025 · 被引用 12 次
- Spectral Attention Steering for Prompt HighlightingWeixian Waylon Li, Yuchen Niu, Yongxin Yang, Keshuang Li 等ICLR 2026 · 被引用 6 次
它引用的顶会 Paper6
- Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary SpaceMor Geva, Avi Caciularu, Kevin Ro Wang, Yoav GoldbergEMNLP 2022 · 被引用 92 次
- Mass-Editing Memory in a TransformerKevin Meng, Arnab Sen Sharma, Alex J. Andonian, Yonatan Belinkov 等ICLR 2023 · 被引用 52 次
- Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 SmallKevin Ro Wang, Alexandre Variengien, Arthur Conmy, Buck Shlegeris 等ICLR 2023 · 被引用 50 次
- Transformer Feed-Forward Layers Are Key-Value MemoriesMor Geva, Roei Schuster, Jonathan Berant, Omer LevyEMNLP 2021 · 被引用 33 次
- Explaining How Transformers Use Context to Build PredictionsJavier Ferrando, Gerard I. Gállego, Ioannis Tsiamas, Marta R. Costa-jussàACL 2023 · 被引用 9 次
相关 Paper
- Unlocking the Future: Exploring Look-Ahead Planning Mechanistic Interpretability in Large Language ModelsTianyi Men, Pengfei Cao, Zhuoran Jin, Yubo Chen 等EMNLP 2024 · 被引用 20 次
- Interpreting and Improving Large Language Models in Arithmetic CalculationWei Zhang, Chaoqun Wan, Yonggang Zhang, Yiu-ming Cheung 等ICML 2024 · 被引用 47 次
- Token Alignment Heads: Unveiling Attention's Role in LLM Multilingual TranslationBinbin Liu, Wenhan Han, Feng Chen, Yifan Zhang 等ICLR 2026
- Token-wise Decomposition of Autoregressive Language Model Hidden States for Analyzing Model PredictionsByung-Doh Oh, William SchulerACL 2023 · 被引用 1 次
- Successor Heads: Recurring, Interpretable Attention Heads In The WildRhys Gould, Euan Ong, George Ogden, Arthur ConmyICLR 2024 · 被引用 75 次
