Your Transformer May Not be as Powerful as You Expect
Not on the map. Why?
Abstract (arXiv)
Relative Positional Encoding (RPE), which encodes the relative distance between any pair of tokens, is one of the most successful modifications to the original Transformer. As far as we know, theoretical understanding of the RPE-based Transformers is largely unexplored. In this work, we mathematically analyze the power of RPE-based Transformers regarding whether the model is capable of approximating any continuous sequence-to-sequence functions. One may naturally assume the answer is in the affirmative -- RPE-based Transformers are universal function approximators. However, we present a negative result by showing there exist continuous sequence-to-sequence functions that RPE-based Transformers cannot approximate no matter how deep and wide the neural network is. One key reason lies in that most RPEs are placed in the softmax attention that always generates a right stochastic matrix. This restricts the network from capturing positional information in the RPEs and limits its capacity. To overcome the problem and make the model more powerful, we first present sufficient conditions for RPE-based Transformers to achieve universal function approximation. With the theoretical guidance, we develop a novel attention module, called Universal RPE-based (URPE) Attention, which satisfies the conditions. Therefore, the corresponding URPE-based Transformers become universal function approximators. Extensive experiments covering typical architectures and tasks demonstrate that our model is parameter-efficient and can achieve superior performance to strong baselines in a wide range of applications. The code will be made publicly available at https://github.com/lsj2408/URPE.
Key facts. Cited by 55 papers in the map (data through 7 Oct 2026). Builds on 61 of its 80 references that are in the map. First posted on arXiv 26 May 2022.
Builds on
61 of 80 references.
References · 61
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
- 2016Semi-Supervised Classification with Graph Convolutional Networkscited by 11,282
- 2017Graph Attention Networkscited by 8,854
- 2015Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shiftcited by 6,979
- 2017Inductive Representation Learning on Large Graphscited by 6,284
38 more
- 2016Layer Normalizationcited by 5,579
- 2018How Powerful are Graph Neural Networks?cited by 4,355
- 2017Neural Message Passing for Quantum Chemistrycited by 3,460
- 2016Pointer Sentinel Mixture Modelscited by 2,992
- 2020DeBERTa: Decoding-enhanced BERT with Disentangled Attentioncited by 2,157
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
- 2017Modeling Relational Data with Graph Convolutional Networkscited by 1,684
- 2019fairseq: A Fast, Extensible Toolkit for Sequence Modelingcited by 1,486
- 2019Simplifying Graph Convolutional Networkscited by 1,470
- 2018An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modelingcited by 1,447
- 2019Root Mean Square Layer Normalizationcited by 1,425
- 2018Self-Attention with Relative Position Representationscited by 1,112
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
- 2016Deep Networks with Stochastic Depthcited by 973
- 2016Language Modeling with Gated Convolutional Networkscited by 688
- 2020Benchmarking Graph Neural Networkscited by 672
- 2020A Generalization of Transformer Networks to Graphscited by 653
- 2020Principal Neighbourhood Aggregation for Graph Netscited by 477
- 2016Geometric deep learning on graphs and manifolds using mixture model CNNscited by 468
- 2021Rethinking Graph Transformers with Spectral Attentioncited by 468
- 2021Attention is Not All You Need: Pure Attention Loses Rank Doubly Exponentially with Depthcited by 411
- 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 404
- 2017Residual Gated Graph ConvNetscited by 341
- 2021OGB-LSC: A Large-Scale Challenge for Machine Learning on Graphscited by 328
- 2017The Expressive Power of Neural Networks: A View from the Widthcited by 318
- 2019On the Relationship between Self-Attention and Convolutional Layerscited by 299
- 2020SIGN: Scalable Inception Graph Neural Networkscited by 283
- 2020DeeperGCN: All You Need to Train Deeper GCNscited by 249
- 2020UniLMv2: Pseudo-Masked Language Models for Unified Language Model Pre-Trainingcited by 204
- 2020Combining Label Propagation and Simple Models Out-performs Graph Neural Networkscited by 199
- 2020Rethinking Positional Encoding in Language Pre-trainingcited by 197
- 2018Constituency Parsing with a Self-Attentive Encodercited by 196
- 2017Approximating Continuous Functions by ReLU Nets of Minimal Widthcited by 120
- 2020Infinite attention: NNGP and NTK for deep attention networkscited by 117
- 2021Learnable Fourier Features for Multi-Dimensional Spatial Positional Encodingcited by 93
- 2021Do Transformer Modifications Transfer Across Implementations and Applications?cited by 87
- 2020O(n) Connections are Expressive Enough: Universal Approximability of Sparse Transformerscited by 82
- 2016Improving Neural Language Models with a Continuous Cachecited by 81
50 most cited of 61 All 61 (JSON)
Built on by
Citing papers per year: 2022: 2; 2023: 21; 2024: 17; 2025: 13; 2026: 2.
55 papers.
Sort:
By area:
- 2023The Falcon Series of Open Language Modelscited by 526
- 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspectivecited by 293
- 2023Graph Inductive Biases in Transformers without Message Passingcited by 150
- 2023Rethinking the Expressive Power of GNNs via Graph Biconnectivitycited by 119
- 2023Attending to Graph Transformerscited by 81
- 2022One Transformer Can Understand Both 2D & 3D Molecular Datacited by 77
- 2023A Complete Expressiveness Hierarchy for Subgraph GNNs via Subgraph Weisfeiler-Lehman Testscited by 64
- 2023Are Transformers with One Layer Self-Attention Using Low-Rank Weight Matrices Universal Approximators?cited by 46
- 2024Transformers are Universal In-context Learnerscited by 42
- 2023Memorization Capacity of Multi-Head Attention in Transformerscited by 39
- 2024Beyond Weisfeiler-Lehman: A Quantitative Framework for GNN Expressivenesscited by 38
- 2023Never Lost in the Middle: Mastering Long-Context Question Answering with Position-Agnostic Decompositional Trainingcited by 31
38 more
- 2023Approximation Rate of the Transformer Architecture for Sequence Modelingcited by 28
- 2025Can Classic GNNs Be Strong Baselines for Graph-level Tasks? Simple Architectures Meet Excellencecited by 24
- 2023Highly Accurate Quantum Chemical Property Prediction with Uni-Mol+cited by 22
- 2023TorchDEQ: A Library for Deep Equilibrium Modelscited by 21
- 2024StableMask: Refining Causal Masking in Decoder-only Transformercited by 20
- 2025Understanding Multimodal LLMs Under Distribution Shifts: An Information-Theoretic Approachcited by 15
- 2023CIN++: Enhancing Topological Message Passingcited by 14
- 2025Sample Complexity and Representation Ability of Test-time Scaling Paradigmscited by 12
- 2023Learning a Fourier Transform for Linear Relative Positional Encodings in Transformerscited by 10
- 2023The Languini Kitchen: Enabling Language Modelling Research at Different Scales of Computecited by 10
- 2024DAPE V2: Process Attention Score as Feature Map for Length Extrapolationcited by 10
- 2023Monotonic Location Attention for Length Generalizationcited by 9
- 2024Rethinking Transformers in Solving POMDPscited by 9
- 2024Subgraphormer: Unifying Subgraph GNNs and Graph Transformers via Graph Productscited by 8
- 2024Let the Code LLM Edit Itself When You Edit the Codecited by 8
- 2024Transformers are Expressive, But Are They Expressive Enough for Regression?cited by 6
- 2024GeoMFormer: A General Architecture for Geometric Molecular Representation Learningcited by 6
- 2025Transformers Can Overcome the Curse of Dimensionality: A Theoretical Study from an Approximation Perspectivecited by 5
- 2025Transformers through the lens of support-preserving maps between measurescited by 5
- 2023Optimizing a Transformer-based network for a deep learning seismic processing workflowcited by 4
- 2024CKGConv: General Graph Convolution with Continuous Kernelscited by 4
- 2022Why self-attention is Natural for Sequence-to-Sequence Problems? A Perspective from Symmetriescited by 3
- 2023Parrot Mind: Towards Explaining the Complex Task Reasoning of Pretrained Large Language Models with Template-Content Structurecited by 3
- 2023Positional Embedding-Aware Activationscited by 2
- 2024A Structure-Aware Lane Graph Transformer Model for Vehicle Trajectory Predictioncited by 2
- 2024Bridging Geometric States via Geometric Diffusion Bridgecited by 2
- 2025Plain Transformers Can be Powerful Graph Learnerscited by 2
- 2025A unified framework for establishing the universal approximation of transformer-type architecturescited by 2
- 2025DoPE: Denoising Rotary Position Embeddingcited by 2
- 2023Model-Generated Pretraining Signals Improves Zero-Shot Generalization of Text-to-Text Transformerscited by 1
- 2024How Out-of-Distribution Detection Learning Theory Enhances Transformer: Learnability and Reliabilitycited by 1
- 2024Generalizable autoregressive modeling of time series through functional narrativescited by 1
- 2025On the Existence of Universal Simulators of Attentioncited by 1
- 2025Deep Learning Empowered Super-Resolution: A Comprehensive Survey and Future Prospectscited by 1
- 2026Algebraic Invariants of Lightning Self-Attentioncited by 1
- 2023Hybrid Focal and Full-Range Attention Based Graph Transformerscited by 0
- 2024Topological Neural Networks: Mitigating the Bottlenecks of Graph Neural Networks via Higher-Order Interactionscited by 0
- 2024Non-autoregressive Personalized Bundle Generationcited by 0
50 most cited of 55 All 55 (JSON)
- 2026How Many Different Outputs Can a Transformer Generate?21 May 2026
- 2026Algebraic Invariants of Lightning Self-Attention17 Apr 2026
- 2025On the Universality of Transformer Architectures; How Much Attention Is Enough?20 Dec 2025
- 2025DoPE: Denoising Rotary Position Embedding12 Nov 2025
- 2025Vocabulary In-Context Learning in Transformers: Benefits of Positional Encoding9 Nov 2025
- 2025Transformers through the lens of support-preserving maps between measures30 Sep 2025
- 2025Deep Learning Empowered Super-Resolution: A Comprehensive Survey and Future Prospects19 Sep 2025
- 2025Data Uniformity Improves Training Efficiency and More, with a Convergence Framework Beyond the NTK Regime30 Jun 2025
- 2025A unified framework for establishing the universal approximation of transformer-type architectures30 Jun 2025
- 2025On the Existence of Universal Simulators of Attention23 Jun 2025
- 2025Sample Complexity and Representation Ability of Test-time Scaling Paradigms5 Jun 2025
- 2025Transformers Can Overcome the Curse of Dimensionality: A Theoretical Study from an Approximation Perspective18 Apr 2025
38 more
- 2025Plain Transformers Can be Powerful Graph Learners17 Apr 2025
- 2025Can Classic GNNs Be Strong Baselines for Graph-level Tasks? Simple Architectures Meet Excellence13 Feb 2025
- 2025Understanding Multimodal LLMs Under Distribution Shifts: An Information-Theoretic Approach1 Feb 2025
- 2024Bridging Geometric States via Geometric Diffusion Bridge31 Oct 2024
- 2024Generalizable autoregressive modeling of time series through functional narratives10 Oct 2024
- 2024DAPE V2: Process Attention Score as Feature Map for Length Extrapolation7 Oct 2024
- 2024Sampling Foundational Transformer: A Theoretical Perspective11 Aug 2024
- 2024Transformers are Universal In-context Learners2 Aug 2024
- 2024Let the Code LLM Edit Itself When You Edit the Code3 Jul 2024
- 2024GeoMFormer: A General Architecture for Geometric Molecular Representation Learning24 Jun 2024
- 2024How Out-of-Distribution Detection Learning Theory Enhances Transformer: Learnability and Reliability13 Jun 2024
- 2024Non-autoregressive Personalized Bundle Generation11 Jun 2024
- 2024A Structure-Aware Lane Graph Transformer Model for Vehicle Trajectory Prediction30 May 2024
- 2024Rethinking Transformers in Solving POMDPs27 May 2024
- 2024CKGConv: General Graph Convolution with Continuous Kernels21 Apr 2024
- 2024Transformers are Expressive, But Are They Expressive Enough for Regression?23 Feb 2024
- 2024Subgraphormer: Unifying Subgraph GNNs and Graph Transformers via Graph Products13 Feb 2024
- 2024Topological Neural Networks: Mitigating the Bottlenecks of Graph Neural Networks via Higher-Order Interactions10 Feb 2024
- 2024StableMask: Refining Causal Masking in Decoder-only Transformer7 Feb 2024
- 2024Beyond Weisfeiler-Lehman: A Quantitative Framework for GNN Expressiveness16 Jan 2024
- 2023The Falcon Series of Open Language Models28 Nov 2023
- 2023Never Lost in the Middle: Mastering Long-Context Question Answering with Position-Agnostic Decompositional Training15 Nov 2023
- 2023Hybrid Focal and Full-Range Attention Based Graph Transformers8 Nov 2023
- 2023TorchDEQ: A Library for Deep Equilibrium Models28 Oct 2023
- 2023Parrot Mind: Towards Explaining the Complex Task Reasoning of Pretrained Large Language Models with Template-Content Structure9 Oct 2023
- 2023The Languini Kitchen: Enabling Language Modelling Research at Different Scales of Compute20 Sep 2023
- 2023Optimizing a Transformer-based network for a deep learning seismic processing workflow9 Aug 2023
- 2023Are Transformers with One Layer Self-Attention Using Low-Rank Weight Matrices Universal Approximators?26 Jul 2023
- 2023Positional Embedding-Aware Activations27 Jun 2023
- 2023CIN++: Enhancing Topological Message Passing6 Jun 2023
- 2023Memorization Capacity of Multi-Head Attention in Transformers3 Jun 2023
- 2023Monotonic Location Attention for Length Generalization31 May 2023
- 2023Approximation Rate of the Transformer Architecture for Sequence Modeling29 May 2023
- 2023Graph Inductive Biases in Transformers without Message Passing27 May 2023
- 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective24 May 2023
- 2023Model-Generated Pretraining Signals Improves Zero-Shot Generalization of Text-to-Text Transformers21 May 2023
- 2023Highly Accurate Quantum Chemical Property Prediction with Uni-Mol+16 Mar 2023
- 2023A Complete Expressiveness Hierarchy for Subgraph GNNs via Subgraph Weisfeiler-Lehman Tests14 Feb 2023
50 newest of 55 All 55 (JSON)
- 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspectivecited by 293
- 2025Sample Complexity and Representation Ability of Test-time Scaling Paradigmscited by 12
- 2023Parrot Mind: Towards Explaining the Complex Task Reasoning of Pretrained Large Language Models with Template-Content Structurecited by 3
- 2025Sample Complexity and Representation Ability of Test-time Scaling Paradigms5 Jun 2025
- 2023Parrot Mind: Towards Explaining the Complex Task Reasoning of Pretrained Large Language Models with Template-Content Structure9 Oct 2023
- 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective24 May 2023
- 2024Let the Code LLM Edit Itself When You Edit the Codecited by 8
- 2024Let the Code LLM Edit Itself When You Edit the Code3 Jul 2024
- 2023The Falcon Series of Open Language Modelscited by 526
- 2023Graph Inductive Biases in Transformers without Message Passingcited by 150
- 2023Rethinking the Expressive Power of GNNs via Graph Biconnectivitycited by 119
- 2023Attending to Graph Transformerscited by 81
- 2022One Transformer Can Understand Both 2D & 3D Molecular Datacited by 77
- 2023A Complete Expressiveness Hierarchy for Subgraph GNNs via Subgraph Weisfeiler-Lehman Testscited by 64
- 2023Are Transformers with One Layer Self-Attention Using Low-Rank Weight Matrices Universal Approximators?cited by 46
- 2024Transformers are Universal In-context Learnerscited by 42
- 2023Memorization Capacity of Multi-Head Attention in Transformerscited by 39
- 2024Beyond Weisfeiler-Lehman: A Quantitative Framework for GNN Expressivenesscited by 38
- 2023Never Lost in the Middle: Mastering Long-Context Question Answering with Position-Agnostic Decompositional Trainingcited by 31
- 2023Approximation Rate of the Transformer Architecture for Sequence Modelingcited by 28
12 most cited of 50 All 50 (JSON)
- 2026How Many Different Outputs Can a Transformer Generate?21 May 2026
- 2026Algebraic Invariants of Lightning Self-Attention17 Apr 2026
- 2025On the Universality of Transformer Architectures; How Much Attention Is Enough?20 Dec 2025
- 2025DoPE: Denoising Rotary Position Embedding12 Nov 2025
- 2025Vocabulary In-Context Learning in Transformers: Benefits of Positional Encoding9 Nov 2025
- 2025Transformers through the lens of support-preserving maps between measures30 Sep 2025
- 2025Deep Learning Empowered Super-Resolution: A Comprehensive Survey and Future Prospects19 Sep 2025
- 2025Data Uniformity Improves Training Efficiency and More, with a Convergence Framework Beyond the NTK Regime30 Jun 2025
- 2025A unified framework for establishing the universal approximation of transformer-type architectures30 Jun 2025
- 2025On the Existence of Universal Simulators of Attention23 Jun 2025
- 2025Transformers Can Overcome the Curse of Dimensionality: A Theoretical Study from an Approximation Perspective18 Apr 2025
- 2025Plain Transformers Can be Powerful Graph Learners17 Apr 2025
12 newest of 50 All 50 (JSON)