2019/12/20 by Chulhee Yun, Yun, Chulhee, Srinadh Bhojanapalli +7 · 1 voice · 41 citations
Computer Science · #Fuzzy Logic and Control Systems #Natural Language Processing Techniques #Neural Networks and Applications #Software Engineering Research #Speech Recognition and Synthesis #Topic Modeling #cs.LG #stat.ML
paper · pdf · doi:10.48550/arxiv.1912.10077
openalex publication_date 2019/12/20 · openalex created_date 2019/12/26 · openalex updated_date 2026/07/28
Despite the widespread adoption of Transformer models for NLP tasks, the expressive power of these models is not well-understood. In this paper, we establish that Transformer models are universal approximators of continuous permutation equivariant sequence-to-sequence functions with compact support, which is quite surprising given the amount of shared parameters in these models. Furthermore, using positional encodings, we circumvent the restriction of permutation equivariance, and show that Transformer models can universally approximate arbitrary continuous sequence-to-sequence functions on a compact domain. Interestingly, our proof techniques clearly highlight the different roles of the self-attention and the feed-forward layers in Transformers. In particular, we prove that fixed width self-attention layers can compute contextual mappings of the input sequences, playing a key role in the universal approximation property of Transformers. Based on this insight from our analysis, we consider other simpler alternatives to self-attention layers and empirically evaluate them.