$O(n)$ Connections are Expressive Enough: Universal Approximability of Sparse Transformers

By Chulhee Yun, Yin-Wen Chang, Srinadh Bhojanapalli, Ankit Singh Rawat, Sashank J. Reddi, Sanjiv Kumar. 2020

108 citations recorded by the source corpus.

Transformer networks use pairwise attention to compute contextual embeddings of inputs, and have redefined the state of the art in many NLP tasks. However, these models suffer from quadratic computational cost in the input sequence length $n$ to compute attention in each layer. This has prompted recent research into faster attention models, with a predominant approach involving sparsifying the connections in the attention layers. While empirically promising for long sequences, fundamental questions remain unanswered: Can sparse transformers approximate any arbitrary sequence-to-sequence function, similar to their dense counterparts? How does the sparsity pattern and the sparsity level affect their performance? In this paper, we address these questions and provide a unifying framework that captures existing sparse attention models. Our analysis proposes sufficient conditions under which we prove that a sparse attention model can universally approximate any sequence-to-sequence function. Surprisingly, our results show the existence of models with only $O(n)$ connections per attention layer that can approximate the same function class as the dense model with $n^2$ connections. Lastly, we present experiments comparing different patterns/levels of sparsity on standard NLP tasks.

Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition, Model Architectures

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. Yi Tay
  2. Mostafa Dehghani
  3. Donald Metzler
  4. Dara Bahri
  5. J. Ainslie
  6. William W. Cohen
  7. Dacheng Tao
  8. Ruslan Salakhutdinov

In Computer Vision and Pattern Recognition

  1. Dacheng Tao
  2. Yunhe Wang
  3. Kai Han
  4. Luc Van Gool
  5. Yi Tay
  6. Jianyuan Guo
  7. Mostafa Dehghani
  8. Chunjing Xu

In Model Architectures

  1. Yi Tay
  2. Mostafa Dehghani
  3. Donald Metzler
  4. J. Ainslie
  5. Dara Bahri
  6. Santiago Ontañón
  7. Yunhe Wang
  8. Kai Han

Citations in the corpus