Linformer: Self-Attention with Linear Complexity

By Sinong Wang, Belinda Z. Li, Madian Khabsa, Han Fang, Hao Ma. 2020

2,339 citations recorded by the source corpus.

Large transformer models have shown extraordinary success in achieving state-of-the-art results in many natural language processing applications. However, training and deploying these models can be prohibitively costly for long sequences, as the standard self-attention mechanism of the Transformer uses $O(n^2)$ time and space with respect to sequence length. In this paper, we demonstrate that the self-attention mechanism can be approximated by a low-rank matrix. We further exploit this finding to propose a new self-attention mechanism, which reduces the overall self-attention complexity from $O(n^2)$ to $O(n)$ in both time and space. The resulting linear transformer, the \textit{Linformer}, performs on par with standard Transformer models, while being much more memory- and time-efficient.

Subfields: Artificial Intelligence, Model Architectures, Efficiency & Compression

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

In Model Architectures

  1. Quoc V. Le
  2. Jianfeng Gao
  3. Yoshua Bengio
  4. Alan L. Yuille
  5. Christoph Feichtenhofer
  6. Jianwei Yang
  7. Luc Van Gool
  8. Xiaogang Wang

In Efficiency & Compression

  1. Song Han
  2. Kurt Keutzer
  3. Quoc V. Le
  4. Mohammad Rastegari
  5. Chuang Gan
  6. Tijmen Blankevoort
  7. Zi-Mei Yao
  8. A. Gholami

Citations in the corpus