QuantumAtlas

Research Explained · Algorithms

A Quantum-Inspired Classical Algorithm for Recommendation Systems

Ewin Tang

University of Texas at Austin · 2019 (preprint 2018) · Difficulty ★★★★☆

Reference

Tang, E. (2019). A quantum-inspired classical algorithm for recommendation systems. Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing (STOC '19), 217-228. arXiv:1807.04271.

Preprint: arXiv:1807.04271

This page is an independent explanation. For exact wording, figures, and data, read the original paper.

The short version

Ewin Tang, then an undergraduate, shows that a classical algorithm can solve the recommendation problem in time polylogarithmic in the size of the data, matching the speed of a celebrated quantum algorithm under comparable assumptions. The result removed a prominent claim of exponential quantum speedup in machine learning.

Key findings

  • A classical algorithm with sampling access to the data matrix can produce recommendations in time polylogarithmic in the matrix dimensions, for low-rank matrices.
  • The algorithm matches the Kerenidis-Prakash quantum recommendation algorithm of 2016 up to polynomial factors.
  • The quantum speedup in that setting came from the data-access model, in which the quantum algorithm assumes a fast quantum-accessible data structure, and a classical analogue of that access gives the same scaling.
  • The technique, now called dequantization, applies to other machine learning problems.

Background: why this paper was written

A recommendation system predicts which products a user would like from a large matrix of past preferences, such as users by movies. A common model is that the matrix is approximately low rank, since people's tastes can be described by a small number of factors. Classical methods, such as the singular value decomposition, take time polynomial in the matrix dimensions, which can be millions.

In 2016 Iordanis Kerenidis and Anupam Prakash proposed a quantum algorithm that produced recommendations in time polylogarithmic in the dimensions, an exponential speedup, and it was widely cited as a leading example of quantum machine learning. The speedup depended on assuming that the preference data were stored in a quantum-accessible data structure that allows quantum states of rows to be prepared quickly.

What the researchers did

Tang, advised by Scott Aaronson, asked whether the data structure assumption was doing the work. The quantum algorithm used the structure to prepare states whose amplitudes are proportional to a row of the matrix, and then used quantum linear algebra on those states. A classical analogue of the same assumption is the ability to sample an index of a row or an entry with probability proportional to its squared magnitude, which is the kind of access a classical data structure can also provide.

With this access, Tang designed a randomized algorithm based on length-squared sampling and low-rank approximation. The algorithm samples a small number of rows and columns, computes a small matrix that approximates the original in the sense relevant for the singular values, and uses it to estimate the quantity needed for the recommendation. Techniques from randomized numerical linear algebra, due to Frieze, Kannan, and Vempala, underpin it.

The paper proves that the running time is polynomial in the rank k, in one over the error, and in the logarithm of the dimensions, though the polynomial in k is of fairly high degree. It acknowledges that the quantum algorithm is faster in the exponents, so a polynomial advantage for the quantum algorithm may remain, but not an exponential one.

Results

The headline result is that the exponential quantum speedup for recommendation systems, under the stated input model, does not exist.

The result was posted in July 2018, and within the following two years Tang and others, including Chia, Gilyén, Li, Lin, and Wang, extended the approach to quantum-inspired algorithms for principal component analysis, supervised clustering, low-rank linear systems, and semidefinite programming.

The work also pointed to the importance of input and output models in comparing quantum and classical algorithms, which Aaronson had stressed in his earlier essay on the HHL algorithm.

Key facts and numbers

ItemDetail
YearPreprint July 2018; STOC 2019
TargetKerenidis-Prakash quantum recommendation algorithm (2016)
Classical runtimePolynomial in rank and inverse error, polylogarithmic in dimensions
Access modelLength-squared sampling of rows and entries
Follow-upsDequantized PCA, clustering, regression, and semidefinite programming

Limitations and caveats

The classical algorithm's polynomial dependence on rank and error is large, so it is not practical for typical sizes. The result is about asymptotic scaling.

The result applies to low-rank problems with sampling access. Quantum algorithms for other problems, such as simulation of quantum systems, are not affected.

It does not show that quantum machine learning is worthless. It shows that for this class of problems, the claimed exponential advantage vanishes.

Why it matters

The paper changed how researchers evaluate quantum machine learning claims, by showing that apparent exponential speedups can disappear when classical algorithms are given the same kind of input access. It led to a wave of dequantized algorithms for principal component analysis, clustering, and regression.

What happened next

The paper is a standard example in discussions about how to evaluate claims of quantum advantage, and it is cited in resource estimates and reviews that consider data loading as a bottleneck. The sampling-based methods it introduced became known as dequantization.

The work also had a human side that attracted attention: Tang was 18 when he began it, and his result was welcomed by the quantum computing community, which treated the correction of a major claim as a sign of the field's maturity.

How to read the original paper

The introduction explains the problem and the comparison clearly. The algorithm relies on randomized linear algebra and is technical, so a reader new to the subject can skip the analysis and focus on the discussion of what the result means.

For context, read Aaronson's essay Read the Fine Print, and the quantum PCA and quantum support vector machine pages on this site.

Original abstract (paraphrased)

The paper gives a classical algorithm for the recommendation systems problem, assuming a low-rank preference matrix and the ability to sample from rows and entries according to their squared magnitudes. The algorithm runs in time polynomial in the rank, the inverse of the error, and the logarithm of the matrix dimensions, and is only polynomially slower than the quantum algorithm of Kerenidis and Prakash, which it proves cannot offer an exponential speedup in this model.

Frequently asked questions

What did Ewin Tang prove?

That a classical algorithm with sampling access to the data can solve the recommendation problem about as fast as the quantum algorithm, removing its claimed exponential speedup.

Does this mean quantum machine learning does not work?

No. It shows that some proposed speedups depend on assumptions that classical algorithms can also exploit, and it encourages careful comparisons.

What is dequantization?

The process of finding a classical algorithm that matches a quantum one by using a classical analogue of its data-access assumptions.

Keep exploring

Explanations on this page summarize published work for education (last reviewed September 30, 2026). Numbers are taken from the cited paper or from widely reported follow-up work, and later results may have updated or challenged them. Check the reference above before citing.

← Back to all research papers