Neural network structure search method and system

By employing FlexCell cell design and a neural network architecture search method that coordinates heterogeneous computing hardware, the problems of high computational resource consumption and large number of network parameters in existing technologies are solved, achieving lightweight and efficient convolutional neural network architecture search, which shows outstanding performance, especially in the field of medical image diagnosis.

WO2026145296A1PCT designated stage Publication Date: 2026-07-09JIANGNAN UNIV

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
JIANGNAN UNIV
Filing Date
2025-12-26
Publication Date
2026-07-09

AI Technical Summary

Technical Problem

Existing technologies for designing convolutional neural network architectures suffer from high computational resource consumption, a large number of network parameters, and difficulty in deployment on edge devices or in industrial scenarios. Furthermore, the automated search process is time-consuming, making it difficult to achieve efficient, automated, and high-performance structure search.

Method used

A neural network structure search method that employs FlexCell cell design and heterogeneous computing hardware collaboration is proposed. An improved genetic algorithm is executed collaboratively by CPU and GPU to parallelize computationally intensive tasks during the search process. Furthermore, three-dimensional hardware-aware encoding and continuous address space storage optimization are utilized to generate lightweight and high-performance convolutional neural network structures.

Benefits of technology

It significantly reduces the number of network parameters and computational costs, improves search efficiency, and the generated network structure exhibits excellent performance in image classification tasks, especially in the field of medical image diagnosis, where it has high accuracy and strong practical value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025145931_09072026_PF_FP_ABST
    Figure CN2025145931_09072026_PF_FP_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of collaboration between artificial intelligence and computer systems. Disclosed are a neural network structure search method and a system. The method comprises: deploying in a memory a network architecture template comprising a reconfigurable convolutional layer, wherein the convolutional layer consists of a plurality of FlexCell units, each FlexCell comprises a standard convolution operator and two depthwise separable convolution operators, and the degree of contribution of each operator is regulated by means of a trainable weight coefficient; using a graphics processing unit to perform three-dimensional hardware-aware encoding on the convolutional layer, so as to generate a structure definition matrix; and a central processing unit and the graphics processing unit collaboratively executing an improved genetic algorithm to perform parallel evaluation, crossover and mutation on candidate network structures in an encoding-based search space, so as to search out optimal network structure parameters. The present invention can automatically generate a network structure with few parameters and high precision, greatly improves search efficiency by means of heterogeneous computing collaboration, and is suitable for tasks such as image classification.
Need to check novelty before this filing date? Find Prior Art

Description

A method and system for searching neural network structures Technical Field

[0001] This invention belongs to the field of artificial intelligence and computer system collaboration technology, and specifically relates to a neural network structure search method and system. Background Technology

[0002] Convolutional Neural Networks (CNNs), deep learning models specifically designed for processing grid-structured data such as images and audio, have been widely applied in fields such as image classification and object detection. However, designing high-performance CNN architectures heavily relies on expert experience, making the process cumbersome and difficult to optimize. Automated Neural Architecture Search (NAS) techniques, particularly evolutionary computation methods based on genetic algorithms, offer the possibility of automatically discovering efficient network architectures. These methods, through heuristic searches in a vast structural space, can reduce the blind spots of manual design and improve model performance and generalization ability.

[0003] Despite the progress made in evolutionary computation-based NAS methods, most current research suffers from two prominent limitations: First, they often prioritize improving classification accuracy while neglecting the complexity of the model itself, resulting in a massive number of network parameters that are difficult to deploy in resource-constrained edge devices or industrial scenarios. For example, existing techniques can generate tens of millions or even hundreds of millions of network parameters; for instance, Xie et al. [L. Xie and A. Yuille, “Genetic CNN,” in 2017 IEEE International Conference on Computer Vision (ICCV), Conference Proceedings, pp. 1388–1397.] discovered a network with as many as 156M parameters using a genetic algorithm. Second, the NAS process itself is extremely computationally expensive. Evaluating the performance of candidate networks typically requires a complete training process, leading to lengthy search times and enormous computational resource consumption. For example, NASNet [B. Zoph, V. Vasudevan, J. Shlens, and QVLe, “Learning transferable architectures for scalable image recognition,” in 2018 IEEE / CVF Conference on Computer Vision and Pattern Recognition, Conference Proceedings, pp. 8697–8710.] consumed 500 GPUs for four days in its search on the CIFAR-10 dataset; Sun et al. [Y. Sun, B. Xue, M. Zhang, and GGYen, “Completely automated CNN architecture design based on blocks,” IEEE Transactions on Neural Networks and Learning Systems, vol. 31, no. 4, pp. 1242–1254, 2020.] required 35 and 40 GPU days respectively for independent searches on different datasets. This high computational cost severely hinders the practical application and widespread adoption of NAS technology.

[0004] In summary, existing technologies lack a method and system for efficiently and automatically searching for high-performance and structurally simple convolutional neural network architectures on computer systems. Such a method and system not only needs to balance network performance and parameter quantity by improving the design of basic units and the search space, but also needs to fundamentally accelerate the time-consuming search process by utilizing and optimizing the parallel processing capabilities and memory access patterns of heterogeneous computing hardware. This would allow for the simultaneous realization of high-precision model output and high-efficiency structure search within the computer system. Summary of the Invention

[0005] To overcome the aforementioned shortcomings, this invention aims to provide an efficient and low-power neural network architecture search method and system. The core of this invention lies in the deep integration of advanced network architecture design concepts with heterogeneous computing hardware architectures, significantly reducing the computational complexity and time cost of the search process while ensuring search accuracy.

