Table of Contents
Fetching ...

The complexity of quantum support vector machines

Gian Gentinetta, Arne Thomsen, David Sutter, Stefan Woerner

TL;DR

This paper analyzes the training complexity of quantum support vector machines (QSVMs) under the inevitable shot-noise of quantum kernel evaluations. It provides rigorous complexity bounds for two training paradigms: a dual formulation requiring estimation of the $M\times M$ kernel matrix with $O(M^{4.67}/\varepsilon^2)$ quantum circuit evaluations, and a kernelized Pegasos primal method with $O(\min\{ M^2/\varepsilon^6, 1/\varepsilon^{10} \})$ evaluations under a data-assumption. It also investigates a variational approximate QSVM, showing empirically that its training scales as $O(1/\varepsilon^{2.9})$ and is independent of $M$, albeit with non-convex optimization risks. Across extensive empirical tests, the authors demonstrate that these analytical scalings are essentially tight for practical data, while highlighting that the practical advantage depends on the choice of training approach and the quality of the quantum kernel; the work emphasizes both the potential and the current overhead introduced by quantum measurement noise and non-convex optimization in quantum kernel methods.

Abstract

Quantum support vector machines employ quantum circuits to define the kernel function. It has been shown that this approach offers a provable exponential speedup compared to any known classical algorithm for certain data sets. The training of such models corresponds to solving a convex optimization problem either via its primal or dual formulation. Due to the probabilistic nature of quantum mechanics, the training algorithms are affected by statistical uncertainty, which has a major impact on their complexity. We show that the dual problem can be solved in $O(M^{4.67}/\varepsilon^2)$ quantum circuit evaluations, where $M$ denotes the size of the data set and $\varepsilon$ the solution accuracy compared to the ideal result from exact expectation values, which is only obtainable in theory. We prove under an empirically motivated assumption that the kernelized primal problem can alternatively be solved in $O(\min \{ M^2/\varepsilon^6, \, 1/\varepsilon^{10} \})$ evaluations by employing a generalization of a known classical algorithm called Pegasos. Accompanying empirical results demonstrate these analytical complexities to be essentially tight. In addition, we investigate a variational approximation to quantum support vector machines and show that their heuristic training achieves considerably better scaling in our experiments.

The complexity of quantum support vector machines

TL;DR

This paper analyzes the training complexity of quantum support vector machines (QSVMs) under the inevitable shot-noise of quantum kernel evaluations. It provides rigorous complexity bounds for two training paradigms: a dual formulation requiring estimation of the kernel matrix with quantum circuit evaluations, and a kernelized Pegasos primal method with evaluations under a data-assumption. It also investigates a variational approximate QSVM, showing empirically that its training scales as and is independent of , albeit with non-convex optimization risks. Across extensive empirical tests, the authors demonstrate that these analytical scalings are essentially tight for practical data, while highlighting that the practical advantage depends on the choice of training approach and the quality of the quantum kernel; the work emphasizes both the potential and the current overhead introduced by quantum measurement noise and non-convex optimization in quantum kernel methods.

Abstract

Quantum support vector machines employ quantum circuits to define the kernel function. It has been shown that this approach offers a provable exponential speedup compared to any known classical algorithm for certain data sets. The training of such models corresponds to solving a convex optimization problem either via its primal or dual formulation. Due to the probabilistic nature of quantum mechanics, the training algorithms are affected by statistical uncertainty, which has a major impact on their complexity. We show that the dual problem can be solved in quantum circuit evaluations, where denotes the size of the data set and the solution accuracy compared to the ideal result from exact expectation values, which is only obtainable in theory. We prove under an empirically motivated assumption that the kernelized primal problem can alternatively be solved in evaluations by employing a generalization of a known classical algorithm called Pegasos. Accompanying empirical results demonstrate these analytical complexities to be essentially tight. In addition, we investigate a variational approximation to quantum support vector machines and show that their heuristic training achieves considerably better scaling in our experiments.
Paper Structure (27 sections, 6 theorems, 69 equations, 13 figures, 2 tables, 2 algorithms)

This paper contains 27 sections, 6 theorems, 69 equations, 13 figures, 2 tables, 2 algorithms.

