Understanding the Expressive Power and Mechanisms of Transformer for Sequence Modeling
Mingze Wang, Weinan E
Abstract
We conduct a systematic study of the approximation properties of Transformer for sequence modeling with long, sparse and complicated memory. We investigate the mechanisms through which different components of Transformer, such as the dot-product self-attention, positional encoding and feed-forward layer, affect its expressive power, and we study their combined effects through establishing explicit approximation rates. Our study reveals the roles of critical parameters in the Transformer, such as the number of layers and the number of attention heads. These theoretical insights are validated experimentally and offer natural suggestions for alternative architectures.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
13 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Big Bird: Transformers for Longer Sequences cites Reformer: The Efficient Transformer
- Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation cites Language Models are Few-Shot Learners
- Initialization is Critical to Whether Transformers Fit Composite Functions by Reasoning or Memorizing cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Approximation Rate of the Transformer Architecture for Sequence Modeling cites Language Models are Few-Shot Learners
- Approximation Bounds for Transformer Networks with Application to Regression cites Approximation Rate of the Transformer Architecture for Sequence Modeling
- The Effect of Attention Head Count on Transformer Approximation cites Approximation Rate of the Transformer Architecture for Sequence Modeling
- The Effect of Attention Head Count on Transformer Approximation cites Language Models are Few-Shot Learners
Cited by top-tier papers13
- Approximation Rate of the Transformer Architecture for Sequence ModelingHaotian Jiang, Qianxiao LiNeurIPS 2024 · 32 citations
- ViSpec: Accelerating Vision-Language Models with Vision-Aware Speculative DecodingJialiang Kang, Han Shu, Wenshuo Li, Yingjie Zhai et al.NeurIPS 2025 · 24 citations
- Initialization is Critical to Whether Transformers Fit Composite Functions by Reasoning or MemorizingZhongwang Zhang, Pengxiao Lin, Zhiwei Wang, Yaoyu Zhang et al.NeurIPS 2024 · 20 citations
- Approximation Bounds for Transformer Networks with Application to RegressionYuling Jiao, Yanming Lai, Defeng Sun, Yang Wang et al.ICML 2026 · 6 citations
- The Effect of Attention Head Count on Transformer ApproximationPenghao Yu, Haotian Jiang, Zeyu Bao, Ruoxi Yu et al.ICLR 2026 · 5 citations
Builds on32
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- Big Bird: Transformers for Longer SequencesManzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie et al.NeurIPS 2020 · 3,159 citations
- Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 citations
- Train Short, Test Long: Attention with Linear Biases Enables Input Length ExtrapolationOfir Press, Noah A. Smith, Mike LewisICLR 2022 · 1,168 citations
Related papers
- Are Transformers universal approximators of sequence-to-sequence functions?Chulhee Yun, Srinadh Bhojanapalli, Ankit Singh Rawat, Sashank J. Reddi et al.ICLR 2020 · 481 citations
- Provable Memorization Capacity of TransformersJunghwan Kim, Michelle Kim, Barzan MozafariICLR 2023
- Combiner: Full Attention Transformer with Sparse Computation CostHongyu Ren, Hanjun Dai, Zihang Dai, Mengjiao Yang et al.NeurIPS 2021 · 99 citations
- Redesigning the Transformer Architecture with Insights from Multi-particle Dynamical SystemsSubhabrata Dutta, Tanya Gautam, Soumen Chakrabarti, Tanmoy ChakrabortyNeurIPS 2021 · 34 citations
- Memorization Capacity of Multi-Head Attention in TransformersSadegh Mahdavi, Renjie Liao, Christos ThrampoulidisICLR 2024 · 34 citations
