English
Related papers

Related papers: LevAttention: Time, Space, and Streaming Efficient…

200 papers

In modern machine learning, inner product attention computation is a fundamental task for training large language models such as Transformer, GPT-1, BERT, GPT-2, GPT-3 and ChatGPT. Formally, in this problem, one is given as input three…

Machine Learning · Computer Science 2023-05-11 Josh Alman , Zhao Song

The self-attention mechanism is the key to the success of transformers in recent Large Language Models (LLMs). However, the quadratic computational cost $O(n^2)$ in the input sequence length $n$ is a notorious obstacle for further…

Machine Learning · Computer Science 2024-10-17 Yingyu Liang , Heshan Liu , Zhenmei Shi , Zhao Song , Zhuoyan Xu , Junze Yin

In the classical transformer attention scheme, we are given three $n \times d$ size matrices $Q, K, V$ (the query, key, and value tokens), and the goal is to compute a new $n \times d$ size matrix $D^{-1} \exp(QK^\top) V$ where $D =…

Data Structures and Algorithms · Computer Science 2023-10-09 Josh Alman , Zhao Song

Large language models (LLMs) have played a pivotal role in revolutionizing various facets of our daily existence. Solving attention regression is a fundamental task in optimizing LLMs. In this work, we focus on giving a provable guarantee…

Data Structures and Algorithms · Computer Science 2023-09-15 Yeqi Gao , Zhao Song , Weixin Wang , Junze Yin

Given the query, key and value matrices $Q, K, V\in \mathbb{R}^{n\times d}$, the attention module is defined as $\mathrm{Att}(Q, K, V)=D^{-1}AV$ where $A=\exp(QK^\top/\sqrt{d})$ with $\exp(\cdot)$ applied entrywise, $D=\mathrm{diag}(A{\bf…

Quantum Physics · Physics 2026-02-03 Zhao Song , Jianfei Xue , Jiahao Zhang , Lichen Zhang

We describe an efficient hierarchical method to compute attention in the Transformer architecture. The proposed attention mechanism exploits a matrix structure similar to the Hierarchical Matrix (H-Matrix) developed by the numerical…

Machine Learning · Computer Science 2021-07-27 Zhenhai Zhu , Radu Soricut

Large language models (LLMs) have made fundamental changes in human life. The attention scheme is one of the key components over all the LLMs, such as BERT, GPT-1, Transformers, GPT-2, 3, 3.5 and 4. Inspired by previous theoretical study of…

Data Structures and Algorithms · Computer Science 2023-04-06 Jan van den Brand , Zhao Song , Tianyi Zhou

The transformer has revolutionized modern AI across language, vision, and beyond. It consists of $L$ layers, each running $H$ attention heads in parallel and feeding the combined output to the subsequent layer. In attention, the input…

Computational Complexity · Computer Science 2026-03-13 Barna Saha , Yinzhan Xu , Christopher Ye , Hantao Yu

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,…

Machine Learning · Computer Science 2020-06-16 Sinong Wang , Belinda Z. Li , Madian Khabsa , Han Fang , Hao Ma

The attention mechanism is an important reason for the success of transformers. It relies on computing pairwise relations between tokens. To reduce the high computational cost of standard quadratic attention, linear attention has been…

Artificial Intelligence · Computer Science 2026-02-13 Hanno Ackermann , Hong Cai , Mohsen Ghafoorian , Amirhossein Habibian

Transformers have been successfully used in various fields and are becoming the standard tools in computer vision. However, self-attention, a core component of transformers, has a quadratic complexity problem, which limits the use of…

Computer Vision and Pattern Recognition · Computer Science 2022-06-02 Jiuk Hong , Chaehyeon Lee , Soyoun Bang , Heechul Jung

Motivated by the factorization inherent in the original fast multipole method and the improved fast Gauss transform we introduce a factorable form of attention that operates efficiently in high dimensions. This approach reduces the…

Machine Learning · Computer Science 2024-02-13 Armin Gerami , Monte Hoover , Pranav S. Dulepet , Ramani Duraiswami

Attention computation takes both the time complexity of $O(n^2)$ and the space complexity of $O(n^2)$ simultaneously, which makes deploying Large Language Models (LLMs) in streaming applications that involve long contexts requiring…

Machine Learning · Computer Science 2024-02-06 Raghav Addanki , Chenyang Li , Zhao Song , Chiwun Yang

A recently discovered universal rank-based matrix method to extract trends from noisy time series is described in [1] but the formula for the output matrix elements, implemented there as an open-access supplement MATLAB computer code, is…

Data Analysis, Statistics and Probability · Physics 2020-06-24 D. J. Kestner , G. R. Ierley , A. B. Kostinski

The self-attention mechanism, at the heart of the Transformer model, is able to effectively model pairwise interactions between tokens. However, numerous recent works have shown that it is unable to perform basic tasks involving detecting…

Machine Learning · Computer Science 2026-02-03 Sayak Chakrabarti , Toniann Pitassi , Josh Alman

State-of-the-art transformer models use pairwise dot-product based self-attention, which comes at a computational cost quadratic in the input sequence length. In this paper, we investigate the global structure of attention scores computed…

Machine Learning · Computer Science 2021-06-17 Srinadh Bhojanapalli , Ayan Chakrabarti , Himanshu Jain , Sanjiv Kumar , Michal Lukasik , Andreas Veit

Transformers are state-of-the-art models for a variety of sequence modeling tasks. At their core is an attention function which models pairwise interactions between the inputs at every timestep. While attention is powerful, it does not…

Computation and Language · Computer Science 2021-03-23 Hao Peng , Nikolaos Pappas , Dani Yogatama , Roy Schwartz , Noah A. Smith , Lingpeng Kong

Neural networks using transformer-based architectures have recently demonstrated great power and flexibility in modeling sequences of many types. One of the core components of transformer networks is the attention layer, which allows…

Machine Learning · Computer Science 2019-07-16 Matthew Spellings

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

Attention matrices are fundamental to transformer research, supporting a broad range of applications including interpretability, visualization, manipulation, and distillation. Yet, most existing analyses focus on individual attention heads…

Machine Learning · Computer Science 2026-01-27 Ido Andrew Atad , Itamar Zimerman , Shahar Katz , Lior Wolf
‹ Prev 1 2 3 10 Next ›