Universal Approximation Theorem for a Single-Layer Transformer
Not on the map. Why?
Abstract (arXiv)
Deep learning employs multi-layer neural networks trained via the backpropagation algorithm. This approach has achieved success across many domains and relies on adaptive gradient methods such as the Adam optimizer. Sequence modeling evolved from recurrent neural networks to attention-based models, culminating in the Transformer architecture. Transformers have achieved state-of-the-art performance in natural language processing (for example, BERT and GPT-3) and have been applied in computer vision and computational biology. However, theoretical understanding of these models remains limited. In this paper, we examine the mathematical foundations of deep learning and Transformers and present a novel theoretical result. We review key concepts from linear algebra, probability, and optimization that underpin deep learning, and we analyze the multi-head self-attention mechanism and the backpropagation algorithm in detail. Our main contribution is a universal approximation theorem for Transformers: we prove that a single-layer Transformer, comprising one self-attention layer followed by a position-wise feed-forward network with ReLU activation, can approximate any continuous sequence-to-sequence mapping on a compact domain to arbitrary precision. We provide a formal statement and a complete proof. Finally, we present case studies that demonstrate the practical implications of this result. Our findings advance the theoretical understanding of Transformer models and help bridge the gap between theory and practice.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 12 of its 19 references that are in the map. First posted on arXiv 11 Jul 2025.
Builds on
12 of 19 references.
References · 12
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2014Adam: A Method for Stochastic Optimizationcited by 37,240
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,548
- 2014Sequence to Sequence Learning with Neural Networkscited by 2,986
- 2017Deep Setscited by 1,421
- 2016Error bounds for approximations with deep ReLU networkscited by 574
- 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 406
- 2017The Expressive Power of Neural Networks: A View from the Widthcited by 320
- 2023Are Transformers with One Layer Self-Attention Using Low-Rank Weight Matrices Universal Approximators?cited by 47
Built on by
Citing papers per year: 2026: 1.
1 paper.
- 2026The Role of Feed-Forward Layers in Transformer Dynamicscited by 0
- 2026The Role of Feed-Forward Layers in Transformer Dynamics28 Sep 2026