A training-free neural network architecture search method and related device

By constructing a target supernet and pruning redundant connections, and evaluating the expressive power of the neural network based on the output difference of a linear mapping, an efficient neural network architecture search is achieved, solving the problems of long time consumption and high computational resource consumption in existing technologies.

CN115186810BActive Publication Date: 2026-02-24HARBIN INST OF TECH SHENZHEN GRADUATE SCHOOL
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210798777.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-08
Publication Date
2026-02-24
Estimated Expiration
2042-07-08

AI Technical Summary

Technical Problem

Existing neural network architecture search techniques are time-consuming and computationally resource-intensive, making it impossible to efficiently search for the best neural network.

Method used

By constructing a target supernet, using the linear mapping of network input data to output differences to calculate evaluation values, and pruning redundant connections, a training-free neural network architecture search is achieved, reducing computational load and search time.

Benefits of technology

High-performance neural networks can be quickly searched out without training by evaluating scores and connection importance, reducing computational resources and time costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115186810B_ABST
    Figure CN115186810B_ABST
Patent Text Reader

Abstract

The application discloses a kind of training-free neural network architecture search method and related equipment.The method comprises the following steps: at least two network input data are input into target super-network respectively, and the network linear mapping output corresponding to each network input data is obtained, wherein the target super-network includes a predetermined number of nodes, and at least one connection is included between two adjacent nodes, and each connection corresponds to a neural network operation;The evaluation value of the target super-network is determined according to the difference between each network linear mapping output;The importance of each connection in the target super-network is calculated, wherein the importance of each connection in the target super-network reflects the influence of the connection on the evaluation value of the target super-network;According to the importance of each connection in the target super-network, at least one connection in the target super-network is deleted, and the step of calculating the importance of each connection in the target super-network is repeatedly executed until the target super-network is a single neural network.The application can reduce the time consumption of neural network architecture search.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of neural network technology, and in particular to a training-free neural network architecture search method and related equipment. Background Technology

[0002] NAS (Neural Architecture Search) is a technique that searches for the best neural network for a given task from a search space composed of numerous neural networks. Existing NAS (Neural Architecture Search) techniques are based on training neural networks in the search space to obtain information and then search for the best neural network. However, due to the huge number of neural networks in the search space, existing NAS requires a lot of computing resources and is time-consuming.

[0003] Therefore, existing technologies still need to be improved and enhanced. Summary of the Invention

[0004] To address the aforementioned shortcomings of existing technologies, this invention provides a training-free neural network architecture search method, aiming to solve the problem of long search times in existing neural network architecture searches.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0006] A first aspect of the present invention provides a training-free neural network architecture search method, the method comprising:

[0007] At least two network input data are selected and input into the target supernet respectively, and the network linear mapping output corresponding to each network input data is obtained. The target supernet includes a preset number of nodes, and there is at least one connection between two adjacent nodes. Each connection corresponds to a neural network operation.

[0008] The evaluation value of the target supernet is determined based on the differences between the linear mapping outputs of each of the networks;

[0009] Calculate the importance of each connection in the target supernet, wherein the importance of each connection in the target supernet reflects the impact of that connection on the evaluation value of the target supernet;

[0010] Based on the importance of each connection in the target supernet, at least one connection is deleted from the target supernet, and the step of calculating the importance of each connection in the target supernet is repeated until the target supernet is a single neural network.

[0011] The training-free neural network architecture search method, wherein obtaining the network linear mapping output corresponding to each of the network input data includes:

[0012] For the target node: The neural network operation corresponding to each connection between the target node and its previous neighbor node is used to calculate the node input data of the previous neighbor node of the target node to obtain multiple node output data. The multiple node output data are then connected to obtain the node input data of the target node.

[0013] The node input data of the first node in the supernet is the network input data.

[0014] The training-free neural network architecture search method, wherein determining the evaluation value of the target supernet based on the difference between the linear mapping outputs of each of the networks includes:

