FNet: Mixing Tokens with Fourier Transforms

By James Lee-Thorp, J. Ainslie, Ilya Eckstein, Santiago Ontañón. 2021

751 citations recorded by the source corpus.

We show that Transformer encoder architectures can be sped up, with limited accuracy costs, by replacing the self-attention sublayers with simple linear transformations that “mix” input tokens. Most surprisingly, we find that replacing the self-attention sublayer in a Transformer encoder with a standard, unparameterized Fourier Transform achieves 92-97% of the accuracy of BERT counterparts on the GLUE benchmark, but trains 80% faster on GPUs and 70% faster on TPUs at standard 512 input lengths. At longer input lengths, our FNet model is significantly faster: when compared to the “efficient Transformers” on the Long Range Arena benchmark, FNet matches the accuracy of the most accurate models, while outpacing the fastest models across all sequence lengths on GPUs (and across relatively shorter lengths on TPUs). Finally, FNet has a light memory footprint and is particularly efficient at smaller model sizes; for a fixed speed and accuracy budget, small FNet models outperform Transformer counterparts.

Subfields: Artificial Intelligence, Natural Language Processing, Model Architectures, Signal Processing

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. Quoc V. Le
  2. Jiashi Feng
  3. Jianfeng Gao
  4. Mohit Bansal
  5. Yoshua Bengio
  6. Trevor Darrell
  7. Dacheng Tao
  8. Luke S. Zettlemoyer

In Natural Language Processing

  1. Armand Joulin
  2. Luke S. Zettlemoyer
  3. Graham Neubig
  4. Yi Tay
  5. Gabriel Synnaeve
  6. Herv'e J'egou
  7. Hinrich Schütze
  8. Mostafa Dehghani

In Model Architectures

  1. Mostafa Dehghani
  2. Xinchao Wang
  3. Yi Tay
  4. Jiashi Feng
  5. Shuicheng Yan
  6. Weihao Yu
  7. Herv'e J'egou
  8. Donald Metzler

In Signal Processing

  1. Qiang Xu
  2. Ailing Zeng
  3. Armand Joulin
  4. Jiwen Lu
  5. Jie Zhou
  6. Doyen Sahoo
  7. Zhijian Xu
  8. Caglar Gulcehre

Citations in the corpus