Quantum transfer learning
发布时间: 2024年06月06日

The advantage of quantum computing lies in its powerful parallelism and non-local characteristics. Quantum neural network models, built on the fundamental principles of quantum mechanics, are stronger in extracting global features compared to classical neural networks. They converge faster and require fewer parameters to achieve the same accuracy. Currently, as classical machine learning handles increasingly larger datasets, the models become more complex, leading to longer training times and greater demand for classical computing resources, resulting in larger data centers. Therefore, with quantum computers participating in training, the convergence speed is faster, and fewer parameters are needed. This makes it promising for quantum computing to reduce scomputational resources and achieve the same accuracy with fewer resources compared to purely classical machine learning, the schematic diagram is as follows.

The gray dashed box contains the classical neural network, and the red dashed box contains the quantum neural network. Data is first input into the classical neural network, and the output from the classical network is then fed into the quantum neural network for feature processing by quantum system. The quantum system is then measured to obtain results, which are combined with the labels to form a loss function. Here, the cross-entropy loss function is used as an example,as follows.


This loss function is used to update the parameters of both the classical and quantum networks. Once the loss function converges, the trained model can be used on new data to obtain accuracy and other metrics.

This model can be applied to feature prediction scenarios such as image recognition and classification, as well as weather forecasting etc. For example, in the task of predicting cloud presence in weather forecasts, we replace a layer in a partially trained classical neural network with a quantum neural network. Using a hybrid quantum-classical machine learning framework, we input physical data like reflectance and absorbance from sensors into this model for training. Once trained, the model can be used to predict the weather by inputting new sensor data.