[0015] The Jacobian determinant of the mapping function corresponding to the target supernet is obtained based on the linear mapping output of the network and the corresponding network input data.

[0016] The target matrix is ​​obtained by combining the various Jacobian determinants.

[0017] Calculate the correlation coefficient matrix of the elements in the target matrix;

[0018] The evaluation value of the target supernet is calculated based on the correlation coefficient matrix.

[0019] The training-free neural network architecture search method, wherein calculating the correlation coefficient matrix of the elements in the target matrix includes:

[0020] Calculate the covariance matrix of the target matrix;

[0021] The correlation coefficient matrix is ​​obtained based on the covariance matrix.

[0022] The training-free neural network architecture search method, wherein calculating the evaluation value of the target supernet based on the correlation coefficient matrix includes:

[0023] The evaluation value of the target supernet is calculated according to the first preset formula;

[0024] The first preset formula is:

[0025]

[0026] Where EX(f) represents the evaluation value corresponding to the target supernet, and f represents the mapping function corresponding to the target supernet, (A J ) i,jRepresents the correlation coefficient matrix A J The element in the i-th row and j-th column of the correlation coefficient matrix A J The number of rows and columns are both N, α and ε are constants, and F α Let (x) be a binary classification function. If x ≤ α, then F α (x) = x, otherwise F α (x) = 1 - ε.

[0027] The training-free neural network architecture search method, wherein calculating the importance of each connection in the target supernet includes:

[0028] For each connection in the target supernet, the importance of the target connection is determined based on the evaluation value when the target supernet includes or excludes the connection.

[0029] The training-free neural network architecture search method, wherein deleting at least one connection in the target supernet based on the importance of each connection in the target supernet includes:

[0030] Delete the least important connection between any two adjacent nodes.

[0031] A second aspect of the present invention provides a training-free neural network architecture search device, the device comprising:

[0032] The mapping module is used to select at least two network input data and input them into the target supernet respectively, and obtain the network linear mapping output corresponding to each of the network input data. The target supernet includes a preset number of nodes, and there is at least one connection between two adjacent nodes. Each connection corresponds to a neural network operation.

[0033] The evaluation module, wherein the data generation module is used to determine the evaluation value of the target supernet based on the differences between the linear mapping outputs of each of the networks;

[0034] An importance assessment module is used to calculate the importance of each connection in the target supernet, wherein the importance of each connection in the target supernet reflects the impact of that connection on the evaluation value of the target supernet;

[0035] An iterative module is used to delete at least one connection in the target supernet based on the importance of each connection in the target supernet, and call the importance evaluation module to repeatedly perform the step of calculating the importance of each connection in the target supernet until the target supernet is a single neural network.

[0036] A third aspect of the present invention provides a terminal, the terminal including a processor and a computer-readable storage medium communicatively connected to the processor, the computer-readable storage medium being adapted to store a plurality of instructions, the processor being adapted to invoke the instructions in the computer-readable storage medium to perform steps implementing the training-free neural network architecture search method described in any of the preceding claims.

[0037] In a fourth aspect, the present invention provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps of the training-free neural network architecture search method described in any of the preceding claims.

[0038] Compared with existing technologies, this invention provides a training-free neural network architecture search method. In this method, multiple network input data are input into a target supernet. Evaluation values ​​are obtained based on the differences between the mapping outputs of the target supernet, reflecting its expressive power. The importance of a connection is determined by its evaluation value (including or excluding it). Connections in the target supernet are then deleted based on their importance, ultimately resulting in a single neural network. This method achieves neural network architecture search without training, reducing computational load and search time. Attached Figure Description

[0039] Figure 1 A flowchart illustrating an embodiment of the training-free neural network architecture search method provided by the present invention;

[0040] Figure 2 A schematic diagram illustrating the evolution of the linear region in a two-dimensional input ReLU network;

