Table of Contents
Fetching ...

A Hyperparameter Study for Quantum Kernel Methods

Sebastian Egginger, Alona Sakhnenko, Jeanette Miriam Lorenz

TL;DR

This study investigates how hyperparameter choices affect the empirical performance and generalization behavior of quantum kernel methods on classical datasets. By comparing classical kernels with projected quantum kernels built from reduced density matrices, the authors quantify the geometric difference (GD) as a proxy for potential quantum advantage. Across 11 datasets, they identify $t$ (evolution time) as the most influential hyperparameter for both accuracy and GD, with the distance kernel generally outperforming inner kernels when $ abla$ is optimized. The work also proposes a data-driven pipeline for applying quantum kernels to new datasets and analyzes relabeled datasets to explore conditions under which quantum methods may outperform classical ones, providing practical guidance for future QKM studies. The findings offer actionable insights into hyperparameter tuning, kernel choices, and data-preprocessing strategies to better assess and harness potential quantum advantages in kernel methods.

Abstract

Quantum kernel methods are a promising method in quantum machine learning thanks to the guarantees connected to them. Their accessibility for analytic considerations also opens up the possibility of prescreening datasets based on their potential for a quantum advantage. To do so, earlier works developed the geometric difference, which can be understood as a closeness measure between two kernel-based machine learning approaches, most importantly between a quantum kernel and a classical kernel. This metric links the quantum and classical model complexities, and it was developed to bound generalization error. Therefore, it raises the question of how this metric behaves in an empirical setting. In this work, we investigate the effects of hyperparameter choice on the model performance and the generalization gap between classical and quantum kernels. The importance of hyperparameters is well known also for classical machine learning. Of special interest are hyperparameters associated with the quantum Hamiltonian evolution feature map, as well as the number of qubits to trace out before computing a projected quantum kernel. We conduct a thorough investigation of the hyperparameters across 11 datasets and we identify certain aspects that can be exploited. Analyzing the effects of certain hyperparameter settings on the empirical performance, as measured by cross validation accuracy, and generalization ability, as measured by geometric difference described above, brings us one step closer to understanding the potential of quantum kernel methods on classical datasets.

A Hyperparameter Study for Quantum Kernel Methods

TL;DR

This study investigates how hyperparameter choices affect the empirical performance and generalization behavior of quantum kernel methods on classical datasets. By comparing classical kernels with projected quantum kernels built from reduced density matrices, the authors quantify the geometric difference (GD) as a proxy for potential quantum advantage. Across 11 datasets, they identify (evolution time) as the most influential hyperparameter for both accuracy and GD, with the distance kernel generally outperforming inner kernels when is optimized. The work also proposes a data-driven pipeline for applying quantum kernels to new datasets and analyzes relabeled datasets to explore conditions under which quantum methods may outperform classical ones, providing practical guidance for future QKM studies. The findings offer actionable insights into hyperparameter tuning, kernel choices, and data-preprocessing strategies to better assess and harness potential quantum advantages in kernel methods.

Abstract

Quantum kernel methods are a promising method in quantum machine learning thanks to the guarantees connected to them. Their accessibility for analytic considerations also opens up the possibility of prescreening datasets based on their potential for a quantum advantage. To do so, earlier works developed the geometric difference, which can be understood as a closeness measure between two kernel-based machine learning approaches, most importantly between a quantum kernel and a classical kernel. This metric links the quantum and classical model complexities, and it was developed to bound generalization error. Therefore, it raises the question of how this metric behaves in an empirical setting. In this work, we investigate the effects of hyperparameter choice on the model performance and the generalization gap between classical and quantum kernels. The importance of hyperparameters is well known also for classical machine learning. Of special interest are hyperparameters associated with the quantum Hamiltonian evolution feature map, as well as the number of qubits to trace out before computing a projected quantum kernel. We conduct a thorough investigation of the hyperparameters across 11 datasets and we identify certain aspects that can be exploited. Analyzing the effects of certain hyperparameter settings on the empirical performance, as measured by cross validation accuracy, and generalization ability, as measured by geometric difference described above, brings us one step closer to understanding the potential of quantum kernel methods on classical datasets.
Paper Structure (31 sections, 10 equations, 30 figures, 5 tables)

This paper contains 31 sections, 10 equations, 30 figures, 5 tables.

Figures (30)

  • Figure 1: Distribution of accuracies achieved by an SVM with a quantum kernel on the test set for all hyperparameters setting from the search grid (\ref{['sec:models']}) for each dataset (\ref{['tab:data']}). The distributions are visualized as boxplots. Additionally, the diamonds indicate the best accuracies achieved by classical and quantum models. The dashed line indicates the accuracy that would be achieved by random guessing.
  • Figure 2: Mean Gini importance for each hyperparameter listed in \ref{['tab:hyperparameters']}, across all datasets listed \ref{['tab:data']} and for both accuracy and GD to the classical RBF kernel. The height of each bar represent mean value while error bars indicate standard deviation. The importance indicates how much influence the variation of this hyperparameter value has on one of the two metrics. These importances were extracted from GBDT model fitted on the results from the search grid (\ref{['sec:analysis']}).
  • Figure 3: Dependence of the GD, the test accuracy and the cross validation accuracy on $t$ (evolution time). The shadows illustrate the standard deviations when averaging over the other parameters and over all datasets. The GD was scaled to the range $[0, 1]$ by dividing through the maximum.
  • Figure 4: a Dependence of the accuracy and the GD on $\gamma$ (bandwidth) and $t$ (evolution time) combined. The graphic displays the mean over all datasets and other parameters. b Different marginals of the accuracy depending on 2 hyperparameters. $\gamma$ in combination with $C$ (regularization strength), $T$ (number of Trotterization steps) and $K$ (RDM size) as well as $t$ (evolution time) in combination with $C$ (regularization strength).
  • Figure 5: Dependence of the test accuracy on the choice of basis for the kernel function. For this comparison $\gamma$ is optimized and not averaged. The specific form of a distance- or inner based kernel function is given in \ref{['sec:quantum_kernels']}. The dashed line indicates the accuracy that would be achieved by random guessing.
  • ...and 25 more figures