Generalization is the ability of quantum machine learning models to make accurate predictions on new data by learning from training data. Here, we introduce the data quantum Fisher information metric (DQFIM) to determine when a model can generalize. For variational learning of unitaries, the DQFIM quantifies the amount of circuit parameters and training data needed to successfully train and generalize. We apply the DQFIM to explain when a constant number of training states and polynomial number of parameters are sufficient for generalization. Further, we can improve generalization by removing symmetries from training data. Finally, we show that out-of-distribution generalization, where training and testing data are drawn from different data distributions, can be better than using the same distribution. Our work opens up new approaches to improve generalization in quantum machine learning.
翻译:泛化是量子机器学习模型从训练数据中学习,对新数据进行正确预测的能力。在这里,我们引入数据量子费舍尔信息度量(DQFIM),以确定模型何时能够泛化。对于可变单元的学习,DQFIM衡量电路参数和训练数据的量,以成功地进行训练和泛化。我们使用DQFIM来解释何时恒定数量的训练状态和多项式数量的参数足以泛化。此外,我们还可以通过从训练数据中去除对称性来改善泛化。最后,我们展示了数据分布不同的训练和测试数据在泛化方面能够更好地表现。我们的工作为改善量子机器学习中的泛化能力打开了新的方法。