Sublinear Time Quantum Algorithm for Attention Approximation

arXiv:2602.00874 · quant-ph, cs.DS, cs.LG · Submitted 2026-01-31 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: Quantum Radio. Generated commentary on the latest quantum physics and condensed matter papers.

Kai: I'm Kai.

Mira: And I'm Mira, here with Lev.

Kai: We're looking at the paper: "Sublinear Time Quantum Algorithm for Attention Approximation".

Paper summary: Kai: So we're looking at the paper "Sublinear Time Quantum Algorithm for Attention Approximation" and what it actually claims. They are tackling that quadratic time complexity in the attention module for large language models, which is a huge problem because of how much data these models can process >

Mira: The thesis is that they propose a quantum data structure that approximates any row of the attention module Att(Q, K, V) using only row queries to Q, K and V >

Lev: So they’re not trying to compute the whole matrix Att(Q, K, V) = D minus one A directly but instead focusing on approximating just one of those rows >

Kai: The claim is that their algorithm preprocesses these matrices in big O of epsilon minus one n point zero five s squared point five lambda plus s point one five lambda d plus alpha point zero five d time >

Mira: And the key result they prove is that each row query can be answered in time big O of s squared lambda plus s sub lambda d time >

Lev: This gives them sublinear runtime with respect to n for a single query, which is what they're trying to achieve >

Kai: They achieve this by combining several quantum techniques: a quantum Nyström approximation of the exponential kernel matrix, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V >

Mira: That’s how they build up each component of the attention module: D, A, and V using these specialized quantum approaches >

Lev: The authors provide a formal theorem that gives an end-to-end guarantee on estimating the normalization factor by combining these approximations for D, A, and V >

Kai: That theorem shows the error in Frobenius norm is bounded by something involving epsilon times the inverse of beta times some terms related to n squared and lambda >

Mira: And they also acknowledge that their result gives a Frobenius norm guarantee rather than a spectral norm guarantee and there’s an additive term in the error bound that could be pessimistic >

Lev: So, while it’s sublinear in n for row queries, we have to consider how those approximations translate to actual performance on real quantum hardware >

Conclusion: Kai: So looking at this paper "Sublinear Time Quantum Algorithm for Attention Approximation" and the title itself, it’s about finding a way around the big quadratic cost in transformer attention modules >

Mira: It sounds like they are proposing a quantum data structure that lets you approximate any row of that attention module using just row queries to Q, K and V >

Lev: The implication is that if we can achieve this sublinear time performance for inference settings where only row queries are needed, it could significantly improve the scalability of these models >

Kai: It’s about moving away from the need to compute the entire attention matrix, which is what causes all that quadratic scaling on training and inference >

Mira: And they used quantum techniques like Grover search and multivariate mean estimation to build up approximations for D, A, and V in a way that scales better than classical methods allow >

Lev: From an engineering standpoint, the challenge right now is figuring out how to map this theoretical complexity onto the actual physical constraints of qubits and memory access for this kind of operation >

Zhao Song, Jianfei Xue, Jiahao Zhang, Lichen Zhang

Simons Institute for the Theory of Computing, UC Berkeley · New York University · Massachusetts Institute of Technology

quant-ph, cs.DS, cs.LG

Submitted: 2026-01-31

Updated: 2026-11-23

Comments: ICLR 2026. This version corrects the main theorem: the preprocessing time, the row-query count, and the error bound, whose $λ\sqrt{n}$ term is additive and which needs large row sums and a full-rank Nystrom factor. The product with V now samples rows by squared norms, as the published leverage-score step and its boosting were invalid, and the error proof is completed

License: http://creativecommons.org/licenses/by-nc-sa/4.0/

Importance score: 100/100

The gist: Given the query, key and value matrices Q, K, V ∈ R n×d, the attention module is defined as Att(Q, K, V) = D−1AV where.

Key concepts

Attention Matrix Approximation
The attention matrix is central to transformers but requires $O(n^2)$ time classically. This paper aims to approximate any single row of this matrix efficiently using only queries against the input matrices Q, K, and V without forming the full $n \times n$ matrix.
Quantum Nyström Approximation
This technique is used to approximate the exponential kernel that defines the attention mechanism. It leverages quantum primitives to create a low-rank approximation of this complex kernel matrix, which is crucial for reducing computational complexity during preprocessing.
Row Query Model
Instead of calculating the entire attention matrix, this model focuses on answering only row queries. This is particularly useful in inference settings where only specific output rows are needed, allowing for sublinear time computation relative to the input size $n$.

Terminology

Summary

Given the query, key and value matrices Q, K, V ∈ R n×d, the attention module is defined as Att(Q, K, V) = D−1AV where. p. 0

Where the paper says it

Sublinear Time Quantum Algorithm for Attention Approximation Zhao Song∗ Jianfei Xue† Jiahao Zhang‡ Lichen Zhang§ Abstract Given the query, key and value matrices Q, K, V ∈ R n×d , the attention module is defined as Att(Q, K, V ) = D−1AV where A = exp(QK⊤/ √ d) with exp(·) applied entrywise, D = diag(A1n). The attention module is the backbone of modern transformers and large language models, but explicitly forming the softmax matrix D−1A incurs Ω(n 2 ) time, motivating numerous approximation schemes that reduce runtime to Oe(nd) via sparsity or low-rank factorization.

A = exp(QK⊤/√d) with exp(·) applied entrywise. p. 0
Where the paper says it

Sublinear Time Quantum Algorithm for Attention Approximation Zhao Song∗ Jianfei Xue† Jiahao Zhang‡ Lichen Zhang§ Abstract Given the query, key and value matrices Q, K, V ∈ R n×d , the attention module is defined as Att(Q, K, V ) = D−1AV where A = exp(QK⊤/ √ d) with exp(·) applied entrywise, D = diag(A1n). The attention module is the backbone of modern transformers and large language models, but explicitly forming the softmax matrix D−1A incurs Ω(n 2 ) time, motivating numerous approximation schemes that reduce runtime to Oe(nd) via sparsity or low-rank factorization.

<ref:2602.00874#pg15, the attention module is the backbone of modern transformers and large language models, but explicitly forming the softmax matrix D−1A incurs omega(n 2) time, motivating numerous approximation schemes that reduce runtime to O(nd) via sparsity or low-rank factorization. p. 0
Where the paper says it

Sublinear Time Quantum Algorithm for Attention Approximation Zhao Song∗ Jianfei Xue† Jiahao Zhang‡ Lichen Zhang§ Abstract Given the query, key and value matrices Q, K, V ∈ R n×d , the attention module is defined as Att(Q, K, V ) = D−1AV where A = exp(QK⊤/ √ d) with exp(·) applied entrywise, D = diag(A1n). The attention module is the backbone of modern transformers and large language models, but explicitly forming the softmax matrix D−1A incurs Ω(n 2 ) time, motivating numerous approximation schemes that reduce runtime to Oe(nd) via sparsity or low-rank factorization.

