A key component of a quantum machine learning model operating on classical inputs is the design of an embedding circuit mapping inputs to a quantum state. This paper studies a transfer learning setting in which classical-to-quantum embedding is carried out by an arbitrary parametric quantum circuit that is pre-trained based on data from a source task. At run time, a binary quantum classifier of the embedding is optimized based on data from the target task of interest. The average excess risk, i.e., the optimality gap, of the resulting classifier depends on how (dis)similar the source and target tasks are. We introduce a new measure of (dis)similarity between the binary quantum classification tasks via the trace distances. An upper bound on the optimality gap is derived in terms of the proposed task (dis)similarity measure, two Rényi mutual information terms between classical input and quantum embedding under source and target tasks, as well as a measure of complexity of the combined space of quantum embeddings and classifiers under the source task. The theoretical results are validated on a simple binary classification example.
A key component of a quantum machine learning model operating on classical inputs is the design of an embedding circuit mapping inputs to a quantum state. This paper studies a transfer learning setting in which classical-to-quantum embedding is carried out by an arbitrary parametric quantum circuit that is pre-trained based on data from a source task. At run time, a binary quantum classifier of the embedding is optimized based on data from the target task of interest. The average excess risk, i.e., the optimality gap, of the resulting classifier depends on how (dis)similar the source and target tasks are. We introduce a new measure of (dis)similarity between the binary quantum classification tasks via the trace distances. An upper bound on the optimality gap is derived in terms of the proposed task (dis)similarity measure, two Rényi mutual information terms between classical input and quantum embedding under source and target tasks, as well as a measure of complexity of the combined space of quantum embeddings and classifiers under the source task. The theoretical results are validated on a simple binary classification example.
In a manner analogous to their classical counterparts, quantum classifiers are vulnerable to adversarial attacks that perturb their inputs. A promising countermeasure is to train the quantum classifier by adopting an attack-aware, or adversarial, loss function. This paper studies the generalization properties of quantum classifiers that are adversarially trained against bounded-norm white-box attacks. Specifically, a quantum adversary maximizes the classifier's loss by transforming an input stateρ(x)into a stateτthat isϵ-close to the original stateρ(x)in p-Schatten distance. Under suitable assumptions on the quantum embeddingρ(x), we derive novel information-theoretic upper bounds on the generalization error of adversarially trained quantum classifiers forp=1andp=∞. The derived upper bounds consist of two terms: the first is an exponential function of the 2-Renyi mutual information between classical data and quantum embedding, while the second term scales linearly with the adversarial perturbation sizeϵ. Both terms are shown to decrease as1/Tover the training set sizeT. An extension is also considered in which the adversary assumed during training has different parameterspandϵas compared to the adversary affecting the test inputs. Finally, we validate our theoretical findings with numerical experiments for a synthetic setting.
Quantum Machine Learning (QML) is an exciting frontier applying the philosophy of quantum computation to classical machine learning for improved learning performance of complicated tasks. However, QML is greatly challenged by realistic issues like noisy quantum measurements and limited labeled quantum data caused by the high cost and technological limitations. This paper explores the novel transfer-learning mechanisms to tackle these issues, which allow the reuse of the knowledge from related quantum tasks for improving model performance and generalization in resource-limited scenarios. Transfer learning, one of the great and successful concepts of classical machine learning, is to transfer the learned parameters or features from the source domain (or task) to the target domain (or task). We further develop and investigate, in quantum, a methodology where parameterized quantum circuits (PQCs) learnt on a source quantum data set have certain parts partially re-used or fine-tuned for a target task, given limited amount of target data. This strategy also avoids large quantum training runs that are not scalable on state-of-the-art noisy intermediate-scale quantum (NISQ) processors. The suggested methods are layerwise quantum adaptation, quantum kernel reuse and hybrid quantum-classical feature transfer. We investigate the robustness of these mechanisms in presence of noise by simulating quantum circuits using depolarizing and readout noise models. Moreover, we show that pretraining of quantum models on synthetic (or simulated) data sets (which are generated using larger, less noisy systems) can be instrumental in learning on real, small-sized quantum devices. Experiment results in quantum classification tasks demonstrate the effectiveness of transfer learning in boosting the accuracy, accelerating the convergence, and lowering the quantum circuit depth of successfully trained model. It is interesting to mention that transfer using layer-wise models became very resistant to quantum noise, as its performance did not degrade significantly for noisy inputs. These results demonstrate that transfer learning can overcome the scarce quantum data and suppress the harmful impact of measurement noise. This work presents a potential venue for enhancing the applicability of QML in the NISQ era. By transferring knowledge from theoretical quantum learning models to actual quantum hardware constraints, transfer learning allows quantum algorithms to learn faster and generalize better across tasks.
Quantum classifiers are vulnerable to adversarial attacks that manipulate their input classical or quantum data. A promising countermeasure is adversarial training, where quantum classifiers are trained by using an attack-aware, adversarial loss function. This work establishes novel bounds on the generalization error of adversarially trained quantum classifiers when tested in the presence of perturbation-constrained adversaries. The bounds quantify the excess generalization error incurred to ensure robustness to adversarial attacks as scaling with the training sample size m as 1/m, while yielding insights into the impact of the quantum embedding. For quantum binary classifiers employing \textit{rotation embedding}, we find that, in the presence of adversarial attacks on classical inputs x, the increase in sample complexity due to adversarial training over conventional training vanishes in the limit of high dimensional inputs x. In contrast, when the adversary can directly attack the quantum state ρ(x) encoding the input x, the excess generalization error depends on the choice of embedding only through its Hilbert space dimension. The results are also extended to multi-class classifiers. We validate our theoretical findings with numerical experiments.
Quantum classification and hypothesis testing (state and channel discrimination) are two tightly related subjects, the main difference being that the former is data driven: how to assign to quantum states ρ(x) the corresponding class c (or hypothesis) is learnt from examples during training, where x can be either tunable experimental parameters or classical data "embedded" into quantum states.Does the model generalize?This is the main question in any data-driven strategy, namely the ability to predict the correct class even of previously unseen states.Here we establish a link between quantum classification and quantum information theory, by showing that the accuracy and generalization capability of quantum classifiers depend on the (Rényi) mutual information I (C:Q) and I 2 (X :Q) between the quantum state space Q and the classical parameter space X or class space C. Based on the above characterization, we then show how different properties of Q affect classification accuracy and generalization, such as the dimension of the Hilbert space, the amount of noise, and the amount of neglected information from X via, e.g., pooling layers.Moreover, we introduce a quantum version of the information bottleneck principle that allows us to explore the various trade-offs between accuracy and generalization.Finally, in order to check our theoretical predictions, we study the classification of the quantum phases of an Ising spin chain, and we propose the variational quantum information bottleneck method to optimize quantum embeddings of classical data to favor generalization.
Understanding generalization is essential for assessing the practical viability of quantum machine learning. In many applications, quantum models operate on classical data that must first be encoded into quantum states, making the encoding part of the effective hypothesis class. We develop a margin-based generalization framework for this setting, covering both fixed and trainable quantum data encodings. For fixed encodings, the existing margin bound transfers unchanged. For trainable encodings, we derive a bound using a two-scale covering argument that combines the original margin-dependent term with an additive encoding-capacity term of order O~(L/m), where L is the number of trainable encoding parameters and m is the training-sample size. Across 19,440 simulated training runs spanning various image datasets, circuit architectures, and optimization settings, the inverse margin performs best among five baseline and two bound-derived complexity measures under conditional-independence and 90th-percentile sign-error criteria, within bootstrap uncertainty. These results provide a unified margin-based view of generalization in quantum machine learning with classical data.
Quantum classifiers are trainable quantum circuits used as machine learning models. The first part of the circuit implements a quantum feature map that encodes classical inputs into quantum states, embedding the data in a high-dimensional Hilbert space; the second part of the circuit executes a quantum measurement interpreted as the output of the model. Usually, the measurement is trained to distinguish quantum-embedded data. We propose to instead train the first part of the circuit -- the embedding -- with the objective of maximally separating data classes in Hilbert space, a strategy we call quantum metric learning. As a result, the measurement minimizing a linear classification loss is already known and depends on the metric used: for embeddings separating data using the l1 or trace distance, this is the Helstrom measurement, while for the l2 or Hilbert-Schmidt distance, it is a simple overlap measurement. This approach provides a powerful analytic framework for quantum machine learning and eliminates a major component in current models, freeing up more precious resources to best leverage the capabilities of near-term quantum information processors.