[0006] In a first aspect, the present invention provides a neural network structure search method, comprising:

[0007] Step S1: Deploy a configurable convolutional neural network architecture template in memory. The architecture template includes an input layer, at least one reconfigurable convolutional layer, and a classification layer. The reconfigurable convolutional layer is defined as containing at least one optimizable convolutional unit (FlexCell). Each FlexCell unit includes a standard convolution operator, a first depthwise separable convolution operator, and a second depthwise separable convolution operator. The three operators are configured to receive the same input tensor and perform convolution operations respectively. The resulting three output tensors are concatenated to generate the final output tensor of the FlexCell. The contribution of each convolution operator is controlled by trainable weight coefficients α1, α2, and α3, and the sum of α1, α2, and α3 is 1.

[0008] Step S2: The graphics processing unit reads the architecture template from the memory and performs three-dimensional hardware-aware encoding on the reconfigurable convolutional layer to generate a set of structure definition matrices, including:

[0009] The connection topology between FlexCell units within the convolutional layer is encoded into an adjacency matrix, which corresponds to a directed acyclic graph with unidirectional information flow constraints, where each graph node represents a FlexCell unit.

[0010] The weight coefficients of the three convolution operators in each FlexCell unit are encoded into a weight matrix whose dimension matches the number of FlexCell units and the number of convolution operators in the convolutional layer.

[0011] The output channel number of each FlexCell unit is encoded into a channel number matrix;

[0012] The matrix generated by the three-dimensional hardware-aware encoding is organized into a tensor format suitable for parallel processing by the graphics processing unit.

[0013] Step S3: The central processing unit and the graphics processing unit jointly execute an improved genetic algorithm to search for optimal network structure parameters in the search space defined by the structure definition matrix, specifically including:

[0014] The central processing unit initializes the control parameters of the genetic algorithm;

[0015] The graphics processing unit performs population initialization, parallel fitness evaluation, and parallel crossover and mutation operations in the video memory.

[0016] The central processing unit receives the evaluation results from the graphics processing unit, executes selection logic to update the population, and sends the update instruction to the graphics processing unit.

[0017] The above process is iteratively executed until the termination condition is met. The graphics processing unit decodes a set of optimal network structure parameters, including the optimal topology, optimal weight coefficients, and optimal number of channels, and stores them in the memory.

[0018] Optionally, step S2 further includes: the structure definition matrix is ​​stored in a contiguous address space of the memory.

[0019] Optionally, step S3 specifically includes:

[0020] Step S3.1: The central processing unit initializes the population number N, population evolution iteration number G, convolutional layer cell size Sc, convolutional layer cell number L, mutation rate Mr, crossover rate Cr, crossover mutation type probability vector V, and candidate channel list Lc;

[0021] Step S3.2: The graphics processing unit randomly generates a first-generation population P in the video memory. The first-generation population P contains N individuals, each individual is composed of L different convolutional layer cells connected in series, and each convolutional layer cell is composed of Sc different FlexCell units.

[0022] Step S3.3: For each generation of evolution, perform the following operations in a loop:

[0023] Step S3.3.1: The graphics processing unit calculates the fitness score of each individual in the current population P in parallel and transmits the fitness score set back to the central processing unit;

[0024] Step S3.3.2: The central processing unit retains the three individuals with the highest fitness as elites E;

[0025] Step S3.3.3: The graphics processing unit performs mutation and crossover operations in parallel on individuals in population P based on the mutation rate Mr, crossover rate Cr, and crossover mutation type probability vector V, to generate offspring population Q;

[0026] Step S3.3.4: The central processing unit performs a roulette wheel algorithm on population P and population Q to select N-3 individuals, merges the selected N-3 individuals with elite E to form a new generation population P, and transmits its data back to the graphics processing unit's video memory.

[0027] Step S3.4: When the preset evolutionary generation G is reached, the central processing unit instructs the graphics processing unit to decode the individual with the highest fitness into the optimal network structure parameters.

[0028] Optionally, the number of parameters in the FlexCell unit is determined by the following formula: α1×C in ×C ouu +C in ×(3 2 +α2×C ouu )+C in ×(5 2 +α3×C ouu ) = C in ×C ouu +34×C in

[0029] Among them, C n Indicates the number of input channels, C uu This indicates the number of output channels of the FlexCell unit.

[0030] Optionally, the adjacency matrix is ​​constrained to satisfy the following conditions:

[0031] Except for the last row, all other rows are not zero;

[0032] Except for the first column, all other columns are non-zero.

[0033] Secondly, the present invention provides an image classification method, comprising:

[0034] Using the neural network structure search method described above, the optimal structure parameters of the convolutional neural network for image classification are obtained;

[0035] Based on the aforementioned optimal structural parameters, a convolutional neural network is constructed;

[0036] The image to be classified is input into the convolutional neural network to perform image classification.

[0037] Thirdly, the present invention provides a neural network structure search system, the system comprising:

[0038] The memory is used to store configurable convolutional neural network architecture templates, population data during the evolution process, and the final optimal network structure parameters.

[0039] The graphics processing unit, connected to the memory via a high-speed bus, is configured to perform massively parallel computing tasks, including:

[0040] Perform three-dimensional hardware-aware encoding to generate a structure definition matrix organized into a tensor format suitable for batch parallel processing;

[0041] Population initialization is performed in video memory;

[0042] Parallel fitness assessment of individuals within the population;

[0043] Perform parallel crossover and mutation operations on individuals in the population;

[0044] The central processing unit, connected to the memory and the graphics processing unit, is configured to perform the following control and scheduling tasks:

