Lune

EMNLP2024顶会

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.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 4 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Mass-Editing Memory in a Transformer 引用了 Transformer Feed-Forward Layers Are Key-Value Memories
  • Mass-Editing Memory in a Transformer 引用了 Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Space
  • Understanding Addition in Transformers 引用了 Transformer Feed-Forward Layers Are Key-Value Memories
  • Detecting Edit Failures In Large Language Models: An Improved Specificity Benchmark 引用了 Transformer Feed-Forward Layers Are Key-Value Memories
  • Detecting Edit Failures In Large Language Models: An Improved Specificity Benchmark 引用了 Mass-Editing Memory in a Transformer
  • Intrinsic Self-correction for Enhanced Morality: An Analysis of Internal Mechanisms and the Superficial Hypothesis 引用了 Transformer Feed-Forward Layers Are Key-Value Memories
  • Intrinsic Self-correction for Enhanced Morality: An Analysis of Internal Mechanisms and the Superficial Hypothesis 引用了 Mass-Editing Memory in a Transformer
  • Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Space 引用了 Transformer Feed-Forward Layers Are Key-Value Memories
  • Capturing Polysemanticity with PRISM: A Multi-Concept Feature Description Framework 引用了 Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 Small
  • Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 Small 引用了 Transformer Feed-Forward Layers Are Key-Value Memories
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper4

  1. Understanding Addition in TransformersPhilip Quirke, Fazl BarezICLR 2024 · 36 次引用
  2. 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 次引用
  3. Capturing Polysemanticity with PRISM: A Multi-Concept Feature Description FrameworkLaura Kopf, Nils Feldhus, Kirill Bykov, Philine Lou Bommer 等NeurIPS 2025 · 12 次引用
  4. Spectral Attention Steering for Prompt HighlightingWeixian Waylon Li, Yuchen Niu, Yongxin Yang, Keshuang Li 等ICLR 2026 · 6 次引用

它引用的 Paper8

  1. Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary SpaceMor Geva, Avi Caciularu, Kevin Ro Wang, Yoav GoldbergEMNLP 2022 · 92 次引用
  2. Mass-Editing Memory in a TransformerKevin Meng, Arnab Sen Sharma, Alex J. Andonian, Yonatan Belinkov 等ICLR 2023 · 52 次引用
  3. 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 次引用
  4. Transformer Feed-Forward Layers Are Key-Value MemoriesMor Geva, Roei Schuster, Jonathan Berant, Omer LevyEMNLP 2021 · 33 次引用
  5. Detecting Edit Failures In Large Language Models: An Improved Specificity BenchmarkJason Hoelscher-Obermaier, Julia Persson, Esben Kran, Ioannis Konstas 等ACL Findings 2023 · 19 次引用

相关 Paper

  1. Unlocking the Future: Exploring Look-Ahead Planning Mechanistic Interpretability in Large Language ModelsTianyi Men, Pengfei Cao, Zhuoran Jin, Yubo Chen 等EMNLP 2024 · 20 次引用
  2. Length Representations in Large Language ModelsSangjun Moon, Dasom Choi, Jingun Kwon, Hidetaka Kamigaito 等EMNLP Findings 2025
  3. Interpreting and Improving Large Language Models in Arithmetic CalculationWei Zhang, Chaoqun Wan, Yonggang Zhang, Yiu-ming Cheung 等ICML 2024 · 47 次引用
  4. Token Alignment Heads: Unveiling Attention's Role in LLM Multilingual TranslationBinbin Liu, Wenhan Han, Feng Chen, Yifan Zhang 等ICLR 2026
  5. Token-wise Decomposition of Autoregressive Language Model Hidden States for Analyzing Model PredictionsByung-Doh Oh, William SchulerACL 2023 · 1 次引用
黄昏的海面,两侧是细线勾勒的悬崖