[0041] Figure 3 Proof of the correctness of the evaluation value in the training-free neural network architecture search method provided by this invention Figure 1 ;

[0042] Figure 4 Proof of the correctness of the evaluation value in the training-free neural network architecture search method provided by this invention Figure 2 ;

[0043] Figure 5 A logical block diagram of the search neural network in an embodiment of the training-free neural network architecture search method provided by the present invention;

[0044] Figure 6 A schematic diagram of the overall algorithm of an embodiment of the training-free neural network architecture search method provided by the present invention;

[0045] Figure 7 A schematic diagram illustrating the structural principle of an embodiment of the training-free neural network architecture search device provided by the present invention;

[0046] Figure 8 A schematic diagram illustrating the principle of an embodiment of the terminal provided by the present invention. Detailed Implementation

[0047] To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0048] The training-free neural network architecture search method provided by this invention can be applied to terminals with computing capabilities. The terminal can execute the training-free neural network architecture search method provided by this invention to search for a single neural network in the search space. The terminal can be, but is not limited to, various computers, mobile terminals, smart home appliances, wearable devices, etc.

[0049] Example 1

[0050] like Figure 1 As shown, one embodiment of the training-free neural network architecture search method includes the following steps:

[0051] S100. Select at least two network input data and input them into the target supernet respectively, and obtain the network linear mapping output corresponding to each of the network input data.

[0052] The target supernet is a supernetwork composed of neural networks in the search space of a neural network. The target supernet includes a preset number of nodes, which is a number that can be set as needed, determined according to the task the neural network needs to perform (e.g., image classification, image super-resolution, object tracking, etc.). There is at least one connection between any two adjacent nodes in the target supernet. Each connection corresponds to a neural network operation, such as convolution or pooling. It is worth noting that each connection can correspond to a single operation (e.g., convolution or pooling) or a combination of multiple operations, such as convolution followed by pooling, or a combination of multiple convolution kernels with different values. In this embodiment, two adjacent nodes refer to nodes that have a data mapping relationship. That is, if a neural network operation can be added between two nodes, then these two nodes are called adjacent nodes. Specifically, the target supernet can be divided into multiple layers, and each layer can have one or more nodes. Nodes in each layer can be adjacent or not adjacent. Nodes in the lower and upper layers can also be adjacent. The setting of adjacent nodes can also be determined according to the task the neural network needs to perform, and can refer to the node settings in existing neural network structures that perform specific tasks.

[0053] In neural networks, different inputs are mapped to different linear regions by neurons (i.e., operations within the neural network). As the number of layers increases and more linear regions are divided, the input will be mapped to even more linear regions, for example... Figure 2 The evolution of the linear region in the two-dimensional input ReLU network is shown. Figure 2 Different colors in the diagram represent different linear regions. The inventors discovered that the more linear regions a neural network has, the better its performance should be. Therefore, the number of linear regions in a neural network can be used to obtain metrics for evaluating the network. However, in large networks, the number of linear regions increases exponentially with the number of layers, making calculation difficult. Therefore, in the method provided in this embodiment, the network's performance is evaluated from a mapping perspective. Mapping refers to the process where, after operations in the neural network, the input is located in different linear regions, and the result is obtained from... Figure 2As the number of layers increases and more linear regions are divided, the input will map to more linear regions. For high-performance neural networks, the input space is divided into even more linear regions, and different inputs will largely reside in different linear regions. Each linear region is associated with a set of radiation parameters. If two inputs are mapped to different linear regions in the network, the correlation of the radiation parameters of the linear mapping between these two inputs is low. The correlation coefficient of the radiation parameters mapped to different inputs in the network can be used to evaluate the expressive power of the neural network. That is, the evaluation value of the neural network is determined by the difference between the output data obtained after different input data are input into the neural network and mapped through the operations in the neural network. The evaluation value is used to evaluate the expressive power of the neural network; the better the evaluation value, the better the performance of the neural network. In this way, the neural network in the search space can be searched by calculating the evaluation value of the neural network, without the need to train each neural network individually.