We propose a quantum data structure that approximates any row of Att(Q, K, V) using only row queries to Q, K, V. p. 0
Where the paper says it

The attention module is the backbone of modern transformers and large language models, but explicitly forming the softmax matrix D−1A incurs Ω(n 2 ) time, motivating numerous approximation schemes that reduce runtime to Oe(nd) via sparsity or low-rank factorization. We propose a quantum data structure that approximates any row of Att(Q, K, V ) using only row queries to Q, K, V .

Our algorithm preprocesses these matrices in O(epsilon-1n 0. p. 0
Where the paper says it

We propose a quantum data structure that approximates any row of Att(Q, K, V ) using only row queries to Q, K, V . Our algorithm preprocesses these matrices in Oe ϵ −1n 0.

5s 2.5 lambda + s 1.5 lambda d + alpha 0.5d) time, where epsilon is the target accuracy, s lambda is the lambda-statistical dimension of the exponential kernel defined by Q and K, and alpha measures the row distortion of V that is at most d/srank(V), the stable rank of V. p. 0
Where the paper says it

5 λ d + α 0. 5d time, where ϵ is the target accuracy, sλ is the λ-statistical dimension of the exponential kernel defined by Q and K, and α measures the row distortion of V that is at most d/srank(V ), the stable rank of V .

Each row query can be answered in time O(s 2 lambda + s lambda d) time. p. 0
Where the paper says it

5d time, where ϵ is the target accuracy, sλ is the λ-statistical dimension of the exponential kernel defined by Q and K, and α measures the row distortion of V that is at most d/srank(V ), the stable rank of V . Each row query can be answered in Oe(s 2 λ + sλd) time.

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. p. 0
Where the paper says it

Each row query can be answered in Oe(s 2 λ + sλd) time. To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n.

Our approach relies on a quantum Nyström approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V. p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

This work addresses how to circumvent the omega(nd) lower bound by focusing on partial output, specifically row queries in inference settings where only row queries are needed. p. 1
Where the paper says it

In this setting, we aim to preprocess Q, K, V into a data structure such that, for any index i ∈ [n], the structure can return a vector rei ∈ R d that approximates the i-th row of Att(Q, K, V ). This model circumvents the Ω(nd) lower bound by focusing on partial output.

To our knowledge, this is the first quantum algorithm to implement the row query model in sublinear time. p. 1
Where the paper says it

Given any index i ∈ [n], the data structure returns an approximation to the i-th row of Att(Q, K, V ) in time Oe(s 2 λ + sλd). To our knowledge, this is the first quantum algorithm to implement the row query model in sublinear time.

p. 1
Where the paper says it

Given any index i ∈ [n], the data structure returns an approximation to the i-th row of Att(Q, K, V ) in time Oe(s 2 λ + sλd). To our knowledge, this is the first quantum algorithm to implement the row query model in sublinear time.

Our approach avoids both superlinear preprocessing time or structural assumptions by making no assumptions on Q, K, V. p. 1
Where the paper says it

Prior works either require superlinear preprocessing time or impose structural assumptions [GSYZ23]. Our approach avoids both: it makes no assumptions on Q, K, V , making it broadly applicable in practice.

Moreover, our construction is conceptually simple — it combines quantum techniques such as Grover search [Gro96], Nyström kernel approximation, and quantum multivariate mean estimation to approximate each component of the attention module: D, A, and V. p. 1
Where the paper says it

Our approach avoids both: it makes no assumptions on Q, K, V , making it broadly applicable in practice. Moreover, our construction is conceptually simple — it combines quantum techniques such as Grover search [Gro96], Nystr¨om kernel approximation, and quantum 1We use Oe(·) to suppress polylogarithmic factors in n, d, sλ, and 1/ϵ.

To our knowledge, this is the first quantum algorithm to implement the row query model in sublinear time. The paper provides a formal theorem establishing an end-to-end guarantee on estimating the normalization factor by combining approximations for D, e A, and V. p. 7
Where the paper says it

Algorithm 2 Algorithm for estimating normalization factor. 1: data structure QRowNorm 2: begin members 3: s ∈ N 4: S ∈ (R 2 ) s 5: N ∈ R s×s 6: µe ∈ R s 7: end members 8: 9: procedure Preprocess(Q ∈ R n×d , K ∈ R n×d , λ ∈ (0, ∞), ϵ ∈ (0, 1)) 10: s ← O(sλ log(sλn)) 11: S ← QNystromKernel ¨ (Q ∪ K,(xi , xj ) 7→ exp(⟨xi , xj ⟩), 1/ poly(n), λ) ▷ Algorithm 1, S is a list of sampled indices and weights 12: N ← (S ⊤ES) †/2 13: Implement row oracle (U2)j,∗ as follows: 14: e(U2)j(k),∗ ← Sk · exp(⟨xj+n, xk⟩), ∀k ∈ S ▷ e(U2)j(k),∗ ∈ R s 15: (U2)j,∗ ← Ne(U2)j(k),∗ ▷ S stores pairs of indices and weights, Sk is the weight corresponding to index k, (U2)j,∗ ∈ R s 16: Implement entry oracle for a vector v = 1n ∈ R n 17: µe ← QMatVec(U2, v, ϵ) ▷ µe ∈ R s , Lemma 2.

