Skip to main content
QUICK REVIEW

[Paper Review] A quantum algorithm for training wide and deep classical neural networks

Alexander Zlokapa, Hartmut Neven|arXiv (Cornell University)|Jul 19, 2021
Quantum Computing Algorithms and ArchitectureComputer Science4 references12 citations
TL;DR

This paper proposes a quantum algorithm that achieves polylogarithmic training time for wide and deep classical neural networks by leveraging the neural tangent kernel (NTK) formalism and solving quantum linear systems (QLSA) for matrix inversion. It demonstrates that when data allows efficient state preparation and readout—as shown for MNIST—the algorithm offers an exponential speedup over classical gradient descent, with numerical evidence supporting its efficacy on convolutional networks with pooling.

ABSTRACT

Given the success of deep learning in classical machine learning, quantum algorithms for traditional neural network architectures may provide one of the most promising settings for quantum machine learning. Considering a fully-connected feedforward neural network, we show that conditions amenable to classical trainability via gradient descent coincide with those necessary for efficiently solving quantum linear systems. We propose a quantum algorithm to approximately train a wide and deep neural network up to $O(1/n)$ error for a training set of size $n$ by performing sparse matrix inversion in $O(\log n)$ time. To achieve an end-to-end exponential speedup over gradient descent, the data distribution must permit efficient state preparation and readout. We numerically demonstrate that the MNIST image dataset satisfies such conditions; moreover, the quantum algorithm matches the accuracy of the fully-connected network. Beyond the proven architecture, we provide empirical evidence for $O(\log n)$ training of a convolutional neural network with pooling.

Motivation & Objective

  • To bridge quantum machine learning with classical deep learning by enabling quantum speedups for standard neural network architectures.
  • To identify conditions under which quantum algorithms can outperform classical gradient descent in training wide and deep neural networks.
  • To demonstrate that efficient quantum training is feasible when the data distribution permits efficient state preparation and readout, as in the MNIST dataset.
  • To extend theoretical results from fully-connected networks to convolutional networks with pooling layers using the NTK framework.
  • To provide empirical evidence that the quantum algorithm maintains accuracy comparable to classical training while achieving sub-polynomial runtime scaling.

Proposed method

  • Formalizes the training of wide, deep neural networks as solving a system of linear equations via the neural tangent kernel (NTK), where the output is given by $ \mathbf{k}_*^T K^{-1} \mathbf{y} $.
  • Applies the quantum linear systems algorithm (QLSA) to invert the NTK matrix $ K $ in $ O(\log n) $ time, assuming $ K $ is sparse and well-conditioned.
  • Employs a sparsity pattern $ s = O(\log n) $ to reduce matrix size while preserving conditioning, using the Gershgorin circle theorem to bound eigenvalue perturbations.
  • Preconditions the NTK by suppressing off-diagonal elements by a factor of $ O((\log n)^{9/10}) $, ensuring bounded condition number even at scale.
  • Uses a fixed sparsity pattern derived from a small subset of training data to select important NTK elements, minimizing impact on performance without increasing complexity.
  • Integrates efficient quantum state preparation and measurement protocols to ensure post-selection and readout costs remain $ O(\log n) $, enabling end-to-end polylogarithmic runtime.

Experimental results

Research questions

  • RQ1Can quantum algorithms achieve exponential speedup over classical gradient descent for training wide and deep classical neural networks?
  • RQ2Under what conditions on data distribution does efficient quantum training become feasible—specifically regarding state preparation and readout?
  • RQ3Does the neural tangent kernel (NTK) formalism enable quantum speedups beyond fully-connected networks, including convolutional networks with pooling?
  • RQ4How does the conditioning of the NTK matrix affect the feasibility and efficiency of quantum linear system solving in this context?
  • RQ5Can sparsification of the NTK matrix preserve generalization performance while enabling polylogarithmic runtime on real-world datasets like MNIST?

Key findings

  • The quantum algorithm achieves $ O(\log n) $ runtime for training a wide and deep fully-connected neural network, with $ O(1/n) $ error for a training set of size $ n $, under the assumption of efficient state preparation and readout.
  • Numerical experiments confirm that the MNIST dataset satisfies the required conditions for efficient state preparation and readout, enabling a polylogarithmic runtime and matching classical accuracy.
  • The condition number of the NTK matrix remains bounded by $ O(\log n) $ even as the training set size increases, supporting efficient quantum linear system solving.
  • For convolutional neural networks with pooling, the NTK remains well-conditioned with a condition number approaching a constant as depth increases, enabling similar quantum speedups.
  • Sparsification of the NTK matrix using a fixed pattern based on a small subset of data preserves classification performance while maintaining $ O(\log n) $ conditioning and runtime.
  • The combination of sparsification, preconditioning via off-diagonal suppression, and efficient measurement ensures that the total quantum runtime remains polylogarithmic in $ n $, achieving an exponential speedup over classical gradient descent.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.