The Inductive Bias of Quantum Kernels

1 Introduction . In recent years , much attention has been dedicated to studies of how small and noisy quantum devices [ 1 ] could be used for near term applications to showcase the power of quantum computers . Besides fundamental demonstrations [ 2 ] , potential applications that have been discussed are in quantum chemistry [ 3 ] , discrete optimization [ 4 ] and machine learning ( ML ) [ 5–12 ] . Initiated by the seminal HHL algorithm [ 13 ] , early work in quantum machine learning ( QML ) was focused on speeding up linear algebra subroutines , commonly used in ML , offering the perspective of a runtime logarithmic in the problem size [ 14–17 ] . However , most of these works have an inverse polynomial scaling of the runtime in the error and it was shown rigorously by Ciliberto et al . [ 18 ] that due to the quantum mechanical measurement process a runtime complexity O ( √ n ) is necessary for convergence rate 1/ √ n. Rather than speeding up linear algebra subroutines , we focus on more recent suggestions that use a quantum device to define and implement the function class and do the optimization on a classical computer . There are two ways to that : the first are so-called Quantum Neural Networks ( QNN ) or ∗JMK and SB contributed equally and are ordered randomly . 35th Conference on Neural Information Processing Systems ( NeurIPS 2021 ) . parametrized quantum circuits [ 5–7 ] which can be trained via gradient based optimization [ 5 , 19–23 ] . The second approach is to use a predefined way of encoding the data in the quantum system and defining a quantum kernel as the inner product of two quantum states [ 7–11 ] . These two approaches essentially provide a parametric and a non-parametric path to quantum machine learning , which are closely related to each other [ 11 ] . Since the optimization of QNNs is non-convex and suffers from so-called Barren Plateaus [ 24 ] , we here focus on quantum kernels , which allow for convex problems and thus lend themselves more readily to theoretical analysis . The central idea of using a QML model is that it enables to do computations that are exponentially hard classically . However , also in classical ML , kernel methods allow us to implicitly work with high- or infinite dimensional function spaces [ 25 , 26 ] . Thus , purely studying the expressivity of QML models [ 27 ] is not sufficient to understand when we can expect speed-ups . Only recently first steps where taken into this direction [ 10 , 12 , 28 ] . Assuming classical hardness of computing discrete logarithms , Liu et al . [ 10 ] proposed a task based on the computation of the discrete logarithm where the quantum computer , equipped with the right feature mapping , can learn the target function with exponentially less data than any classical ( efficient ) algorithm . Similarly , Huang et al . [ 12 ] analyzed generalization bounds and realized that the expressivity of quantum models can hinder generalization . They proposed a heuristic to optimize the labels of a dataset such that it can be learned well by a quantum computer but not a classical machine . In this work , we relate the discussion of quantum advantages to the classical concept of inductive bias . The no free lunch theorem informally states that no learning algorithm can outperform other algorithms on all problems . This implies that an algorithm that performs well on one type of problem necessarily performs poorly on other problems . A standard inductive bias in ML is to prefer functions that are continuous . An algorithm with that bias , however , will then struggle to learn functions that are discontinuous . For a QML model to have an edge over classical ML models , we could thus ensure that it is equipped with an inductive bias that can not be encoded ( efficiently ) with a classical machine . If a given dataset fits this inductive bias , the QML model will outperform any classical algorithm . For kernel methods , the qualitative concept of inductive bias can be formalized by analyzing the spectrum of the kernel and relating it to the target function [ 25 , 29–33 ] . Our main contribution is the analysis of the inductive bias of quantum machine learning models based on the spectral properties of quantum kernels . First , we show that quantum kernel methods will fail to generalize as soon as the data embedding into the quantum Hilbert space is too expressive ( Theorem 1 ) . Then we note that projecting the quantum kernel appropriately allows to construct inductive biases that are hard to create classically ( Figure 1 ) . However , our Theorem 2 also implies that estimating the biased kernel requires exponential measurements , a phenomenon reminiscent of the Barren plateaus observed in quantum neural networks . Finally we show experiments supporting our main claims . While our work gives guidance to find a quantum advantage in ML , this yields no recipe for obtaining a quantum advantage on a classical dataset . We conjecture that unless we have a clear idea how the data generating process can be described with a quantum computer , we can not expect an advantage by using a quantum model in place of a classical machine learning model . 2 Supervised learning . We briefly introduce the setting and notation for supervised learning as a preparation for our analysis of quantum mechanical methods in this context . The goal of supervised learning is the estimation of a functional mechanism based on data generated from this mechanism . For concreteness we focus on the regression setting where we assume data is generated according to Y = f∗ ( X ) + ε where ε denotes zero-mean noise . We focus on X ∈ X ⊂ Rd , Y ∈ R. We denote the joint probability distribution of ( X , Y ) by D and we are given n i.i.d . observations Dn from D. We will refer to the marginal distribution of X as µ , define the L2µ inner product 〈f , g〉 = ∫ f ( x ) g ( x ) µ ( dx ) and denote the corresponding norm by ‖ · ‖ . The least square risk and the empirical risk of some hypothesis h : X → R is defined by R ( h ) = ED [ ( h ( X ) − Y ) 2 ] and Rn ( h ) = EDn [ ( h ( X ) − Y ) 2 ] . In supervised machine learning , one typically considers a hypothesis spaceH of functions h : X → R and tries to infer argminh∈HR ( h ) ( assuming for simplicity that the minimizer exists ) . Typically this is done by ( regularized ) empirical risk minimization argminh∈HRn ( h ) + λΩ ( h ) , where λ > 0 and Ω determine the regularization . The risk of h can then be decomposed in generalization and training error R ( h ) = ( R ( h ) −Rn ( h ) ) +Rn ( h ) . Kernel ridge regression . We will focus on solving the regression problem over a reproducing kernel Hilbert space ( RKHS ) [ 25 , 26 ] . An RKHS F associated with a positive definite kernel k : X ×X → R is the space of functions such that for all x ∈ X and h ∈ F the reproducing property h ( x ) = 〈h , k ( x , · ) 〉F holds . Kernel ridge regression regularizes the RKHS norm , i.e. , Ω ( h ) = ‖h‖2F . With observations { ( x ( i ) , y ( i ) ) } ni=1 we can compute the kernel matrix K ( X , X ) ij = k ( x ( i ) , x ( j ) ) and the Representer Theorem [ 34 ] ensures that the empirical risk minimizer of kernel ridge regression is of the form f̂λn ( · ) = ∑n i=1 αik ( x ( i ) , · ) , with α = ( K ( X , X ) + λ id ) −1y . The goal of our work is to study when a ( quantum ) kernel is suitable for learning a particular problem . The central object to study this is the integral operator . Spectral properties and inductive bias . For kernel k and marginal distribution µ , the integral operator K , is defined as ( Kf ) ( x ) = ∫ k ( x , x′ ) f ( x′ ) µ ( dx′ ) . Mercer ’ s Theorem ensures that there exist a spectral decomposition of K with ( possibly infinitely many ) eigenvalues γi ( ordered nonincreasingly ) and corresponding eigenfunctions φi , which are orthonormal in L2µ , i.e. , 〈φi , φj〉 = δi , j . We will assume that Tr [ K ] = ∑ i γi = 1 which we can ensure by rescaling the kernel . We can then write k ( x , x′ ) = ∑ i γiφi ( x ) φi ( x ′ ) . While the functions φ form a basis of F they might not completely span L2µ . In this case we simply complete the basis and implicitly take γ = 0 for the added functions . Then we can decompose functions in L2µ as f ( x ) = ∑ i aiφi ( x ) . ( 1 ) We have ‖f‖2 = ∑ i a 2 i and ‖f‖2F = ∑ i a2i γi ( if f ∈ F ) . Kernel ridge regression penalizes the RKHS norm of functions . The components corresponding to zero eigenvalues are infinitely penalized and can not be learned since they are not in the RKHS . For large regularization λ the solution f̂λn is heavily biased towards learning only the coefficients of the principal components ( corresponding to the largest eigenvalues ) and keeps the other coefficients small ( at the risk of underfitting ) . Decreasing the regularization allows ridge regression to also fit the other components , however , at the potential risk of overfitting to the noise in the empirical data . Finding good choices of λ thus balances this bias-variance tradeoff . We are less concerned with the choice of λ , but rather with the spectral properties of a kernel that allow for a quantum advantage . Similar to the above considerations , a target function f can easily be learned if it is well aligned with the principal components of a kernel . In the easiest case , the kernel only has a single non-zero eigenvalue and is just k ( x , x′ ) = f ( x ) f ( x′ ) . Such a construction is arguably the simplest path to a quantum advantage in ML . Example 1 ( Trivial Quantum Advantage ) . Let f be a scalar function that is easily computable on a quantum device but requires exponential resources to approximate classically . Generate data as Y = f ( X ) + . The kernel k ( x , x′ ) = f ( x ) f ( x′ ) then has an exponential advantage for learning f from data . To go beyond this trivial case , we introduce two qualitative measures to judge the quality of a kernel for learning the function f . The kernel target alignment of Cristianini et al . [ 30 ] is A ( k , f ) = 〈k , f ⊗ f〉 〈k , k〉1/2 〈f ⊗ f , f ⊗ f〉1/2 = ∑ i γia 2 i ( ∑ i γ 2 i ) 1/2 ∑ i a 2 i ( 2 ) and measures how well the kernel fits f . If A = 1 , learning reduces to estimating a single real parameter , whereas for A = 0 , learning is infeasible . We note that the kernel target alignment also weighs the contributions of f depending on the corresponding eigenvalue , i.e. , the alignment is better if large |ai| correspond to large γi . The kernel target alignment was used extensively to optimize kernel functions [ 31 ] and recently also used to optimize quantum kernels [ 35 ] . In a similar spirit , the task-model alignment of Canatar et al . [ 32 ] measures how much of the signal of f is captured in the first i principal components : C ( i ) = ∑ j≤i a 2 j ( ∑ j a 2 j ) −1 . The slower C ( i ) approaches 1 , the harder it is to learn as the target function is more spread over the eigenfunctions .

Summary: This article studies the learnability of functions using quantum kernels. More precisely, it investigates the potential advantages in learning that quantum kernels may offer compared to classical ones. The focus was put on ridge kernel regression as a running example of a learning task. In this case, the analysis boils down to two ingredients: 1) the spectral properties of the corresponding integration operator 2) the alignment of the function to learn with the first eigenfunctions of the integration operator. The contribution of this work is to highlight the fact that, under some assumptions, the class of functions for which quantum kernels would have an advantage over classical ones is very restricted: the functions that belong to RKHSs associated with the so-called biased kernels.