[0054] To obtain evaluation values ​​for evaluating neural networks, this embodiment provides a method, such as... Figure 5 As shown, firstly, the target supernet is constructed based on the search space. Then, at least two network input data are respectively input into the target supernet, and the network linear mapping output corresponding to each network input data is obtained. This eliminates the need for training the neural network with a large amount of data; only a small batch of data is required, significantly reducing the amount of computational data. Specifically, obtaining the network linear mapping output corresponding to each network input data includes:

[0055] For the target node: The neural network operation corresponding to each connection between the target node and its previous neighbor node is used to calculate the node input data of the previous neighbor node of the target node to obtain multiple node output data. The multiple node output data are then connected to obtain the node input data of the target node.

[0056] The node input data of the first node in the supernet is the network input data.

[0057] In the target supernet, the neural network operations between two adjacent nodes are not unique, but rather numerous. In order to obtain a unique output, for each of the two adjacent nodes, all the neural network operations between them are used to calculate a result. Then, the results obtained by using all the neural network operations between them are connected together to calculate the connection between the second node and other adjacent nodes. Finally, in the last result of the target supernet, a unique output data is obtained as the linear mapping output of the network.

[0058] S200. Determine the evaluation value of the target supernet based on the differences between the linear mapping outputs of each of the networks.

[0059] As explained above, the differences between the linear mapping outputs of each of the aforementioned networks can reflect the network expressive power of the target supernet. Determining the evaluation value of the target supernet based on the differences between the linear mapping outputs of each of the aforementioned networks includes:

[0060] The Jacobian determinant of the mapping function corresponding to the target supernet is obtained based on the linear mapping output of the network and the corresponding network input data.

[0061] The target matrix is ​​obtained by combining the various Jacobian determinants.

[0062] Calculate the correlation coefficient matrix of the elements in the target matrix;

[0063] The evaluation value of the target supernet is calculated based on the correlation coefficient matrix.

[0064] Specifically, for the network input data x i (like Figure 5 As shown, when the purpose of neural network architecture search is to find a neural network suitable for image processing, the network input data can be an image, and the corresponding linear mapping output of the network is f(x). i The corresponding Jacobian determinant is: For a set of N network input data N Jacobian determinants can be obtained. The target matrix is ​​obtained by combining the Jacobian determinants corresponding to the linear mapping outputs of all the networks, which can be expressed by the formula:

[0065]

[0066] Where J is the target matrix.

[0067] The target matrix contains the gradients of different input data in the target supernet. To evaluate the performance of the target supernet, the covariance matrix of the target matrix is ​​calculated first, followed by the correlation matrix. The calculation of the correlation coefficient matrix of the elements in the target matrix includes:

[0068] Calculate the covariance matrix of the target matrix;

[0069] The correlation coefficient matrix is ​​obtained based on the covariance matrix.

[0070] Specifically, the formula for calculating the covariance matrix of the target matrix is ​​as follows:

[0071] C J =(JYJ (JY) J ) T

[0072]

[0073] Among them, C J Let J be the covariance matrix, and J be the target matrix. J ) i,j Represents matrix Y J The element in the i-th row and j-th column of the target matrix, where M is the number of columns and J is the element in the i-th row and j-th column of the target matrix. i,m Y represents the element in the i-th row and m-th column of matrix J. J The size of Y is the same as that of the target matrix. It is easy to see from the calculation formula that Y... J All values ​​in each row are equal.

[0074] The formula for calculating the correlation coefficient matrix is:

[0075]

[0076] Among them, (A) J ) i,j Represents the correlation coefficient matrix A J The element in the i-th row and j-th column, (C J ) i,j This represents the element in the i-th row and j-th column of the covariance matrix. The smaller the element value in the correlation coefficient matrix, the weaker the linear correlation between different input data in the network, meaning the stronger the network's expressive power.