[0045] Initialize the genetic algorithm parameters;

[0046] Receive the fitness score set returned by the graphics processing unit, determine elite individuals based on it, and execute the population update selection algorithm;

[0047] Instructions are sent to the graphics processing unit to control it to perform population initialization, fitness evaluation, crossover and mutation operations;

[0048] When the evolutionary iteration is complete, the graphics processing unit is instructed to decode the optimal individual into the optimal network structure parameters.

[0049] Optionally, the graphics processing unit is further configured to store the generated structure definition matrix in a contiguous address space of the memory to minimize the data transmission latency between the central processing unit and the graphics processing unit.

[0050] Fourthly, the present invention provides a neural network structure search device, comprising:

[0051] Memory and processor;

[0052] The memory stores a computer program configured to implement the neural network structure search method as described above when executed by the processor.

[0053] Fifthly, the present invention provides a non-transitory computer-readable storage medium storing a computer program containing instructions that, when executed by one or more processors, implement the neural network structure search method described above.

[0054] The beneficial effects of this invention are:

[0055] 1. The method of this invention controls the number of network parameters from the source through the multi-scale design and parameter constraint formula of FlexCell units, so that the searched network structure has both lightweight and high-performance characteristics. On standard datasets such as CIFAR-10 and CIFAR-100, the obtained network (FC-NAS) can achieve or surpass the classification accuracy achieved by many large, manually designed networks and time-consuming NAS methods with significantly fewer parameters.

[0056] 2. The method of this invention utilizes a heterogeneous collaborative computing architecture of a central processing unit (CPU) and a graphics processing unit (GPU) to parallelize computationally intensive tasks in genetic algorithms, such as population initialization, fitness evaluation, and crossover mutation, on the GPU. Furthermore, it performs hardware-aware storage optimization on the structural data, significantly accelerating the search process. Experiments show that the search process of this invention requires only a very short GPU time, reducing computational costs by several orders of magnitude compared to existing NAS methods, making automated network structure search truly efficient and feasible.

[0057] 3. The network structure obtained by the method of this invention demonstrates outstanding performance in the field of medical image diagnosis, which has extremely high requirements for classification accuracy and reliability: on professional medical datasets such as PneumoniaMNIST, PathMNIST, and BreastMNIST, its classification accuracy comprehensively and significantly surpasses that of classic ResNet series networks and mainstream automated machine learning tools. This proves that the solution of this invention can not only be used for general tasks, but also directly solve the image analysis problems in professional fields with complex features and low fault tolerance, possessing strong practical value and generalization ability.

[0058] In summary, this invention provides a complete technical solution that can be implemented on a computing system, simultaneously overcoming multiple challenges related to model performance, complexity, and search efficiency through co-design and optimization of hardware and software. The substantial technical effects of this solution are reflected in two aspects: firstly, it achieves significant optimization in the accuracy-parameter balance of the output model; secondly, it reduces computation time and resource consumption in the search process by orders of magnitude. These effects have been fully verified through comparative experiments on general benchmark datasets such as CIFAR and professional medical imaging datasets such as PneumoniaMNIST, demonstrating the significant application value of this invention in improving the practicality of automated network design and promoting its implementation in demanding industrial scenarios such as medical diagnosis. Attached Figure Description

[0059] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0060] Figure 1 is a schematic diagram of the structure of the FlexCell, an optimizable convolutional unit provided by the present invention.

[0061] Figure 2 is a schematic diagram of the three-dimensional hardware-aware coding provided by the present invention.

[0062] Figure 3 is a schematic diagram of the mutation operation in the genetic algorithm provided by this invention.

[0063] Figure 4 is a schematic diagram of the crossover operation in the genetic algorithm provided by this invention.

[0064] Figure 5 is a general block diagram of the convolutional neural network structure provided by the present invention.

[0065] Figure 6 is a schematic diagram of the encoding of an individual (network structure) provided by the present invention. Detailed Implementation

[0066] 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, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0067] Both Examples 1 and 2 are executed on a computer system configured with a central processing unit (CPU, Intel Core i9-9900X@3.50GHz), a graphics processing unit (GPU, NVIDIA GeForce RTX 4090 with 24GB of video memory), 48GB of system memory (RAM), and necessary input / output interfaces. This hardware system provides the necessary parallel computing resources, data storage capacity, and high-speed data throughput capabilities for the technical solution of this invention. The software environment is built based on the PyTorch 2.5.1 and torchvision 0.20.1 framework.

[0068] Example 1

[0069] This embodiment provides an automatic neural network structure search method that significantly improves search efficiency by optimizing the collaboration and data management of heterogeneous computing hardware.

[0070] The methods include:

[0071] Step S1: Deploy a configurable convolutional neural network architecture template in memory. The architecture template includes an input layer, at least one reconfigurable convolutional layer, and a classification layer. The reconfigurable convolutional layer is defined as containing at least one optimizable convolutional unit (FlexCell).

[0072] The structure of the FlexCell unit is shown in Figure 1. It includes a 1×1 standard convolution operator, a 3×3 depthwise separable convolution operator, and a 5×5 depthwise separable convolution operator. These three operators receive the same input tensor and perform convolution operations respectively. The contribution of each operator is controlled by a set of trainable weight coefficients (α1, α2, α3) that sum to 1.

[0073] The output tensors of the three operators are concatenated along the channel dimension, and then subjected to batch normalization (BN) and linear rectified (ReLU) activation functions to form the final output tensor of FlexCell.

