A quantum neural network architecture search optimization method and system and application thereof in agricultural image classification
By combining Grover quantum pre-screening and the classical NSGA-II algorithm, the quantum neural network architecture is optimized, solving the problems of low computational efficiency and high resource consumption in existing technologies. This generates a high-performance, lightweight model suitable for agricultural image classification, enabling efficient deployment and good compatibility on edge devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ANHUI SCI & TECH UNIV
- Filing Date
- 2025-10-13
- Publication Date
- 2026-06-26
AI Technical Summary
Existing technologies for optimizing quantum neural network architectures suffer from low computational efficiency, slow convergence speed, high resource consumption, difficulty in deployment on edge devices, and poor compatibility. In particular, they are difficult to achieve efficient feature extraction and classification in crop image classification tasks.
A multi-objective evolutionary optimization method combining Grover quantum pre-screening and the classical NSGA-II algorithm is adopted. Through quantum parallel search and classical fine optimization, a high-performance and lightweight neural network architecture is generated. Grover quantum search algorithm is used for preliminary screening, and classical algorithm is used for fine optimization to generate a high-precision and low-latency model architecture.
In resource-constrained agricultural scenarios, the search cycle is significantly shortened, generating a high-performance, lightweight image classification model that is suitable for deployment on edge devices and has good compatibility and generalization capabilities.
Smart Images