[0077] By performing the preceding steps, the correlation coefficient matrix of the network has been obtained through gradient analysis. However, these matrices and network performance are still affected by noise. To further eliminate noise and enhance the correlation between the correlation coefficient matrix and the network performance of the target supernet, the method provided in this embodiment further defines an evaluation value to assess the network structure. The step of calculating the evaluation value of the target supernet based on the correlation coefficient matrix includes:

[0078] The evaluation value of the target supernet is calculated according to the first preset formula;

[0079] The first preset formula is:

[0080]

[0081] Where EX(f) represents the evaluation value corresponding to the target supernet, and f represents the mapping function corresponding to the target supernet, (A J ) i,j Represents the correlation coefficient matrix A JThe element in the i-th row and j-th column of the correlation coefficient matrix A J The number of rows and columns are both N, α and ε are constants, and F α Let (x) be a binary classification function. If x ≤ α, then F α (x) = x, otherwise F α (x) = 1 - ε, where ε is a very small constant used for numerical stability, for example, it can be taken as 1 × 10⁻⁶. -5 α can be 0.1.

[0082] The principle of calculating the evaluation value using the first preset formula is to accumulate the correlation coefficients that meet the conditions and use a logarithmic function to make the scores show a positive correlation. To verify the effectiveness of the evaluation value in this embodiment, 1000 different networks were randomly selected from the existing neural network set NAS-Bench-201, and they were ranked using the evaluation value provided by this invention. The results are as follows. Figure 3 and Figure 4 As shown, there is a strong correlation between the evaluation value and the final accuracy of the network on two different datasets (CIFAR-10 and ImageNet16-120), proving the effectiveness of the evaluation value provided by this invention.

[0083] Although the evaluation value is related to network performance, using a sampling-based method to select the optimal subnet from the target supernet is still very inefficient because in some complex cell-based search spaces, every cell of the network needs to be considered. These networks have tens of millions or even billions of subnets, thus still requiring significant computational resources. Specifically, a cost analysis of the sampling-based method is as follows:

[0084] For a search space consisting of T distinct units superimposed, each unit has E i There are 1, 2, ..., T edges. On each edge, the algorithm can choose |O| operations (O is a set of candidate operations). For sampling-based methods, there are a total of The different choices, γ can be interpreted as sampling efficiency. The cost of these methods increases with the growth of the search space, i.e. Obviously, such a search would be extremely costly.

[0085] To further reduce computational load and shorten search time, the method provided in this embodiment introduces the concept of pruning. After constructing the target supernet, redundant connections are selectively pruned based on the importance of each connection. That is, the method provided in this embodiment further includes the following steps:

[0086] S300. Calculate the importance of each connection in the target supernet, wherein the importance of each connection in the target supernet reflects the impact of the connection on the evaluation value of the target supernet;

[0087] S400. Delete at least one connection in the target supernet according to the importance of each connection in the target supernet, and repeat the step of calculating the importance of each connection in the target supernet until the target supernet is a single neural network.

[0088] Specifically, calculating the importance of each connection in the target supernet includes:

[0089] For each connection in the target supernet, the importance of the target connection is determined based on the evaluation value when the target supernet includes or excludes the connection.

[0090] For each connection in the target supernet, its importance is calculated using a second preset formula, which is:

[0091] ΔEX i,j (f)=EX(1⊙f)-EX((m-δ i,j )⊙f)

