On the Generalization of Adversarially Trained Quantum Classifiers

Petros Georgiou, Aaron Mark Thomas, Sharu Theresa Jose, Osvaldo Simeone · 2025

Read On the Generalization of Adversarially Trained Quantum Classifiers by Petros Georgiou, Aaron Mark Thomas, Sharu Theresa Jose, Osvaldo Simeone (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-17690.txt.

Introduction

Petros Georgiou and co-authors proved new limits in 2025 on how well quantum classifiers trained against attacks carry their skill to fresh data. Such classifiers can be fooled by small, crafted changes to their input, so builders train them with the attack in mind.

The team bound the extra error that this robust training adds, and show it shrinks as the training set grows. For one common way of loading data into the quantum state, the extra cost vanishes when inputs are large. When the attack hits the quantum state itself, the cost depends only on the size of that state's space. The results extend to multi class problems and match numeric tests.

Catalog record

CREATORPetros Georgiou, Aaron Mark Thomas, Sharu Theresa Jose, Osvaldo Simeone
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE109 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2504-17690

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

On the Generalization of Adversarially Trained Quantum Classifiers Petros Georgiou, Aaron Mark Thomas, Sharu Theresa Jose, Osvaldo Simeone Abstract 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 m as 1 / m 1/\sqrt{m} , while yielding insights into the impact of the quantum embedding. For quantum binary classifiers employing rotation embedding , we find that, in the presence of adversarial attacks on classical inputs 𝐱 \mathbf{x} , the increase in sample complexity due to adversarial training over conventional training vanishes in the limit of high dimensional inputs 𝐱 \mathbf{x} . In contrast, when the adversary can directly attack the quantum state ρ ⁡ ( 𝐱 ) \rho(\mathbf{x}) encoding the input 𝐱 \mathbf{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. Preprint: APS/123-QED I Introduction Context and Motivation: Quantum Machine Learning (QML) aims to leverage quantum computing capabilities to outperform classical ML techniques [ 1 , 2 ] . Recent studies have highlighted limitations of QML including difficulties in training unstructured QML models [ 3 , 4 ] and the classical simulability of some structured QML models [ 5 ] . Another concern with QML models is the fact that, similar to their classical counterparts, QML models are susceptible to adversarial attacks [ 6 , 7 , 8 ] . For instance, a quantum classifier utilizing superconducting qubits to classify MRI images, achieving a test accuracy of 99\% , was found to be easily deceived by minor adversarial perturbations [ 7 ] . This vulnerability poses another challenge on the way to realizing quantum advantages. Figure 1: (Adversarial) Generalization error (Test error - Train error) plotted against number of training samples for an adversarially trained angle embedding based classifier. Despite adversarial training, the adversarial generalization error remains significant. Details about the dataset and quantum classifier used can be found in section VII.1 . To address this problem, recent works [ 9 , 10 ] have explored efficient strategies to defend quantum classifiers against adversarial attacks, with adversarial training emerging as a promising strategy [ 6 ] . Adversarial training replaces the standard classification loss with an attack-aware adversarial loss , accounting for the worst-case effect of adversarial perturbation of the input data. This results in a min-max optimization problem with the classifier attempting to minimize the worst-case adversarial loss. In classical machine learning models it has been observed that adversarially trained classifiers have desirable training performance but a poor performance on test datasets [ 11 ] . For example, a Resnet model adversarially trained on CIFAR10 dataset achieved a training accuracy of 96%, but a test accuracy of only 47% when evaluated on similarly perturbed data [ 12 ] . Theoretical studies have also confirmed that an increase in sample complexity is required to guarantee generalization with adversarial training [ 13 , 14 ] . The significant generalization gap of adversarially trained classifiers can also be observed in quantum classifiers. As an example, Figure 1 shows the adversarial training and test losses – i.e., the training and test losses evaluated in the presence of an adversary – incurred during adversarial training of a QML model over the training epochs. The figure also shows the conventional training and test losses of the same model. As observed in the figure, the generalization error – i.e., the gap between the training and test losses – tends to be larger in the presence of an adversary. This is the case even though the QML model was trained using an adversarial loss. While existing works analyze the empirical merit of adversarial training against various attacks [ 6 , 15 , 7 , 8 , 16 ] , a theoretical understanding of the generalization performance of adversarially trained quantum classifiers remains limited. Addressing this knowledge gap is the focus of this work. Quantum Classifiers and Quantum Embeddings : To elaborate, consider a quantum binary classifier that takes as input a d -dimensional feature vector \mathbf{x} , embedding it into a d_{H} -dimensional quantum state \rho(\mathbf{x}) . Classification is carried out based on the sign of the function f(\mathbf{x})={\rm Tr}(A\rho(\mathbf{x})) , which corresponds to the expected value of a suitable observable A\in\mathcal{A} , with {\rm Tr}(\cdot) denoting the trace. The set of observables \mathcal{A} determines the model class, and the specific observable A deployed for classification is identified based on training data. The choice of the quantum embedding \rho(\mathbf{x}) is critical for the performance and learnability of the quantum classifier [ 17 , 18 , 19 , 20 ] . Figure 2: The embedding \rho(\mathbf{x}) plays a key role in determining the performance of a quantum classifier [ 17 , 18 ] . This paper studies the learning requirements for two main classes of embeddings in the presence of adversarial attacks. (Top) Rotation embedding schemes, including angle rotation embedding, dense rotation embedding, and their repeated variants require a number of qubits that scale linearly with the dimension d of the input vector \mathbf{x} . (Bottom) Amplitude embedding, which can encode a vector \mathbf{x} of dimension d into a quantum state whose number of qubits scales logarithmically with d . In this particular case we embed a 3 -dimensional input \mathbf{x} into a 2 -qubit quantum state. As illustrated in Figure 2 , we distinguish two main types of embeddings. The first type encompasses rotation -based methods, in which information is encoded via the rotation angles of qubit gates. These methods, encompassing angle embedding, dense embedding, and their repeated variants [ 21 ] , require a number of qubits that scales linearly with the data dimension d , and thus the Hilbert space dimension d_{H} grows exponentially with d . Despite their significant requirements in terms of number of qubits, these embeddings are widely used in practice as the corresponding circuits have constant depth [ 17 , 22 ] . In contrast, with amplitude encoding , the information vector \mathbf{x} directly modulates the quantum amplitudes of the quantum state \rho(\mathbf{x}) . Accordingly, in order to embed a vector \mathbf{x} of dimension d into a quantum state, amplitude embedding requires a number of qubits that grows only logarithmically with d , and thus the dimension of the Hilbert space d_{H} scales linearly with d . On the flip side, the circuit implementing amplitude embedding generally requires a number of quantum gates that is exponential in the dimension d [ 17 ] . The impact of the choice of quantum embedding on the generalization of conventionally trained classifiers has been studied in [ 19 ] . This reference quantifies the generalization error via the number of encoding gates used in the circuit. In particular, for an L -layer angle encoding based classifier, the generalization error is specifically

Read the complete text