English
Related papers

Related papers: Sublinear Time Quantum Algorithm for Attention App…

200 papers

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

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

Dot-product attention mechanism plays a crucial role in modern deep architectures (e.g., Transformer) for sequence modeling, however, na\"ive exact computation of this model incurs quadratic time and memory complexities in sequence length,…

Machine Learning · Computer Science 2023-06-30 Amir Zandieh , Insu Han , Majid Daliri , Amin Karbasi

The Transformer model architecture has become one of the most widely used in deep learning and the attention mechanism is at its core. The standard attention formulation uses a softmax operation applied to a scaled dot product between query…

Machine Learning · Computer Science 2026-04-02 Hariprasath Govindarajan , Per Sidén , Jacob Roll , Fredrik Lindsten

The attention interaction matrix $QK^{\top}$ contains two entangled computations: a skew-symmetric component that redistributes information between positions (routing) and a symmetric component that scales mutual relevance (filtering). We…

Machine Learning · Computer Science 2026-05-20 Shafayeth Jamil , Rehan Kapadia

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

Quantum machine learning is one of the most promising applications of a full-scale quantum computer. Over the past few years, many quantum machine learning algorithms have been proposed that can potentially offer considerable speedups over…

Quantum Physics · Physics 2021-06-14 Iordanis Kerenidis , Jonas Landman , Alessandro Luongo , Anupam Prakash

We give a quantum approximation scheme (i.e., $(1 + \varepsilon)$-approximation for every $\varepsilon > 0$) for the classical $k$-means clustering problem in the QRAM model with a running time that has only polylogarithmic dependence on…

Quantum Physics · Physics 2025-05-27 Ragesh Jaiswal

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

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

We propose a variational quantum implementation of self-attention (QSA), the core operation in transformers and large language models, which predicts future elements of a sequence by forming overlap-weighted combinations of past data. At…

Quantum Physics · Physics 2026-02-09 Alessio Pecilli , Matteo Rosati

Sequence-to-sequence (encoder-decoder) models with attention constitute a cornerstone of deep learning research, as they have enabled unprecedented sequential data modeling capabilities. This effectiveness largely stems from the capacity of…

Artificial Intelligence · Computer Science 2018-10-31 Aristotelis Charalampous , Sotirios Chatzis

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

Transformers have been proven a successful model for a variety of tasks in sequence modeling. However, computing the attention matrix, which is their key component, has quadratic complexity with respect to the sequence length, thus making…

Machine Learning · Computer Science 2020-10-01 Apoorv Vyas , Angelos Katharopoulos , François Fleuret

At the core of the Transformer, the softmax normalizes the attention matrix to be right stochastic. Previous research has shown that this often de-stabilizes training and that enforcing the attention matrix to be doubly stochastic (through…

Machine Learning · Computer Science 2025-11-11 Jannis Born , Filip Skogh , Kahn Rhrissorrakrai , Filippo Utro , Nico Wagner , Aleksandros Sobczyk

Submodular functions are set functions mapping every subset of some ground set of size $n$ into the real numbers and satisfying the diminishing returns property. Submodular minimization is an important field in discrete optimization theory…

Data Structures and Algorithms · Computer Science 2020-01-16 Yassine Hamoudi , Patrick Rebentrost , Ansis Rosmanis , Miklos Santha

Transformer networks are able to capture patterns in data coming from many domains (text, images, videos, proteins, etc.) with little or no change to architecture components. We perform a theoretical analysis of the core component…

Machine Learning · Computer Science 2021-06-09 Valerii Likhosherstov , Krzysztof Choromanski , Adrian Weller

Transformers have shown superior performance on various vision tasks. Their large receptive field endows Transformer models with higher representation power than their CNN counterparts. Nevertheless, simply enlarging the receptive field…

Computer Vision and Pattern Recognition · Computer Science 2023-09-06 Zhuofan Xia , Xuran Pan , Shiji Song , Li Erran Li , Gao Huang

Transformer architectures are now central to sequence modeling tasks. At its heart is the attention mechanism, which enables effective modeling of long-term dependencies in a sequence. Recently, transformers have been successfully applied…

Computer Vision and Pattern Recognition · Computer Science 2022-06-16 Lin Zheng , Huijie Pan , Lingpeng Kong

Attention mechanisms underpin modern deep learning, while the quadratic time and space complexity limit scalability for long sequences. To address this, Quantum Annealing Multi-Head Attention (QAMA) is proposed, a novel drop-in operator…

Quantum Physics · Physics 2025-10-14 Peng Du , Jinjing Shi , Wenxuan Wang , Yin Ma , Kai Wen , Xuelong Li