[0092] Where, ΔEX i,j (f) represents the importance of the connection with index (i,j) in the target supernet, and EX(1⊙f) represents the evaluation value when the target supernet includes the connection with index (i,j), EX((m-δ) i,j )⊙f) represents the evaluation value when the target hypernet does not include the connection with index (i,j), ⊙ represents the Hadamard product, each row in matrix m represents all connections between two nodes in the target hypernet, δ i,j δ represents the indicator matrix corresponding to the connection with index (i,j) in the target supernet. i,j The element with index (i,j) in m is equal to 1, and all other elements are equal to 0. The activity of a connection in the supernet is determined by whether the value in m is 0 or 1. Therefore, to measure the impact of the (i,j)th connection on the supernet, the value of the (i,j)th element in m can be set to zero, while keeping other variables unchanged.

[0093] The step of deleting at least one connection in the target supernet based on the importance of each connection in the target supernet includes:

[0094] Delete the least important connection between any two adjacent nodes.

[0095] Applying pruning algorithms can directly and effectively identify and prune redundant connections, reducing costs from... Reduce to Specifically, the search is performed iteratively by examining all non-zero elements in `m`. In each iteration, the values ​​of the non-zero elements in `m` are set to zero, thus pruning the connections in the hypernet. The importance of each current connection is then obtained using the second preset formula. At the end of the iteration, all currently available connections are sorted by importance, and the connection with the lowest importance on each edge is removed until the hypernet is a single network, i.e., there is only one connection between any two adjacent nodes, completing the search. It is worth noting that after each deletion of a connection in the target hypernet, the importance of each remaining connection in the target hypernet is recalculated, such as... Figure 5 As shown.

[0096] The overall algorithm pseudocode of the training-free neural network architecture search method provided in this embodiment is as follows: Figure 6 As shown.

[0097] In summary, this embodiment provides a training-free neural network architecture search method. Multiple network input data are input into a target supernet, and an evaluation value is obtained based on the difference between the mapping outputs of the target supernet. This evaluation value reflects the expressive power of the target supernet. The importance of a connection is determined by its evaluation value when it is included or excluded from the target supernet. Connections in the target supernet are then deleted based on their importance, ultimately resulting in a single neural network. This method enables neural network architecture search without training, reducing computational load and search time.

[0098] It should be understood that although the steps in the flowcharts shown in the accompanying drawings are displayed sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0099] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0100] Example 2

[0101] Based on the above embodiments, the present invention also provides a training-free neural network architecture search device, such as... Figure 7 As shown, the training-free neural network architecture search device includes:

[0102] The mapping module is used to select at least two network input data and input them into the target supernet respectively, and obtain the network linear mapping output corresponding to each network input data. The target supernet includes a preset number of nodes, and there is at least one connection between two adjacent nodes. Each connection corresponds to a neural network operation, as described in Embodiment 1.

[0103] The evaluation module, wherein the data generation module is used to determine the evaluation value of the target supernet based on the differences between the linear mapping outputs of each of the networks, as specifically described in Embodiment 1;

[0104] An importance assessment module is used to calculate the importance of each connection in the target supernet, wherein the importance of each connection in the target supernet reflects the impact of the connection on the evaluation value of the target supernet, as described in Embodiment 1.

[0105] An iterative module is used to delete at least one connection in the target supernet according to the importance of each connection in the target supernet, and call the importance evaluation module to repeatedly execute the step of calculating the importance of each connection in the target supernet until the target supernet is a single neural network, as described in Embodiment 1.

[0106] Example 3

[0107] Based on the above embodiments, the present invention also provides a terminal, such as... Figure 8 As shown, the terminal includes a processor 10 and a memory 20. Figure 8 Only some of the terminal components are shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0108] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory. In other embodiments, the memory 20 may be an external storage device of the terminal, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, the memory 20 may include both internal and external storage devices. The memory 20 is used to store application software and various types of data installed on the terminal. The memory 20 can also be used to temporarily store data that has been output or will be output. In one embodiment, the memory 20 stores a training-free neural network architecture search program 30, which can be executed by the processor 10 to implement the training-free neural network architecture search method of this application.

[0109] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other chip, used to run program code stored in the memory 20 or process data, such as executing the target-based multimodal named entity recognition method.