Figure CN121303205B_ABST
Abstract
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:
[0004] 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.
[0005] 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).
[0006] 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.
[0007] 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
[0008] 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.
[0009] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:
[0010] A quantum neural network architecture search and optimization method includes the following steps:
[0011] (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.
[0012] (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 operations, crossover operations 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.
[0013] 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:
[0014]
[0015] 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:
[0016]
[0017] 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.
[0018] As an improvement, the diffusion operator is constructed by combining Pauli gates, CNOT gates, and unit gates. The specific construction steps are as follows:
[0019] Basis transformation layer:
[0020] Pauli-X gates are applied to the L master qubits encoded in the search space. Then, apply the Hadamard gate (H) to transform the quantum state from the computational basis to the superposition basis, laying the foundation for subsequent phase operations; apply only the Hadamard gate to the 1 auxiliary qubit introduced into the system (initialized to |0>) to make it in a uniform superposition state.
[0021] Multi-qubit correlation layer:
[0022] 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.
[0023] Phase adjustment layer:
[0024] 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 qubit is propagated to the entire quantum system, giving the quantum state corresponding to the “non-target architecture” a global negative phase.
[0025] 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.
[0026] As an improvement, in step (2), the multi-objective evolutionary algorithm is the NSGA-II algorithm, and a preset computational load constraint is set.
[0027] This invention also discloses a quantum neural network architecture search optimization system, comprising:
[0028] The search space definition module is used to configure neural network component types, connection rules, and encoding schemes.
[0029] 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.
[0030] 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.
[0031] The model output and deployment module is used to generate the final network architecture and support compilation and deployment to edge devices.
[0032] 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.
[0033] The advantages of this invention are:
[0034] 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.
[0035] 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, which requires O(N) qubits to encode the topological details of the model, making it practically operable on medium-scale quantum hardware in the NISQ era.
[0036] 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.
[0037] 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.
[0038] 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
[0039] Figure 1 This is a flowchart of a quantum neural network architecture search optimization method according to the present invention.
[0040] 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.
[0041] 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
[0042] 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.
[0043] This invention discloses a quantum neural network architecture search and optimization method, comprising the following steps:
[0044] (1) Grover quantum pre-screening
[0045] 1.1 Discretization of the search space
[0046] 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: .
[0047] 1.2 Design of Grover Quantum Preselector
[0048] 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.
[0049]
[0050] in, =1, if and only if architecture x satisfies the above preliminary screening conditions.
[0051] 1.3 Perform Grover iteration and measure
[0052] 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.
[0053] The diffusion operator is constructed by combining Pauli gates, CNOT gates, and unit gates. The specific construction steps are as follows:
[0054] 1.3.1 Basis Transformation Layer:
[0055] Pauli-X gates are applied to the L master qubits encoded in the search space. Then, apply the Hadamard gate (H) to transform the quantum state from the computational basis to the superposition basis, laying the foundation for subsequent phase operations; apply only the Hadamard gate to the 1 auxiliary qubit introduced into the system (initialized to |0>) to make it in a uniform superposition state.
[0056] 1.3.2 Multi-qubit correlation layer:
[0057] 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.
[0058] 1.3.3 Phase Adjustment Layer:
[0059] 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 qubit is propagated to the entire quantum system, giving the quantum state corresponding to the “non-target architecture” a global negative phase.
[0060] 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.
[0061] 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 subsequent screening of the Top-K candidate set.
[0062] The formula for calculating the Hadamard door is as follows:
[0063]
[0064] The matrix calculation formula for the CNOT gate is:
[0065]
[0066] The matrix calculation formula for the unit gate I is:
[0067]
[0068] The formula for calculating the Pauli gate is:
[0069]
[0070]
[0071]
[0072] In the formula, , , These are the Pauli-X gate, Pauli-Y gate, and Pauli-Z gate, respectively.
[0073] The optimal number of iterations is: Where L is the number of binary decision variables and N is the size of the search space.
[0074] 1.4 Output high-probability candidate set
[0075] 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.
[0076] The algorithm steps for step 1 are as follows:
[0077] # Phase 1: Grover Pre-screening
[0078] def grover_prescreening(search_space, oracle, k):
[0079] grover_circ = construct_grover(oracle) # Construct a quantum circuit
[0080] result = quantum_hardware.run(grover_circ, shots=sqrt(N))
[0081] topk_archs = result.most_common(k) # Measure the K architectures with the highest probabilities
[0082] return topk_archs
[0083] (2) Classical fine optimization based on evolutionary algorithm
[0084] 2.1 Initialize the population
[0085] 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.
[0086] 2.2 Perform multi-generational evolution operations
[0087] Evolutionary operations are performed based on the NSGA-II algorithm. In each generation of evolution, mutation, crossover, and fitness evaluation operations are performed sequentially.
[0088] The mutation operation uses a preset mutation probability P. m The binary encoded strings of the architectures in the population are randomly flipped, i.e., "1" is changed to "0" or "0" is changed to "1". At the same time, specific components in the neural network are added, deleted or modified accordingly to explore changes in neighboring architectures. The crossover operation uses a two-point crossover strategy to exchange encoded fragments among individuals in the population. The crossover operation is based on the functional module boundaries of the neural network. Between one or more sets of parent architectures, the exchange and recombination operation is carried out based on the functional module boundaries of the network to generate a new architecture with some structural features of both parents, i.e., the offspring architecture.
[0089] 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.
[0090] 2.3 Terminate evolution and output optimal architecture
[0091] 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.
[0092] The algorithm steps for step 2 are as follows:
[0093] # Phase 2: Evolutionary Refinement and Optimization
[0094] def evolutionary_refinement(topk_archs):
[0095] population = init_population(topk_archs)
[0096] for gen in range(max_generations):
[0097] offspring = crossover_mutation(population)
[0098] fitness = [evaluate(arch) for arch in offspring] # Accuracy + Latency Multi-Objective Evaluation
[0099] population = nsga2_selection(population + offspring)
[0100] return pareto_front(population)[0] # Return the optimal solution
[0101] This invention also discloses a quantum neural network architecture search optimization system, which includes at least:
[0102] The search space definition module configures the basic module type, connection rules, and encoding length L of the neural network to be searched.
[0103] 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.
[0104] 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.
[0105] The model output and deployment module is used to generate the final network architecture and support compilation and deployment to edge devices.
[0106] In the computing platform of this solution, step 1, Grover quantum prescreening can be executed on an efficient classical quantum simulator (Pennylane). Step 2, classical fine optimization is performed based on the evolutionary algorithm: it runs on a computing workstation equipped with a high-performance GPU (NVIDIA GeForce RTX 3090, with 24GB 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.
[0107] This invention adopts a 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 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.
[0108] At the same time, this invention can be customized for agricultural image characteristics:
[0109] Screening conditions integrating agricultural domain knowledge are preset in the Grover Oracle function:
[0110] It supports architecture filtering based on the key features of crop images, such as network layers sensitive to leaf texture and lesion morphology, and importance; it supports strong threshold constraints on model complexity (number of parameters, FLOPs), ensuring edge deployability from the source. In the evaluation stage of NSGA-II, an agricultural image dataset rich in real noise is used for testing, improving the environmental noise robustness and long-tail data generalization ability of the search process and the final architecture.
[0111] This invention can jointly incorporate model computing load constraints in both the quantum prescreening and classical fine-tuning stages, thereby reducing the computing power requirements of neural architectures as needed, ensuring that the output optimal architecture naturally meets the deployment requirements of low computing power and limited storage of agricultural edge devices.
[0112] The system of this invention includes modules such as search space definition, quantum prescreening 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.
[0113] 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, The quantum neural network architecture is used for image processing, and the 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 search 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, ultimately outputting the optimal neural network architecture on the Pareto front; wherein, the mutation operation flips random bits of the binary encoding string of the architecture in the population with a preset mutation probability, corresponding to adding, deleting, or modifying components in the neural network to explore changes in neighboring architectures; the crossover operation is based on the functional module boundary of the neural network, and between one or more sets of parent architectures, the exchange and recombination operation is performed based on the functional module boundary of the network to generate offspring architectures with some structural features of both parents; the fitness evaluation is based on the task and corresponding data to train and validate the offspring architecture, calculate the classification accuracy, parameter quantity, and inference latency index, and comprehensively weight them as the fitness value; when the evolution reaches the preset maximum number of generations or the performance improvement of the population on 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 level as the output result.
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 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; the auxiliary qubit introduced into the system is initialized to |0> with only a Hadamard gate applied to make it in a uniform superposition state; Multi-qubit correlation layer: Using auxiliary qubits as control bits, CNOT gate operations are performed on L master qubits respectively. When the auxiliary qubit is in the |1> state, the state of the corresponding master qubit is flipped; when the auxiliary qubit is in the |0> state, the state of the master qubit remains unchanged. Through this operation, entanglement between the auxiliary qubit and all master qubits is established, realizing the linkage 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 qubits 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, is used to perform Grover search and output Top-K candidate architectures. The classic fine-tuning optimization module includes a population initializer, a mutation crossover operator, a fitness evaluator, and a multi-objective selector, used for evolutionary optimization of candidate architectures. The mutation crossover operator flips random bits of the binary encoding string of the architectures in the population with a preset mutation probability, corresponding to adding, deleting, or modifying components in the neural network, and performs exchange and recombination operations between parent architectures based on the functional module boundaries of the neural network. The fitness evaluator trains and validates the offspring architectures based on the task and corresponding data, calculates classification accuracy, parameter count, and inference latency, and uses a weighted average as the fitness value. Evolution terminates when the preset maximum number of generations is reached or the performance improvement of the population at the Pareto front slows down. The multi-objective selector selects the network architecture with the best overall performance from the optimal non-dominated levels as the output result. 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.