[0074] The number of parameters in a FlexCell cell is determined by the following formula: α1×C in ×C ouu +C in ×(3 2 +α2×C ouu )+C in ×(5 2 +α3×C ouu ) = C in ×C ouu +34×C in

[0075] Among them, C n Indicates the number of input channels, Cuu This indicates the number of output channels of the FlexCell unit.

[0076] Through this multi-scale fusion and parameter constraint design, the FlexCell unit fundamentally constrains the number of parameters in the network architecture while ensuring feature extraction capabilities.

[0077] Step S2: The GPU reads the architecture template from memory. For each reconfigurable convolutional layer (cell) in the network, the GPU performs three-dimensional hardware-aware encoding. All structure definition matrices generated by the encoding are organized into tensor format suitable for batch parallel processing by the GPU streaming multiprocessor (SM). To further optimize memory access performance and reduce data transfer latency between the CPU and GPU, these matrices are stored in a contiguous address space in memory. This hardware-aware encoding and storage strategy is one of the keys to improving the underlying computational efficiency of this method.

[0078] The structure definition matrix tensor includes the adjacency matrix (AME), weight matrix (WE), and channel number matrix (CE):

[0079] The Adjacency Matrix (AME) encodes the connection topology between FlexCell cells within the Cell, represented by a Directed Acyclic Graph (DAG). Each node in the DAG represents a FlexCell. Figure 2 shows the possible structure of a Cell consisting of 5 FlexCells in the AME. The lower left corner of the AME in Figure 2 is set to zero to ensure unidirectional flow of information within the Cell. The values ​​in the diagonal regions are also set to 0, meaning that no self-loops are allowed in the Cell. To ensure that there are no suspended nodes in the DAG, two principles must be satisfied in the AME: first, all rows except the last row cannot be zero; second, all columns except the first column cannot be zero.

[0080] The first principle ensures that the out-degree of all nodes except the last node is greater than zero. The second principle ensures that the in-degree of all nodes except the first node is greater than zero. These two principles together ensure that the structure of the Cell determined by AME is valid.

[0081] Weight matrix (WE): Encodes the three weight coefficients (α1, α2, α3) for each FlexCell unit within the Cell, with a matrix shape of [number of FlexCells, 3]. The WE in Figure 2 determines α1, α2, and α3 for each FlexCell. If the value of coefficient α is 0, there is no convolution kernel of the corresponding size in the FlexCell.

[0082] Channel Count Matrix (CE): Encoded by a constant C, it determines the number of output channels for all FlexCells within the corresponding Cell. In Figure 2, the number of output channels for all FlexCells is set to C. The encoding of each Cell needs to be continuously optimized during the search process.

[0083] For a network consisting of k cells, k sets of AME, WE, and CE are used to control the topology and weight allocation of different FlexCells within the k units. Different encoding schemes affect the structure and performance of the convolutional neural network. Figure 4 shows an example of the encoding of a single network consisting of three cells. In Figure 4, each cell consists of AME, WE, and CE, and different colors in each cell indicate that the AME, WE, and CE are different for each cell. If a cell consists of 5 FlexCells, then AME is a matrix of shape (5,5), WE is a matrix of shape (5,3), and CE is a constant. The encoding of these three cells forms the individual encoding of this convolutional neural network structure.

[0084] Figure 6 shows that the structure of a convolutional neural network consists of a Previous Layer, a set of Cells, and a Classify Layer. The Previous Layer, added at the head of the neural network, extracts the feature information of the input image. The Cell is the backbone of the network, thoroughly learning the image features. The Classify Layer, added at the end of the network, classifies the features generated by the Cells. The structures of the Previous Layer and Classify Layer are fixed, while the structure of the Cells is continuously optimized during the search process. Each Cell consists of FlexCell cells with different topologies.

[0085] Step S3: The CPU and GPU collaborate in a specific division of labor to execute an improved genetic algorithm to efficiently search for the optimal network structure parameters, i.e., the optimal combination of AME, WE, and CE, within the search space defined by the structure definition matrix. This search process is illustrated in Figures 3 and 4, and the collaborative process is specifically manifested as follows:

[0086] The CPU is responsible for initializing the control parameters of the genetic algorithm and executing global logic scheduling.

[0087] GPUs utilize their thousands of computing cores to perform population initialization, parallel fitness evaluation of all individuals in the population, and parallel crossover and mutation operations on all individuals in the population in parallel within video memory.

[0088] The CPU receives the parallel evaluation results from the GPU, executes selection logic (such as elite retention or roulette wheel algorithm) to update the population, and sends the update instructions and new population data to the GPU memory.

[0089] The aforementioned collaborative process of "GPU parallel computing - CPU logic control" is executed iteratively until the preset evolutionary termination condition is met. Finally, the GPU decodes the individual with the highest fitness to obtain a set of optimal network structure parameters, including the optimal topology, optimal weight coefficients, and optimal number of channels, and stores them in memory.

[0090] Furthermore, the improved genetic algorithm specifically includes:

[0091] Step S3.1: CPU initializes algorithm parameters: population size N = 50, number of iterations G = 100, cell size Sc = 5, number of cells L = 3, mutation rate Mr = 0.1, crossover rate Cr = 0.8, crossover mutation type probability vector V (including the first-stage crossover mutation type probability vector V1 and the second-stage crossover mutation type probability vector V2), candidate channel list Lc = [32, 64, 128]; the value of the crossover mutation vector V will be set to V1 or V2 according to the current population iteration number. When the current iteration number g ≤ G / 2, V = V1, and when the current iteration number g > G / 2, V = V2.

