Transformers are Expressive, But Are They Expressive Enough for Regression?
Not on the map. Why?
Abstract (arXiv)
Transformers have become pivotal in Natural Language Processing, demonstrating remarkable success in applications like Machine Translation and Summarization. Given their widespread adoption, several works have attempted to analyze the expressivity of Transformers. Expressivity of a neural network is the class of functions it can approximate. A neural network is fully expressive if it can act as a universal function approximator. We attempt to analyze the same for Transformers. Contrary to existing claims, our findings reveal that Transformers struggle to reliably approximate smooth functions, relying on piecewise constant approximations with sizable intervals. The central question emerges as: ''Are Transformers truly Universal Function Approximators?'' To address this, we conduct a thorough investigation, providing theoretical insights and supporting evidence through experiments. Theoretically, we prove that Transformer Encoders cannot approximate smooth functions. Experimentally, we complement our theory and show that the full Transformer architecture cannot approximate smooth functions. By shedding light on these challenges, we advocate a refined understanding of Transformers' capabilities. Code Link: https://github.com/swaroop-nath/transformer-expressivity.
Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). Builds on 19 of its 26 references that are in the map. First posted on arXiv 23 Feb 2024.
Builds on
19 of 26 references.
References · 19
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2020Big Bird: Transformers for Longer Sequencescited by 1,673
- 2020Reformer: The Efficient Transformercited by 1,658
- 2019Generating Long Sequences with Sparse Transformerscited by 1,523
- 2014On the Properties of Neural Machine Translation: Encoder-Decoder Approachescited by 1,303
- 2015Effective Approaches to Attention-based Neural Machine Translationcited by 1,024
- 2020On Layer Normalization in the Transformer Architecturecited by 906
- 2020Efficient Transformers: A Surveycited by 784
- 2018Universal Transformerscited by 613
7 more
- 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 404
- 2022The Parallelism Tradeoff: Limitations of Log-Precision Transformerscited by 191
- 2021Saturated Transformers are Constant-Depth Threshold Circuitscited by 137
- 2022Formal Language Recognition by Hard Attention Transformers: Perspectives from Circuit Complexitycited by 92
- 2020O(n) Connections are Expressive Enough: Universal Approximability of Sparse Transformerscited by 82
- 2023Tighter Bounds on the Expressivity of Transformer Encoderscited by 65
- 2022Your Transformer May Not be as Powerful as You Expectcited by 55
Built on by
Citing papers per year: 2024: 2; 2025: 3; 2026: 1.
6 papers.
- 2024Transformers are Universal In-context Learnerscited by 42
- 2024Towards Understanding the Universality of Transformers for Next-Token Predictioncited by 9
- 2025Solving Empirical Bayes via Transformerscited by 7
- 2025Transformers through the lens of support-preserving maps between measurescited by 5
- 2026Geometric Capacity of Transformers: A Tropical Geometry Perspectivecited by 1
- 2025On the Universality of Transformer Architectures; How Much Attention Is Enough?cited by 0
- 2026Geometric Capacity of Transformers: A Tropical Geometry Perspective16 Apr 2026
- 2025On the Universality of Transformer Architectures; How Much Attention Is Enough?20 Dec 2025
- 2025Transformers through the lens of support-preserving maps between measures30 Sep 2025
- 2025Solving Empirical Bayes via Transformers14 Feb 2025
- 2024Towards Understanding the Universality of Transformers for Next-Token Prediction3 Oct 2024
- 2024Transformers are Universal In-context Learners2 Aug 2024