1
$\begingroup$

When I used and tested out the Quantum Support Vector Machine for just 120 samples of a large dataset (Training - 100 and Testing - 20). Its kernel classification results were quite close to the Classical Support Vector Machine. But, when I tested the whole dataset on the Quantum Support Vector Machine the kernel classification results differed a lot from the Classical Support Vector Machine.

So, I wanted to ask if this difference in result is only due to quantum noise? Or are there any other factors contributing to this difference?

$\endgroup$
5
  • 1
    $\begingroup$ Could you provide more details about the setup of your experiment? By Quantum SVM do you mean a classical SVM trained using a kernel computed on a quantum computer, or an SVM that is trained using a quantum algorithm with access to qRAM? What kernel function are you implementing for the classical and quantum classifiers? How big is the "whole dataset" and what kind of sampling error do you expect from a 100/20 train/test split based on cross validation? $\endgroup$
    – forky40
    Sep 12 at 21:50
  • $\begingroup$ Yes, @forky40. I am talking about kernel classification on a quantum computer for QSVM, not the qRAM one. I am using the digits dataset on sklearn. I am using the precomputed kernel classification score(i.e. the SVC) by taking the training and test kernel matrices. $\endgroup$
    – sohamb172
    Sep 13 at 6:26
  • $\begingroup$ Okay, and what sort of "quantum noise" do you mean here - is this the result of running kernel experiments on real hardware? How many qubits? What circuit ansatz? And again, 20 test points is very small. If you compute the test classification score over many randomly sampled 100 train / 20 test datasets, its possible that the variance in those scores is very large, meaning that the difference in classical vs quantum performance could be attributed to statistical fluctuations. $\endgroup$
    – forky40
    Sep 13 at 18:56
  • $\begingroup$ Yes, I have used the ZZFeatureMap in Qiskit. You're right probably the train-test-split ratio I have used is a little incorrect. But, I just wanted to know some disadvantages of the QSVM over the Classical SVM. Like you know noise is one of the problems. I wanted to know some more in general. $\endgroup$
    – sohamb172
    Sep 13 at 19:27
  • $\begingroup$ I also wanted to know, do large datasets reduce the performance of a QSVM? $\endgroup$
    – sohamb172
    Sep 13 at 19:29
1
$\begingroup$

Large datasets will not necessarily reduce the performance of an quantum kernel SVM (a Support Vector Machine trained classically using a kernel function evaluated on a quantum computer). You should actually expect the opposite: Training on larger datasets will reduce the generalization error and improve classifier (test) performance provided that you are accounting for overfitting.

For the sample size you mentioned, one reason for the behavior you observe may be that the classifier performance is dominated by statistical fluctuation: The test performance evaluated on a small subset of data is just not a reliable indicator of the classifier's performance on the complete test set.

One way to assess this is through cross validation: Randomly sample (with replacement) $N$ many subsets of data containing $m$ training points and $t$ testing points ($m=100$, $t=20$ in your case) and compute the test score for sample. Then compute the mean and variance of this set of $N$ many test scores. If the variance in these scores is large, it means that a typical sample of $(m, t)$ train/test points is a poor indicator for the typical performance of a classifier with a size $m$ training set. This increases the probability that the test performance for your sample of data is significantly higher (or lower) than the typical performance of a classifier trained on $m$ datapoints, which will make it more difficult to discern an improvement in performance as $m$ increases.

More generally, there are many different reasons why the performance of a quantum kernel SVM would differ from a classical one. Hardware noise could be the issue, but also the expressiveness of the quantum kernel $k_Q$ (what decision boundaries can be expressed by this particular kernel function?), sampling error in evaluating $k_Q$, "curse of dimensionality" type effects wherein the kernel matrix $K_{ij} = k_Q(x_i, x_j)$ approaches the identity matrix, and so on. A thorough discussion of these effects is better left to a separate question.

$\endgroup$
1
  • $\begingroup$ Alright! Thanks @forky40 $\endgroup$
    – sohamb172
    Sep 14 at 5:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.