Quantum neural network architecture search optimization method and system and application of quantum neural network architecture search optimization method and system in agricultural image classification

CN121303205AActive Publication Date: 2026-01-09ANHUI SCI & TECH UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511456400.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-13
Publication Date
2026-01-09
Estimated Expiration
2045-10-13

AI Technical Summary

Technical Problem

Existing technologies suffer from low computational efficiency, slow convergence speed, resource limitations, and poor compatibility in optimizing quantum neural network architectures, making it difficult to rapidly iterate and deploy efficient feature extraction and classification models in agricultural scenarios.

Method used

A multi-objective evolutionary optimization method combining Grover quantum pre-screening with the classical NSGA-II algorithm is adopted to generate a high-performance and lightweight image classification model architecture through quantum parallel search and classical fine optimization.

Benefits of technology

In resource-constrained scenarios, this technology enables the rapid generation of high-performance models, shortens the search cycle, avoids resource limitations, improves the generalization ability and compatibility of models, and meets the deployment needs of agricultural edge devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121303205A_ABST
    Figure CN121303205A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of quantum computing and artificial intelligence crossing, and particularly relates to a quantum neural network architecture search optimization method and system and application of the quantum neural network architecture search optimization method and system in agricultural image classification. According to the method, a quantum coarse screening-classic fine tuning method is adopted, a framework which is poor in performance or does not conform to resource constraints in a search space is efficiently eliminated through Grover quantum pre-screening, a search funnel is rapidly narrowed to a potential high-performance area, blind search of a classic evolutionary algorithm in a huge space is avoided, and the overall search period is greatly shortened. According to the method, multiple targets such as precision, delay and resource consumption can be finely optimized, and the obtained model architecture can effectively balance the problems of global exploration and local mining in the search process, so that the model architecture has the characteristics of high precision and low delay; and meanwhile, light weight and high performance of the architecture are ensured through a preset value light weight constraint, and the method has good compatibility and can be completely compatible with existing agricultural IT infrastructure and edge equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the interdisciplinary field of quantum computing and artificial intelligence, specifically relating to a quantum neural network architecture search optimization method, system, and its application in agricultural image classification. Background Technology

[0002] With the development of intelligent agriculture, crop image classification places dual demands on model accuracy and deployment efficiency. How to optimize quantum neural architecture and achieve efficient feature extraction and classification with limited quantum resources has become a key problem that urgently needs to be solved.

[0003] Existing technologies typically employ the following methods when optimizing quantum neural network architectures: 1. Based on the classic Neural Architecture Search (NAS) framework. This method suffers from low computational efficiency and slow convergence speed when dealing with large-scale architecture search spaces, typically requiring hundreds to thousands of GPU hours, making it difficult to meet the rapid iteration needs of agricultural scenarios, especially in edge deployment scenarios; 2. Quantum annealing methods rely heavily on dedicated quantum annealing hardware, making system deployment difficult, compatibility poor, and integration and application on general-purpose classical computing platforms (including farm edge devices); 3. Architecture search methods based on pure Grover search, although theoretically possible... The search for the target in the unlabeled library is completed within this single query, but its implementation requires... Quantum bits are used to encode the complete search space. For crop image processing models with complex hierarchical topologies, the number of qubits required to encode the architecture space easily exceeds the capability limits of current medium-sized noisy quantum devices.

[0004] Furthermore, single quantum algorithms often struggle to effectively balance "global exploration" and "local mining" during the search process, leading to local optima or premature convergence, making it difficult to efficiently generate high-performance, lightweight image classification model architectures. Summary of the Invention

[0005] The purpose of this invention is to overcome the problems existing in the prior art and propose a quantum neural network architecture search optimization method and system. By combining the parallel search acceleration advantage of quantum computing with the fine optimization capability of classical algorithms, a high-performance and lightweight image classification model architecture can be efficiently generated so as to perform image classification tasks in resource-constrained scenarios.

