Are Transformers universal approximators of sequence-to-sequence functions?

By Chulhee Yun, Srinadh Bhojanapalli, Ankit Singh Rawat, Sashank J. Reddi, Sanjiv Kumar. 2019

533 citations recorded by the source corpus.

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 architectures that can compute contextual mappings and empirically evaluate them.

Subfields: Artificial Intelligence, Information Systems, Scaling & Learning Theory

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Percy Liang
  2. Tengyu Ma
  3. Mohit Bansal
  4. Quoc V. Le
  5. Ruslan Salakhutdinov
  6. Luke S. Zettlemoyer
  7. Jianfeng Gao
  8. William W. Cohen

In Information Systems

  1. Jacob Andreas
  2. Dimitris Papailiopoulos
  3. Denny Zhou
  4. Julian Martin Eisenschlos
  5. Di He
  6. Amr Ahmed
  7. Percy Liang
  8. Sanjiv Kumar

In Scaling & Learning Theory

  1. Tengyu Ma
  2. Jason D. Lee
  3. Percy Liang
  4. Yoav Levine
  5. Dale Schuurmans
  6. Dimitris Papailiopoulos
  7. Srinadh Bhojanapalli
  8. Gregory Valiant

Citations in the corpus