Neural network structure search device and neural network structure search method
By aggregating operations in neural network search methods, the device reduces computational and memory requirements, enhancing the efficiency of neural network structure searches.
Patent Information
- Application Number
- JP2023052559
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-29
- Publication Date
- 2024-10-10
AI Technical Summary
Existing neural network structure search methods face challenges with increased computational complexity and memory requirements due to large search spaces and the need for extensive learning data, particularly when using random forests for performance prediction.
A neural network structure search device that aggregates multiple operations of the same type or role into a single operation, reducing the search space dimensions and using performance predictors to determine high-performance architectures.
This approach reduces computational and memory demands while facilitating efficient learning and inference, enabling faster and more effective neural network structure searches.
Smart Images

Figure 2024141096000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a neural network structure searching device and a neural network structure searching method for searching the structure of a neural network. [Background technology]
[0002] A neural network is a machine learning model that has multiple layers that perform nonlinear processing to predict the output for a given input. Neural Architecture Search (NAS) is a technique for deriving the optimal architecture (optimal structure) of a neural network. NAS searches for, for example, the type of nonlinear processing of a neural network and the connection points of layers.
[0003] An example of NAS is described in Patent Document 1 and Non-Patent Document 1. The architecture search system described in Patent Document 1 includes a computational cell generator that defines a computational cell, a computational cell parameter adjustment engine, and an architecture generator. The computational cell includes a directed graph that represents nodes and edges. Each node represents a neural network latent representation. Each edge represents an operation that transforms the neural network latent representation.
[0004] The computational cell parameter adjustment engine replaces the operation of transforming the latent representation with an operation of a linear combination of the candidate operations with weights. The computational cell parameter adjustment engine adjusts the computational cell hyperparameters and weights. The architecture generator uses the adjusted computational cell hyperparameters and weights to generate a neural network.
[0005] A NAS using computational cells is also described in Non-Patent Document 1. The system described in Non-Patent Document 1 includes an architecture sampling means, an architecture evaluation means, an architecture performance prediction means, an architecture storage device, and a parameter search means.
[0006] The system described in Non-Patent Document 1 randomly samples architectures from the search space and uses the samples to train a decision forest (random forest). The system explores new areas while tracking the distribution of good architectures. After the entire search space has been fully explored by the random forest, the system selects the architecture with the maximum probability from the distribution as the optimal solution. [Prior art documents] [Patent documents]
[0007] [Patent Document 1] Special Publication No. 2022-545038 [Non-patent literature]
[0008] [Non-Patent Document 1] Xiawu Zheng, "Neural Architecture Search with Representation Mutual Information," 2022 IEEE / CVF Conference on Computer Vision and Pattern Recognition (CVPR), September 27, 2022 Summary of the Invention [Problem to be solved by the invention]
[0009] In the system described in Non-Patent Document 1, when the sample size is increased, it becomes difficult to search for an architecture. The reason is that the system converts the input to the random forest into a one-hot vector before inputting it to the random forest, so the search space increases exponentially, making it difficult to train the performance predictor. In addition, as the amount of training data required for training the random forest increases, the number of times sampling should be performed increases. This also makes training time longer.
[0010] In the system described in Patent Document 1, when a computational cell includes many candidate operations, a large amount of memory is required for searching the computational cell, and the space of architectures that can be searched is restricted by the performance of the computer. This is because, in the system, the candidate operations are weighted by computational cell hyperparameters, and the computational cell is constructed by linearly combining them, and the computational cell hyperparameters must be calculated by the gradient method.
[0011] An object of the present invention is to provide a neural network structure searching device and a neural network structure searching method that can reduce the amount of calculation and memory required when searching for the structure of a neural network. [Means for solving the problem]
[0012] The neural network structure searching device according to the present invention is a neural network structure searching device that searches for neural network architectures, and includes an operation compression means that aggregates multiple operations included in an operation space that is a candidate for search into one operation, and an architecture determination means that determines an architecture with high performance from candidate architectures that include the aggregated operations.
[0013] The neural network structure search method of the present invention is a method in which a computer aggregates multiple operations contained in an operation space that is a candidate for search into a single operation, and determines an architecture with high performance from candidate architectures that include the aggregated operations.
[0014] The neural network structure search program according to the present invention causes a computer to execute a process of aggregating multiple operations contained in an operation space that is a candidate for search into a single operation, and a process of determining an architecture with high performance from candidate architectures that include the aggregated operations. Effect of the Invention
[0015] According to the present invention, the amount of calculation and the amount of memory required when searching for a neural network structure can be reduced. [Brief description of the drawings]
[0016] [Figure 1] FIG. 2 is an explanatory diagram illustrating an example of a computational cell used in the first embodiment. [Diagram 2] FIG. 11 is an explanatory diagram showing a specific example of compression of a search space. [Diagram 3] 1 is a block diagram showing an example of the configuration of a neural network structure searching device according to a first embodiment; [Figure 4] 11 is an explanatory diagram showing a specific example of an input to a search space dimension reduction means and an output from the search space dimension reduction means. FIG. [Figure 5A] FIG. 1 is an explanatory diagram showing a specific example of a candidate architecture. [Figure 5B] FIG. 11 is an explanatory diagram showing a specific example of a vector representation of a candidate architecture. [Figure 6] 4 is a flowchart showing the operation of the neural network structure searching device of the first embodiment. [Figure 7] 4 is a flowchart showing the operation of the neural network structure searching device of the first embodiment. [Figure 8] FIG. 11 is an explanatory diagram illustrating an example of a computational cell used in the second embodiment. [Figure 9] FIG. 11 is a block diagram showing an example of the configuration of a neural network structure searching device according to a second embodiment. [Figure 10] FIG. 2 is an explanatory diagram showing an example of an input to a parameter searching means and an output from the parameter searching means. [Figure 11] 10 is a flowchart showing the operation of the neural network structure searching device of the second embodiment. [Figure 12] 10 is a flowchart showing the operation of the neural network structure searching device of the second embodiment. [Figure 13] FIG. 1 is a block diagram showing an example of a computer having a CPU. [Figure 14]FIG. 2 is a block diagram showing the main parts of a neural network structure searching device. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0017] In the following embodiment, a NAS that uses the concept of computational cells to explore architectures is taken as an example. A computational cell includes a directed graph that represents nodes and edges. In the following embodiment, the amount of calculation required to explore neural network structures is reduced by aggregating operations represented by edges of the computational cell.
[0018] Embodiment 1. Fig. 1 is an explanatory diagram showing an example of a computational cell used in the first embodiment. As shown in Fig. 1, the computational cell 500 is expressed as a directed graph consisting of nodes 501 representing feature maps of a neural network and edges 502 representing one or more candidate operations between the nodes. In this embodiment, the computational cell 500 is optimized. The optimization of the computational cell 500 is to bring the computational cell into a state in which only one edge that improves the performance of the network architecture, such as inference accuracy, model size, and execution speed, is selected.
[0019] The neural network structure searching device of this embodiment reduces the number of dimensions of the search space by treating operations of the same type or with the same role, or operations of the same type and with the same role, contained in the operation space, as one representative compressed operation. In other words, the neural network structure searching device aggregates multiple operations into one operation to reduce the number of dimensions of the search space.
[0020] An example of the same type of operation is two or more operations with different parameters, such as a convolutional layer operation with a stride number of 1 and a convolutional layer operation with a stride number of 2. In this example, the parameter is the stride number. Another example of the same type of operation is an average pooling layer operation with a kernel size of 2×2 and an average pooling layer operation with a kernel size of 3×3. In this example, the parameter is the kernel size.
[0021] Also, as an example of a role, there is a role to reduce the size of a feature map. In this case, as an operation having the same role, an operation of a convolutional layer with a stride number of 2 and an operation of an average pooling layer with a stride number of 2 are exemplified. As another example of a role, there is a role to perform a nonparametric operation on a feature map and output it to the next layer. In this case, as an operation having the same role, an operation of an average pooling layer with a stride number of 1 and an operation of a max pooling layer with a stride number of 1 are exemplified. Furthermore, when one edge includes multiple operations, the number of times an operation is repeated may be positioned as a role.
[0022] Fig. 2 is an explanatory diagram showing a specific example of compression of a search space. A change in the search space due to compression will be described with reference to Fig. 2. It is assumed that the search space before compression is an eight-dimensional space consisting of a convolution layer with a 1x1 kernel, a convolution layer with a 3x3 kernel, a convolution layer with a 5x5 kernel, a convolution layer with a 7x7 kernel, an average pooling layer, a max pooling layer, a skip-connection, and a zeroize.
[0023] After compressing operations of the same type or with the same role into one operation, the operation space becomes a four-dimensional space consisting of convolutional layers, pooling layers, skip connections, and no connections. The parameter space becomes a two-dimensional space consisting of parameters related to convolutional layers and parameters related to pooling layers. In this example, the parameters related to convolutional layers include four types: 1×1, 3×3, 5×5, and 7×7. The parameters related to pooling layers include two types: average pooling and max pooling.
[0024] The operation space may be represented by a one-hot signal. The parameter space may be represented by a single value for the operation. In this example, the search space before compression is an eight-dimensional space, but after compression the operation space is a four-dimensional space and the parameter space is a two-dimensional space. This reduces the number of dimensions for representing the candidate operations.
[0025] Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0026] In the first embodiment, the neural network structure searching device treats operations of the same type or role included in the operation space that is a search candidate in the computation cell as one operation, and defines a new operation space after compression. The neural network structure searching device compresses the number of dimensions of the input feature of the performance predictor by expressing the search space of the operation of the computation cell in a vector format that combines the compressed operation space and the parameter space of the compressed operation.
[0027] The performance predictor is a machine learning model such as a random forest or neural network. It learns the relationship between a computational cell that contains multiple operations and the performance of a network architecture that uses the computational cell. Through learning, it becomes possible to predict and explore the performance of unknown architectures.
[0028] [Configuration Description] Fig. 3 is a block diagram showing an example of the configuration of a neural network structure searching device 100 according to the first embodiment. The neural network structure searching device 100 shown in Fig. 3 includes a search space dimension reduction means 101, an architecture sampling means 102, an architecture evaluation means 103, an architecture performance prediction means 104, and an architecture storage device 105. The arrows in Fig. 3 simply indicate the direction of signal (data) flow, but do not exclude bidirectionality. This also applies to other block diagrams.
[0029] 4 is an explanatory diagram showing a specific example of an input to the search space dimension compression means 101 and an output from the search space dimension compression means 101. In the example shown in FIG. 4, the search space dimension compression means 101 inputs an operation list 111 and a parameter list 112 to be compressed. The search space dimension compression means 101 outputs a compressed operation list 113.
[0030] The operation list 111 corresponds to the operation space to be searched. The operation list 111 includes all the candidate operations in the calculation cell (specifically, data indicating the operations). The operations include operations for constructing neural networks such as convolution layer operations (convolution operations), fully connected operations (fully connected operations), skip connections, average pooling layer operations (average pooling operations), maximum pooling operations (maximum pooling operations), and no connections. Note that operations of convolution layers with different parameters such as kernel size and stride are treated as different operations. For example, an operation of a convolution layer having a 3×3 kernel is treated as a different operation from an operation of a convolution layer having a 1×1 kernel.
[0031] For pooling operations and the like, operations with different parameters are treated as different operations.
[0032] The parameter list 112 is a dictionary-type list that extracts different parameters in operations having the same type or the same role included in the operation list 111. The parameter list 112 corresponds to the parameter space to be searched. The compressed operation list 113 includes the types of operations compressed by the search space dimension compression means 101.
[0033] The architecture sampling means 102 receives the compressed operation list 113 and the parameter list 112, and outputs candidate architectures to be searched for. The architecture sampling means 102 samples one or more architectures from all architectures that can be constructed using the input with an arbitrary probability distribution, and outputs the architectures as candidate architectures.
[0034] FIG. 5A is an explanatory diagram showing a specific example of the candidate architecture 121 output from the architecture sampling means 102. In FIG. 5A, a node mn (m, n: integers equal to or greater than 0) indicates a node-to-node relationship. That is, a node mn indicates an edge between nodes m and n. In the example shown in FIG. 5A, the candidate architecture 121 is composed of a type of operation and a parameter corresponding to each of the nodes mn. FIG. 5B is an explanatory diagram showing a specific example of a vector representation of the candidate architecture 121. In this embodiment, as shown in FIG. 5B, the candidate architecture 121 is represented in a one-dimensional vector format for operations between nodes in a computation cell. The vector format is represented by combining the value of the compressed operation list 113, which is a one-hot signal, and the value of the parameter list 112 for each node when the candidate architecture 121 is created.
[0035] The architecture evaluation means 103 learns the weights of the network architecture using a target data set 114. The architecture evaluation means 103 uses an arbitrary evaluation function to output an index representing the performance of the candidate architecture 121 as a single numerical value. The target data set 114 is a data set of a task targeted by the network architecture. The evaluation function is expressed by values such as the inference error, expressive power, computational complexity, and model size of the architecture, or a weighted sum of these values.
[0036] The architecture performance prediction means 104 includes a machine learning model such as a random forest as the performance predictor. The architecture performance prediction means 104 executes a process of learning a given input / output pair and a process of inferring an output for an unknown input. The input value is the candidate architecture 121. The output value is the quantified performance of the architecture. The quantified performance of the architecture is the performance value.
[0037] The architecture storage unit 105 stores a plurality of combinations of architectures, parameters, and performance of the architectures. The architecture storage unit 105 also outputs the best architecture (the architecture with the highest performance) among the stored architectures. The architectures are candidates in the compressed operation list. The parameters are candidates in the parameter list.
[0038] [Explanation of operation] Next, the operation of the neural network structure searching device 100 will be described with reference to the flowcharts of Figures 6 and 7. Figure 6 shows the process of the learning stage of the performance predictor. Figure 7 shows the process of the strengthening stage of the performance predictor and the architecture selection stage.
[0039] In the learning stage of the performance predictor, the search space dimension compression means 101 receives as input the operation list 111 of a predefined computation cell and the parameter list 112 to be compressed (step S101). Then, the search space dimension compression means 101 creates a compressed operation list 113 based on the operation list 111 and the parameter list 112, and outputs the compressed operation list 113 to the architecture sampling means 102 (step S102).
[0040] In step S102, the search space dimension compression means 101 compresses two or more operations to be compressed in the operation list 111 into one compressed operation. The search space dimension compression means 101 writes the compressed operations (specifically, data indicating the operations) in the compressed operation list. Note that compressing an operation means consolidating operations of the same type or having the same role contained in the operation space into one operation. Note that in this embodiment, the search space dimension compression means 101 compresses operations of the same type and operations having the same role, but it is also possible to compress only one of the operations of the same type and operations having the same role.
[0041] The architecture sampling means 102 outputs the candidate architecture 121 in a one-dimensional vector format (step S103). The vector can be expressed in a format combining the vector of the compressed operation list 113 and the value of the parameter list 112. In the compressed operation list 113, the parameters are expressed as values themselves or as indexes corresponding to values. The architecture evaluation means 103 receives the candidate architecture 121. The architecture evaluation means 103 evaluates the performance of the candidate architecture 121 using an evaluation function (step S104). In step S104, the architecture evaluation means 103 calculates, for example, an index representing the performance. Note that the architecture evaluation means 103 can also calculate an index representing the performance of the candidate architecture using the input target dataset 114.
[0042] The architecture performance prediction means 104 performs learning using a machine learning model (step S105). That is, the architecture performance prediction means 104 receives the candidate architecture 121 as an input and performs learning of a performance predictor using training data as performance.
[0043] Next, a process of the strengthening stage of the performance predictor is executed. In the strengthening stage, similarly to the learning stage, the architecture sampling means 102 outputs one or more new candidate architectures 121 to the architecture performance prediction means 104 (step S111). The architecture performance prediction means 104 predicts the performance of the candidate architectures 121 using the performance predictor learned in the learning stage (step S112). The architecture performance prediction means 104 provides one or more architectures predicted to have high performance among the predicted candidate architectures and associated parameters to the architecture storage device 105 and the architecture evaluation means 103 (step S113). The architecture storage device 105 stores the architecture predicted to have high performance (step S114).
[0044] The architecture evaluation means 103 evaluates the performance of the architecture using the evaluation function used in the learning stage (step S115). The architecture evaluation means 103 outputs the performance value of the architecture to the architecture performance prediction means 104. The architecture performance prediction means 104 performs learning of the performance predictor as in the learning stage (step S116). The performance predictor is re-learned, thereby improving the prediction performance of the performance predictor. The processes of steps S111 to S117 are repeated a predetermined number of times. The processes of steps S111 to S117 are repeatedly executed a predetermined number of times, thereby storing a certain number of high-performance architectures in the architecture storage device 105. The predetermined number of times, which is the number of repetitions, is set to a number at which a certain number of high-performance architectures are expected to be stored in the architecture storage device 105. A criterion (threshold value) for determining whether or not the performance is high may be determined in advance.
[0045] In the architecture selection stage, the architecture storage device 105 selects and outputs one architecture with the highest performance from among the stored architectures (step S121). In this manner, an architecture with high performance is finally obtained.
[0046] [Effect description] In this embodiment, the search space dimension compression means 101 generates a compressed operation list 113 based on the operation list 111 to be searched and the parameter list 112 corresponding thereto. The search space dimension compression means 101 compresses the number of elements required to express a candidate architecture. In the compressed operation list 113, the candidate architecture is set with data that is combined with data expressed by a one-hot signal and one value in which the value in the parameter list 112 is expressed by an index or the like. Therefore, the architecture can be expressed with a small number of elements. As a result, the input dimension of the performance predictor can be reduced. Therefore, the learning and inference of the performance predictor can be facilitated.
[0047] In addition, in the prior art, operations of the same kind with different parameters are represented as separate elements. Therefore, the performance predictor needs to learn the relationship. However, in the present embodiment, the relationship is already represented by the magnitude of a numerical value using an index or the like. As a result, the complexity of the learning is reduced.
[0048] In this embodiment, the search for computational cells in a CNN (Convolutional Neural Network) is illustrated as an example, but the concept of this embodiment is also applicable to structural search of other neural networks such as an RNN (Recurrent Neural Network) or a Transformer.
[0049] Embodiment 2. Fig. 8 is an explanatory diagram showing an example of a computational cell used in the second embodiment. As shown in Fig. 8, a computational cell 600 is expressed as a directed graph consisting of a node 601 representing a feature map of a neural network and edges 602 and 603 representing one or more candidate operations between the nodes. In this embodiment, the edge 602 corresponds to a candidate operation that includes a parameter. The edge 603 corresponds to a candidate operation that does not include a parameter.
[0050] Candidate operations that contain parameters corresponding to edges 602 are replaced by weighted linear combinations parameterized by computational cell hyperparameters 611 .
[0051] In the second embodiment, the neural network structure searching device also treats operations of the same type or role included in the operation space that is a search candidate in the computation cell 600 as one operation, and defines a new operation space after compression. Then, the neural network structure searching device searches the operation space after compression using a performance predictor, and searches the parameter space of the compressed operations.
[0052] In the second embodiment, the neural network structure searching device further includes a performance predictor that learns pairs of operations in the computation cell 600 whose parameters are undetermined and their performance. Such a performance predictor predicts the performance of an architecture whose parameters are unknown. Then, the parameters are determined. As a method for determining the parameters, for example, the method described in Patent Document 1 can be used.
[0053] [Configuration Description] Fig. 9 is a block diagram showing a configuration example of a neural network structure searching device 200 according to the second embodiment. The neural network structure searching device 200 shown in Fig. 9 includes a search space dimension reduction means 101, an architecture sampling means 202, a parameter searching means 201, an architecture evaluation means 103, an architecture performance prediction means 204, and an architecture storage device 105.
[0054] The search space dimension reduction means 101 is configured similarly to the search space dimension reduction means 101 shown in FIG.
[0055] The architecture sampling means 202 inputs the compressed operation list 113 (see FIG. 4) and outputs a candidate architecture 221 to be searched. The architecture sampling means 202 samples one or more architectures from all architectures that can be constructed using the input with an arbitrary probability distribution, and outputs the sampled architecture as the candidate architecture 221. The candidate architecture 221 is expressed in a one-dimensional vector format for each operation between nodes in a computation cell.
[0056] In this embodiment, unlike the architecture sampling means 102 of the first embodiment, the architecture sampling means 202 does not sample parameters. The architecture sampling means 202 outputs candidate architectures whose parameters are not yet determined.
[0057] Fig. 10 is an explanatory diagram showing an example of an input to the parameter search means 201 and an output from the parameter search means 201. In the example shown in Fig. 10, the parameter search means 201 inputs a candidate architecture 221. The parameter search means 201 outputs a candidate architecture 222 whose parameters have been determined. Note that Fig. 10 also shows an example of a parameter list 212 input to the search space dimension compression means 101 and an example of a compression operation list 213 output from the search space dimension compression means 101.
[0058] The parameter search means 201 receives a candidate architecture 221 whose parameters are not yet determined and a parameter list 212. The parameter search means 201 searches for parameters of the candidate architecture 221 to determine the parameters. As shown in Fig. 8, the parameter search means 201 replaces candidate operations for determining parameters with linear combinations to construct a computational cell 600. Each candidate operation in the linear combination has a computational cell hyperparameter 611, which is a parameterized weight. The computational cell hyperparameter 611 is optimized by an evaluation function to determine the optimal parameters.
[0059] FIG. 10 shows, in (A) to (C), an example of replacement with a linear combination by the parameter searching means 201, an example of optimization of the computational cell hyperparameters 611, and an example of determination of optimal parameters.
[0060] The architecture evaluation means 103 uses an arbitrary evaluation function to evaluate the candidate architecture 222 for the input target data set 114, and outputs an index representing the performance of the architecture as a single numerical value. The output of the evaluation function is values such as the expressive ability, inference error, computational complexity, model size, etc. of the architecture, or a weighted sum of these values, which represents the performance of the network architecture.
[0061] The architecture performance prediction means 204 includes a machine learning model such as a random forest as the performance predictor. The architecture performance prediction means 204 executes a process of learning a given input / output pair and a process of inferring an output for an unknown input. The input value is a candidate architecture. The output value is a quantified performance of the architecture. The quantified performance of the architecture is defined as a performance value.
[0062] The architecture preservation device 105 has the same functions as the architecture preservation device 105 in the first embodiment.
[0063] [Explanation of operation] Next, the operation of the neural network structure searching device 200 will be described with reference to the flowcharts of Figures 11 and 12. Figure 11 shows the process of the learning stage of the performance predictor. Figure 12 shows the process of the strengthening stage of the performance predictor and the architecture selection stage.
[0064] In the learning stage of the performance predictor, the search space dimension compression means 101 receives the operation list 111 of a predefined computation cell and the parameter list 112 to be compressed as input (step S101). Then, the search space dimension compression means 101 creates a compressed operation list 213 based on the operation list 111 and the parameter list 112, and outputs the compressed operation list 213 to the architecture sampling means 202 (step S102). The process for creating the compressed operation list 213 is the same as the process in the first embodiment.
[0065] The architecture sampling means 202 outputs the candidate architecture 221 in a one-dimensional vector format (step S201). In step S201, the architecture sampling means 202 expresses the vector of the compressed operation list 213 as a one-hot signal for each operation between nodes.
[0066] The parameter search means 201 receives the candidate architecture 221 and the input parameter list 212 (step S202). As shown in Figures 8 and 10, the parameter search means 201 reconstructs the computational cell 600 by replacing candidate operations including parameters in the computational cell 600 with weighted linear combinations parameterized by computational cell hyperparameters 611 (see (A) in Figure 10).
[0067] Next, the parameter search means 201 optimizes the computational cell hyper parameters 611 to update the computational cell hyper parameters 611 (see (B) in FIG. 10). The parameter search means 201 can perform optimization using, for example, the backpropagation method described in Patent Document 1. Then, the parameter search means 201 calculates the parameter values of the operation to be compressed (see (C) in FIG. 10). The parameter search means 201 outputs the candidate architecture 222 whose parameters have been determined (step S203).
[0068] The architecture evaluation means 103 receives the candidate architecture 222 whose parameters have been determined. The architecture evaluation means 103 evaluates the performance of the candidate architecture 222 using an evaluation function (step S104). In step S104, the architecture evaluation means 103 calculates, for example, an index representing the performance. Note that the architecture evaluation means 103 can also calculate an index representing the performance of the candidate architecture using the input target dataset 114.
[0069] The architecture performance prediction means 204 performs learning using the machine learning model (step S105). That is, the architecture performance prediction means 204 performs learning of a performance predictor using the candidate architecture as input and the training data as performance. Unlike the first embodiment, the machine learning model is given the candidate operations in the computational cell 600 as input, but does not include parameter values.
[0070] Next, a process of the reinforcement stage of the performance predictor is executed. In the reinforcement stage, similarly to the learning stage, the architecture sampling means 202 outputs one or more new candidate architectures 221 to the architecture performance prediction means 204 (step S211).
[0071] The architecture performance prediction means 204 predicts the performance of the candidate architecture 221 using the performance predictor learned in the learning stage (step S112). The architecture performance prediction means 204 provides one or more architectures predicted to have high performance among the predicted candidate architectures 221 to the parameter search means 201 (step S113). The parameter search means 201 determines parameters of the candidate architecture 221 whose parameters are not yet determined (step S212). Then, the parameter search means 201 provides the candidate architecture whose parameters have been determined as an architecture to the architecture storage device 105 and the architecture evaluation means 103.
[0072] The architecture storage device 105 stores the architecture predicted to have high performance (step S114). The architecture evaluation means 103 evaluates the performance of the architecture using the evaluation function used in the learning stage (step S115). The architecture evaluation means 103 outputs the performance value of the architecture to the architecture performance prediction means 204. The architecture performance prediction means 204 performs learning of the performance predictor as in the learning stage (step S116). By re-learning the performance predictor, the prediction performance of the performance predictor is improved.
[0073] The process of steps S211 to S117 is repeated a preset number of times. By repeatedly executing the process of steps S211 to S117 a preset number of times, a certain number of high-performance architectures are stored in the architecture storage device 105.
[0074] In the architecture selection stage, the architecture storage device 105 selects and outputs one architecture with the highest performance from among the stored architectures (step S121). In this manner, an architecture with high performance is finally obtained.
[0075] [Effect description] The neural network structure searching device 200 of this embodiment only needs to perform calculations on the hyperparameters of some of the operations in the calculation cell. Therefore, in this embodiment, the effect of the first embodiment can be obtained, and the effect of reducing memory usage can be obtained compared to the device described in Patent Document 1 that performs calculations on the hyperparameters of all the operations in the calculation cell. EXAMPLES
[0076] Next, a specific example will be described. In the first embodiment, a case will be taken as an example in which a user defines an operation list 111 and a parameter list 112 to be compressed, as shown in FIG. 4, and inputs them to the search space dimension compression means 101.
[0077] In the first embodiment, it is assumed that nine types of operations are set in the operation list 111, including no connection, skip connection, average pooling, a convolution operation with a kernel size of 1×1, a convolution operation with a kernel size of 3×3, a convolution operation with a kernel size of 5×5, a group convolution operation with a kernel size of 3×3 and the number of groups being 2, a group convolution operation with a kernel size of 3×3 and the number of groups being 4, and a group convolution operation with a kernel size of 3×3 and the number of groups being 8. It is assumed that 1×1, 3×3, and 5×5 are set in the parameter list 112 as parameters for the convolution operations. It is also assumed that 1, 2, 4, and 8 are set in the parameter list 112 as parameters for the group convolution.
[0078] As the operations other than the above, it is possible to select the operations used in neural networks such as max pooling, decoupling, and normalization, or layers consisting of a plurality of operations in which operations are combined. For example, as the parameters other than the above operations, it is possible to select the stride number, expansion rate, and number of channels of the convolution operation or pooling operation.
[0079] The search space dimension compression means 101 compresses (aggregates) a group of operations having the same type or the same role targeted in the parameter list 112 into one operation among nine types of operations. In this embodiment, the search space dimension compression means 101 aggregates a plurality of convolution operations having different kernel sizes as operations of the same type into one convolution operation. In addition, the search space dimension compression means 101 aggregates a plurality of group convolution operations having different numbers of groups into one group convolution. As a result, the search space dimension compression means 101 creates a compressed operation list 113 with five elements including no join, skip join, average pooling, convolution, and group convolution as operation types.
[0080] Other examples of the same type of operations include operations with different kernel sizes or numbers of groups, as well as operations with different strides, expansion rates, numbers of channels, etc. As examples of operations having the same role, a convolutional layer with a stride number of 2 and an operation that has the role of reducing the size of a feature map, such as average pooling with a stride number of 2, are considered. As examples of operations having the same role, an operation that has the role of performing a non-parametric operation on a feature map and outputting it to the next layer, such as average pooling with a stride number of 1 and max pooling with a stride number of 1, are considered. Furthermore, operations having the same role may include the number of times an operation is repeated when multiple operations are included in one edge.
[0081] The architecture sampling means 102 samples an architecture that can be constructed from the compressed operation list 113 and the parameter list 112 under an arbitrary probability distribution. Specifically, the architecture sampling means 102 samples (selects) one operation from the operation list 111 as an operation candidate. If the operation is a compressible operation, i.e., a compressed operation (aggregatable operation), the architecture sampling means 102 selects a parameter from the parameter list 112. The selected candidate operation and parameter constitute a candidate architecture 121 (see FIG. 5A). The representation format of the candidate architecture 121 is a list format in which an operation (specifically, operation data indicating the type of operation) and a parameter (specifically, parameter data) are combined (see FIG. 5B). The operation data is represented by a one-hot signal with a length of 5. The parameter data is represented by one value for one parameter. As an example, the parameter data is represented by a value by an index. For example, the index is 1 for 1×1, 2 for 3×3, and 3 for 5×5. The architecture sampling means 102 assigns out-of-range values, such as 0 or -1, to operations that are not compression operations.
[0082] For example, when a convolution operation with a kernel size of 3×3 and a group number of 2 is selected by the architecture sampling means 102 for a connection between certain nodes in a computation cell, the candidate architecture is expressed by seven elements, such as [0 0 0 0 1 0 2] (the first element to the fifth element are one-hot representation values of the type of operation, the sixth element is an index of the kernel size of the convolution operation, and the seventh element is an index of the group convolution operation). When the number of nodes in the computation cell is 4, the number of connections between the nodes is (4×(4−1)) / 2=6. Therefore, the architecture of the entire search cell is expressed by 7×6=42 elements. Note that, when the architecture sampling means 102 of the first embodiment is not used, the architecture is expressed by 9×6=54 elements. Note that the architecture output by the architecture sampling means 102 is the candidate architecture 121.
[0083] The architecture evaluation means 103 evaluates the candidate architecture 121 using an evaluation function. The evaluation function includes a loss due to the difference from the teacher label when the target dataset 114 is input, a difference from the teacher model, and a numerical value for evaluating the performance of the model. In the evaluation function, the weighted sum of these may be used as the loss. In addition, Non-Patent Document 1 adopts the loss of the teacher label when the target dataset is input to the candidate architecture and the weighted sum of the mutual information of the intermediate layer with the teacher model. The teacher model is a model having an already existing architecture structure and trained with the same dataset. The architecture structure is defined as an architecture with higher performance as the value of the weighted sum is smaller.
[0084] The architecture performance prediction means 104 makes a performance predictor learn the above performance. The input of the performance predictor is the candidate architecture 121, and the output is performance. The performance predictor is a machine learning method that can express the relationship between input and output.
[0085] Random forest is used as the machine learning method. In random forest, the input is a one-dimensional vector with 42 elements that represents the architecture of the entire search cell. The output is a two-class classification of high-performance models and low-performance models. In order to distinguish between high-performance models and low-performance models, the values of the evaluation function of the candidate architectures are divided by an arbitrary threshold value.
[0086] After the performance predictor is trained, the system moves to a strengthening phase. In the strengthening phase, the architecture sampling means 102 samples one or more new candidate architectures 121. The architecture performance prediction means 104 infers the performance of the candidate architecture 121 using the trained performance predictor. As a result, architectures classified as high-performance classes can be stored in the architecture storage device 105 in list form, and the architecture evaluation means 103 can calculate the performance again using the evaluation function. The architecture performance prediction means 104 re-trains the performance predictor using a pair of performance and architecture. The re-training is repeated until a specified condition is met. The condition can be, for example, a preset number of times or the number of architectures with high performance that are stored.
[0087] In the architecture selection stage, the architecture storage unit 105 outputs the best architecture from among the architectures stored in the storage unit 105. In this manner, the user can obtain the optimal architecture for the target data set.
[0088] Next, a second example corresponding to the second embodiment will be described. In the second embodiment, in addition to the components of the first embodiment, a parameter search means 201 exists. The operations of the architecture sampling means 202 and the architecture performance prediction means 204 differ from those of the architecture sampling means 102 and the architecture performance prediction means 104 in the first embodiment. The architecture sampling means 202 does not determine the parameters of the operations described in the parameter list. The architecture sampling means 202 performs sampling from an architecture configured only by the compressed operation list 213 (see FIG. 10).
[0089] Therefore, the output candidate architecture 221 depends only on the compressed operation list 213, and in this embodiment, the number of elements in the compressed operation list 213 is 5×6=30. The parameter search means 201 operates when the candidate architecture 221 includes a compressed operation, and searches for parameters of the compressed operation. As shown in Fig. 10, the parameters are expressed as the sum of linear combinations of the candidate operations weighted by the computational cell hyperparameter 611.
[0090] In this embodiment, the parameter search means 201 replaces the operation between nodes for which a convolution operation is selected with an operation of a weighted linear combination of three operations of kernel sizes 1×1, 3×3, and 5×5. Also, the parameter search means 201 replaces the operation between nodes for which a group convolution operation is selected with an operation of a weighted linear combination of four operations of group numbers 1, 2, 4, and 8. The parameter search means 201 determines the parameters by optimizing the computation cell hyperparameter 611 of the architecture by a loss function. Also, the performance predictor of the architecture performance prediction means 204 performs learning and inference regarding the performance of a candidate architecture whose parameters are not yet determined. Therefore, the architecture that is determined to be high performance at the time of inference has parameters that are not yet determined. Therefore, after the parameter search means 201 determines the parameters of the candidate architecture whose parameters are not yet determined and the architecture storage device 105 stores the architecture predicted to have high performance, the same processing as in the first embodiment is performed.
[0091] Each function (each process) in the above-described embodiments can be realized by a computer having a processor such as a CPU (Central Processing Unit), a memory, etc. For example, a program for implementing the method (process) in the above-described embodiments may be stored in a storage device (storage medium), and each function may be realized by executing the program stored in the storage device by a CPU.
[0092] FIG. 13 is a block diagram showing an example of a computer having a CPU. The computer is implemented in the neural network structure searching device 100, 200. The CPU 1000 executes processing according to a program (software element: code) stored in the storage device 1001 to realize each function in the above embodiment. That is, it realizes the functions of the search space dimension reduction means 101, the architecture sampling means 102, the architecture evaluation means 103, and the architecture performance prediction means 104 in the neural network structure searching device 100 shown in FIG. 3. It also realizes the functions of the search space dimension reduction means 101, the architecture sampling means 202, the parameter searching means 201, the architecture evaluation means 103, and the architecture performance prediction means 204 in the neural network structure searching device 200 shown in FIG. 9.
[0093] The storage device 1001 is, for example, a non-transitory computer readable medium. The non-transitory computer readable medium includes various types of tangible storage media. Specific examples of the non-transitory computer readable medium include a magnetic recording medium (for example, a hard disk), a magneto-optical recording medium (for example, a magneto-optical disk), a CD-ROM (Compact Disc-Read Only Memory), a CD-R (Compact Disc-Recordable), a CD-R / W (Compact Disc-ReWritable), and a semiconductor memory (for example, a mask ROM, a PROM (Programmable ROM), an EPROM (Erasable PROM), and a flash ROM).
[0094] The program may also be stored in various types of transitory computer readable media, to which the program is supplied, for example, via a wired or wireless communication path, i.e., via an electrical signal, an optical signal, or an electromagnetic wave.
[0095] The memory 1002 is realized by, for example, a RAM (Random Access Memory), and is a storage means for temporarily storing data when the CPU 1000 executes processing. A configuration is also conceivable in which a program held in the storage device 1001 or a temporary computer-readable medium is transferred to the memory 1002, and the CPU 1000 executes processing based on the program in the memory 1002. The architecture storage device 105 can be realized by the memory 1002 or the storage device 1001 to which data can be written.
[0096] Fig. 14 is a block diagram showing the main parts of a neural network structure searching device. The neural network structure searching device 10 shown in Fig. 14 includes an operation compression unit (operation compression means) 11 (realized by a search space dimension compression means 101 in the embodiment) that aggregates a plurality of operations included in an operation space that is a candidate for searching into one operation, and an architecture determination unit (architecture determination means) 12 (realized by an architecture sampling means 102, an architecture evaluation means 103, and an architecture performance prediction means 104 in the first embodiment, and by an architecture sampling means 202, an architecture evaluation means 103, an architecture performance prediction means 204, and a parameter searching means 201 in the second embodiment) that determines an architecture with high performance from among candidate architectures including the aggregated operations.
[0097] In the neural network structure searching device 10, the architecture determination unit 12 may include a prediction unit (prediction means: in the first embodiment, realized by the architecture performance prediction means 104) that predicts the performance of the architecture based on the candidate architectures.
[0098] In the neural network structure searching device 10, the architecture determination unit 12 may include a parameter searching unit (parameter searching means: in the second embodiment, realized by parameter searching means 201) that searches for parameters of a candidate architecture whose parameters are unknown. [Explanation of symbols]
[0099] 10. Neural network structure exploration device 11 Arithmetic Compression Unit 12 Architecture Decision Section 100, 200 Neural network structure search device 101 Search space dimension reduction means 102, 202 Architecture Sampling Methods 103 Architecture Evaluation Tools 104, 204 Architecture performance prediction methods 105 Architecture Preservation Device 111 Calculation List 112, 212 Parameter List 113, 213 Compressed Operation List 114 Target Data Set 121, 221, 222 Candidate architectures 201 Parameter Search Method 500, 600 calculation cells 501, 601 nodes 502, 602, 603 Edge 611 Calculation Cell Hyperparameters 1000 CPU 1001 Storage device 1002 Memory
Claims
1. A neural network structure exploration device for exploring a neural network architecture, comprising: an operation compression means for aggregating a plurality of operations included in an operation space that is a candidate for search into one operation; and an architecture determination means for determining an architecture with high performance from among candidate architectures including aggregated operations. Neural network structure exploration device.
2. The operation compression means consolidates operations of the same type or having the same role into one operation.
2. The neural network structure searching device according to claim 1.
3. The operation compression means consolidates a plurality of operations into one operation using parameters to be compressed.
3. The neural network structure searching device according to claim 1 or 2.
4. The architecture determination means includes a prediction means for predicting performance of an architecture based on the candidate architectures.
4. The neural network structure searching device according to claim 3.
5. The architecture determination means includes a parameter search means for searching parameters of a candidate architecture whose parameters are unknown.
4. The neural network structure searching device according to claim 3.
6. The parameter search means searches for parameters in a parameter space to be searched.
6. The neural network structure searching device according to claim 5.
7. A neural network structure search method for searching for a neural network architecture, comprising the steps of: The computer Aggregating a plurality of operations contained in the candidate operation space into one operation; Determine the best performing architecture from candidate architectures that include intensive operations Neural network structure search method.
8. The computer Aggregate operations of the same type or with the same role into one operation.
8. The neural network structure searching method according to claim 7.
9. A neural network structure search program for searching for a neural network architecture, comprising: On the computer, A process of aggregating a plurality of operations included in a candidate operation space to be searched into one operation; A process to determine the architecture with the highest performance from candidate architectures including aggregated operations. A neural network structure search program for executing the above.
10. On the computer, Aggregating operations of the same type or with the same role into one operation 10. The neural network structure searching program according to claim 9.
Citation Information
Patent Citations
Resource-Constrained Neural Network Architecture Search
JP2022545038A