[0092] Step S3.2: The GPU randomly generates a first-generation population P (containing 50 individuals) in the video memory according to the parameters N, Sc, L, and Lc. Each individual is composed of L = 3 different Cells connected in series (as shown in Figure 6), and each Cell is composed of Sc = 5 different FlexCells. For any Cell, there is a corresponding adjacency matrix of dimension (5, 5) representing a directed acyclic graph. This directed acyclic graph is used to represent the connection method of different FlexCells within that Cell.

[0093] Step S3.3: For each generation (g from 1 to G), execute the following loop:

[0094] Step S3.3.1: The GPU performs forward propagation of the network of all individuals in population P in parallel, calculates the fitness score of each individual using the Zen-Score agent evaluation function, and transmits the fitness score set back to the CPU.

[0095] Step S3.3.2: The CPU retains the top 3 individuals based on their fitness scores as the elite set E.

[0096] Step S3.3.3: The GPU executes mutation (randomly resetting the AME / WE / CE of a certain Cell) and crossover (swapping the encodings of specific Cells between two individuals) on the individuals in population P in parallel according to the mutation rate Mr, crossover rate Cr, and the crossover mutation type probability vector V (including the first-stage crossover mutation type probability vector V1 and the second-stage crossover mutation type probability vector V2), generating an offspring population Q. This process includes:

[0097] Operations, generating an offspring population Q. This process includes:

[0098] Step S3.3.3.1: For the current individual I, a random number mr is generated from 0 - 1. When mr < Mr (mr < 0.1), the individual I will perform the corresponding mutation operation and enter step A1.

[0099] Step A1: Select the mutation type mo according to the probability V.

[0100] Step A2: Randomly generate a position serial number Pos according to the individual length L.

[0101] If mo is the adjacency matrix encoding, randomly generate a new adjacency matrix encoding ame' to replace the adjacency matrix encoding of the Pos-th Cell of individual I; if mo is the weight encoding, randomly generate a new weight encoding we' to replace the weight encoding of the Pos-th Cell of individual I; if mo is the channel encoding, randomly generate a new channel encoding ce' to replace the channel encoding of the Pos-th Cell of individual I.

[0102] Step A3: After replacing the encoding, put the newly generated individual I' into population Q.

[0103] Step S3.3.3.2: For the current individual I, a random number cr is generated from 0 - 1. When cr < Cr (cr < 0.8), the individual I will perform the corresponding crossover operation and enter step B.

[0104] Step B1: Randomly select an individual IC from population Q to perform a crossover operation with I.

[0105] Step B2: Select the crossover operation type co from the probability V.

[0106] Step B3: Randomly generate a position serial number Pos according to the individual length L. If co is the adjacency matrix encoding type, swap the adjacency matrix encodings of the Pos-th Cells of individuals I and IC; if co is the weight encoding type, swap the weight encodings of the Pos-th Cells of individuals I and IC; if co is the channel encoding type, swap the channel encodings of the Pos-th Cells of individuals I and IC.

[0107] Step B4: After exchanging codes, the newly generated individuals I' and IC' are placed into population Q.

[0108] Step S3.3.4: The CPU executes the roulette wheel selection algorithm on the merged population (P∪Q) to select N-3 = 47 individuals. The selected 47 individuals are then merged with the elite E to form a new generation population P. The CPU then transfers the new population data to the GPU memory.

[0109] Step S3.4: When g = G, the CPU instructs the GPU to decode the individual with the highest fitness in the final population to obtain the optimal network structure parameters, i.e. the optimal combination of AME, WE, and CE, and store them in the system memory.

[0110] This embodiment maps tasks such as population initialization, fitness evaluation, and genetic operations to thousands of GPU cores for parallel execution. This task scheduling tailored to GPU hardware characteristics transforms the genetic algorithm from serial computation to massively parallel computation, significantly reducing the total processing time of the search process. The CPU is dedicated to handling the logical control of the genetic algorithm, such as parameter initialization, elite retention strategy, roulette wheel selection, and data flow coordination between the CPU and GPU. This division of labor optimizes the overall resource utilization of the system, avoiding GPU idleness or the CPU becoming a computational bottleneck.

[0111] The method provided in this embodiment is not an abstract mathematical algorithm, but rather efficiently solves the specific technical problem of automatically designing a dedicated convolutional neural network with both high performance and a small number of parameters under limited computing resources through specific improvements to the computer system architecture and functions. Simultaneously, this embodiment introduces the Optimizable Convolutional Structure FlexCell unit. This structure uses depthwise separable convolution technology and multi-scale design, and can generate diverse convolutional structures through corresponding weight parameters to fully extract features from the input data, thereby improving the performance of the convolutional neural network. This embodiment designs a GPU-specific three-dimensional hardware-aware encoding and tensor format organization, enabling the core computational tasks of the genetic algorithm (encoding, evaluation, crossover, mutation) to achieve extreme parallelism on the GPU, transforming the traditional serial search process into a large-scale parallel computing task. Furthermore, this embodiment clearly defines the specific division of labor between the CPU and GPU (CPU control logic, GPU data parallelism), and optimizes the continuous address space storage of structured data to minimize data transfer overhead, optimize the data layout between the CPU and GPU, reduce the number of data transfers and latency, and improve bus utilization. This hardware-software co-design significantly improves the overall resource utilization and task execution efficiency of heterogeneous computing systems.

[0112] Example 2

[0113] This embodiment provides an image classification method. This embodiment demonstrates how to apply the convolutional neural network structure obtained in Embodiment 1 to perform image classification tasks. The specific process is as follows:

[0114] Step S1: Using the neural network structure search method as described in Example 1, obtain the optimal structure parameters of the convolutional neural network specifically for image classification tasks.