[0006] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: A quantum neural network architecture search and optimization method includes the following steps: (1) Grover quantum pre-screening: The component selection problem in the neural network architecture is mapped to a discretized search space. The Grover quantum search algorithm is used to search the encoding space in parallel. Based on predefined screening conditions, potential high-performance architectures are marked by quantum oracle functions. A set of Top-K candidate architectures with significantly higher probabilities than the average level is obtained through iterative quantum measurement. (2) Classical fine optimization: Using the Top-K candidate architecture set as the initial population, a multi-objective evolutionary algorithm is used to perform mutation, crossover and fitness evaluation, and to balance and optimize between accuracy and resource consumption, and finally output the optimal neural network architecture on the Pareto front.

[0007] As an improvement, step (1) maps the component selection problem in the neural network architecture to a discretized search space, and encodes the retention / pruning decisions of L components in the neural network architecture as binary variables, where "1" represents retention and "0" represents pruning. The search space size is:

[0008] The Grover quantum search algorithm includes constructing a uniform superposition state, calling the Oracle function to perform phase flipping, applying the diffusion operator, and performing a suboptimal number of iterations. The formula for the optimal number of suboptimal iterations is: , Where L is the number of binary decision variables, N is the size of the search space, and R is the optimal number of iterations.

[0009] As an improvement, the diffusion operator is constructed by combining Pauli gates, CNOT gates, and unit gates. The specific construction steps are as follows: Basis transformation layer: Pauli-X gates are applied to the L master qubits encoded in the search space. Then, a Hadamard gate (H) is applied to transform the quantum state from the computational basis to the superposition basis, laying the foundation for subsequent phase operations; a Hadamard gate is applied only to the 1 auxiliary qubit introduced into the system (initialized to |0>) to put it in a uniform superposition state; Multi-qubit correlation layer: Using auxiliary qubits as control bits, CNOT gate operations are performed on each of the L master qubits. When an auxiliary qubit is in the |1> state, the state of the corresponding master qubit is flipped; when an auxiliary qubit is in the |0> state, the state of the master qubit remains unchanged. Through this operation, entanglement is established between the auxiliary qubits and all master qubits, achieving coordinated global state control. Phase adjustment layer: Apply the Pauli-Z gate to the auxiliary qubit ( The |1> state component is given a phase marker of -1; a unit gate (I) is applied to all master qubits to ensure that their states are not subject to additional interference. Due to the entanglement effect of the CNOT gate, the phase change of the auxiliary qubits is propagated to the entire quantum system, causing the quantum state corresponding to the "non-target architecture" to acquire a global negative phase; Inverse conversion layer: Repeat the inverse operation of the basis conversion layer, first apply the Hadamard gate to the L main qubits, then apply the Pauli-X gate; apply only the Hadamard gate to the auxiliary qubits, converting the system from the superposition basis back to the computation basis, completing the complete operation cycle of the diffusion operator; As an improvement, in step (2), the multi-objective evolutionary algorithm is the NSGA-II algorithm, and a preset computational load constraint is set.

[0010] This invention also discloses a quantum neural network architecture search optimization system, comprising: The search space definition module is used to configure neural network component types, connection rules, and encoding schemes. The quantum pre-screening module, including an Oracle function designer, a quantum circuit builder, and a measurement post-processor, performs Grover search and outputs Top-K candidate architectures. The classic fine optimization module, including a population initializer, mutation and crossover operator, fitness evaluator, and multi-objective selector, is used to perform evolutionary optimization on candidate architectures. The model output and deployment module is used to generate the final network architecture and support compilation and deployment to edge devices.

[0011] The method and system disclosed in this invention can be used for agricultural image classification, which includes tasks such as crop disease identification, growth status monitoring, or field environment perception. The final output lightweight neural network model is deployed on farm edge devices.

[0012] The advantages of this invention are: 1. This invention employs a quantum coarse sieving-classical fine-tuning method, utilizing Grover quantum pre-screening in... It efficiently eliminates inefficient or resource-constrained architectures from the search space, rapidly narrowing the search funnel to potentially high-performance regions and avoiding the blind search of classic evolutionary algorithms in a vast space. This significantly shortens the overall search cycle. 2. This invention can overcome the resource limitations of large-scale search. In the quantum pre-screening stage, only the search space needs to be encoded. Combined with classical fine-tuning, it effectively avoids the resource explosion problem of the pure quantum Grover scheme requiring O(N) qubits to encode the topological details of the model, making it practically operable on medium-scale quantum hardware in the NISQ era. 3. This invention can perform fine optimization on multiple objectives, such as accuracy, latency, and resource consumption. The resulting model architecture can effectively balance the problems of "global exploration" and "local mining" in the search process, giving the model architecture the characteristics of high accuracy and low latency. At the same time, the lightweight constraint of preset values ​​ensures the lightweight and high performance of the architecture, meeting the deployment requirements of edge devices. 4. The quantum pre-screening of this invention can run on cloud platforms supporting quantum computing or future quantum accelerator cards, while fine-tuning and optimization are performed on general-purpose classical hardware. The entire solution does not force a specific quantum hardware binding and ultimately deploys a purely classical lightweight model with good compatibility, fully compatible with existing agricultural IT infrastructure and edge devices; 5. This invention considers crop image characteristics in the Oracle design and uses noisy real crop data sets in the evaluation, which can enhance the robustness of the search process to actual noise and improve the field generalization ability of the final model. Attached Figure Description

[0013] Figure 1 This is a flowchart of a quantum neural network architecture search optimization method according to the present invention.

[0014] Figure 2 This is a flowchart of the Grover quantum pre-screening step in a quantum neural network architecture search optimization method of the present invention.

[0015] Figure 3 This is a flowchart of the classical fine optimization steps based on evolutionary algorithms in a quantum neural network architecture search optimization method of the present invention. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0017] This invention discloses a quantum neural network architecture search and optimization method, comprising the following steps: (1) Grover quantum pre-screening 1.1 Discretization of the search space The problem of selecting architectural components for a target neural network is mapped to a discretized search space. The neural network contains L components, such as convolutional layers, pooling layers, and activation layers. The retention / pruning decisions for these L components are encoded as binary variables, where "1" represents retention and "0" represents pruning. This results in a binary string of length L, where each string uniquely corresponds to one architecture. The size of the entire search space is: .

