An efficient quantum algorithm for generative machine learning

Xun Gao, Zhengyu Zhang, Luming Duan · DOI

Abstract

A central task in the field of quantum computing is to find applications where quantum computer could provide exponential speedup over any classical computer. Machine learning represents an important field with broad applications where quantum computer may offer significant speedup. Several quantum algorithms for discriminative machine learning have been found based on efficient solving of linear algebraic problems, with potential exponential speedup in runtime under the assumption of effective input from a quantum random access memory. In machine learning, generative models represent another large class which is widely used for both supervised and unsupervised learning. Here, we propose an efficient quantum algorithm for machine learning based on a quantum generative model. We prove that our proposed model is exponentially more powerful to represent probability distributions compared with classical generative models and has exponential speedup in training and inference at least for some instances under a reasonable assumption in computational complexity theory. Our result opens a new direction for quantum machine learning and offers a remarkable example in which a quantum algorithm shows exponential improvement over any classical algorithm in an important application field.

Introduction

In machine learning, generative models such as Boltzmann Machines or Bayesian Networks are essential for learning the underlying structure of data. These models allow for generating new samples and performing complex inference. However, classical generative models are often computationally expensive to train and sample from.

While quantum algorithms for discriminative tasks (like classification) exist, they frequently rely on Quantum Random Access Memory (QRAM). The engineering challenge of building QRAM—where components scale exponentially with qubits—often negates theoretical speedups. This paper introduces a Quantum Generative Model (QGM) that achieves exponential expressivity and speedup without the need for QRAM.

The Quantum Generative Model (QGM)

The proposed QGM leverages the principles of quantum interference to represent probability distributions more efficiently than classical factor graphs.

Comparison of classical factor graphs (a) and the proposed Quantum Generative Model (c), with component definitions.

The model is constructed using a combination of graph states and tensor networks:

  1. Graph States: The foundation is a graph state representing a specific network topology, which captures complex entanglement.
  2. Local Operations: Local, invertible (but not necessarily unitary) matrices $M$ are applied to each qubit. These matrices contain the learnable parameters.
  3. Probability Amplitudes: Unlike classical models that sum positive probabilities, QGMs sum complex probability amplitudes. This allows for constructive and destructive interference, making the model fundamentally more expressive.

Training and Inference Algorithm

The researchers reduce the tasks of training and inference to preparing a specific quantum state. This is achieved through a novel application of many-body physics techniques:

  1. Parent Hamiltonian: They define a mathematical description of a system where the target state is the unique ground state (the state with the lowest energy).
  2. Recursive State Preparation: To reach this ground state efficiently, the algorithm uses a recursive version of Quantum Phase Estimation (QPE). By transitioning through a sequence of intermediate states $|Q_t\rangle$, the system is "cooled" into the desired configuration.
Illustration of the recursive state preparation process and the vector space relationship between successive states.

This recursive approach ensures that the algorithm remains efficient, provided the "spectral gap" (the energy difference between the ground and first excited state) does not become too small.

Theoretical Results and Complexity

The paper establishes three core theorems that define the power of QGMs:

  • Representation: QGMs can efficiently represent any classical factor graph, making them a universal generalization of common classical generative models.
  • Exponential Power: There exist probability distributions that a QGM can represent with a polynomial number of parameters, whereas any classical model would require an exponential number of variables.
  • Provable Speedup: For specific instances, the quantum algorithm for training and inference provides an exponential speedup over any classical alternative, assuming standard complexity theory conjectures (like the hardness of simulating quantum circuits).

Conclusion and Future Outlook

The QGM framework represents a significant advancement in QML by bypassing the QRAM bottleneck and offering provable advantages. While the "worst-case" complexity for training may still be NP-hard (similar to classical Boltzmann machines), the quantum advantage is clear for specific classes of distributions.

Future research will focus on identifying real-world datasets that naturally fit the efficiency conditions of this model—specifically those maintaining a healthy spectral gap during the recursive cooling process. Such applications could revolutionize fields ranging from drug discovery to financial risk modeling.

Summary updated

Abstract

A central task in the field of quantum computing is to find applications where quantum computer could provide exponential speedup over any classical computer. Machine learning represents an important field with broad applications where quantum computer may offer significant speedup. Several quantum algorithms for discriminative machine learning have been found based on efficient solving of linear algebraic problems, with potential exponential speedup in runtime under the assumption of effective input from a quantum random access memory. In machine learning, generative models represent another large class which is widely used for both supervised and unsupervised learning. Here, we propose an efficient quantum algorithm for machine learning based on a quantum generative model. We prove that our proposed model is exponentially more powerful to represent probability distributions compared with classical generative models and has exponential speedup in training and inference at least for some instances under a reasonable assumption in computational complexity theory. Our result opens a new direction for quantum machine learning and offers a remarkable example in which a quantum algorithm shows exponential improvement over any classical algorithm in an important application field.
BibTeX
@misc{gao2017efficient,
  author = {Xun Gao and Zhengyu Zhang and Luming Duan},
  title = {{An efficient quantum algorithm for generative machine learning}},
  year = {2017},
  eprint = {1711.02038},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1711.02038},
}
Figure