[0115] The search process utilizes GPUs to perform three-dimensional hardware-aware encoding and parallel genetic operations, while the CPU handles logical control and coordinated scheduling. Memory optimization techniques, such as contiguous address space storage, are employed to automatically complete the network structure search with extremely low computational time costs. The optimal structure parameters output in this step (including topology, weight coefficients, and number of channels) form the foundation for subsequently building efficient classification networks.

[0116] Step S2: Based on the optimal structural parameters, construct (instantiate) the corresponding convolutional neural network in the computing system. This network inherits all the architectural advantages obtained during the search process, namely, it has a compact structure with constrained parameters composed of FlexCell units.

[0117] Step S3: Input the image data to be classified into the constructed convolutional neural network, perform forward propagation inference calculation, and thus obtain the image classification result.

[0118] To further illustrate the beneficial effects of this invention, this embodiment uses a series of state-of-the-art artificially designed network structure algorithms and neural network structure search algorithms to compare and comprehensively evaluate the performance of the method of this invention. Considering testing accuracy, the size of network structure parameters, and the GPU days required for the search process, the experimental results use FC-NAS to represent the method of this invention. The performance of each algorithm on a specific dataset is shown in Table 1 below:

[0119] Table 1: Performance of each algorithm on a specific dataset

[0120] As shown in Table 1, the neural network structure FC-NAS (Sd=1, Sw=2) generated by this invention achieves 96.96% accuracy on CIFAR-10 with only 1.0197M parameters. Compared with the DARTS series (parameters>3M) of similar accuracy, the number of parameters is reduced by about two-thirds; compared with DenseNet-B (25.6M parameters, accuracy 96.54%), with comparable accuracy (96.96% vs 96.54%), the number of parameters is only about 1 / 25 of the latter. This proves that this method, through specific data structure design, achieves orders of magnitude improvement in search efficiency (saving computational resources) and model simplification (saving storage resources), and can automatically generate practical network models with both high accuracy and extremely simple parameters, directly solving the technical problem of high hardware resource requirements for model deployment.

[0121] On CIFAR-100, the neural network architecture FC-NAS (Sd=3, Sw=2) generated in this invention has a parameter size of 1.4843M and a test accuracy of 82.17%. Compared with DenseNet (k=24) and Wide ResNet, FC-NAS achieves higher test accuracy with a smaller parameter size. Compared with DenseNet-B (k=40), FCNAS has lower test accuracy. However, DenseNet-B, with 40 times more parameters than FC-NAS, only achieved a tiny improvement of 0.65%, indicating that FC-NAS has better classification performance with fewer parameters.

[0122] On CIFAR-10, FC-NAS outperforms NAS-RL, MetaQNN, and EAS in test accuracy with a significantly smaller parameter size and a substantial reduction in search time cost. DARTS and a series of improved algorithms, including P-DARTS, PC-DARTS, and SP-DARTS, typically achieve test accuracy above 97% while consuming over 3M parameters. Compared to these algorithms, FC-NAS consumes fewer parameters and has a lower search time cost, but with slightly lower test accuracy. Compared to FPSO, FC-NAS improves test accuracy by 3.24% and increases the parameter size by 0.3M. FC-NAS's test accuracy is slightly higher than CNN-GA and SaMuNet, while its smaller parameter size results in a lower search time cost. Compared to LoNAS and EPCNAS-C, FC-NAS has a slight advantage in test accuracy. However, FC-NAS has a parameter size that is twice that of LoNAS and is 100 times faster than EPCNAS-C. On the CIFAR-100, FC-NAS typically offers advantages over EPCNASC in terms of test accuracy, parameter size, and search time cost. FC-NAS achieves detection accuracy that is 9.31% and 2.82% higher than MetaQNN and Block-QNN-S, respectively.

[0123] In summary, on CIFAR-10 and CIFAR-100, the FC-NAS neural network structure obtained by the present invention based on genetic algorithm search achieves higher test accuracy with fewer parameters than most manually designed network architectures.

[0124] To further illustrate the beneficial effects of the present invention and its practical value in the field of medical image classification, a series of experiments were conducted in this embodiment. All experiments were performed on the aforementioned computer system equipped with an NVIDIA GeForce RTX4090 GPU.

[0125] In the field of medical image diagnosis, the core technical challenge lies in meeting extremely high classification accuracy requirements: medical images have complex features and subtle differences in lesions, and accurate identification directly affects the reliability of clinical diagnostic results, thereby influencing treatment plans and patient prognosis. Furthermore, it is necessary to adapt to the feature differences of different types of medical images to improve the model's generalization ability. This embodiment uses the MedMNIST dataset, published by researchers at Shanghai Jiao Tong University in "MedMNIST Classification Decathlon: A Lightweight AutoML Benchmark for Medical Image Analysis." This dataset covers image data of various common diseases, with standardized data annotation and sufficient sample size, and is widely used for performance validation of medical image classification models, objectively reflecting the model's practical application value.

[0126] Based on this, this embodiment selects three typical medical image subsets from the MedMNIST dataset—PneumoniaMNIST (pneumonia diagnosis image dataset), PathMNIST (pathological slide image dataset), and BreastMNIST (breast lesion image dataset)—as test datasets. The performance of the FC-NAS (Sd=1, Sw=2) of this invention is compared with mainstream artificially designed deep learning networks (ResNet-18, ResNet-50) and automated machine learning tools (Auto-sklearn, AutoKeras). Considering the core requirements of medical image classification tasks, this experiment uses image classification accuracy as the evaluation metric. The test accuracy of each algorithm on the above three medical image datasets is shown in the table below:

