Quantum network redundancy control training and image classification method and system based on mutual information mechanism
By introducing the mutual information mechanism and regularization coefficient, the quantum neural network training process is optimized, which solves the problem that the existing technology fails to fully utilize the properties of quantum superposition and entanglement, improves the image classification performance and model robustness, and is suitable for NISQ devices.
Patent Information
- Application Number
- CN202510691999.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-09-05
AI Technical Summary
Existing hybrid quantum neural networks have failed to fully tap the potential advantages of quantum and classical networks, and have failed to effectively utilize the potential of quantum superposition and entanglement properties in feature representation and performance optimization.
The mutual information mechanism is introduced to dynamically measure the correlation between quantum states through quantum mutual information loss and regularization coefficient, suppress redundant information, strengthen key feature extraction, and use mutual information loss and cross entropy loss to optimize the training process.
It improves the performance of image classification tasks, achieves model robustness and efficiency, reduces the number of quantum bits required, is suitable for NISQ devices, and improves the overall performance of the hybrid network.
Smart Images

Figure CN120599346A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of quantum network and machine vision technology, and in particular to a quantum network redundant control training and image classification method and system based on a mutual information mechanism. Background Art
[0002] In recent years, machine learning has achieved revolutionary breakthroughs and widespread application in many areas of artificial intelligence, particularly in computer vision and natural language processing. Through training on large amounts of data, machine learning can automate complex tasks and has demonstrated tremendous potential in real-world scenarios such as image recognition, speech recognition, and autonomous driving. Quantum neural networks are a key application of quantum computing in machine learning. As a quantized version of classical neural networks, they leverage properties such as quantum superposition and entanglement to demonstrate unique advantages in solving specific problems.
[0003] Currently, quantum neural networks are divided into two main categories: one is pure quantum circuits, whose calculations are almost entirely performed on quantum computers; the other is hybrid quantum-classical models, which optimize the learning process by combining classical and quantum computing. Current quantum processors still have noise and hardware limitations and cannot rely entirely on pure quantum computing methods, so the second type of model is currently more widely used. The specific construction of the second type of model mainly includes the following:
[0004] 1) Use quantum convolutional neural networks for image preprocessing, and then input the data into classical neural networks for classification or regression; 2) Hybrid classical quantum models of quantum recurrent neural networks promote the implementation of machine learning algorithms for sequence modeling on noisy quantum devices; 3) Variational imaging quantum learning framework, which extracts features through convolution, reduces parameters and avoids the problem of barren plateaus, promoting quantum circuit training; 4) Quantum convolutional neural network models based on particle swarm optimization improve image classification performance by optimizing quantum circuit structure.
[0005] Although existing hybrid quantum neural networks have to some extent integrated the advantages of quantum and classical neural networks and achieved acceleration and optimization of specific tasks, the core problem is that most current research simply combines quantum circuits with classical neural networks, failing to fully tap the potential advantages of unique properties of quantum states such as superposition and entanglement in feature representation and performance optimization. The advantages of hybrid networks need to be further explored. Summary of the Invention
[0006] In order to overcome the defect of the above-mentioned existing technologies that fail to fully tap the potential of the hybrid architecture of quantum and classical networks, the present invention proposes a quantum network redundancy control training method based on the mutual information mechanism, introduces mutual information loss and regularization coefficient, dynamically measures the correlation between quantum states, effectively suppresses redundant information, strengthens the extraction of key features, and further improves the performance of classification tasks.
[0007] The present invention proposes a quantum network redundancy control training method based on mutual information mechanism, which is used to train a classification model composed of quantum convolutional neural network and classical neural network. During the training process, the error loss L between the model label and the true label is measured. CE Optimize the classical neural network and use parameter derivation to update the quantum parameter circuit of the quantum convolutional neural network; until the loss function Loss of the classification model converges; the loss function Loss is composed of the mutual information loss L QMI With L CE constitute;
[0008]
[0009] in, is the quantum mutual information; N is the number of quantum bits in the quantum parameterized circuit, ρ N is the set of quantum bits in the parameterized quantum circuit, and i and j are the quantum bit numbers of the quantum parameterized circuit.
[0010] Preferred:
[0011]
[0012] Among them, L CE is the cross entropy loss between the output category and the true category of the image classification model, L QMI is the loss based on quantum mutual information, λ is the regularization coefficient; M c is the set loss threshold, and M c ≤0.02, 0.1≤λ≤10.
[0013] Preferably, λ=2, M c =0.0172.
[0014] Preferably, the parameter derivation formula is:
[0015]
[0016] in, is the expected value function, is the expected value of the parameterized quantum circuit U(θ) after parameterized Pauli rotation and quantum measurement; θ is the adjustable parameter of the parameterized quantum circuit, θ k is the kth parameter in θ, ek is θ k The unit vector of the offset; represents the transpose of U(θ).
[0017] Preferably, the method comprises the following steps:
[0018] St1. Build a dataset and construct and initialize an image classification model consisting of a quantum convolutional neural network and a classical neural network. The quantum convolutional neural network is used to extract the feature map of the image, and the classical neural network is used to convert the feature map into the classification label of the image.
[0019] St2, extract training samples from the data set and input them into the image classification model, and calculate the loss function L CE and Loss;
[0020] St3, determine whether the loss function Loss converges;
[0021] If not, then based on L CE Update the classical neural network; and update the adjustable parameter θ based on the parameter derivative; then return to step St2;
[0022] If yes, then the parameterized quantum circuit and classical neural network are fixed and the output is an image classification model.
[0023] The present invention proposes an image classification method for a quantum network redundant control training method, which is characterized by comprising the following steps:
[0024] First, an image classification model is constructed and trained using the quantum network redundancy control training method based on the mutual information mechanism as described in any one of claims 1 to 5;
[0025] Then the image to be identified is input into the image classification model to obtain the classification result.
[0026] Preferably, the quantum convolutional neural network of the image classification model includes a sequentially connected pixel extraction module, a quantum encoding module, a quantum parameter circuit and a quantum measurement module; the quantum measurement module adopts one or more combinations of the three types of revolving gate Rx, revolving gate Rz and CNOT gate.
[0027] Preferably, the classical neural network of the image classification model uses a fully connected layer.
[0028] The present invention proposes a quantum network redundant control training system based on a mutual information mechanism, comprising a memory and a processor. The memory stores a computer program, the processor is connected to the memory, and the processor is used to execute the computer program to implement the quantum network redundant control training method based on the mutual information mechanism.
[0029] The present invention proposes a storage medium storing a computer program, which, when executed, is used to implement the quantum network redundant control training method based on the mutual information mechanism.
[0030] The advantages of the present invention are:
[0031] (1) The present invention proposes a quantum network redundancy control training method based on the mutual information mechanism, which uses quantum mutual information as the regularization term of the loss function to measure the degree of information sharing between systems. It effectively solves the problem that the non-classical correlation and unconstrained quantum neural network training process may lead to the accumulation of redundant information and unstable training. The introduction of quantum mutual information in the present invention helps to capture the complex relationship in the data, and the loss L based on the prediction error is CE This ensures the basic accuracy of the model in classification tasks. By adjusting the regularization coefficient λ, the optimal balance between model complexity and accuracy can be found.
[0032] (2) The threshold M is introduced in the present invention C , setting a minimum lower bound on mutual information to ensure that the network can effectively capture useful features while avoiding information loss. Mutual information is not only an important indicator for measuring the degree of sharing between variables, but also a key factor affecting the performance of convolutional neural networks. Setting a mutual information range in this paper can effectively improve the performance of the model, making it more robust and efficient when processing complex data.
[0033] (3) The present invention has been verified through image classification tasks to have good scalability. It can be added as a module to the mainstream quantum classical network architecture and can significantly reduce the number of quantum bits required, making it possible for the actual realization of quantum network structure.
[0034] (4) This paper proposes a neural network architecture based on quantum mutual information and provides an implementation scheme. At the same time, this method is also applicable to NISQ (Noisy Intermediate-Scale Quantum, the new quantum technology era) devices. When combined with classical neural networks, it can more effectively improve the overall network performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 Schematic diagram of the quantum convolutional neural network architecture and image classification model proposed in this invention;
[0036] Figure 2 Represents the loss function calculation process;
[0037] Figure 3 This is a flow chart of a quantum network redundancy control training method based on mutual information mechanism proposed by the present invention;
[0038] Figure 4 Demonstrated for the Fashion-MNIST dataset;
[0039] Figure 5(a) is a comparison of model training accuracy;
[0040] Figure 5(b) is a histogram of the model classification accuracy;
[0041] Figure 6 The accuracy changes with different regularization coefficients. DETAILED DESCRIPTION
[0042] The following will provide a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0043] Reference Figure 1 ,This embodiment proposes a quantum convolutional neural network, which includes a sequentially connected pixel ,extraction module, quantum encoding module, quantum parameter circuit and quantum ,measurement module.
[0044] The pixel extraction module traverses the image with a set stride through the quantum convolution kernel and extracts the pixel values of the local area by region.
[0045] The quantum coding module normalizes the pixel values in the local area and inputs the initial quantum state |0〉, and performs quantum state encoding to convert it into the quantum input state |ψ of the quantum bit. in 〉, forming local quantum information. Quantum state encoding can specifically use angle encoding to transform the initial quantum state |0〉 into the quantum input state |ψ in 〉.
[0046] The quantum parameter circuit uses a quantum gate with adjustable parameters to control the quantum input state |ψ in 〉 is evolved and processed to obtain the output state |ψ out (θ)〉, θ represents an adjustable parameter. The quantum gate can be a rotation gate Rx, Rz and CNOT gate or a combination of multiple gates.
[0047] The processing process of quantum parameter circuit is expressed as follows:
[0048] |ψ out (θ)〉=U(θ)|ψ in 〉
[0049] Here, U(θ) represents a parameterized quantum circuit with an adjustable parameter θ, which can be set to the quantum gate rotation angle, etc.
[0050] The quantum measurement module outputs the state |ψ out In this embodiment, the Pauli measurement is used to enhance the feature expression capability.
[0051] It is worth noting that the local area pixel values extracted by the pixel extraction module undergo quantum encoding, quantum parameter circuit and quantum measurement respectively, so the number of quantum bits contained in the quantum parameter circuit is equal to the number of pixels extracted by the pixel extraction module each time.
[0052] Refer to,1. Figure 2 、 Figure 3 , this embodiment proposes a quantum network redundancy control training method based on mutual information mechanism, comprising the following steps:
[0053] Step 1: Construct a dataset of {image samples, categories}; build and initialize an image classification model consisting of a quantum convolutional neural network and a classical neural network. The quantum convolutional neural network is used to extract image feature maps, and the classical neural network is used to convert feature maps into image classification labels. The classical neural network can specifically use a fully connected network.
[0054] St2, extract training samples from the data set and input them into the image classification model, and calculate the loss function L CE and Loss;
[0055]
[0056] Among them, L CE is the cross entropy loss between the output category and the true category of the image classification model, L QMI is the loss based on quantum mutual information, λ is the regularization coefficient; M c is the loss threshold set;
[0057]
[0058] S(ρ)=-Tr(ρlgρ); ρ=ρ i , ρ j or ρ ij ;
[0059] Where N is the number of quantum bits in the quantum parameterized circuit, ρ N is the set of N quantum bits in the parameterized quantum circuit, ρ i is the density matrix of the i-th quantum bit in the parameterized quantum circuit, ρ j is the density matrix of the j-th quantum bit in the parameterized quantum circuit; ρ ij is the density matrix of the composite quantum system consisting of the i-th quantum bit and the j-th quantum bit in the parameterized quantum circuit; is the quantum mutual information; S(ρ) is the von Neumann entropy of the quantum bit.
[0060] St3, determine whether the loss function Loss converges;
[0061] If not, then based on L CE Update the classical neural network; and update the adjustable parameter θ of the parameterized quantum circuit U(θ) based on the parameter derivative; then return to step St2.
[0062] The parameter derivative formula is:
[0063]
[0064]
[0065] in, is the expected value function, is the expected value of the parameterized quantum circuit U(θ) after parameterized Pauli rotation and quantum measurement; θ is the adjustable parameter of the parameterized quantum circuit, that is, the set of parameters to be trained for the parameterized quantum circuit; θ k is the kth parameter in θ; e k is θ k The unit vector of the offset, indicating the offset of the kth parameter; represents the transpose of U(θ);
[0066] If yes, then the parameterized quantum circuit and classical neural network are fixed and the output is an image classification model.
[0067] In the following, in combination with specific embodiments, the image classification model of the quantum convolutional neural network (MI-QCNN) obtained by adopting the above-mentioned quantum network redundant control training method based on the mutual information mechanism is verified.
[0068] This example proposes multiple sets of comparison models: classical convolutional neural network (CNN), quantum convolutional neural network (QCNN), amplitude-transformed quantum convolutional neural network (ATQCNN), and decremental quantum convolutional neural network (DQCNN). In this example, simulation experiments were performed on the Pennylane platform.
[0069] To ensure fairness in the comparative experiments, the convolutional neural network structure is set to be consistent in this embodiment. The convolutional neural network architecture is shown in Table 1. The CNN method is the classic counterpart of the QCNN method. Its corresponding method is to replace the quantum convolution layer with the classic convolution layer to ensure that the input and output channels are the same.
[0070] Table 1 Convolutional neural network architecture
[0071]
[0072] When designing the convolutional neural network architecture, we ensured that the five methods ran in the same structure to avoid performance impacts due to differences in network structure. The only difference between the experiments was the difference in the number of parameters. Under the current architecture, the number of convolutional layer parameters of the classical convolutional neural network is 20, while the number of parameters of the quantum convolutional neural network can be adjusted according to specific needs. In this embodiment, the number of quantum layers is set to 2, and the parameters contained in each layer are twice the number of quantum bits, for a total of 16 parameters. This choice is intended to maintain the consistency of parameter scale as much as possible while ensuring the comparability and fairness of the model.
[0073] The data in this example comes from Figure 4 The Fashion-MNIST dataset, shown here, contains a total of 70,000 images of clothing and accessories, divided into training and test sets in an 8:2 ratio, with 60,000 images in the training set and 10,000 images in the test set. All images are standardized and preprocessed into a 28×28 pixel grayscale image format. The dataset covers 10 different clothing categories, including T-shirts, pants, pullovers, dresses, coats, sandals, shirts, sneakers, bags, and ankle boots. Compared to the traditional MNIST dataset, Fashion-MNIST provides a more challenging classification task. Its images have richer texture features and more significant intra-class variations, making it more suitable for evaluating the performance and generalization ability of deep learning models.
[0074] In this example, 175 images are randomly and evenly sampled from each category of the Fashion-MNIST dataset, of which 125 are used as a training set and 50 are used as a test set.
[0075] In this embodiment, the five models CNN, QCNN, ATQCNN, DQCNN and MI-QCNN are all trained on the training set, and then the model performance is tested on the test set. The comparison models CNN, QCNN, ATQCNN and DQCNN adopt the corresponding existing learning methods, and MI-QCNN adopts the quantum network redundancy control training method based on the mutual information mechanism provided by the present invention. QCNN, ATQCNN, DQCNN and MI-QCNN all extract feature maps through quantum neural network parts, and then the classical neural network outputs classification labels based on the feature maps, and the classical neural network all uses a fully connected layer.
[0076] In this embodiment, the model is iterated for 50 epochs on the training set, and the comparison model uses the cross entropy loss function commonly used in classification tasks; the experimental process is set to use the Adam optimizer, the learning rate is set to 0.001, and the batch size is set to 20 for small batch learning; the performance indicators of the model after training are calculated on the test set.
[0077] Due to the randomness of the initialization weights, in this embodiment, ten experiments are conducted on each model, and the final average value is taken as the final result. The performance index statistics are shown in Table 2.
[0078] Table 2 Classification experimental results of each model (%)
[0079]
[0080]
[0081] Table 2, Figures 5(a), and 5(b) show significant differences in accuracy between different models. CNN achieved an accuracy of 79.1%, while QCNN improved to 80.4%. ATQCNN and DQCNN achieved accuracies of 81.4% and 81.8%, respectively. MI-QCNN achieved the highest accuracy of 83.2%. These results demonstrate that the combination of quantum computing technology and mutual information can effectively improve model performance. Quantum mutual information offers significant advantages in adaptively controlling the strength of quantum entanglement and reducing redundant correlations.
[0082] In the above experiments, the regularization coefficient λ of MI-QCNN is set to 2, and the threshold M c Set to 0.0172; these two parameter settings are verified as follows.
[0083] In this embodiment, MI-QCNN models with different regularization coefficient λ values are trained on the same training set, and then the accuracy is tested on the test set. The results are shown in Table 3.
[0084] Table 3 Network performance with different regularization coefficients
[0085]
[0086] Table 3 and Figure 5 show that when λ is between 1.25 and 2.5, the accuracy is also high (mainly in the range of 80.8% to 81.8%), and the best accuracy is achieved in the range of 2 to 2.5 (83.2% for λ = 2). This shows that moderate quantum mutual information regularization can effectively improve the generalization ability of the model.
[0087] The introduction of quantum mutual information helps capture complex relationships in the data, while cross-entropy ensures the model's basic accuracy in classification tasks. By adjusting λ, an optimal balance between model complexity and accuracy can be found. However, when the regularization coefficient λ exceeds 2 or falls below 1.00, the accuracy shows a downward trend. This may be because excessive regularization inhibits the model's ability to learn data features, while excessive regularization is insufficient to prevent overfitting.
[0088] Of course, it will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, but also encompasses the same or similar structures that can be implemented in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims, not the foregoing description, and it is intended that all variations that fall within the meaning and range of equivalents of the claims be encompassed within the present invention. Any reference signs in the claims should not be construed as limiting the claim to which they relate.
[0089] In addition, it should be understood that although this specification is described in terms of implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
[0090] The technology, shape, and structure not described in detail in the present invention are all well-known technologies.
Claims
1. A quantum network redundant control training method based on mutual information mechanism, characterized in that: Used to train a classification model composed of a quantum convolutional neural network and a classical neural network; during the training process, the loss L is used to measure the error between the model label and the true label CE Optimize classical neural networks and use parameter derivatives to update the quantum parameter circuits of quantum convolutional neural networks; Until the loss function Loss of the classification model converges; the loss function Loss is composed of the mutual information loss L QMI With L CE constitute; in, is the quantum mutual information; N is the number of quantum bits in the quantum parameterized circuit, ρ N is the set of quantum bits in the parameterized quantum circuit, and i and j are the quantum bit numbers of the quantum parameterized circuit.
2. The quantum network redundancy control training method based on mutual information mechanism according to claim 1, characterized in that: Among them, L CE is the cross entropy loss between the output category and the true category of the image classification model, L QMI is the loss based on quantum mutual information, λ is the regularization coefficient; M c is the set loss threshold, and M c ≤0.02, 0.1≤λ≤10.
3. The quantum network redundancy control training method based on mutual information mechanism according to claim 2, characterized in that: λ=2,M c = 0.0172.
4. The quantum network redundancy control training method based on mutual information mechanism according to claim 1, characterized in that: The parameter derivative formula is: in, is the expected value function, is the expected value of the parameterized quantum circuit U(θ) after parameterized Pauli rotation and quantum measurement; θ is the adjustable parameter of the parameterized quantum circuit, θ k is the kth parameter in θ, e k is θ k The unit vector of the offset; represents the transpose of U(θ).
5. The quantum network redundancy control training method based on mutual information mechanism according to any one of claims 1 to 4, characterized in that: The following steps are involved: St1. Build a dataset and construct and initialize an image classification model consisting of a quantum convolutional neural network and a classical neural network. The quantum convolutional neural network is used to extract the feature map of the image, and the classical neural network is used to convert the feature map into the classification label of the image. St2, extract training samples from the data set and input them into the image classification model, and calculate the loss function L CE and Loss; St3, determine whether the loss function Loss converges; If not, then based on L CE Update classic neural networks; And update the adjustable parameter θ based on the parameter derivative; then return to step St2; If yes, then the parameterized quantum circuit and classical neural network are fixed and the output is an image classification model.
6. An image classification method using the quantum network redundancy control training method based on mutual information mechanism according to any one of claims 1 to 5, characterized in that: The following steps are involved: First, an image classification model is constructed and trained using the quantum network redundancy control training method based on the mutual information mechanism as described in any one of claims 1 to 5; Then the image to be identified is input into the image classification model to obtain the classification result.
7. The image classification method according to claim 1, wherein: The quantum convolutional neural network of the image classification model includes a sequentially connected pixel extraction module, a quantum encoding module, a quantum parameter circuit and a quantum measurement module; the quantum measurement module adopts one or more combinations of the three types of revolving gate Rx, revolving gate Rz and CNOT gate.
8. The image classification method according to claim 1, wherein: Classic neural networks for image classification models use fully connected layers.
9. A quantum network redundant control training system based on mutual information mechanism, characterized in that: The invention comprises a memory and a processor, wherein a computer program is stored in the memory, the processor is connected to the memory, and the processor is used to execute the computer program to implement the quantum network redundant control training method based on the mutual information mechanism according to any one of claims 1 to 5.
10. A storage medium, characterized in that: A computer program is stored, and when the computer program is executed, it is used to implement the quantum network redundancy control training method based on the mutual information mechanism according to any one of claims 1 to 5.
Citation Information
Cited By
Hybrid neural network training method based on quantum correlation
CN121503532A