Questions about How-To Material #13
-
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hello Daniel, thanks for your great questions!
The choice of circuit family for the quantum kernel can have a significant impact on the machine learning model. For these kernel-based methods, we know that a necessary, but not always sufficient, condition for any computational advantage is that the quantum kernel be hard to estimate classically. The quantum kernel built from the It is known that, in principle, kernels that incorporate knowledge about the target problem can outperform problem-agnostic kernels. The discrete logarithm kernel mentioned above is an extreme example of this. In practice, it is not always clear how one can encode problem-specific information into the quantum feature map -- this is an ongoing research challenge. By introducing trainable parameters we can explore broad families of quantum feature maps in search of ones that capture useful structure about our target problem.
Think of a parameterized quantum kernel as being analogous to a classical neural network. The neural network has inputs and trainable parameters/weights and this parameterized model represents a family of possible functions. Once you assign a specific value to all the parameters of your model, it now represents one specific function on the inputs, rather than a family of possible functions. We are invoking precisely the same idea when we discuss binding parameters to a quantum circuit. By binding values to each user parameter in our quantum feature map, we are doing the analogous operation to specifying the weights of our neural network. This essentially selects one particular quantum feature map from a parameterized family of feature maps. As our classical optimizer searches over a parameterized family of feature maps it will be repeatedly binding new values to the user parameters of our trainable quantum feature map. This in turn will yield specific quantum feature maps drawn from our parameterized family, and we can then evaluate the performance of these feature maps so that our classical optimizer can attempt to learn progressively better user parameters for our given problem.
The broad goal of kernel training is to find a quantum kernel that captures some underlying structure of our data. Phrased differently: we are less concerned with the ability of a quantum kernel to precisely learn the labels of a specific training dataset and are primarily interested in our kernel's ability to generalize / infer the labels of unseen data. For this reason, it is natural to optimize a trainable quantum kernel according to how well it captures the structure of your data, rather than optimizing it simply for training accuracy. The SVCLoss (or, 'svc_loss'), for example, returns the value of the SVC's optimized objective function (which has been trained using a specific quantum kernel on a specific dataset). This quantity is explicitly related to bounds on the generalization error of your underlying model, and is therefore a useful tool when seeking to build a quantum kernel that performs well on unseen data. The study of generalization bounds for quantum and classical models is an ongoing area of research and these bounds are known to often be quite loose. The important takeaway here, is that optimizing the SVCLoss in place of training accuracy is a step in the right direction; however, we may yet find even better loss functions that lead to stronger generalization. It may even be the case that using dataset-specific loss functions will lead to even greater performance. For this reason, we encourage users to define their own kernel loss functions and we hope this will facilitate research on quantum kernel training strategies. It is also worth noting that we currently focus on using quantum kernels for binary classification; however, kernel methods extend to other problem areas such as regression, clustering, and more. We've designed the interface to accommodate users who are interested in optimizing kernels for these tasks and would like to design suitable loss functions. I hope these answers make things a bit clearer! |
Beta Was this translation helpful? Give feedback.
-
Bryce,
Thank you for your reply, my apologies for the late reply, still digesting it. I will likely have some more questions once I get a chance to experiment with what you sent over on live data. Already have tried the QKT methods on multiple datasets, and created custom kernels for those datasets and found good results.
Daniel Beaulieu
Specialist Master
***@***.******@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I'm glad to hear it! |
Beta Was this translation helpful? Give feedback.
Hello Daniel, thanks for your great questions!
The choice of circuit family for the quantum kernel can have a significant impact on the machine learning model. For these kernel-based methods, we know that a necessary, but not always sufficient, condition for any computational advantage is that the quantum kernel be hard to estimate classically. The quantum kernel built from the
ZZFeatureMap
in the Qiskit library is conjectured to be one such example. (More recently, a quantum kernel and learning problem based on the h…