[0127] Table 2: Performance of each algorithm on a specific dataset

[0128] As shown in Table 2, the FC-NAS (Sd=1, Sw=2) generated by this invention demonstrates significantly better test accuracy than the comparison algorithms on three medical image datasets in the MedMNIST series. The specific performance advantages are analyzed as follows:

[0129] On PneumoniaMNIST, FC-NAS achieved a test accuracy of 98.6%, which is 4.2% and 3.8% higher than the manually designed mainstream networks ResNet-18 and ResNet-50, respectively; and 4.4% and 3.9% higher than the automated machine learning tools Auto-sklearn and AutoKeras, respectively. This indicates that the neural network structure searched by this invention has stronger feature extraction and classification capabilities in lung disease image recognition tasks.

[0130] On PathMNIST, FC-NAS has a slight advantage in test accuracy compared to ResNet-18 and ResNet-50; compared to Auto-sklearn and AutoKeras, the advantage is more obvious, with test accuracy improved by 6.1% and 3.6% respectively. This verifies the superiority of the neural network structure searched by this invention in the scenario of identifying subtle pathological features.

[0131] On BreastMNIST, FC-NAS achieved a test accuracy of 94.8%, which is 4.7% higher than ResNet-18, the best-performing comparative model. This demonstrates that the neural network structure discovered in this invention has outstanding value in medical tasks such as breast lesion screening, which require extremely high classification accuracy.

[0132] Further analysis reveals that ResNet-18 and ResNet-50, as classic manually designed deep learning networks, have been widely used in medical image classification. However, due to their fixed network structure design, they are difficult to adapt to the feature differences of different types of medical images. While Auto-sklearn and AutoKeras can automatically search for model structures, the limitations of their search space and optimization strategies make it difficult to achieve significant performance improvements. In contrast, the network structure FC-NAS obtained by the method of this invention can accurately match the feature distribution of various types of medical images, achieving a significant improvement in medical image classification accuracy without the need for manual adjustment of network parameters.

[0133] In summary, on the MedMNIST series of medical image datasets, the neural network structure FC-NAS obtained by the method of this invention has superior medical image classification accuracy compared with mainstream manually designed networks and automatic machine learning tools, verifying the effectiveness and practicality of the method of this invention in the field of medical image diagnosis.

[0134] The image classification method provided in this embodiment successfully applies a neural network structure search method that specifically optimizes computer system functions to the specific technical field of image classification, and solves the core technical problem of automatically designing high-performance, lightweight classification models within this field. This fully demonstrates the practical value of the present invention.

[0135] Example 3

[0136] This embodiment provides a neural network structure search system for performing the method described in Embodiment 1. The system includes:

[0137] The memory is used to store configurable convolutional neural network architecture templates, population data during the evolution process, and the final optimal network structure parameters.

[0138] GPUs, connected to memory via a high-speed bus, are configured to perform massively parallel computing tasks, including:

[0139] Perform three-dimensional hardware-aware encoding to generate a structure definition matrix organized into a tensor format suitable for batch parallel processing;

[0140] Population initialization is performed in video memory;

[0141] Parallel fitness assessment of individuals within the population;

[0142] Perform parallel crossover and mutation operations on individuals in the population;

[0143] The CPU, connected to memory and GPU, is configured to perform the following control and scheduling tasks:

[0144] Initialize the genetic algorithm parameters;

[0145] Receive the fitness score set returned by the GPU, identify elite individuals based on it, and execute the population update selection algorithm;

[0146] Instructions are sent to the GPU to control it to perform population initialization, fitness evaluation, crossover and mutation operations;

[0147] When the evolutionary iteration is complete, the GPU is instructed to decode the best individual into the best network structure parameters.

[0148] Furthermore, the GPU is further configured to store the generated structure definition matrix in a contiguous address space of memory to minimize data transfer latency between the CPU and the GPU.

[0149] Example 4

[0150] This embodiment provides a neural network structure search device, including:

[0151] Memory and processor;

[0152] The memory stores a computer program configured to implement the neural network structure search method described in Example 1 when executed by a processor.

[0153] Example 5

[0154] This embodiment provides a non-transitory computer-readable storage medium storing a computer program containing instructions that, when executed by one or more processors, implement the neural network structure search method as described in Embodiment 1.

[0155] In summary, this invention improves search efficiency by optimizing the CPU-GPU collaborative computing process and designs a hardware-aware, compact data structure to control network complexity. Ultimately, it achieves a comprehensive technical effect of higher or comparable classification accuracy with less computational time cost (GPU days) and fewer model storage computing resources (number of parameters). This collectively demonstrates that this invention is an effective improvement to the functionality of computer systems for the specific task of automated neural network design, possessing outstanding practicality and technological advancement.

[0156] Some steps in the embodiments of the present invention can be implemented using software, and the corresponding software program can be stored in a readable storage medium, such as an optical disc or a hard disk.

