English
Related papers

Related papers: Linformer: Self-Attention with Linear Complexity

200 papers

We present a very simple algorithm for attention that requires $O(1)$ memory with respect to sequence length and an extension to self-attention that requires $O(\log n)$ memory. This is in contrast with the frequently stated belief that…

Machine Learning · Computer Science 2022-10-11 Markus N. Rabe , Charles Staats

Since their introduction the Trasformer architectures emerged as the dominating architectures for both natural language processing and, more recently, computer vision applications. An intrinsic limitation of this family of "fully-attentive"…

Machine Learning · Computer Science 2023-03-16 Carmelo Scribano , Giorgia Franchini , Marco Prato , Marko Bertogna

The key to a Transformer model is the self-attention mechanism, which allows the model to analyze an entire sequence in a computationally efficient manner. Recent work has suggested the possibility that general attention mechanisms used by…

Machine Learning · Computer Science 2020-01-01 Thomas Dowdell , Hongyu Zhang

Transformer is a powerful tool for many natural language tasks which is based on self-attention, a mechanism that encodes the dependence of other tokens on each specific token, but the computation of self-attention is a bottleneck due to…

Machine Learning · Computer Science 2021-03-11 Madhusudan Verma

In pursuit of faster computation, Efficient Transformers demonstrate an impressive variety of approaches -- models attaining sub-quadratic attention complexity can utilize a notion of sparsity or a low-rank approximation of inputs to reduce…

Machine Learning · Computer Science 2022-11-09 Uladzislau Yorsh , Alexander Kovalenko

Transformer-based large language models (LLMs) excel in modeling complex language patterns but face significant computational costs during inference, especially with long inputs due to the attention mechanism's memory overhead. We observe…

Computation and Language · Computer Science 2024-10-18 Ruiqing Yan , Linghan Zheng , Xingbo Du , Han Zou , Yufeng Guo , Jianfei Yang

Transformer-based models are widely used in natural language processing (NLP). Central to the transformer model is the self-attention mechanism, which captures the interactions of token pairs in the input sequences and depends quadratically…

Machine Learning · Computer Science 2021-11-19 Zhanpeng Zeng , Yunyang Xiong , Sathya N. Ravi , Shailesh Acharya , Glenn Fung , Vikas Singh

Transformer models have achieved remarkable success in sequential recommender systems (SRSs). However, computing the attention matrix in traditional dot-product attention mechanisms results in a quadratic complexity with sequence lengths,…

Information Retrieval · Computer Science 2024-11-05 Langming Liu , Xiangyu Zhao , Chi Zhang , Jingtong Gao , Wanyu Wang , Wenqi Fan , Yiqi Wang , Ming He , Zitao Liu , Qing Li

Latest development of neural models has connected the encoder and decoder through a self-attention mechanism. In particular, Transformer, which is solely based on self-attention, has led to breakthroughs in Natural Language Processing (NLP)…

Computation and Language · Computer Science 2019-11-07 Xindian Ma , Peng Zhang , Shuai Zhang , Nan Duan , Yuexian Hou , Dawei Song , Ming Zhou

Transformer-based models have emerged as one of the most widely used architectures for natural language processing, natural language generation, and image generation. The size of the state-of-the-art models has increased steadily reaching…

Hardware Architecture · Computer Science 2025-01-15 Rya Sanovar , Srikant Bharadwaj , Renee St. Amant , Victor Rühle , Saravan Rajmohan

Transformers provide a class of expressive architectures that are extremely effective for sequence modeling. However, the key limitation of transformers is their quadratic memory and time complexity $\mathcal{O}(L^2)$ with respect to the…

Machine Learning · Computer Science 2021-10-29 Hongyu Ren , Hanjun Dai , Zihang Dai , Mengjiao Yang , Jure Leskovec , Dale Schuurmans , Bo Dai

Transformer models cannot easily scale to long sequences due to their O(N^2) time and space complexity. This has led to Transformer variants seeking to lower computational complexity, such as Longformer and Performer. While such models have…

Computation and Language · Computer Science 2024-12-10 Guanghui Qin , Yukun Feng , Benjamin Van Durme

In recent years, self-attention has become the dominant paradigm for sequence modeling in a variety of domains. However, in domains with very long sequence lengths the $\mathcal{O}(T^2)$ memory and $\mathcal{O}(T^2 H)$ compute costs can…

Machine Learning · Computer Science 2023-06-01 Mohammad Mahmudul Alam , Edward Raff , Stella Biderman , Tim Oates , James Holt

The multi-head self-attention of popular transformer models is widely used within Natural Language Processing (NLP), including for the task of extractive summarization. With the goal of analyzing and pruning the parameter-heavy…

Computation and Language · Computer Science 2020-12-04 Wen Xiao , Patrick Huber , Giuseppe Carenini

While the Self-Attention mechanism in the Transformer model has proven to be effective in many domains, we observe that it is less effective in more diverse settings (e.g. multimodality) due to the varying granularity of each token and the…

Computer Vision and Pattern Recognition · Computer Science 2024-06-06 Wayner Barrios , SouYoung Jin

Transformer-based deep learning models have achieved state-of-the-art performance across numerous language and vision tasks. While the self-attention mechanism, a core component of transformers, has proven capable of handling complex data…

Machine Learning · Computer Science 2025-08-05 Laziz Abdullaev , Tan M. Nguyen

Transformer-based models are popularly used in natural language processing (NLP). Its core component, self-attention, has aroused widespread interest. To understand the self-attention mechanism, a direct method is to visualize the attention…

Machine Learning · Computer Science 2021-07-02 Han Shi , Jiahui Gao , Xiaozhe Ren , Hang Xu , Xiaodan Liang , Zhenguo Li , James T. Kwok

In-context learning is a remarkable property of transformers and has been the focus of recent research. An attention mechanism is a key component in transformers, in which an attention matrix encodes relationships between words in a…

Machine Learning · Computer Science 2025-04-01 Katsuyuki Hagiwara

Standard inference and training with transformer based architectures scale quadratically with input sequence length. This is prohibitively large for a variety of applications especially in web-page translation, query-answering etc.…

Computation and Language · Computer Science 2023-03-20 Lovish Madaan , Srinadh Bhojanapalli , Himanshu Jain , Prateek Jain

The computational complexity of the self-attention mechanism in popular transformer architectures poses significant challenges for training and inference, and becomes the bottleneck for long inputs. Is it possible to significantly reduce…

Machine Learning · Computer Science 2024-10-16 Yingyu Liang , Zhizhou Sha , Zhenmei Shi , Zhao Song , Yufa Zhou