Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:2111.08915

A quantum-inspired algorithm for approximating statistical leverage scores

Qian Zuo, Hua Xiang

Published Nov 17, 2021• 2 citations
arXivHTMLPDF

Abstract

Suppose a matrix $A \in \mathbb{R}^{m \times n}$ of rank $r$ with singular value decomposition $A = U_{A}Σ_{A} V_{A}^{T}$, where $U_{A} \in \mathbb{R}^{m \times r}$, $V_{A} \in \mathbb{R}^{n \times r}$ are orthonormal and $Σ_{A} \in \mathbb{R}^{r \times r}$ is a diagonal matrix. The statistical leverage scores of a matrix $A$ are the squared row-norms defined by $\ell_{i} = \|(U_{A})_{i,:}\|_2^2$, where $i \in [m]$, and the matrix coherence is the largest statistical leverage score. These quantities play an important role in machine learning algorithms such as matrix completion and Nyström-based low rank matrix approximation as well as large-scale statistical data analysis applications, whose usual algorithm complexity is polynomial in the dimension of the matrix $A$. As an alternative to the conventional approach, and inspired by recent development on dequantization techniques, we propose a quantum-inspired algorithm for approximating the statistical leverage scores. We then analyze the accuracy of the algorithm and perform numerical experiments to illustrate the feasibility of our algorithm. Theoretical analysis shows that our novel algorithm takes time polynomial in an integer $k$, condition number $κ$ and logarithm of the matrix size.

DOI
10.48550/arxiv.2111.08915

Related papers

Quantum-Inspired Classical Algorithms for Singular Value Transformation

Dhawal Jethwani, François Le Gall, Sanjay Kumar Singh

A recent breakthrough by Tang (STOC 2019) showed how to "dequantize" the quantum algorithm for recommendation systems by Kerenidis and Prakash (ITCS 2017). The resulting algorithm, classical but "quantum-inspired", efficiently computes a low-rank approximation of the users' preference matrix. Subsequent works have shown how to construct efficient quantum-inspired algorithms for approximating the pseudo-inverse of a low-rank matrix as well, which can be used to (approximately) solve low-rank linear systems of equations. In the present paper, we pursue this line of research and develop quantum-inspired algorithms for a large class of matrix transformations that are defined via the singular value decomposition of the matrix. In particular, we obtain classical algorithms with complexity polynomially related (in most parameters) to the complexity of the best quantum algorithms for singular value transformation recently developed by Chakraborty, Gilyén and Jeffery (ICALP 2019) and Gilyén, Su, Low and Wiebe (STOC 2019).

arXiv:1910.05699•Leibniz international proceedings in informatics•Oct 13, 2019•14 citations

Sublinear Time Quantum Algorithm for Attention Approximation

