2021/02/07 by Yunyang Xiong, Xiong, Yunyang, Zhanpeng Zeng +12 · 1 voice · 72 citations
Computer Science · Engineering · Mathematics · #Algorithm #Benchmark (surveying) #Code (set theory) #Computer science #Ferroelectric and Negative Capacitance Devices #Mathematics #Natural Language Processing Techniques #Quadratic equation #Range (aeronautics) #Scalability #Security token #Sequence (biology) #Topic Modeling #cs.CL #cs.LG
paper · pdf · doi:10.48550/arxiv.2102.03902
published in arXiv (Cornell University) (Cornell University) · AAAI 2021; Code and supplement available at https://github.com/mlpen/Nystromformer
openalex publication_date 2021/02/07 · openalex created_date 2021/02/15 · arxiv created 2021/03/31 · arxiv updated 2021/04/02 · openalex updated_date 2026/07/28
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.