This result shows that De-1AeVe - Att(Q, K, V) F at most epsilon times (beta times D-1A) times (A F + lambda sqrt n) times |V| F, where beta = 1/(1-(epsilon A + lambda sqrt n) D-1. The preprocessing time scales with n 0. p. 9
Where the paper says it

We pause to make some remarks on Theorem 3. The preprocessing time scales with n 0.

5, achieving a quadratic speedup with respect to n over any classical algorithm. p. 9
Where the paper says it

The preprocessing time scales with n 0. 5 , achieving a quadratic speedup with respect to n over any classical algorithm.

The final runtime specification is O(epsilon-1n 0. p. 8
Where the paper says it

There exists a quantum data structure that preprocesses Q, K, V through only row queries to these matrices and maintains matrices D, e A, e Ve implicitly such that, with probability at least 1 − 1/ poly(n), ∥De−1AeVe − Att(Q, K, V )∥F ≤ ϵ · (β · ∥D−1 ∥) · (∥A∥F + λ √ n) · ∥V ∥F . Moreover, the data structure has the specification • It preprocesses Q, K, V in Oe(ϵ −1n 0.

5s 2.5 lambda + s 1.5 lambda d + alpha 0.5d) + d omega + s omega lambda + epsilon-2s lambda d time for preprocessing and O(s 2 lambda + s lambda d) time for each row query. p. 1
Where the paper says it

To our knowledge, this is the first quantum algorithm to implement the row query model in sublinear time. Prior works either require superlinear preprocessing time or impose structural assumptions [GSYZ23].

The paper also addresses the limitations of the result, noting that the error guarantee is in Frobenius norm rather than spectral norm, and that an additive lambda sqrt n term exists in the error bound which might be pessimistic. p. 9
Where the paper says it

This ensures α ≤ d and becomes smaller if the value matrix V has close to d stable rank. We empirically verify that (1) the assumption on ∥D−1∥ is easy to satisfy with wide range of choices for ϵ, (2) the Frobenius norm of A is only a small constant factor of its spectral norm, (3) the row distortion α = O(1) and (4) the infinity norm of A is only a small constant factor of its spectral norm, implying in practice, the additive λ √ n term is likely to be O(λ).

The empirical verifications suggest that this additive term is likely O(lambda) in practice. p. 9
Where the paper says it

This ensures α ≤ d and becomes smaller if the value matrix V has close to d stable rank. We empirically verify that (1) the assumption on ∥D−1∥ is easy to satisfy with wide range of choices for ϵ, (2) the Frobenius norm of A is only a small constant factor of its spectral norm, (3) the row distortion α = O(1) and (4) the infinity norm of A is only a small constant factor of its spectral norm, implying in practice, the additive λ √ n term is likely to be O(λ).

To achieve a spectral norm guarantee, one would need to strengthen the result to control D-1 and remove the sqrt n factor from the additive term. p. 9
Where the paper says it

This ensures α ≤ d and becomes smaller if the value matrix V has close to d stable rank. We empirically verify that (1) the assumption on ∥D−1∥ is easy to satisfy with wide range of choices for ϵ, (2) the Frobenius norm of A is only a small constant factor of its spectral norm, (3) the row distortion α = O(1) and (4) the infinity norm of A is only a small constant factor of its spectral norm, implying in practice, the additive λ √ n term is likely to be O(λ).

The paper concludes by detailing the quantum algorithm for exponential kernels, estimating the normalization factor using quantum mean estimation, and approximating matrix multiplication via leverage score sampling. p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

The roadmap outlines how these components are combined in Algorithm 3 to yield the final result. p. 8
Where the paper says it

4 Main Result Now that we have described how to approximate each of the matrices D, A, and V , we are in a position to state our main result. We provide an overview of our algorithm below in Algorithm 3.

This is a novel quantum data structure that provides sublinear time approximation for attention row queries in transformer architectures. p. 0
Where the paper says it

The attention module is the backbone of modern transformers and large language models, but explicitly forming the softmax matrix D−1A incurs Ω(n 2 ) time, motivating numerous approximation schemes that reduce runtime to Oe(nd) via sparsity or low-rank factorization. We propose a quantum data structure that approximates any row of Att(Q, K, V ) using only row queries to Q, K, V .

This paper is. p. 2
Where the paper says it

For a matrix A, we use ∥A∥ to denote its spectral norm and ∥A∥∞ to denote its max row ℓ1 norm, and ∥A∥F to denote its Frobenius norm. Throughout the paper, we will also exclusively work with weighted sampling matrices, usually denoted by S ∈ R n×s for where s is the total number of samples taken, let i(j) be the index of the i-th sample, then the i-th column of S is √ 1 pj ej , where pj is the probability of choosing the index j.

<ref:2602.00874#pg15>, the single most informative sentence about the paper's subject and finding with no reference to the paper by its title alone and no reference to your own answer. The gist of this research is presenting a quantum data structure that approximates any row of Att(Q, K, V) using only row queries to Q, K, V. p. 0
Where the paper says it

The attention module is the backbone of modern transformers and large language models, but explicitly forming the softmax matrix D−1A incurs Ω(n 2 ) time, motivating numerous approximation schemes that reduce runtime to Oe(nd) via sparsity or low-rank factorization. We propose a quantum data structure that approximates any row of Att(Q, K, V ) using only row queries to Q, K, V .

This is.<ref:2602.00874#pg15>. The gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

The training signal is built by combining a quantum Nyström approximation of the exponential kernel matrix with leverage score sampling for approximating D,. p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

A, and V. Where the gains come from using quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper details how to approximate D,. p. 2
Where the paper says it

For a matrix A, we use ∥A∥ to denote its spectral norm and ∥A∥∞ to denote its max row ℓ1 norm, and ∥A∥F to denote its Frobenius norm. Throughout the paper, we will also exclusively work with weighted sampling matrices, usually denoted by S ∈ R n×s for where s is the total number of samples taken, let i(j) be the index of the i-th sample, then the i-th column of S is √ 1 pj ej , where pj is the probability of choosing the index j.

p. 2
Where the paper says it

For a matrix A, we use ∥A∥ to denote its spectral norm and ∥A∥∞ to denote its max row ℓ1 norm, and ∥A∥F to denote its Frobenius norm. Throughout the paper, we will also exclusively work with weighted sampling matrices, usually denoted by S ∈ R n×s for where s is the total number of samples taken, let i(j) be the index of the i-th sample, then the i-th column of S is √ 1 pj ej , where pj is the probability of choosing the index j.

p. 2
Where the paper says it

For a matrix A, we use ∥A∥ to denote its spectral norm and ∥A∥∞ to denote its max row ℓ1 norm, and ∥A∥F to denote its Frobenius norm. Throughout the paper, we will also exclusively work with weighted sampling matrices, usually denoted by S ∈ R n×s for where s is the total number of samples taken, let i(j) be the index of the i-th sample, then the i-th column of S is √ 1 pj ej , where pj is the probability of choosing the index j.

p. 2
Where the paper says it

For a matrix A, we use ∥A∥ to denote its spectral norm and ∥A∥∞ to denote its max row ℓ1 norm, and ∥A∥F to denote its Frobenius norm. Throughout the paper, we will also exclusively work with weighted sampling matrices, usually denoted by S ∈ R n×s for where s is the total number of samples taken, let i(j) be the index of the i-th sample, then the i-th column of S is √ 1 pj ej , where pj is the probability of choosing the index j.

p. 2
Where the paper says it

For a matrix A, we use ∥A∥ to denote its spectral norm and ∥A∥∞ to denote its max row ℓ1 norm, and ∥A∥F to denote its Frobenius norm. Throughout the paper, we will also exclusively work with weighted sampling matrices, usually denoted by S ∈ R n×s for where s is the total number of samples taken, let i(j) be the index of the i-th sample, then the i-th column of S is √ 1 pj ej , where pj is the probability of choosing the index j.

p. 2
Where the paper says it

For a matrix A, we use ∥A∥ to denote its spectral norm and ∥A∥∞ to denote its max row ℓ1 norm, and ∥A∥F to denote its Frobenius norm. Throughout the paper, we will also exclusively work with weighted sampling matrices, usually denoted by S ∈ R n×s for where s is the total number of samples taken, let i(j) be the index of the i-th sample, then the i-th column of S is √ 1 pj ej , where pj is the probability of choosing the index j.

p. 2
Where the paper says it

For a matrix A, we use ∥A∥ to denote its spectral norm and ∥A∥∞ to denote its max row ℓ1 norm, and ∥A∥F to denote its Frobenius norm. Throughout the paper, we will also exclusively work with weighted sampling matrices, usually denoted by S ∈ R n×s for where s is the total number of samples taken, let i(j) be the index of the i-th sample, then the i-th column of S is √ 1 pj ej , where pj is the probability of choosing the index j.

p. 2
Where the paper says it

For a matrix A, we use ∥A∥ to denote its spectral norm and ∥A∥∞ to denote its max row ℓ1 norm, and ∥A∥F to denote its Frobenius norm. Throughout the paper, we will also exclusively work with weighted sampling matrices, usually denoted by S ∈ R n×s for where s is the total number of samples taken, let i(j) be the index of the i-th sample, then the i-th column of S is √ 1 pj ej , where pj is the probability of choosing the index j.

p. 2
Where the paper says it

For a matrix A, we use ∥A∥ to denote its spectral norm and ∥A∥∞ to denote its max row ℓ1 norm, and ∥A∥F to denote its Frobenius norm. Throughout the paper, we will also exclusively work with weighted sampling matrices, usually denoted by S ∈ R n×s for where s is the total number of samples taken, let i(j) be the index of the i-th sample, then the i-th column of S is √ 1 pj ej , where pj is the probability of choosing the index j.

p. 2
Where the paper says it

For a matrix A, we use ∥A∥ to denote its spectral norm and ∥A∥∞ to denote its max row ℓ1 norm, and ∥A∥F to denote its Frobenius norm. Throughout the paper, we will also exclusively work with weighted sampling matrices, usually denoted by S ∈ R n×s for where s is the total number of samples taken, let i(j) be the index of the i-th sample, then the i-th column of S is √ 1 pj ej , where pj is the probability of choosing the index j.

p. 2
Where the paper says it

For a matrix A, we use ∥A∥ to denote its spectral norm and ∥A∥∞ to denote its max row ℓ1 norm, and ∥A∥F to denote its Frobenius norm. Throughout the paper, we will also exclusively work with weighted sampling matrices, usually denoted by S ∈ R n×s for where s is the total number of samples taken, let i(j) be the index of the i-th sample, then the i-th column of S is √ 1 pj ej , where pj is the probability of choosing the index j.

p. 2
Where the paper says it

For a matrix A, we use ∥A∥ to denote its spectral norm and ∥A∥∞ to denote its max row ℓ1 norm, and ∥A∥F to denote its Frobenius norm. Throughout the paper, we will also exclusively work with weighted sampling matrices, usually denoted by S ∈ R n×s for where s is the total number of samples taken, let i(j) be the index of the i-th sample, then the i-th column of S is √ 1 pj ej , where pj is the probability of choosing the index j.

p. 2
Where the paper says it

For a matrix A, we use ∥A∥ to denote its spectral norm and ∥A∥∞ to denote its max row ℓ1 norm, and ∥A∥F to denote its Frobenius norm. Throughout the paper, we will also exclusively work with weighted sampling matrices, usually denoted by S ∈ R n×s for where s is the total number of samples taken, let i(j) be the index of the i-th sample, then the i-th column of S is √ 1 pj ej , where pj is the probability of choosing the index j.

p. 2
Where the paper says it

For a matrix A, we use ∥A∥ to denote its spectral norm and ∥A∥∞ to denote its max row ℓ1 norm, and ∥A∥F to denote its Frobenius norm. Throughout the paper, we will also exclusively work with weighted sampling matrices, usually denoted by S ∈ R n×s for where s is the total number of samples taken, let i(j) be the index of the i-th sample, then the i-th column of S is √ 1 pj ej , where pj is the probability of choosing the index j.

p. 2
Where the paper says it

For a matrix A, we use ∥A∥ to denote its spectral norm and ∥A∥∞ to denote its max row ℓ1 norm, and ∥A∥F to denote its Frobenius norm. Throughout the paper, we will also exclusively work with weighted sampling matrices, usually denoted by S ∈ R n×s for where s is the total number of samples taken, let i(j) be the index of the i-th sample, then the i-th column of S is √ 1 pj ej , where pj is the probability of choosing the index j.

p. 2
Where the paper says it

For a matrix A, we use ∥A∥ to denote its spectral norm and ∥A∥∞ to denote its max row ℓ1 norm, and ∥A∥F to denote its Frobenius norm. Throughout the paper, we will also exclusively work with weighted sampling matrices, usually denoted by S ∈ R n×s for where s is the total number of samples taken, let i(j) be the index of the i-th sample, then the i-th column of S is √ 1 pj ej , where pj is the probability of choosing the index j.

p. 2
Where the paper says it

For a matrix A, we use ∥A∥ to denote its spectral norm and ∥A∥∞ to denote its max row ℓ1 norm, and ∥A∥F to denote its Frobenius norm. Throughout the paper, we will also exclusively work with weighted sampling matrices, usually denoted by S ∈ R n×s for where s is the total number of samples taken, let i(j) be the index of the i-th sample, then the i-th column of S is √ 1 pj ej , where pj is the probability of choosing the index j.

p. 2
Where the paper says it

For a matrix A, we use ∥A∥ to denote its spectral norm and ∥A∥∞ to denote its max row ℓ1 norm, and ∥A∥F to denote its Frobenius norm. Throughout the paper, we will also exclusively work with weighted sampling matrices, usually denoted by S ∈ R n×s for where s is the total number of samples taken, let i(j) be the index of the i-th sample, then the i-th column of S is √ 1 pj ej , where pj is the probability of choosing the index j.

A, and V by utilizing a quantum Nyström approximation of the exponential kernel matrix, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V. p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper provides a formal theorem establishing an end-to-end guarantee on estimating the normalization factor by combining approximations for D, e. p. 7
Where the paper says it

Algorithm 2 Algorithm for estimating normalization factor. 1: data structure QRowNorm 2: begin members 3: s ∈ N 4: S ∈ (R 2 ) s 5: N ∈ R s×s 6: µe ∈ R s 7: end members 8: 9: procedure Preprocess(Q ∈ R n×d , K ∈ R n×d , λ ∈ (0, ∞), ϵ ∈ (0, 1)) 10: s ← O(sλ log(sλn)) 11: S ← QNystromKernel ¨ (Q ∪ K,(xi , xj ) 7→ exp(⟨xi , xj ⟩), 1/ poly(n), λ) ▷ Algorithm 1, S is a list of sampled indices and weights 12: N ← (S ⊤ES) †/2 13: Implement row oracle (U2)j,∗ as follows: 14: e(U2)j(k),∗ ← Sk · exp(⟨xj+n, xk⟩), ∀k ∈ S ▷ e(U2)j(k),∗ ∈ R s 15: (U2)j,∗ ← Ne(U2)j(k),∗ ▷ S stores pairs of indices and weights, Sk is the weight corresponding to index k, (U2)j,∗ ∈ R s 16: Implement entry oracle for a vector v = 1n ∈ R n 17: µe ← QMatVec(U2, v, ϵ) ▷ µe ∈ R s , Lemma 2.

p. 7
Where the paper says it

Algorithm 2 Algorithm for estimating normalization factor. 1: data structure QRowNorm 2: begin members 3: s ∈ N 4: S ∈ (R 2 ) s 5: N ∈ R s×s 6: µe ∈ R s 7: end members 8: 9: procedure Preprocess(Q ∈ R n×d , K ∈ R n×d , λ ∈ (0, ∞), ϵ ∈ (0, 1)) 10: s ← O(sλ log(sλn)) 11: S ← QNystromKernel ¨ (Q ∪ K,(xi , xj ) 7→ exp(⟨xi , xj ⟩), 1/ poly(n), λ) ▷ Algorithm 1, S is a list of sampled indices and weights 12: N ← (S ⊤ES) †/2 13: Implement row oracle (U2)j,∗ as follows: 14: e(U2)j(k),∗ ← Sk · exp(⟨xj+n, xk⟩), ∀k ∈ S ▷ e(U2)j(k),∗ ∈ R s 15: (U2)j,∗ ← Ne(U2)j(k),∗ ▷ S stores pairs of indices and weights, Sk is the weight corresponding to index k, (U2)j,∗ ∈ R s 16: Implement entry oracle for a vector v = 1n ∈ R n 17: µe ← QMatVec(U2, v, ϵ) ▷ µe ∈ R s , Lemma 2.

p. 7
Where the paper says it

Algorithm 2 Algorithm for estimating normalization factor. 1: data structure QRowNorm 2: begin members 3: s ∈ N 4: S ∈ (R 2 ) s 5: N ∈ R s×s 6: µe ∈ R s 7: end members 8: 9: procedure Preprocess(Q ∈ R n×d , K ∈ R n×d , λ ∈ (0, ∞), ϵ ∈ (0, 1)) 10: s ← O(sλ log(sλn)) 11: S ← QNystromKernel ¨ (Q ∪ K,(xi , xj ) 7→ exp(⟨xi , xj ⟩), 1/ poly(n), λ) ▷ Algorithm 1, S is a list of sampled indices and weights 12: N ← (S ⊤ES) †/2 13: Implement row oracle (U2)j,∗ as follows: 14: e(U2)j(k),∗ ← Sk · exp(⟨xj+n, xk⟩), ∀k ∈ S ▷ e(U2)j(k),∗ ∈ R s 15: (U2)j,∗ ← Ne(U2)j(k),∗ ▷ S stores pairs of indices and weights, Sk is the weight corresponding to index k, (U2)j,∗ ∈ R s 16: Implement entry oracle for a vector v = 1n ∈ R n 17: µe ← QMatVec(U2, v, ϵ) ▷ µe ∈ R s , Lemma 2.

p. 7
Where the paper says it

Algorithm 2 Algorithm for estimating normalization factor. 1: data structure QRowNorm 2: begin members 3: s ∈ N 4: S ∈ (R 2 ) s 5: N ∈ R s×s 6: µe ∈ R s 7: end members 8: 9: procedure Preprocess(Q ∈ R n×d , K ∈ R n×d , λ ∈ (0, ∞), ϵ ∈ (0, 1)) 10: s ← O(sλ log(sλn)) 11: S ← QNystromKernel ¨ (Q ∪ K,(xi , xj ) 7→ exp(⟨xi , xj ⟩), 1/ poly(n), λ) ▷ Algorithm 1, S is a list of sampled indices and weights 12: N ← (S ⊤ES) †/2 13: Implement row oracle (U2)j,∗ as follows: 14: e(U2)j(k),∗ ← Sk · exp(⟨xj+n, xk⟩), ∀k ∈ S ▷ e(U2)j(k),∗ ∈ R s 15: (U2)j,∗ ← Ne(U2)j(k),∗ ▷ S stores pairs of indices and weights, Sk is the weight corresponding to index k, (U2)j,∗ ∈ R s 16: Implement entry oracle for a vector v = 1n ∈ R n 17: µe ← QMatVec(U2, v, ϵ) ▷ µe ∈ R s , Lemma 2.

p. 7
Where the paper says it

Algorithm 2 Algorithm for estimating normalization factor. 1: data structure QRowNorm 2: begin members 3: s ∈ N 4: S ∈ (R 2 ) s 5: N ∈ R s×s 6: µe ∈ R s 7: end members 8: 9: procedure Preprocess(Q ∈ R n×d , K ∈ R n×d , λ ∈ (0, ∞), ϵ ∈ (0, 1)) 10: s ← O(sλ log(sλn)) 11: S ← QNystromKernel ¨ (Q ∪ K,(xi , xj ) 7→ exp(⟨xi , xj ⟩), 1/ poly(n), λ) ▷ Algorithm 1, S is a list of sampled indices and weights 12: N ← (S ⊤ES) †/2 13: Implement row oracle (U2)j,∗ as follows: 14: e(U2)j(k),∗ ← Sk · exp(⟨xj+n, xk⟩), ∀k ∈ S ▷ e(U2)j(k),∗ ∈ R s 15: (U2)j,∗ ← Ne(U2)j(k),∗ ▷ S stores pairs of indices and weights, Sk is the weight corresponding to index k, (U2)j,∗ ∈ R s 16: Implement entry oracle for a vector v = 1n ∈ R n 17: µe ← QMatVec(U2, v, ϵ) ▷ µe ∈ R s , Lemma 2.

p. 7
Where the paper says it

Algorithm 2 Algorithm for estimating normalization factor. 1: data structure QRowNorm 2: begin members 3: s ∈ N 4: S ∈ (R 2 ) s 5: N ∈ R s×s 6: µe ∈ R s 7: end members 8: 9: procedure Preprocess(Q ∈ R n×d , K ∈ R n×d , λ ∈ (0, ∞), ϵ ∈ (0, 1)) 10: s ← O(sλ log(sλn)) 11: S ← QNystromKernel ¨ (Q ∪ K,(xi , xj ) 7→ exp(⟨xi , xj ⟩), 1/ poly(n), λ) ▷ Algorithm 1, S is a list of sampled indices and weights 12: N ← (S ⊤ES) †/2 13: Implement row oracle (U2)j,∗ as follows: 14: e(U2)j(k),∗ ← Sk · exp(⟨xj+n, xk⟩), ∀k ∈ S ▷ e(U2)j(k),∗ ∈ R s 15: (U2)j,∗ ← Ne(U2)j(k),∗ ▷ S stores pairs of indices and weights, Sk is the weight corresponding to index k, (U2)j,∗ ∈ R s 16: Implement entry oracle for a vector v = 1n ∈ R n 17: µe ← QMatVec(U2, v, ϵ) ▷ µe ∈ R s , Lemma 2.

p. 7
Where the paper says it

Algorithm 2 Algorithm for estimating normalization factor. 1: data structure QRowNorm 2: begin members 3: s ∈ N 4: S ∈ (R 2 ) s 5: N ∈ R s×s 6: µe ∈ R s 7: end members 8: 9: procedure Preprocess(Q ∈ R n×d , K ∈ R n×d , λ ∈ (0, ∞), ϵ ∈ (0, 1)) 10: s ← O(sλ log(sλn)) 11: S ← QNystromKernel ¨ (Q ∪ K,(xi , xj ) 7→ exp(⟨xi , xj ⟩), 1/ poly(n), λ) ▷ Algorithm 1, S is a list of sampled indices and weights 12: N ← (S ⊤ES) †/2 13: Implement row oracle (U2)j,∗ as follows: 14: e(U2)j(k),∗ ← Sk · exp(⟨xj+n, xk⟩), ∀k ∈ S ▷ e(U2)j(k),∗ ∈ R s 15: (U2)j,∗ ← Ne(U2)j(k),∗ ▷ S stores pairs of indices and weights, Sk is the weight corresponding to index k, (U2)j,∗ ∈ R s 16: Implement entry oracle for a vector v = 1n ∈ R n 17: µe ← QMatVec(U2, v, ϵ) ▷ µe ∈ R s , Lemma 2.

p. 7
Where the paper says it

Algorithm 2 Algorithm for estimating normalization factor. 1: data structure QRowNorm 2: begin members 3: s ∈ N 4: S ∈ (R 2 ) s 5: N ∈ R s×s 6: µe ∈ R s 7: end members 8: 9: procedure Preprocess(Q ∈ R n×d , K ∈ R n×d , λ ∈ (0, ∞), ϵ ∈ (0, 1)) 10: s ← O(sλ log(sλn)) 11: S ← QNystromKernel ¨ (Q ∪ K,(xi , xj ) 7→ exp(⟨xi , xj ⟩), 1/ poly(n), λ) ▷ Algorithm 1, S is a list of sampled indices and weights 12: N ← (S ⊤ES) †/2 13: Implement row oracle (U2)j,∗ as follows: 14: e(U2)j(k),∗ ← Sk · exp(⟨xj+n, xk⟩), ∀k ∈ S ▷ e(U2)j(k),∗ ∈ R s 15: (U2)j,∗ ← Ne(U2)j(k),∗ ▷ S stores pairs of indices and weights, Sk is the weight corresponding to index k, (U2)j,∗ ∈ R s 16: Implement entry oracle for a vector v = 1n ∈ R n 17: µe ← QMatVec(U2, v, ϵ) ▷ µe ∈ R s , Lemma 2.

p. 7
Where the paper says it

Algorithm 2 Algorithm for estimating normalization factor. 1: data structure QRowNorm 2: begin members 3: s ∈ N 4: S ∈ (R 2 ) s 5: N ∈ R s×s 6: µe ∈ R s 7: end members 8: 9: procedure Preprocess(Q ∈ R n×d , K ∈ R n×d , λ ∈ (0, ∞), ϵ ∈ (0, 1)) 10: s ← O(sλ log(sλn)) 11: S ← QNystromKernel ¨ (Q ∪ K,(xi , xj ) 7→ exp(⟨xi , xj ⟩), 1/ poly(n), λ) ▷ Algorithm 1, S is a list of sampled indices and weights 12: N ← (S ⊤ES) †/2 13: Implement row oracle (U2)j,∗ as follows: 14: e(U2)j(k),∗ ← Sk · exp(⟨xj+n, xk⟩), ∀k ∈ S ▷ e(U2)j(k),∗ ∈ R s 15: (U2)j,∗ ← Ne(U2)j(k),∗ ▷ S stores pairs of indices and weights, Sk is the weight corresponding to index k, (U2)j,∗ ∈ R s 16: Implement entry oracle for a vector v = 1n ∈ R n 17: µe ← QMatVec(U2, v, ϵ) ▷ µe ∈ R s , Lemma 2.

p. 7
Where the paper says it

Algorithm 2 Algorithm for estimating normalization factor. 1: data structure QRowNorm 2: begin members 3: s ∈ N 4: S ∈ (R 2 ) s 5: N ∈ R s×s 6: µe ∈ R s 7: end members 8: 9: procedure Preprocess(Q ∈ R n×d , K ∈ R n×d , λ ∈ (0, ∞), ϵ ∈ (0, 1)) 10: s ← O(sλ log(sλn)) 11: S ← QNystromKernel ¨ (Q ∪ K,(xi , xj ) 7→ exp(⟨xi , xj ⟩), 1/ poly(n), λ) ▷ Algorithm 1, S is a list of sampled indices and weights 12: N ← (S ⊤ES) †/2 13: Implement row oracle (U2)j,∗ as follows: 14: e(U2)j(k),∗ ← Sk · exp(⟨xj+n, xk⟩), ∀k ∈ S ▷ e(U2)j(k),∗ ∈ R s 15: (U2)j,∗ ← Ne(U2)j(k),∗ ▷ S stores pairs of indices and weights, Sk is the weight corresponding to index k, (U2)j,∗ ∈ R s 16: Implement entry oracle for a vector v = 1n ∈ R n 17: µe ← QMatVec(U2, v, ϵ) ▷ µe ∈ R s , Lemma 2.

p. 7
Where the paper says it

Algorithm 2 Algorithm for estimating normalization factor. 1: data structure QRowNorm 2: begin members 3: s ∈ N 4: S ∈ (R 2 ) s 5: N ∈ R s×s 6: µe ∈ R s 7: end members 8: 9: procedure Preprocess(Q ∈ R n×d , K ∈ R n×d , λ ∈ (0, ∞), ϵ ∈ (0, 1)) 10: s ← O(sλ log(sλn)) 11: S ← QNystromKernel ¨ (Q ∪ K,(xi , xj ) 7→ exp(⟨xi , xj ⟩), 1/ poly(n), λ) ▷ Algorithm 1, S is a list of sampled indices and weights 12: N ← (S ⊤ES) †/2 13: Implement row oracle (U2)j,∗ as follows: 14: e(U2)j(k),∗ ← Sk · exp(⟨xj+n, xk⟩), ∀k ∈ S ▷ e(U2)j(k),∗ ∈ R s 15: (U2)j,∗ ← Ne(U2)j(k),∗ ▷ S stores pairs of indices and weights, Sk is the weight corresponding to index k, (U2)j,∗ ∈ R s 16: Implement entry oracle for a vector v = 1n ∈ R n 17: µe ← QMatVec(U2, v, ϵ) ▷ µe ∈ R s , Lemma 2.

p. 7
Where the paper says it

Algorithm 2 Algorithm for estimating normalization factor. 1: data structure QRowNorm 2: begin members 3: s ∈ N 4: S ∈ (R 2 ) s 5: N ∈ R s×s 6: µe ∈ R s 7: end members 8: 9: procedure Preprocess(Q ∈ R n×d , K ∈ R n×d , λ ∈ (0, ∞), ϵ ∈ (0, 1)) 10: s ← O(sλ log(sλn)) 11: S ← QNystromKernel ¨ (Q ∪ K,(xi , xj ) 7→ exp(⟨xi , xj ⟩), 1/ poly(n), λ) ▷ Algorithm 1, S is a list of sampled indices and weights 12: N ← (S ⊤ES) †/2 13: Implement row oracle (U2)j,∗ as follows: 14: e(U2)j(k),∗ ← Sk · exp(⟨xj+n, xk⟩), ∀k ∈ S ▷ e(U2)j(k),∗ ∈ R s 15: (U2)j,∗ ← Ne(U2)j(k),∗ ▷ S stores pairs of indices and weights, Sk is the weight corresponding to index k, (U2)j,∗ ∈ R s 16: Implement entry oracle for a vector v = 1n ∈ R n 17: µe ← QMatVec(U2, v, ϵ) ▷ µe ∈ R s , Lemma 2.

p. 7
Where the paper says it

Algorithm 2 Algorithm for estimating normalization factor. 1: data structure QRowNorm 2: begin members 3: s ∈ N 4: S ∈ (R 2 ) s 5: N ∈ R s×s 6: µe ∈ R s 7: end members 8: 9: procedure Preprocess(Q ∈ R n×d , K ∈ R n×d , λ ∈ (0, ∞), ϵ ∈ (0, 1)) 10: s ← O(sλ log(sλn)) 11: S ← QNystromKernel ¨ (Q ∪ K,(xi , xj ) 7→ exp(⟨xi , xj ⟩), 1/ poly(n), λ) ▷ Algorithm 1, S is a list of sampled indices and weights 12: N ← (S ⊤ES) †/2 13: Implement row oracle (U2)j,∗ as follows: 14: e(U2)j(k),∗ ← Sk · exp(⟨xj+n, xk⟩), ∀k ∈ S ▷ e(U2)j(k),∗ ∈ R s 15: (U2)j,∗ ← Ne(U2)j(k),∗ ▷ S stores pairs of indices and weights, Sk is the weight corresponding to index k, (U2)j,∗ ∈ R s 16: Implement entry oracle for a vector v = 1n ∈ R n 17: µe ← QMatVec(U2, v, ϵ) ▷ µe ∈ R s , Lemma 2.

p. 7
Where the paper says it

Algorithm 2 Algorithm for estimating normalization factor. 1: data structure QRowNorm 2: begin members 3: s ∈ N 4: S ∈ (R 2 ) s 5: N ∈ R s×s 6: µe ∈ R s 7: end members 8: 9: procedure Preprocess(Q ∈ R n×d , K ∈ R n×d , λ ∈ (0, ∞), ϵ ∈ (0, 1)) 10: s ← O(sλ log(sλn)) 11: S ← QNystromKernel ¨ (Q ∪ K,(xi , xj ) 7→ exp(⟨xi , xj ⟩), 1/ poly(n), λ) ▷ Algorithm 1, S is a list of sampled indices and weights 12: N ← (S ⊤ES) †/2 13: Implement row oracle (U2)j,∗ as follows: 14: e(U2)j(k),∗ ← Sk · exp(⟨xj+n, xk⟩), ∀k ∈ S ▷ e(U2)j(k),∗ ∈ R s 15: (U2)j,∗ ← Ne(U2)j(k),∗ ▷ S stores pairs of indices and weights, Sk is the weight corresponding to index k, (U2)j,∗ ∈ R s 16: Implement entry oracle for a vector v = 1n ∈ R n 17: µe ← QMatVec(U2, v, ϵ) ▷ µe ∈ R s , Lemma 2.

p. 7
Where the paper says it

Algorithm 2 Algorithm for estimating normalization factor. 1: data structure QRowNorm 2: begin members 3: s ∈ N 4: S ∈ (R 2 ) s 5: N ∈ R s×s 6: µe ∈ R s 7: end members 8: 9: procedure Preprocess(Q ∈ R n×d , K ∈ R n×d , λ ∈ (0, ∞), ϵ ∈ (0, 1)) 10: s ← O(sλ log(sλn)) 11: S ← QNystromKernel ¨ (Q ∪ K,(xi , xj ) 7→ exp(⟨xi , xj ⟩), 1/ poly(n), λ) ▷ Algorithm 1, S is a list of sampled indices and weights 12: N ← (S ⊤ES) †/2 13: Implement row oracle (U2)j,∗ as follows: 14: e(U2)j(k),∗ ← Sk · exp(⟨xj+n, xk⟩), ∀k ∈ S ▷ e(U2)j(k),∗ ∈ R s 15: (U2)j,∗ ← Ne(U2)j(k),∗ ▷ S stores pairs of indices and weights, Sk is the weight corresponding to index k, (U2)j,∗ ∈ R s 16: Implement entry oracle for a vector v = 1n ∈ R n 17: µe ← QMatVec(U2, v, ϵ) ▷ µe ∈ R s , Lemma 2.

p. 7
Where the paper says it

Algorithm 2 Algorithm for estimating normalization factor. 1: data structure QRowNorm 2: begin members 3: s ∈ N 4: S ∈ (R 2 ) s 5: N ∈ R s×s 6: µe ∈ R s 7: end members 8: 9: procedure Preprocess(Q ∈ R n×d , K ∈ R n×d , λ ∈ (0, ∞), ϵ ∈ (0, 1)) 10: s ← O(sλ log(sλn)) 11: S ← QNystromKernel ¨ (Q ∪ K,(xi , xj ) 7→ exp(⟨xi , xj ⟩), 1/ poly(n), λ) ▷ Algorithm 1, S is a list of sampled indices and weights 12: N ← (S ⊤ES) †/2 13: Implement row oracle (U2)j,∗ as follows: 14: e(U2)j(k),∗ ← Sk · exp(⟨xj+n, xk⟩), ∀k ∈ S ▷ e(U2)j(k),∗ ∈ R s 15: (U2)j,∗ ← Ne(U2)j(k),∗ ▷ S stores pairs of indices and weights, Sk is the weight corresponding to index k, (U2)j,∗ ∈ R s 16: Implement entry oracle for a vector v = 1n ∈ R n 17: µe ← QMatVec(U2, v, ϵ) ▷ µe ∈ R s , Lemma 2.

p. 7
Where the paper says it

Algorithm 2 Algorithm for estimating normalization factor. 1: data structure QRowNorm 2: begin members 3: s ∈ N 4: S ∈ (R 2 ) s 5: N ∈ R s×s 6: µe ∈ R s 7: end members 8: 9: procedure Preprocess(Q ∈ R n×d , K ∈ R n×d , λ ∈ (0, ∞), ϵ ∈ (0, 1)) 10: s ← O(sλ log(sλn)) 11: S ← QNystromKernel ¨ (Q ∪ K,(xi , xj ) 7→ exp(⟨xi , xj ⟩), 1/ poly(n), λ) ▷ Algorithm 1, S is a list of sampled indices and weights 12: N ← (S ⊤ES) †/2 13: Implement row oracle (U2)j,∗ as follows: 14: e(U2)j(k),∗ ← Sk · exp(⟨xj+n, xk⟩), ∀k ∈ S ▷ e(U2)j(k),∗ ∈ R s 15: (U2)j,∗ ← Ne(U2)j(k),∗ ▷ S stores pairs of indices and weights, Sk is the weight corresponding to index k, (U2)j,∗ ∈ R s 16: Implement entry oracle for a vector v = 1n ∈ R n 17: µe ← QMatVec(U2, v, ϵ) ▷ µe ∈ R s , Lemma 2.

A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper details how to approximate D,. A, and V by utilizing a quantum Nyström approximation of the exponential kernel matrix with leverage score sampling for approximating D,. p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper provides a formal theorem establishing an end-to-end guarantee on estimating the normalization factor by combining approximations for D, e. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper details how to approximate D,. A, and V by utilizing a quantum Nyström approximation of the exponential kernel matrix with leverage score sampling for approximating D,. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper provides a formal theorem establishing an end-to-end guarantee on estimating the normalization factor by combining approximations for D, e. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper details how to approximate D,. A, and V by utilizing a quantum Nyström approximation of the exponential kernel matrix with leverage score sampling for approximating D,. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper provides a formal theorem establishing an end-to-end guarantee on estimating the normalization factor by combining approximations for D, e. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper details how to approximate D,. A, and V by utilizing a quantum Nyström approximation of the exponential kernel matrix with leverage score sampling for approximating D,. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper provides a formal theorem establishing an end-to-end guarantee on estimating the normalization factor by combining approximations for D, e. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper details how to approximate D,. A, and V by utilizing a quantum Nyström approximation of the exponential kernel matrix with leverage score sampling for approximating D,. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper provides a formal theorem establishing an end-to-end guarantee on estimating the normalization factor by combining approximations for D, e. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper details how to approximate D,. A, and V by utilizing a quantum Nyström approximation of the exponential kernel matrix with leverage score sampling for approximating D,. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper provides a formal theorem establishing an end-to-end guarantee on estimating the normalization factor by combining approximations for D, e. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper details how to approximate D,. A, and V by utilizing a quantum Nyström approximation of the exponential kernel matrix with leverage score sampling for approximating D,. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper provides a formal theorem establishing an end-to-end guarantee on estimating the normalization factor by combining approximations for D, e. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper details how to approximate D,. A, and V by utilizing a quantum Nyström approximation of the exponential kernel matrix with leverage score sampling for approximating D,. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper provides a formal theorem establishing an end-to-end guarantee on estimating the normalization factor by combining approximations for D, e. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper details how to approximate D,. A, and V by utilizing a quantum Nyström approximation of the exponential kernel matrix with leverage score sampling for approximating D,. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper provides a formal theorem establishing an end-to-end guarantee on estimating the normalization factor by combining approximations for D, e. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper details how to approximate D,. A, and V by utilizing a quantum Nyström approximation of the exponential kernel matrix with leverage score sampling for approximating D,. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper provides a formal theorem establishing an end-to-end guarantee on estimating the normalization factor by combining approximations for D, e. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper details how to approximate D,. A, and V by utilizing a quantum Nyström approximation of the exponential kernel matrix with leverage score sampling for approximating D,. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper provides a formal theorem establishing an end-to-end guarantee on estimating the normalization factor by combining approximations for D, e. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper details how to approximate D,. A, and V by utilizing a quantum Nyström approximation of the exponential kernel matrix with leverage score sampling for approximating D,. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper provides a formal theorem establishing an end-to-end guarantee on estimating the normalization factor by combining approximations for D, e. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper details how to approximate D,. A, and V by utilizing a quantum Nyström approximation of the exponential kernel matrix with leverage score sampling for approximating D,. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper provides a formal theorem establishing an end-to-end guarantee on estimating the normalization factor by combining approximations for D, e. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper details how to approximate D,. A, and V by utilizing a quantum Nyström approximation of the exponential kernel matrix with leverage score sampling for approximating D,. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper provides a formal theorem establishing an end-to-end guarantee on estimating the normalization factor by combining approximations for D, e. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper details how to approximate D,. A, and V by utilizing a quantum Nyström approximation of the exponential kernel matrix with leverage score sampling for approximating D,. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper provides a formal theorem establishing an end-to-end guarantee on estimating the normalization factor by combining approximations for D, e. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper details how to approximate D,. A, and V by utilizing a quantum Nyström approximation of the exponential kernel matrix with leverage score sampling for approximating D,. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper provides a formal theorem establishing an end-to-end guarantee on estimating the normalization factor by combining approximations for D, e. A, and V. Where the gains come from leveraging quantum primitives like Grover search and multivariate mean estimation to achieve sublinear time complexity in n. The paper details how to approximate D,. A, and V by utilizing a quantum Nyström approximation of the exponential kernel matrix with leverage scor… p. 0
Where the paper says it

To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nystr¨om approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum leverage score sampling for the multiplication with V .

Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.

Improvements for AI systems

  1. Sublinear Attention Row Query Data Structure: The proposed quantum data structure allows preprocessing of Q, K, and V in time Oe(epsilon-1n 0.5 poly(sλ, d, α)) while answering any row query in Oe(s 2λ + sλd) time. This enables approximating any row of Att(Q, K, V) using only row queries to Q, K, and V in sublinear time with respect to n.

  2. Efficient Value Matrix Approximation: The system can approximate the value matrix V by sampling Oe(epsilon-1n 0.5α 0.5d) rows of V according to its leverage score distribution, achieving an approximate matrix multiplication guarantee in Frobenius norm using (ϵ, 1/poly(n))-AMM for any fixed matrix B.

  3. Sublinear Time Attention Row Approximation: Given the data structure, for any index i in [n], it returns a vector rei which approximates the i-th row of Att(Q, K, V) in Oe(s 2λ + sλd) time. This circumvents the Omega(nd) lower bound for output size by focusing on partial output.

Abstract

Given the query, key and value matrices Q, K, V in R n times d, the attention module is defined as Att(Q, K, V)=D-1AV where A= (QK/sqrt d) with (times) applied entrywise, D= diag(A 1 n). The attention module is the backbone of modern transformers and large language models, but explicitly forming the softmax matrix D-1A incurs Ω(n 2) time, motivating numerous approximation schemes that reduce runtime to O(nd) via sparsity or low-rank factorization. We propose a quantum data structure that approximates any row of Att(Q, K, V) using only row queries to Q, K, V. Our algorithm preprocesses these matrices in (ε-1 n 0.5 (s λ cubed + s λ squared d + d) + ε-2 s λd) time, where ε is the target accuracy and s λ is the λ-statistical dimension of the exponential kernel defined by Q and K. Each row query can be answered in (s λ squared + s λd) time. If every row sum of A exceeds ε|A|+λ sqrt n, then with probability 1-1/poly(n) the answers have Frobenius-norm error O(β|D-1|(ε|A| F+λ sqrt n)|V| F). Here β=(1-(ε|A|+λ sqrt n)|D-1|)-1 at least 1 is close to 1 when every row sum is much larger than ε|A|+λ sqrt n. To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to n. Our approach relies on a quantum Nyström approximation of the exponential kernel, quantum multivariate mean estimation for computing D, and quantum sampling of the rows of V by their squared norms, with a median over independent samples, for the multiplication with V.

Sources

Related papers