An Attention Free Transformer

By Shuangfei Zhai, Walter A. Talbott, Nitish Srivastava, Chen Huang, Hanlin Goh, Ruixiang Zhang, J. Susskind. 2021

186 citations recorded by the source corpus.

We introduce Attention Free Transformer (AFT), an efficient variant of Transformers that eliminates the need for dot product self attention. In an AFT layer, the key and value are first combined with a set of learned position biases, the result of which is multiplied with the query in an element-wise fashion. This new operation has a memory complexity linear w.r.t. both the context size and the dimension of features, making it compatible to both large input and model sizes. We also introduce AFT-local and AFT-conv, two model variants that take advantage of the idea of locality and spatial weight sharing while maintaining global connectivity. We conduct extensive experiments on two autoregressive modeling tasks (CIFAR10 and Enwik8) as well as an image recognition task (ImageNet-1K classification). We show that AFT demonstrates competitive performance on all the benchmarks, while providing excellent efficiency at the same time.

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. Christopher R'e
  2. Stefano Ermon
  3. Ji-rong Wen
  4. Wayne Xin Zhao
  5. Tri Dao
  6. Atri Rudra
  7. Yoshua Bengio
  8. Sergey Levine

In Computer Vision and Pattern Recognition

  1. Luc Van Gool
  2. Ming-Hsuan Yang
  3. Stefano Ermon
  4. Xiaogang Wang
  5. Dacheng Tao
  6. Jitendra Malik
  7. Christopher R'e
  8. Oncel Tuzel

In Model Architectures

  1. Tri Dao
  2. Christopher R'e
  3. Stefano Ermon
  4. Atri Rudra
  5. Daniel Y. Fu
  6. Ji-rong Wen
  7. Wayne Xin Zhao
  8. Stella Biderman

Citations in the corpus