Nyströmformer: A Nystöm-based Algorithm for Approximating Self-Attention

By Yunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan, Glenn Moo Fung, Yin Li, Vikas Singh. 2021

733 citations recorded by the source corpus.

Transformers have emerged as a powerful tool for a broad range of natural language processing tasks. A key component that drives the impressive performance of Transformers is the self-attention mechanism that encodes the influence or dependence of other tokens on each specific token. While beneficial, the quadratic complexity of self-attention on the input sequence length has limited its application to longer sequences – a topic being actively studied in the community. To address this limitation, we propose Nyströmformer – a model that exhibits favorable scalability as a function of sequence length. Our idea is based on adapting the Nyström method to approximate standard self-attention with O(n) complexity. The scalability of Nyströmformer enables application to longer sequences with thousands of tokens. We perform evaluations on multiple downstream tasks on the GLUE benchmark and IMDB reviews with standard sequence length, and find that our Nyströmformer performs comparably, or in a few cases, even slightly better, than standard self-attention. On longer sequence tasks in the Long Range Arena (LRA) benchmark, Nyströmformer performs favorably relative to other efficient self-attention methods. Our code is available at https://github.com/mlpen/Nystromformer.

Subfields: Artificial Intelligence, Electrical and Electronic Engineering, 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. Quoc V. Le
  2. Andrew Zisserman
  3. Mohit Bansal
  4. Jianfeng Gao
  5. Jiashi Feng
  6. Luc Van Gool
  7. Dacheng Tao
  8. Trevor Darrell

In Electrical and Electronic Engineering

  1. Haixu Wu
  2. Liang Sun
  3. Tian Zhou
  4. Mingsheng Long
  5. Jianmin Wang
  6. Xue Wang
  7. Rong Jin
  8. Qingsong Wen

In Model Architectures

  1. Herv'e J'egou
  2. Mostafa Dehghani
  3. Christopher R'e
  4. Fahad Shahbaz Khan
  5. Tri Dao
  6. Yi Tay
  7. Armand Joulin
  8. Quoc V. Le

In Efficiency & Compression

  1. Armand Joulin
  2. Tri Dao
  3. Herv'e J'egou
  4. Gabriel Synnaeve
  5. Zhangyang Wang
  6. Gao Huang
  7. Hugo Touvron
  8. Shiji Song

Citations in the corpus