[0110] In one embodiment, when the processor 10 executes the training-free neural network architecture search program 30 in the memory 20, the following steps are performed:

[0111] At least two network input data are selected and input into the target supernet respectively, and the network linear mapping output corresponding to each network input data is obtained. The target supernet includes a preset number of nodes, and there is at least one connection between two adjacent nodes. Each connection corresponds to a neural network operation.

[0112] The evaluation value of the target supernet is determined based on the differences between the linear mapping outputs of each of the networks;

[0113] Calculate the importance of each connection in the target supernet, wherein the importance of each connection in the target supernet reflects the impact of that connection on the evaluation value of the target supernet;

[0114] Based on the importance of each connection in the target supernet, at least one connection is deleted from the target supernet, and the step of calculating the importance of each connection in the target supernet is repeated until the target supernet is a single neural network.

[0115] The step of obtaining the network linear mapping output corresponding to each of the network input data includes:

[0116] For the target node: The neural network operation corresponding to each connection between the target node and its previous neighbor node is used to calculate the node input data of the previous neighbor node of the target node to obtain multiple node output data. The multiple node output data are then connected to obtain the node input data of the target node.

[0117] The node input data of the first node in the supernet is the network input data.

[0118] The step of determining the evaluation value of the target supernet based on the differences between the linear mapping outputs of each of the networks includes:

[0119] The Jacobian determinant of the mapping function corresponding to the target supernet is obtained based on the linear mapping output of the network and the corresponding network input data.

[0120] The target matrix is ​​obtained by combining the various Jacobian determinants.

[0121] Calculate the correlation coefficient matrix of the elements in the target matrix;

[0122] The evaluation value of the target supernet is calculated based on the correlation coefficient matrix.

[0123] The step of calculating the correlation coefficient matrix of the elements in the target matrix includes:

[0124] Calculate the covariance matrix of the target matrix;

[0125] The correlation coefficient matrix is ​​obtained based on the covariance matrix.

[0126] The step of calculating the evaluation value of the target supernet based on the correlation coefficient matrix includes:

[0127] The evaluation value of the target supernet is calculated according to the first preset formula;

[0128] The first preset formula is:

[0129]

[0130] Where EX(f) represents the evaluation value corresponding to the target supernet, and f represents the mapping function corresponding to the target supernet, (A J ) i,j Represents the correlation coefficient matrix A J The element in the i-th row and j-th column of the correlation coefficient matrix A J The number of rows and columns are both N, α and ε are constants, and F α Let (x) be a binary classification function. If x ≤ α, then F α (x) = x, otherwise F α (x) = 1 - ε.

[0131] The calculation of the importance of each connection in the target supernet includes:

[0132] For each connection in the target supernet, the importance of the target connection is determined based on the evaluation value when the target supernet includes or excludes the connection.

[0133] The step of deleting at least one connection in the target supernet based on the importance of each connection in the target supernet includes:

[0134] Delete the least important connection between any two adjacent nodes.

[0135] Example 4

[0136] The present invention also provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps of the training-free neural network architecture search method described above.