Zhao Song, Jianfei Xue, Jiahao Zhang +1 more

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 1}_n)$. The attention module is the backbone of modern transformers and large language models, but explicitly forming the softmax matrix $D^{-1}A$ incurs $Ω(n^2)$ time, motivating numerous approximation schemes that reduce runtime to $\widetilde O(nd)$ via sparsity or low-rank factorization. We propose a quantum data structure that approximates any row of $\mathrm{Att}(Q, K, V)$ using only row queries to $Q, K, V$. Our algorithm preprocesses these matrices in $\widetilde{O}\left( ε^{-1} n^{0.5} \left( s_λ^{2.5} + s_λ^{1.5} d + α^{0.5} d \right) \right)$ 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/{\rm srank}(V)$, the stable rank of $V$. Each row query can be answered in $\widetilde{O}(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$.

quant-pharXiv:2602.00874•Feb 3, 2026•0 citations

Quantum-inspired algorithm applied to extreme learning

Iori Takeda, Souichi Takahira, Kosuke Mitarai +1 more

Quantum-inspired singular value decomposition (SVD) is a technique to perform SVD in logarithmic time with respect to the dimension of a matrix, given access to the matrix embedded in a segment-tree data structure. The speedup is possible through the efficient sampling of matrix elements according to their norms. Here, we apply it to extreme learning which is a machine learning framework that performs linear regression using random feature vectors generated through a random neural network. The extreme learning is suited for the application of quantum-inspired SVD in that it first requires transforming each data to a random feature during which we can construct the data structure with a logarithmic overhead with respect to the number of data. We implement the algorithm and observe that it works order-of-magnitude faster than the exact SVD when we use high-dimensional feature vectors. However, we also observe that, for random features generated by random neural networks, we can replace the norm-based sampling in the quantum-inspired algorithm with uniform sampling to obtain the same level of test accuracy due to the uniformity of the matrix in this case. The norm-based sampling becomes effective for more non-uniform matrices obtained by optimizing the feature mapping. It implies the non-uniformity of matrix elements is a key property of the quantum-inspired SVD. This work is a first step toward the practical application of the quantum-inspired algorithm.

arXiv:2209.12452•Sep 26, 2022•0 citations

Robust Dequantization of the Quantum Singular Value Transformation and Quantum Machine Learning Algorithms

François Le Gall

Several quantum algorithms for linear algebra problems, and in particular quantum machine learning problems, have been “dequantized” in the past few years. These dequantization results typically hold when classical algorithms can access the data via length-squared sampling. This assumption, which is standard in the field of randomized linear algebra, means that for a unit-norm vector $$u\in\mathbb{C}^{n}$$ , we can sample from the distribution $$p_u\colon\{1,\ldots,n\}\to [0,1]$$ defined as $$p_u(i)=|u(i)|^2$$ for each $$i\in\{1,\ldots,n\}$$ . Since this distribution corresponds to the distribution obtained by measuring the quantum state | $$u$$ > in the computational basis, length-squared sampling access gives a reasonable classical analogue to the kind of quantum access considered in many quantum algorithms for linear algebra problems. In this work we investigate how robust these dequantization results are. We introduce the notion of approximate length-squared sampling, where classical algorithms are only able to sample from a distribution close to the ideal distribution in total variation distance. While quantum algorithms are natively robust against small perturbations, current techniques in dequantization are not. Our main technical contribution is showing how many techniques from randomized linear algebra can be adapted to work under this weaker assumption as well. We then use these techniques to show that the recent low-rank dequantization framework by Chia, Gilyén, Li, Lin, Tang and Wang (JACM 2022) and the dequantization framework for sparse matrices by Gharibian and Le Gall (STOC 2022), which are both based on the Quantum Singular Value Transformation, can be generalized to the case of approximate length-squared sampling access to the input. We also apply these results to obtain a robust dequantization of many quantum machine learning algorithms, including quantum algorithms for recommendation systems, supervised clustering and low-rank matrix inversion.

Computational Complexity•Jan 18, 2025•5 citations

Quantum-inspired low-rank stochastic regression with logarithmic dependence on the dimension

András Gilyén, Seth Lloyd, Ewin Tang

We construct an efficient classical analogue of the quantum matrix inversion algorithm (HHL) for low-rank matrices. Inspired by recent work of Tang, assuming length-square sampling access to input data, we implement the pseudoinverse of a low-rank matrix and sample from the solution to the problem $Ax=b$ using fast sampling techniques. We implement the pseudo-inverse by finding an approximate singular value decomposition of $A$ via subsampling, then inverting the singular values. In principle, the approach can also be used to apply any desired "smooth" function to the singular values. Since many quantum algorithms can be expressed as a singular value transformation problem, our result suggests that more low-rank quantum algorithms can be effectively "dequantised" into classical length-square sampling algorithms.

arXiv:1811.04909•Nov 12, 2018•54 citations

Sampling-based sublinear low-rank matrix arithmetic framework for dequantizing Quantum machine learning

Nai-Hui Chia, András Gilyén, Tongyang Li +3 more

We present an algorithmic framework for quantum-inspired classical algorithms on close-to-low-rank matrices, generalizing the series of results started by Tang’s breakthrough quantum-inspired algorithm for recommendation systems [STOC’19]. Motivated by quantum linear algebra algorithms and the quantum singular value transformation (SVT) framework of Gilyén et al. [STOC’19], we develop classical algorithms for SVT that run in time independent of input dimension, under suitable quantum-inspired sampling assumptions. Our results give compelling evidence that in the corresponding QRAM data structure input model, quantum SVT does not yield exponential quantum speedups. Since the quantum SVT framework generalizes essentially all known techniques for quantum linear algebra, our results, combined with sampling lemmas from previous work, suffices to generalize all recent results about dequantizing quantum machine learning algorithms. In particular, our classical SVT framework recovers and often improves the dequantization results on recommendation systems, principal component analysis, supervised clustering, support vector machines, low-rank regression, and semidefinite program solving. We also give additional dequantization results on low-rank Hamiltonian simulation and discriminant analysis. Our improvements come from identifying the key feature of the quantum-inspired input model that is at the core of all prior quantum-inspired results: ℓ2-norm sampling can approximate matrix products in time independent of their dimension. We reduce all our main results to this fact, making our exposition concise, self-contained, and intuitive.

arXiv:1910.06151•ACM Symposium on Theory of Computing (STOC)•Jun 6, 2020•102 citations
Suppose a matrix A∈Rm×nA \in \mathbb{R}^{m \times n}A∈Rm×n of rank rrr with singular value decomposition A=UAΣAVATA = U_{A}Σ_{A} V_{A}^{T}A=UA​ΣA​VAT​, where UA∈Rm×rU_{A} \in \mathbb{R}^{m \times r}UA​∈Rm×r, VA∈Rn×rV_{A} \in \mathbb{R}^{n \times r}VA​∈Rn×r are orthonormal and ΣA∈Rr×rΣ_{A} \in \mathbb{R}^{r \times r}ΣA​∈Rr×r is a diagonal matrix. The statistical leverage scores of a matrix AAA are the squared row-norms defined by ℓi=∥(UA)i,:∥22\ell_{i} = \|(U_{A})_{i,:}\|_2^2ℓi​=∥(UA​)i,:​∥22​, where i∈[m]i \in [m]i∈[m], and the matrix coherence is the largest statistical leverage score. These quantities play an important role in machine learning algorithms such as matrix completion and Nyström-based low rank matrix approximation as well as large-scale statistical data analysis applications, whose usual algorithm complexity is polynomial in the dimension of the matrix AAA. As an alternative to the conventional approach, and inspired by recent development on dequantization techniques, we propose a quantum-inspired algorithm for approximating the statistical leverage scores. We then analyze the accuracy of the algorithm and perform numerical experiments to illustrate the feasibility of our algorithm. Theoretical analysis shows that our novel algorithm takes time polynomial in an integer kkk, condition number κκκ and logarithm of the matrix size.
A recent breakthrough by Tang (STOC 2019) showed how to "dequantize" the quantum algorithm for recommendation systems by Kerenidis and Prakash (ITCS 2017). The resulting algorithm, classical but "quantum-inspired", efficiently computes a low-rank approximation of the users' preference matrix. Subsequent works have shown how to construct efficient quantum-inspired algorithms for approximating the pseudo-inverse of a low-rank matrix as well, which can be used to (approximately) solve low-rank linear systems of equations. In the present paper, we pursue this line of research and develop quantum-inspired algorithms for a large class of matrix transformations that are defined via the singular value decomposition of the matrix. In particular, we obtain classical algorithms with complexity polynomially related (in most parameters) to the complexity of the best quantum algorithms for singular value transformation recently developed by Chakraborty, Gilyén and Jeffery (ICALP 2019) and Gilyén, Su, Low and Wiebe (STOC 2019).
Given the query, key and value matrices Q,K,V∈Rn×dQ, K, V\in \mathbb{R}^{n\times d}Q,K,V∈Rn×d, the attention module is defined as Att(Q,K,V)=D−1AV\mathrm{Att}(Q, K, V)=D^{-1}AVAtt(Q,K,V)=D−1AV where A=exp⁡(QK⊤/d)A=\exp(QK^\top/\sqrt{d})A=exp(QK⊤/d​) with exp⁡(⋅)\exp(\cdot)exp(⋅) applied entrywise, D=diag(A1n)D=\mathrm{diag}(A{\bf 1}_n)D=diag(A1n​). The attention module is the backbone of modern transformers and large language models, but explicitly forming the softmax matrix D−1AD^{-1}AD−1A incurs Ω(n2)Ω(n^2)Ω(n2) time, motivating numerous approximation schemes that reduce runtime to O~(nd)\widetilde O(nd)O(nd) via sparsity or low-rank factorization. We propose a quantum data structure that approximates any row of Att(Q,K,V)\mathrm{Att}(Q, K, V)Att(Q,K,V) using only row queries to Q,K,VQ, K, VQ,K,V. Our algorithm preprocesses these matrices in O~(ε−1n0.5(sλ2.5+sλ1.5d+α0.5d))\widetilde{O}\left( ε^{-1} n^{0.5} \left( s_λ^{2.5} + s_λ^{1.5} d + α^{0.5} d \right) \right)O(ε−1n0.5(sλ2.5​+sλ1.5​d+α0.5d)) time, where εεε is the target accuracy, sλs_λsλ​ is the λλλ-statistical dimension of the exponential kernel defined by QQQ and KKK, and ααα measures the row distortion of VVV that is at most d/srank(V)d/{\rm srank}(V)d/srank(V), the stable rank of VVV. Each row query can be answered in O~(sλ2+sλd)\widetilde{O}(s_λ^2 + s_λd)O(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 nnn. Our approach relies on a quantum Nyström approximation of the exponential kernel, quantum multivariate mean estimation for computing DDD, and quantum leverage score sampling for the multiplication with VVV.
Quantum-inspired singular value decomposition (SVD) is a technique to perform SVD in logarithmic time with respect to the dimension of a matrix, given access to the matrix embedded in a segment-tree data structure. The speedup is possible through the efficient sampling of matrix elements according to their norms. Here, we apply it to extreme learning which is a machine learning framework that performs linear regression using random feature vectors generated through a random neural network. The extreme learning is suited for the application of quantum-inspired SVD in that it first requires transforming each data to a random feature during which we can construct the data structure with a logarithmic overhead with respect to the number of data. We implement the algorithm and observe that it works order-of-magnitude faster than the exact SVD when we use high-dimensional feature vectors. However, we also observe that, for random features generated by random neural networks, we can replace the norm-based sampling in the quantum-inspired algorithm with uniform sampling to obtain the same level of test accuracy due to the uniformity of the matrix in this case. The norm-based sampling becomes effective for more non-uniform matrices obtained by optimizing the feature mapping. It implies the non-uniformity of matrix elements is a key property of the quantum-inspired SVD. This work is a first step toward the practical application of the quantum-inspired algorithm.
Several quantum algorithms for linear algebra problems, and in particular quantum machine learning problems, have been “dequantized” in the past few years. These dequantization results typically hold when classical algorithms can access the data via length-squared sampling. This assumption, which is standard in the field of randomized linear algebra, means that for a unit-norm vector u∈Cnu\in\mathbb{C}^{n}u∈Cn , we can sample from the distribution pu ⁣:{1,…,n}→[0,1]p_u\colon\{1,\ldots,n\}\to [0,1]pu​:{1,…,n}→[0,1] defined as pu(i)=∣u(i)∣2p_u(i)=|u(i)|^2pu​(i)=∣u(i)∣2 for each i∈{1,…,n}i\in\{1,\ldots,n\}i∈{1,…,n} . Since this distribution corresponds to the distribution obtained by measuring the quantum state | uuu > in the computational basis, length-squared sampling access gives a reasonable classical analogue to the kind of quantum access considered in many quantum algorithms for linear algebra problems. In this work we investigate how robust these dequantization results are. We introduce the notion of approximate length-squared sampling, where classical algorithms are only able to sample from a distribution close to the ideal distribution in total variation distance. While quantum algorithms are natively robust against small perturbations, current techniques in dequantization are not. Our main technical contribution is showing how many techniques from randomized linear algebra can be adapted to work under this weaker assumption as well. We then use these techniques to show that the recent low-rank dequantization framework by Chia, Gilyén, Li, Lin, Tang and Wang (JACM 2022) and the dequantization framework for sparse matrices by Gharibian and Le Gall (STOC 2022), which are both based on the Quantum Singular Value Transformation, can be generalized to the case of approximate length-squared sampling access to the input. We also apply these results to obtain a robust dequantization of many quantum machine learning algorithms, including quantum algorithms for recommendation systems, supervised clustering and low-rank matrix inversion.
We construct an efficient classical analogue of the quantum matrix inversion algorithm (HHL) for low-rank matrices. Inspired by recent work of Tang, assuming length-square sampling access to input data, we implement the pseudoinverse of a low-rank matrix and sample from the solution to the problem Ax=bAx=bAx=b using fast sampling techniques. We implement the pseudo-inverse by finding an approximate singular value decomposition of AAA via subsampling, then inverting the singular values. In principle, the approach can also be used to apply any desired "smooth" function to the singular values. Since many quantum algorithms can be expressed as a singular value transformation problem, our result suggests that more low-rank quantum algorithms can be effectively "dequantised" into classical length-square sampling algorithms.
We present an algorithmic framework for quantum-inspired classical algorithms on close-to-low-rank matrices, generalizing the series of results started by Tang’s breakthrough quantum-inspired algorithm for recommendation systems [STOC’19]. Motivated by quantum linear algebra algorithms and the quantum singular value transformation (SVT) framework of Gilyén et al. [STOC’19], we develop classical algorithms for SVT that run in time independent of input dimension, under suitable quantum-inspired sampling assumptions. Our results give compelling evidence that in the corresponding QRAM data structure input model, quantum SVT does not yield exponential quantum speedups. Since the quantum SVT framework generalizes essentially all known techniques for quantum linear algebra, our results, combined with sampling lemmas from previous work, suffices to generalize all recent results about dequantizing quantum machine learning algorithms. In particular, our classical SVT framework recovers and often improves the dequantization results on recommendation systems, principal component analysis, supervised clustering, support vector machines, low-rank regression, and semidefinite program solving. We also give additional dequantization results on low-rank Hamiltonian simulation and discriminant analysis. Our improvements come from identifying the key feature of the quantum-inspired input model that is at the core of all prior quantum-inspired results: ℓ2-norm sampling can approximate matrix products in time independent of their dimension. We reduce all our main results to this fact, making our exposition concise, self-contained, and intuitive.