Abstract
Quantum computers are known to provide speedups over classical state-of-the-art machine learning methods in some specialized settings. For example, quantum kernel methods have been shown to provide an exponential speedup on a learning version of the discrete logarithm problem. Understanding the generalization of quantum models is essential to realizing similar speedups on problems of practical interest. Recent results demonstrate that generalization is hindered by the exponential size of the quantum feature space. Although these results suggest that quantum models cannot generalize when the number of qubits is large, in this paper we show that these results rely on overly restrictive assumptions. We consider a wider class of models by varying a hyperparameter that we call quantum kernel bandwidth. We analyze the large-qubit limit and provide explicit formulas for the generalization of a quantum model that can be solved in closed form. Specifically, we show that changing the value of the bandwidth can take a model from provably not being able to generalize to any target function to good generalization for well-aligned targets. Our analysis shows how the bandwidth controls the spectrum of the kernel integral operator and thereby the inductive bias of the model. We demonstrate empirically that our theory correctly predicts how varying the bandwidth affects generalization of quantum models on challenging datasets, including those far outside our theoretical assumptions. We discuss the implications of our results for quantum advantage in machine learning.
Introduction
In classical machine learning, kernels allow us to map data into high-dimensional spaces to find patterns. Quantum computers naturally offer an exponentially large "feature space" (Hilbert space), which initially seemed like a goldmine for machine learning. However, recent theoretical work has highlighted a significant challenge: as the number of qubits ($n$) increases, quantum kernels tend to become "flat." This means the inner products between different data points shrink toward zero or a constant value. Mathematically, the kernel starts behaving like an identity matrix, allowing the model to memorize training data perfectly while failing to predict unseen points—a quantum manifestation of the "curse of dimensionality."
Methodology: The Bandwidth Hyperparameter
The authors introduce a bandwidth hyperparameter ($c$) into the quantum embedding process to control the model's inductive bias. Geometrically, in a single-qubit system represented by the Bloch sphere, this parameter restricts the portion of the sphere that the data can occupy.
Key methodological components include:
- Analytical Toy Model: Closed-form expressions for the eigenvalue spectrum of a specific quantum kernel were derived to observe how bandwidth $c$ prevents top eigenvalues from vanishing as $n$ grows.
- Task-Model Alignment Theory: Using the replica method from statistical physics, the authors predict generalization error based on the alignment between the kernel's eigenfunctions and the target function.
- Scaling Analysis: The study identifies a critical scaling law, $c \propto n^{-\alpha}$ (where $\alpha \ge 0.5$), necessary to maintain a non-flat spectrum in the large-qubit limit.
Empirical Validation
The theory was validated using both synthetic and real-world datasets. Real-world benchmarks were downsampled via Principal Component Analysis (PCA) to 22 dimensions for quantum simulation compatibility:
- FMNIST (Fashion-MNIST): Images of clothing.
- KMNIST (Kuzushiji-MNIST): Classical Japanese characters.
- PLAsTiCC: Astronomical data for stellar transient classification.
Key Insights
- Inductive Bias Control: Bandwidth serves as a knob for inductive bias. Without it, a model treats all functions as equally complex, leading to a flat spectrum. Tuning it allows the model to prioritize certain "simple" modes.
- Breaking the Curse: By allowing the embedding to scale with the number of qubits, the previously suggested "impossibility" of generalization in high-dimensional quantum spaces is overcome.
- The Goldilocks Zone: An optimal bandwidth exists. Excessive bandwidth leads to memorization (flat spectrum), while insufficient bandwidth causes underfitting. The ideal setting captures the essential data modes.
Results and Discussion
Empirical results demonstrate the power of bandwidth tuning. On the FMNIST dataset using an IQP (Instantaneous Quantum Polynomial) kernel, tuning the bandwidth improved test accuracy from a near-random 54% to a robust 92.6%. Furthermore, empirical tests on IQP and Hamiltonian Evolution (EVO) kernels confirmed the predicted $n^{-0.5}$ scaling law.
While bandwidth tuning fixes the kernel spectrum, it does not guarantee alignment with the target task. If the quantum kernel's inherent structure is fundamentally mismatched with the data, high accuracy remains elusive. Future research will explore the impact of hardware noise on bandwidth-tuned models and seek datasets where quantum kernels offer a definitive advantage over classical state-of-the-art methods.
Summary updated