[0157] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for searching neural network structures, characterized in that, include: Step S1: Deploy a configurable convolutional neural network architecture template in memory. The architecture template includes an input layer, at least one reconfigurable convolutional layer, and a classification layer. The reconfigurable convolutional layer is defined as containing at least one optimizable convolutional unit (FlexCell). Each FlexCell unit includes a standard convolution operator, a first depthwise separable convolution operator, and a second depthwise separable convolution operator. The three operators are configured to receive the same input tensor and perform convolution operations respectively. The resulting three output tensors are concatenated to generate the final output tensor of the FlexCell. The contribution of each convolution operator is controlled by trainable weight coefficients α1, α2, and α3, and the sum of α1, α2, and α3 is 1. Step S2: The graphics processing unit reads the architecture template from the memory and performs three-dimensional hardware-aware encoding on the reconfigurable convolutional layer to generate a set of structure definition matrices, including: The connection topology between FlexCell units within the convolutional layer is encoded into an adjacency matrix, which corresponds to a directed acyclic graph with unidirectional information flow constraints, where each graph node represents a FlexCell unit. The weight coefficients of the three convolution operators in each FlexCell unit are encoded into a weight matrix whose dimension matches the number of FlexCell units and the number of convolution operators in the convolutional layer. The output channel number of each FlexCell unit is encoded into a channel number matrix; The matrix generated by the three-dimensional hardware-aware encoding is organized into a tensor format suitable for parallel processing by the graphics processing unit. Step S3: The central processing unit and the graphics processing unit jointly execute an improved genetic algorithm to search for optimal network structure parameters in the search space defined by the structure definition matrix, specifically including: The central processing unit initializes the control parameters of the genetic algorithm; The graphics processing unit performs population initialization, parallel fitness evaluation, and parallel crossover and mutation operations in the video memory. The central processing unit receives the evaluation results from the graphics processing unit, executes selection logic to update the population, and sends the update instruction to the graphics processing unit. The above process is iteratively executed until the termination condition is met. The graphics processing unit decodes a set of optimal network structure parameters, including the optimal topology, optimal weight coefficients, and optimal number of channels, and stores them in the memory.

2. The method according to claim 1, characterized in that, Step S2 further includes: the structure definition matrix is ​​stored in a contiguous address space of the memory.

3. The method according to claim 1, characterized in that, Step S3 specifically includes: Step S3.1: The central processing unit initializes the population number N, population evolution iteration number G, convolutional layer cell size Sc, convolutional layer cell number L, mutation rate Mr, crossover rate Cr, crossover mutation type probability vector V, and candidate channel list Lc; Step S3.2: The graphics processing unit randomly generates a first-generation population P in the video memory. The first-generation population P contains N individuals, each individual is composed of L different convolutional layer cells connected in series, and each convolutional layer cell is composed of Sc different FlexCell units. Step S3.3: For each generation of evolution, perform the following operations in a loop: Step S3.3.1: The graphics processing unit calculates the fitness score of each individual in the current population P in parallel and transmits the fitness score set back to the central processing unit; Step S3.3.2: The central processing unit retains the three individuals with the highest fitness as elites E; Step S3.3.3: The graphics processing unit performs mutation and crossover operations in parallel on individuals in population P based on the mutation rate Mr, crossover rate Cr, and crossover mutation type probability vector V, to generate offspring population Q; Step S3.3.4: The central processing unit performs a roulette wheel algorithm on population P and population Q to select N-3 individuals, merges the selected N-3 individuals with elite E to form a new generation population P, and transmits its data back to the graphics processing unit's video memory. Step S3.4: When the preset evolutionary generation G is reached, the central processing unit instructs the graphics processing unit to decode the individual with the highest fitness into the optimal network structure parameters.

4. The method according to claim 1, characterized in that, The number of parameters in the FlexCell unit is determined by the following formula: α1×C in ×C ouu +C in ×(3 2 +α2×C ouu )+C in ×(5 2 +α3×C ouu ) = C in ×C ouu +34×C in Among them, C n Indicates the number of input channels, C uu This indicates the number of output channels of the FlexCell unit.

5. The method according to claim 1, characterized in that, The adjacency matrix is ​​constrained to satisfy the following conditions: Except for the last row, all other rows are not zero; Except for the first column, all other columns are non-zero.

6. An image classification method, characterized in that, include: The optimal structural parameters of a convolutional neural network for image classification are obtained by using the neural network structure search method as described in any one of claims 1 to 5. Based on the aforementioned optimal structural parameters, a convolutional neural network is constructed; The image to be classified is input into the convolutional neural network to perform image classification.

7. A neural network structure search system, characterized in that, The system includes: The memory is used to store configurable convolutional neural network architecture templates, population data during the evolution process, and the final optimal network structure parameters. The graphics processing unit, connected to the memory via a high-speed bus, is configured to perform massively parallel computing tasks, including: Perform three-dimensional hardware-aware encoding to generate a structure definition matrix organized into a tensor format suitable for batch parallel processing; Population initialization is performed in video memory; Parallel fitness assessment of individuals within the population; Perform parallel crossover and mutation operations on individuals in the population; The central processing unit, connected to the memory and the graphics processing unit, is configured to perform the following control and scheduling tasks: Initialize the genetic algorithm parameters; Receive the fitness score set returned by the graphics processing unit, determine elite individuals based on it, and execute the population update selection algorithm; Instructions are sent to the graphics processing unit to control it to perform population initialization, fitness evaluation, crossover and mutation operations; When the evolutionary iteration is complete, the graphics processing unit is instructed to decode the optimal individual into the optimal network structure parameters.

8. The system according to claim 7, characterized in that, The graphics processing unit is further configured to store the generated structure definition matrix in a contiguous address space of the memory to minimize the data transmission latency between the central processing unit and the graphics processing unit.

9. A neural network structure search device, characterized in that, include: Memory and processor; The memory stores a computer program configured to implement the method as described in any one of claims 1 to 5 when executed by the processor.

10. A non-transitory computer-readable storage medium, characterized in that, The storage medium stores a computer program containing instructions that, when executed by one or more processors, implement the method as described in any one of claims 1 to 5.