Key Result

Theorem 3

For any matrix $X\in \mathbb{R}^{n\times n}$ whose entries are independent random variables $x_{ij}$ of zero mean, there exists a constant $c > 0$ such that where $\left\lVert\cdot\right\rVert_2 = \sigma_{\max}(\cdot)$ denotes the operator norm induced by the Euclidean vector norm.

Figures (13)

  • Figure 1: Quantum kernel estimation Liu2021Arne: Let $\mathcal{E}(\mathbf{x}_i)$ denote a parametrized unitary fixed by the datum $\mathbf{x}_i$, which defines the feature map $\ket{\psi(\mathbf{x}_i)}=\mathcal{E}(\mathbf{x}_i) \ket{0}^{\otimes q}$. By preparing the state $\mathcal{E}(\mathbf{x}_j)^\dagger \mathcal{E}(\mathbf{x}_i)\ket{0}^{\otimes q}$ and then measuring all of the qubits in the computational basis, a bit string $z \in \{0, 1\}^q$ is determined. When this process is repeated $R$-times, the frequency of the all zero outcome approximates the kernel value $k(\mathbf{x}_i, \mathbf{x}_j)$ in \ref{['eq:quantum_kernel']}.
  • Figure 2: Approximate QSVM Havlicek2019Arne: The classical datum $\mathbf{x}$ is encoded with a feature map circuit $\mathcal{E}(\mathbf{x})$ analogous to the one in \ref{['fig:svm_quantum_kernel_circuit']}. However, the resulting state is then acted upon by a variational circuit $\mathcal{W}(\theta)$, after which measurement in the computational basis is performed to determine the expectation value in \ref{['eq_h_theta']}.
  • Figure 3: Feature map circuit: This quantum circuit (scaled to 8 qubits with nearest-neighbour entanglement) is employed as the feature map in the QSVMs throughout \ref{['sec:empirical_scaling']}. $H$ denotes a Hadamard-gate, $R_z(\theta)$ a single-qubit rotation about the $z$-axis, and $ZZ(\theta)$ a parametric 2-qubit $Z\otimes Z$ interaction (maximally entangled for $\theta = \pi/2$). The feature components $x_1$ and $x_2$ (where $\mathbf{x} = (x_1, x_2)$ is a classical input datum) provide the angles for the rotations. This feature map was chosen due to its previous use in the literature Abbas2020aHavlicek2019.
  • Figure 4: Artificial data: The training data is generated using \ref{['algo:generating_artificial_data']} with the feature map from \ref{['fig:feature_circuit']} and a sample size $M=100$. The linearly separable data is achieved by setting the margin positive ($\mu=0.1$ in this case), while the margin for the overlapping data is negative ($\mu=-0.1$). The colouring in the background corresponds to the fixed classifier used to generate the data (note that this is not necessarily the ideal classifier for the generated data points). To allow visualisation, the data displayed here is generated for 2 qubits according to the same algorithm.
  • Figure 5: $\boldsymbol{\varepsilon}$-scaling of the dual: Using noisy kernel evaluations drawn from a binomial distribution to simulate the number of shots $R$, the kernel matrix $K_R$ is constructed and the dual optimization problem solved. The number of shots is plotted as a function of $\varepsilon$ on a doubly logarithmic scale, where $\varepsilon$ is calculated according to \ref{['eq:eps_dual_heuristic']}. A linear fit inside the log-log plot is then used to determine the empirical exponent. The experiment is repeated for the different regularization parameters $\lambda = 1/10$ and $\lambda = 1/1000$ and run on $n=100$ different realizations of the training data (see \ref{['sec:training_data']}). The markers shown are the means over the different runs and the horizontal error bars correspond to the interval between the 15.9 and 84.1 percentile.
  • ...and 8 more figures

Theorems & Definitions (11)

  • Theorem 3: Latala's theorem Lataa2005 and Vershynin2009
  • Theorem 4: Daniel's Theorem Daniel1973 Liu2021
  • Lemma 5
  • proof
  • Remark 6
  • Lemma 7
  • proof
  • Corollary 8
  • proof
  • Lemma 9
  • ...and 1 more