Mechanism and Emergence of Stacked Attention Heads in Multi-Layer Transformers
Tiberiu Musat
摘要
In this paper, I introduce the retrieval problem, a simple yet common reasoning task that can be solved only by transformers with a minimum number of layers, which grows logarithmically with the input size. I empirically show that large language models can solve the task under different prompting formulations without any fine-tuning. To understand how transformers solve the retrieval problem, I train several transformers on a minimal formulation. Successful learning occurs only under the presence of an implicit curriculum. I uncover the learned mechanisms by studying the attention maps in the trained transformers. I also study the training process, uncovering that attention heads always emerge in a specific sequence guided by the implicit curriculum.
问问这篇 Paper
问问你的智能体。
Lune 读过与它相关的顶会 Paper,每个回答都会注明依据哪几篇。
引用它的顶会 Paper2
- Delta Attention: Fast and Accurate Sparse Attention Inference by Delta CorrectionJeffrey Willette, Heejun Lee, Sung Ju HwangNeurIPS 2025 · 被引用 9 次
- Stability Implies Redundancy: Delta Attention Selective Halting for Efficient Long-Context PrefillingYujie Chen, Tailai Chen, Yifeng Gao, Zoe Wanying He 等ACL 2026 · 被引用 1 次
相关 Paper
- Language models can learn implicit multi-hop reasoning, but only if they have lots of training dataYuekun Yao, Yupei Du, Dawei Zhu, Michael Hahn 等EMNLP 2025
- How do Transformers Learn Implicit Reasoning?Jiaran Ye, Zijun Yao, Zhidian Huang, Liangming Pan 等NeurIPS 2025 · 被引用 17 次
- Retrieval Head Mechanistically Explains Long-Context FactualityWenhao Wu, Yizhong Wang, Guangxuan Xiao, Hao Peng 等ICLR 2025
- Why Prompt Design Matters and Works: A Complexity Analysis of Prompt Search Space in LLMsXiang Zhang, Juntai Cao, Chenyu You, Dujian DingACL 2025 · 被引用 21 次
- Exploring Length Generalization in Large Language ModelsCem Anil, Yuhuai Wu, Anders Andreassen, Aitor Lewkowycz 等NeurIPS 2022 · 被引用 267 次