[0018] 1.2 Design of Grover Quantum Preselector The key quantum subroutine, the Oracle function, is designed to identify and label candidate architectures that meet the initial screening criteria. When setting the Oracle function, a threshold for the number of candidate architecture parameters and an upper limit for computational resource consumption are first set, marking only architectures that meet the lightweight constraints as eligible candidates. Then, a selective phase-flipping operation is performed on the states of eligible candidate architectures. , in, If and only if architecture x satisfies the above preliminary screening conditions.

[0019] 1.3 Perform Grover iteration and measure On a quantum processor or quantum simulator, a quantum circuit is constructed consisting of a Hadamard gate to create a uniform superposition state, a GroverOracle call, and a diffusion operator (diffuser). After performing a suboptimal number of iterations, the quantum register is measured.

[0020] The diffusion operator is constructed by combining Pauli gates, CNOT gates, and unit gates. The specific construction steps are as follows: 1.3.1 Basis Transformation Layer: Pauli-X gates are applied to the L master qubits encoded in the search space. Then, a Hadamard gate (H) is applied to transform the quantum state from the computational basis to the superposition basis, laying the foundation for subsequent phase operations; a Hadamard gate is applied only to the 1 auxiliary qubit introduced into the system (initialized to |0>) to put it in a uniform superposition state; 1.3.2 Multi-qubit correlation layer: Using auxiliary qubits as control bits, CNOT gate operations are performed on each of the L master qubits. When an auxiliary qubit is in the |1> state, the state of the corresponding master qubit is flipped; when an auxiliary qubit is in the |0> state, the state of the master qubit remains unchanged. Through this operation, entanglement is established between the auxiliary qubits and all master qubits, achieving coordinated global state control. 1.3.3 Phase Adjustment Layer: Apply the Pauli-Z gate to the auxiliary qubit ( The |1> state component is given a phase marker of -1; a unit gate (I) is applied to all master qubits to ensure that their states are not subject to additional interference. Due to the entanglement effect of the CNOT gate, the phase change of the auxiliary qubits is propagated to the entire quantum system, causing the quantum state corresponding to the "non-target architecture" to acquire a global negative phase; 1.3.4 Inverse conversion layer: Repeat the inverse operation of step 1.3.1, first apply the Hadamard gate to the L main qubits, then apply the Pauli-X gate; apply only the Hadamard gate to the auxiliary qubits, converting the system from the superposition basis back to the computation basis, completing the complete operation cycle of the diffusion operator.

[0021] Through the above four-level combination, the diffusion operator can amplify the probability amplitude of the "target architecture" (marked by the Oracle function) by ((2K / N-1)) times (K is the number of target architectures and N is the size of the search space), while the probability amplitude of the "non-target architecture" is compressed. Ultimately, after R rounds of Grover iterations, the measurement probability of the target architecture approaches 1, providing a quantum mechanical probabilistic advantage for the subsequent screening of the Top-K candidate set.

[0022] The formula for calculating the Hadamard door is as follows: , The matrix calculation formula for the CNOT gate is: , The matrix calculation formula for the unit gate I is: , The formula for calculating the Pauli gate is: , In the formula, , , These are the Pauli-X gate, Pauli-Y gate, and Pauli-Z gate, respectively.

[0023] The optimal number of iterations is: Where L is the number of binary decision variables and N is the size of the search space.

[0024] 1.4 Output high-probability candidate set By analyzing the probability distribution of the measurement results, only candidate architectures with a significantly higher probability of occurrence than the average level are selected to form a small-scale Top-K candidate architecture set S, where K is much smaller than N, thereby compressing the search space from N to K in polynomial time.

[0025] The algorithm steps for step 1 are as follows: # Phase 1: Grover Pre-screening def grover_prescreening(search_space, oracle, k): grover_circ = construct_grover(oracle) # Construct a quantum circuit result = quantum_hardware.run(grover_circ, shots=sqrt(N)) topk_archs = result.most_common(k) # Measure the K architectures with the highest probabilities return topk_archs (2) Classical fine optimization based on evolutionary algorithm 2.1 Initialize the population The Top-K candidate architecture set S is used as the initial architecture pool, and M architectures in the architecture pool are randomly selected to form the initial population P0 of the evolutionary algorithm.

[0026] 2.2 Perform multi-generational evolution operations Evolutionary operations are performed based on the NSGA-II algorithm. In each generation of evolution, mutation, crossover, and fitness evaluation operations are performed sequentially. The mutation operation uses a preset mutation probability P. m The binary encoded strings of the architecture in the population are randomly flipped, i.e., "1" is changed to "0" or "0" to "1". Simultaneously, specific components in the neural network are added, deleted, or modified to explore changes in neighboring architectures. The crossover operation uses a two-point crossover strategy to exchange encoded segments among individuals in the population. Crossover operations are based on the functional module boundaries of neural networks. Between one or more sets of parent architectures, the functional module boundaries of the network are exchanged and recombined to produce a new architecture with some structural features of both parents, namely the offspring architecture.

[0027] Then, an adaptive evaluation operation is performed: the fitness of the newly generated sub-architecture is evaluated based on the task, the corresponding data, and the data. For example, if the target task is agricultural image classification, the sub-architecture is trained and validated using the Plant Village dataset, and its classification accuracy, parameter count, inference latency, and other metrics are calculated and weighted together as the fitness value.

[0028] 2.3 Terminate evolution and output optimal architecture When the evolution reaches the preset maximum number of generations or the performance improvement of the population at the Pareto front slows down, the evolution is terminated, and the network architecture with the best overall performance is selected from the optimal non-dominated levels as the optimal result of NAS output.

[0029] The algorithm steps for step 2 are as follows: # Phase 2: Evolutionary Refinement and Optimization def evolutionary_refinement(topk_archs): population = init_population(topk_archs) for gen in range(max_generations): offspring = crossover_mutation(population) fitness = [evaluate(arch) for arch in offspring] # Accuracy + Latency Multi-Objective Evaluation population = nsga2_selection(population + offspring) return pareto_front(population)[0] # Return the optimal solution This invention also discloses a quantum neural network architecture search optimization system, which includes at least: The search space definition module configures the basic module type, connection rules, and encoding length L of the neural network to be searched.

[0030] The quantum pre-screening module includes an Oracle function designer, a quantum circuit builder, and a measurement result post-processor. The Oracle function designer is used to implant prior constraints. The quantum circuit builder runs in a quantum processor or quantum simulator and is used to construct quantum circuits. The measurement result post-processor is used to identify the Top-K architecture set S.

[0031] The classic fine optimization module includes a population initializer, a mutation crossover operator, a fitness evaluator, and a multi-objective selector. The population initializer uses the Top-K architecture output by quantum pre-screening as the initial individuals, the mutation crossover operator performs a local search in the discrete architecture space, the fitness evaluator constructs a multi-objective function based on accuracy, number of parameters, and inference latency, and the multi-objective selection uses the NSGA-II algorithm to preserve non-dominated solutions and gradually converges to the Pareto optimal front.

[0032] The model output and deployment module is used to generate the final network architecture and support compilation and deployment to edge devices.

[0033] In the computing platform of this solution, Step 1, Grover quantum pre-screening, can be executed on an efficient classical quantum simulator (Pennylane). Step 2, classical fine optimization based on the evolutionary algorithm: run on a computing workstation equipped with a high-performance GPU (NVIDIA GeForce RTX 3090, with 24GB of video memory or more), and the operating system is Ubuntu 20.04 LTS. The software environment needs to install: Python(>=3.8), deep learning frameworks (PyTorch / TensorFlow), evolutionary algorithm libraries, and quantum computing simulation frameworks to support the construction and simulation operation of the Grover preselector.

[0034] This invention adopts the method of combining quantum coarse screening with classical fine tuning, which can utilize the quantum acceleration advantage of the Grover algorithm to quickly and massively filter out low-quality architectures at the initial stage of NAS, significantly reducing the scale of candidate solutions (K << N) faced in the fine-tuning stage. Then, through the classical NSGA-II, refined multi-objective optimization is performed within the high-performance potential region screened by the quantum, such as in terms of accuracy and resource consumption, effectively avoiding the problem of resource limitations in pure quantum solutions.

[0035] At the same time, this invention can be customized for agricultural image characteristics: The screening conditions integrating agricultural domain knowledge are preset in the Grover Oracle function: Support architecture filtering based on the key features of crop images, such as network layers sensitive to leaf texture and lesion morphology, and strong threshold constraints on model complexity (number of parameters, FLOPs), ensuring edge deployability from the source. In the evaluation stage of NSGA-II, test with an agricultural image dataset rich in real noise to improve the environmental noise robustness and long-tail data generalization ability of the search process and the final architecture.

[0036] This invention can jointly incorporate model computing load constraints in both the quantum pre-screening and classical fine-tuning stages, thereby reducing the computing power requirements of the neural architecture as needed, ensuring that the output optimal architecture naturally meets the deployment requirements of low computing power and limited storage of agricultural edge devices.

[0037] The system of this invention includes modules such as search space definition, quantum pre-screening executor, classical NSGA-II optimization executor, model output and evaluation, etc., and clarifies its collaborative deployment method in a general computing environment, having good compatibility with existing agricultural IT infrastructure and edge devices.

[0038] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A quantum neural network architecture search and optimization method, characterized in that, Includes the following steps: (1) Grover quantum pre-screening: The component selection problem in the neural network architecture is mapped to a discretized search space. The Grover quantum search algorithm is used to search the encoding space in parallel. Based on predefined screening conditions, potential high-performance architectures are marked by quantum oracle functions. A set of Top-K candidate architectures with significantly higher probabilities than the average level is obtained through iterative quantum measurement. (2) Classical fine optimization: Using the Top-K candidate architecture set as the initial population, a multi-objective evolutionary algorithm is used to perform mutation, crossover and fitness evaluation, and to balance and optimize between accuracy and resource consumption, and finally output the optimal neural network architecture on the Pareto front.

2. The quantum neural network architecture search and optimization method according to claim 1, characterized in that, Step (1) maps the component selection problem in the neural network architecture to a discretized search space, and encodes the retention / pruning decisions of L components in the neural network architecture as binary variables, where "1" represents retention and "0" represents pruning. The search space size is: , The Grover quantum search algorithm includes constructing a uniform superposition state, calling the Oracle function to perform phase flipping, applying the diffusion operator, and performing a suboptimal number of iterations. The formula for the optimal number of suboptimal iterations is: , Where L is the number of binary decision variables, N is the size of the search space, and R is the optimal number of iterations.

3. The quantum neural network architecture search and optimization method according to claim 2, characterized in that, The diffusion operator is constructed by combining Pauli gates, CNOT gates, and unit gates. The specific construction steps are as follows: Basis transformation layer: Pauli-X gates are applied to the L master qubits encoded in the search space. Then, a Hadamard gate (H) is applied to transform the quantum state from the computational basis to the superposition basis, laying the foundation for subsequent phase operations; a Hadamard gate is applied only to the 1 auxiliary qubit introduced into the system (initialized to |0>) to put it in a uniform superposition state; Multi-qubit correlation layer: Using auxiliary qubits as control bits, CNOT gate operations are performed on each of the L master qubits. When an auxiliary qubit is in the |1> state, the state of the corresponding master qubit is flipped; when an auxiliary qubit is in the |0> state, the state of the master qubit remains unchanged. Through this operation, entanglement is established between the auxiliary qubits and all master qubits, achieving coordinated control of the global state. Phase adjustment layer: Apply the Pauli-Z gate to the auxiliary qubit ( The phase of the |1> state component is marked with a phase of -1; a unit gate (I) is applied to all master qubits to ensure that their states are not disturbed by additional interference; due to the entanglement effect of the CNOT gate, the phase change of the auxiliary qubit will be transmitted to the entire quantum system, so that the quantum state corresponding to the "non-target architecture" will obtain a global negative phase; Inverse conversion layer: Repeat the inverse operation of the basis conversion layer, first apply the Hadamard gate to the L main qubits, then apply the Pauli-X gate; apply only the Hadamard gate to the auxiliary qubits, converting the system from the superposition basis back to the computation basis, completing the complete operation cycle of the diffusion operator.

4. The quantum neural network architecture search and optimization method according to claim 3, characterized in that, The formula for calculating the Hadamard door is as follows: , The matrix calculation formula for the CNOT gate is: , The matrix calculation formula for the unit gate I is: , The formula for calculating the Pauli gate is: , In the formula, , , These are the Pauli-X gate, Pauli-Y gate, and Pauli-Z gate, respectively.

5. The quantum neural network architecture search and optimization method according to claim 1, characterized in that, In step (2), the multi-objective evolutionary algorithm is the NSGA-II algorithm, and a preset computational load constraint is set.

6. A quantum neural network architecture search optimization system based on the method of claim 1, characterized in that, include: The search space definition module is used to configure neural network component types, connection rules, and encoding schemes. The quantum pre-screening module, including an Oracle function designer, a quantum circuit builder, and a measurement post-processor, performs Grover search and outputs Top-K candidate architectures. The classic fine optimization module, including a population initializer, mutation and crossover operator, fitness evaluator, and multi-objective selector, is used to perform evolutionary optimization on candidate architectures. The model output and deployment module is used to generate the final network architecture and support compilation and deployment to edge devices.

7. An application of the method described in claim 1 in agricultural image classification, characterized in that, The agricultural image classification includes tasks such as crop disease identification, growth status monitoring, or field environment perception. The final output lightweight neural network model is deployed on farm edge devices.

Citation Information

Patent Citations

  • Evolutionary quantum neural network architecture search method based on quantum simulator

    CN114676837A

  • Multi-objective evolutionary neural architecture search method based on multi-population mechanism and proxy model

    CN118014010A

  • Method and apparatus for searching for neural network ensemble model, and electronic device

    WO2023087953A1