Adversarial robustness and generalization are both crucial properties of reliable machine learning models. In this paper, we study these properties in the context of quantum machine learning based on Lipschitz bounds. We derive tailored, parameter-dependent Lipschitz bounds for quantum models with trainable encoding, showing that the norm of the data encoding has a crucial impact on the robustness against perturbations in the input data. Further, we derive a bound on the generalization error which explicitly depends on the parameters of the data encoding. Our theoretical findings give rise to a practical strategy for training robust and generalizable quantum models by regularizing the Lipschitz bound in the cost. Further, we show that, for fixed and non-trainable encodings as frequently employed in quantum machine learning, the Lipschitz bound cannot be influenced by tuning the parameters. Thus, trainable encodings are crucial for systematically adapting robustness and generalization during training. With numerical results, we demonstrate that, indeed, Lipschitz bound regularization leads to substantially more robust and generalizable quantum models.
翻译:对抗鲁棒性与泛化能力是可靠机器学习模型的两个关键特性。本文基于Lipschitz界研究量子机器学习中的这些特性。我们针对具有可训练编码的量子模型推导了定制的参数依赖型Lipschitz界,表明数据编码的范数对输入数据扰动的鲁棒性具有关键影响。进一步,我们推导了明确依赖于数据编码参数的泛化误差上界。理论发现催生了一种实用策略:通过在代价函数中正则化Lipschitz界来训练鲁棒且可泛化的量子模型。此外,我们证明:在量子机器学习中常用的固定非可训练编码情形下,Lipschitz界无法通过参数调整来改变。因此,可训练编码对于在训练过程中系统性地调节鲁棒性与泛化能力至关重要。数值结果表明,Lipschitz界正则化确实能显著提升量子模型的鲁棒性与泛化能力。