[0137] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A training-free neural network architecture search method, characterized in that, The method includes: At least two network input data are selected and input into the target supernet respectively, and the network linear mapping output corresponding to each network input data is obtained. The target supernet includes a preset number of nodes, and there is at least one connection between two adjacent nodes. Each connection corresponds to a neural network operation. The preset number is determined based on the task to be performed by the neural network, which includes image classification, image super-resolution, and target tracking tasks. The step of obtaining the network linear mapping output corresponding to each of the network input data includes: For the target node: The neural network operation corresponding to each connection between the target node and its previous neighbor node is used to calculate the node input data of the previous neighbor node of the target node to obtain multiple node output data. The multiple node output data are then connected to obtain the node input data of the target node. The node input data of the first node in the supernet is the network input data; The evaluation value of the target supernet is determined based on the differences between the linear mapping outputs of each of the networks; Determining the evaluation value of the target supernet based on the differences between the linear mapping outputs of each of the networks includes: The Jacobian determinant of the mapping function corresponding to the target supernet is obtained based on the linear mapping output of the network and the corresponding network input data. The target matrix is ​​obtained by combining the various Jacobian determinants. Calculate the correlation coefficient matrix of the elements in the target matrix; The evaluation value of the target supernet is calculated based on the correlation coefficient matrix to enhance the correlation between the correlation coefficient matrix and the network performance of the target supernet. Calculate the importance of each connection in the target supernet, wherein the importance of each connection in the target supernet reflects the impact of that connection on the evaluation value of the target supernet; Based on the importance of each connection in the target supernet, at least one connection is deleted from the target supernet, and the step of calculating the importance of each connection in the target supernet is repeated until the target supernet is a single neural network. Neural network architecture search is achieved through a training-free method, reducing computational load.

2. The training-free neural network architecture search method according to claim 1, characterized in that, The calculation of the correlation coefficient matrix of the elements in the target matrix includes: Calculate the covariance matrix of the target matrix; The correlation coefficient matrix is ​​obtained based on the covariance matrix.

3. The training-free neural network architecture search method according to claim 1, characterized in that, The step of calculating the evaluation value of the target supernet based on the correlation coefficient matrix includes: The evaluation value of the target supernet is calculated according to the first preset formula; The first preset formula is: ; Where EX(f) represents the evaluation value corresponding to the target supernet, and f represents the mapping function corresponding to the target supernet, (A J ) i ,j Represents the correlation coefficient matrix A J The element in the i-th row and j-th column of the correlation coefficient matrix A J The number of rows and columns are both N, α and ε are constants, and F α Let (x) be a binary classification function. If x ≤ α, then F α (x) = x, otherwise F α (x) = 1 - ε.

4. The training-free neural network architecture search method according to claim 1, characterized in that, The calculation of the importance of each connection in the target supernet includes: For each connection in the target supernet, the importance of the target connection is determined based on the evaluation value when the target supernet includes or excludes the connection.

5. The training-free neural network architecture search method according to claim 1, characterized in that, The step of deleting at least one connection in the target supernet based on the importance of each connection in the target supernet includes: Delete the least important connection between any two adjacent nodes.

6. A training-free neural network architecture search device, characterized in that, The training-free neural network architecture search device is applied to the training-free neural network architecture search method according to any one of claims 1-5, the device comprising: The mapping module is used to select at least two network input data and input them into the target supernet respectively, and obtain the network linear mapping output corresponding to each network input data. The target supernet includes a preset number of nodes, and there is at least one connection between two adjacent nodes. Each connection corresponds to a neural network operation. The evaluation module, wherein the data generation module is used to determine the evaluation value of the target supernet based on the differences between the linear mapping outputs of each of the networks; An importance assessment module is used to calculate the importance of each connection in the target supernet, wherein the importance of each connection in the target supernet reflects the impact of that connection on the evaluation value of the target supernet; An iterative module is used to delete at least one connection in the target supernet based on the importance of each connection in the target supernet, and call the importance evaluation module to repeatedly perform the step of calculating the importance of each connection in the target supernet until the target supernet is a single neural network.

7. A terminal, characterized in that, The terminal includes: a processor and a computer-readable storage medium communicatively connected to the processor. The computer-readable storage medium is adapted to store multiple instructions, and the processor is adapted to invoke the instructions in the computer-readable storage medium to perform the steps of implementing the training-free neural network architecture search method according to any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the training-free neural network architecture search method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Neural network search method and device, computer readable medium and electronic equipment

    CN111553480A

  • Neural network optimization method and device, electronic equipment and storage medium

    CN111950710A

  • Automatic image labeling method and device based on deep learning

    CN114612707A