Neural architecture search method based on reinforcement learning
Through the neural architecture search method based on reinforcement learning, a modular search space and optimization strategy network are constructed, which solves the problem of low operating efficiency of traditional neural networks on edge devices and the reliance of design on manual experience, and achieves a high-performance and efficient neural network structure. generate.
Patent Information
- Application Number
- CN202410844717.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-10-22
AI Technical Summary
In industrial or robotic applications, traditional neural network models cannot run efficiently on edge devices due to too large architectural parameters. Moreover, the neural network structure design relies on manual experience and cannot fully explore the network structure space, resulting in limited performance and applicability. Nowadays, There are automated design solutions such as genetic algorithms, Bayesian optimization and learning-based methods, which have the problems of high consumption of computing resources, low efficiency and poor stability.
Adopt a neural architecture search method based on reinforcement learning, build a modular search space, use reinforcement learning algorithms and world models to optimize the policy network, generate a neural network architecture, and combine it with an actor-critic algorithm for iterative training until the effect converges, improving the neural network performance and efficiency.
It achieves high performance in neural architecture search, improves sample efficiency and result stability, has a 5-10 times improvement in training speed compared to model-free reinforcement learning algorithms, and can generate efficient neural network structures.
Smart Images

Figure CN118821901A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the fields of edge computing, deep learning, and reinforcement learning, and in particular relates to a neural architecture search method based on reinforcement learning. Background Art
[0002] Traditional industrial control systems usually need to send data to a centralized server for processing and analysis, and then return the results to the device for control and operation, which has a high risk of data transmission delay and data privacy leakage. Edge-based and miniaturized distributed devices can improve the real-time and security of the entire control system, and they usually adopt a common hardware platform and modular design to improve the flexibility and scalability of the system. Deep neural networks, as an end-to-end brain-inspired machine learning, imitate the hierarchical operation mode of biological neurons in a simplified way. The concept of artificial neural networks (ANNs) has made great progress from the first theoretical proposal in the 1950s to the recent impressive results of deep learning. Applying them to edge devices can enable them to automatically extract features and analyze them.
[0003] However, traditional neural network models cannot run efficiently on edge devices due to their large architectural parameters. In addition, in industrial or robotic applications, real-time response decisions and generalization capabilities are often required. The optimized and streamlined neural network structure can improve the model's reasoning speed and response time without a significant performance degradation. The performance of deep neural networks, especially convolutional neural networks (CNNs), mainly depends on the setting of the model structure, the training process, and the selection of data features. All of these variables are controlled by a set of hyperparameters and greatly affect the learning process. In order to achieve the optimal performance of deep neural networks, these hyperparameters, including network depth, learning rate, layer type, number of neurons per layer, and dropout rate, need to be carefully adjusted.
[0004] In the rapid development of deep learning, the design of neural network structures often depends on manual experience and expertise. This approach often fails to fully explore the potential of the network structure space and limits the performance and applicability of the model. The emergence of deeper and more complex modern architectures has further increased the number and types of hyperparameters. Therefore, the trial and error process and tuning steps for experts have become very expensive and cumbersome. In addition, deep neural network parameter setting is considered a black box optimization problem because the mapping between architecture, performance, and learning tasks is unknown. In this context, automated design solutions are very necessary and have triggered a lot of research. The existing technical solutions are mainly divided into the following three categories:
[0005] 1) Genetic evolutionary algorithm. The genetic algorithm strategy for hyperparameter optimization is to modify a set of candidate solutions (population) based on certain rules (operators), through an iterative process of mutation, crossover and selection. The first step is to initialize a set of N random networks to create a primary population. The second step is to introduce a fitness function, score each network by its classification accuracy, and retain the top-ranked networks to build the next generation of networks. The evolutionary process continues until the termination criterion is met, which is usually defined as the maximum number of iterations allowed. Yang et al. (Yang, Zhaohui, et al. "Cars: Continuous evolution for efficient neural architecture search." Proceedings of the IEEE / CVF conference on computer vision and pattern recognition. 2020.) developed an efficient continuous evolution method to accelerate the generation of optimal networks through the inheritance and inheritance of hypernetworks. However, genetic algorithms usually require a lot of computing resources and time for search and optimization, especially in the complex space of neural network architectures, and they cannot effectively search all possible architectures. Secondly, the continuity and high latitude of neural network architecture parameters can cause genetic algorithms to converge slowly or fall into the dilemma of local optimal solutions. And it cannot take into account the hidden specific properties of deep neural networks targeted by neural architecture search, such as structural hierarchy, activation function, connection method, etc.
[0006] 2) Bayesian optimization method. Bayesian optimization is an effective black-box optimization algorithm that can be used to solve the global optimal solution of a function with unknown expression. Therefore, it has been widely used in the problem of hyper-automatic tuning of parameters in the field of machine learning. Due to the large number of hyperparameters and the complexity of models (such as deep neural networks), the cost of directly evaluating the objective function in this kind of automatic tuning problem is very high. Therefore, the Bayesian method proposes a probabilistic proxy reconstruction of the objective function, where D is a set of past observations. The evaluation cost of the proxy function is much lower than that of the true objective function. Some of the most commonly used probabilistic regression models are Gaussian processes, random forests, and tree-structured Parzen estimators. White et al. (White, Colin, Willie Neiswanger, and Yash Savani. "Bananas: Bayesian optimization with neural architectures for neural architecture search." Proceedings of the AAAI conference on artificial intelligence. Vol. 35. No. 12. 2021.) transformed the neural architecture search process into an optimal path problem and used the Bayesian optimization method to optimize the matching between architecture components. Shi et al. (Shi, Han, et al. "Bridging the gap between sample-based and one-shot neural architecture search with bonas." Advances in Neural Information Processing Systems 33 (2020): 1808-1819.) used a graph convolutional network predictor as an alternative model to Bayesian optimization, accelerating the NAS process by accelerating the simultaneous evaluation of multiple related architectures through weight sharing. However, Bayesian optimization methods have some of the same problems as genetic algorithms. In addition, Bayesian optimization requires appropriate prior knowledge and initial points, which is a certain challenge for the novelty of neural architecture search, and Bayesian optimization is usually applicable to the optimization of continuous parameter space, while the space of neural architecture search usually contains discrete choices.
[0007] 3) Learning-based algorithms. Learning-based algorithms can combine the powerful nonlinear fitting ability of neural networks and the exploration ability of feasible spaces to design the optimal deep neural network architecture. Zheng et al. (Zheng, Xiawu, et al. "Multinomial distribution learning for effective neural architecture search." Proceedings of the IEEE / CVF international conference on computer vision. 2019.) regard the search space as a joint multinomial distribution and obtain the optimal network structure by taking the operation with the highest probability in the distribution. Reinforcement learning (RL) is inspired by animal behavior psychology and is a goal-oriented optimization method driven by impulse response or signal [7]. It can automatically discover efficient network structures suitable for specific tasks by learning through interaction with the environment to maximize cumulative rewards without manual intervention or expert experience. The current mainstream method is to train recurrent neural networks (RNNs) to generate convolutional architectures through reinforcement learning, or to train components such as convolutional pooling in CNN models as action spaces for reinforcement learning. Hsu et al. (Hsu, Chi-Hung, et al. "Monas: Multi-objective neural architecture search using reinforcement learning." arXiv preprint arXiv:1806.10332(2018).) explored NAS for multiple objectives (accuracy and peak loss) using reinforcement learning. Lyu et al. (Lyu, Bo, et al. "Multiobjective reinforcement learning-based neural architecture search for efficient portrait parsing." IEEE Transactions on Cybernetics 53.2(2021):1158-1169.) took into account accuracy, number of parameters, FLOPs (floating point operations) and inference latency, and the search process generated a series of excellent goal-oriented architectures under different hyperparameter configurations.However, learning-based neural architecture search methods, especially multinomial distribution learning, need to assume that the search space is a joint distribution, which may lead to excessive complexity of the search space in practice. In addition, it relies on the random selection operation of probability distribution, which may cause the performance of the network structure finally selected to fluctuate in different search iterations or different training environments, making it difficult to maintain consistent performance. In addition, although the method of Lyu et al. models the neural architecture search process as a reinforcement learning problem, the model-free reinforcement learning algorithm lacks a basic understanding of the task model, which makes its exploration rely only on trial and error, and has problems of low efficiency and poor stability. In addition, its high dependence on samples requires a lot of computing resources and time for sample collection and verification. Summary of the invention
[0008] The purpose of the present invention is to provide a neural architecture search method based on reinforcement learning to address the deficiencies of the prior art.
[0009] The objective of the present invention is achieved through the following technical solution: a neural architecture search method based on reinforcement learning, comprising the following steps:
[0010] (1) Constructing common units and simplified units to generate a modular search space for neural architecture search, and perform simplified model and computation generation;
[0011] (2) Use the reinforcement learning algorithm as the search algorithm for neural architecture search; in the process of searching for the neural network structure, build a world model based on the data set, use the world model to enhance the training data, and build an actor-critic training method to optimize the policy network. This process is repeated until the training effect converges;
[0012] (3) Generate a neural network architecture using a network structure parameter group generated by a policy network trained by reinforcement learning; randomly initialize the generated network parameters, train the network with training set data until convergence, and test its performance in the test set.
[0013] Furthermore, the step (1) specifically includes the following sub-steps:
[0014] (1.1) Constructing common modules to ensure that the input and output sizes are the same, so that higher-level features can be extracted while maintaining the same image resolution; constructing simple units so that the height and width of the output image are half of the input image, so that the image resolution can be reduced; both adopt a modular serialization generation method, by selecting an operation for each of the two implicit states and then outputting;
[0015] (1.2) A complete network is formed by stacking several basic units and simplified units; the common units and simplified units constructed in step (1.1) are set; the number of blocks in the basic units or simplified units at different positions is calculated differently; the number of basic units and simplified units stacked is also different for different data sets and training tasks;
[0016] (1.3) By constructing a complete network, the global space of neural architecture search is transformed into a modular search space.
[0017] Furthermore, the step (2) specifically includes the following sub-steps:
[0018] (2.1) Construct the reinforcement learning algorithm as a search algorithm for neural architecture search; treat the neural architecture search problem as a reinforcement learning problem to learn a policy network that can produce the optimal network architecture parameters; set the structural parameters in the neural structure search space as the actions output by the reinforcement learning network; set all the structural parameters generated in the neural structure search space as the state of reinforcement learning; set the performance value of the neural network constructed by the searched parameters in the validation set as the reward for reinforcement learning; in order to solve the problem that the structural parameters of the neural network change with the changes in the overall hyperparameters of the structure, design a recurrent neural network as the policy network of the reinforcement learning algorithm;
[0019] (2.2) Training the world model neural network: In the reinforcement learning problem constructed in step (2.1), in order to improve the training rate of the reinforcement learning search algorithm, a world model is constructed; a neural network is designed to represent this world model; the input of the world model network is set as the network structure parameter, and the output is the predicted reward; in order to construct a data set for training the world model neural network, the neural architecture parameters output by the policy network are tested on the validation set to obtain the true value of the reward; the loss is calculated by comparing the predicted reward with the actual reward, and the world model is trained by backpropagating the loss, so that the trained world model neural network can predict the reward more accurately, thereby constructing a large number of imaginary network structure parameter groups and corresponding rewards to greatly improve the training efficiency;
[0020] (2.3) Training the policy network: In combination with the world model established in step (2.2), based on the neural architecture search Markov process transformed in step (2.1), an actor critic-like algorithm is designed to optimize network performance; the algorithm includes an action network and a value network; the action network is set as the policy network so that the next optimal network structure parameters are predicted based on the current network structure parameter group; the action network and the value network are collaboratively optimized in a policy iteration manner; the optimization goal of the value network is set to maximize the expected cumulative discounted reward, and the optimization goal of the value network is set to be as close to the true value of the state value as possible; in order to solve the problem that the true value of the state value is difficult to obtain, a method of estimating the state value is designed by combining the predicted values of multiple world model networks at different time steps;
[0021] (2.4) Based on the above steps (2.1), (2.2) and (2.3), construct a complete model-based reinforcement learning algorithm.
[0022] The beneficial effect of the present invention is that it has superior performance in neural architecture search due to the use of reinforcement learning. The present invention uses a data set to establish a neural architecture search world model between structural parameters and performance in computer vision classification tasks, and through a modular search space construction method, it shows higher sample efficiency and result stability in retraining, and in the later stage of training, it has a 5-10 times training speed improvement compared to the model-free reinforcement learning algorithm proposed by Lyu et al. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 A flowchart of a neural architecture search method based on reinforcement learning;
[0024] Figure 2 Schematic diagram of the basic block generation process;
[0025] Figure 3 The generation process of the simple unit;
[0026] Figure 4 The generation process for common units;
[0027] Figure 5 Schematic diagram of the construction process of the complete network;
[0028] Figure 6 A schematic diagram of the overall framework;
[0029] Figure 7 The overall flow chart of the model-based reinforcement learning algorithm. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical scheme and advantages of the present invention more clear, the present invention is further described in detail in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0031] The technical solution of the present invention is summarized as follows:
[0032] 1) Construct common units and simple units through serialized or parallelized generation modes to assemble a complete neural network structure model, and finally obtain a modular neural architecture search space;
[0033] 2) Use reinforcement learning as a strategy algorithm for neural architecture search, build a world model based on the data set to enhance the training data, and build an actor-critic-like training method to optimize the strategy network, so as to perform iterative training until the effect converges;
[0034] 3) The network structure parameters generated by the policy network obtained by reinforcement learning training are used to generate a neural network architecture. After randomly initializing the internal network parameters, the network is trained using training data until convergence and its effect is verified.
[0035] Example 1
[0036] like Figure 1 As shown, the present invention provides a neural architecture search method based on reinforcement learning, comprising the following steps:
[0037] (1) Constructing common units and simplified units to generate a modular search space for neural architecture search, and perform simplified model and computation generation;
[0038] The step (1) specifically includes the following sub-steps:
[0039] (1.1) Construction of common units and simple units: In order to reduce the complexity of the neural architecture search task, we draw inspiration from classic convolutional neural networks such as ResNet, GogCgLeNet, etc., and characterize complex networks as stacks of simple modules. According to the characteristics of convolutional neural networks, two basic modules are designed, namely common modules and simple modules. Common modules are constructed to ensure that the input and output sizes are the same, so that higher-level features can be extracted while maintaining the same image resolution; simple units are constructed so that the height and width of the output image are half of the input image, so that the image resolution can be reduced; both adopt a modular serialized generation method, and output by selecting an operation for each of the two hidden states.
[0040] Both the common unit and the simplified unit contain several basic blocks, and each basic block is generated in a serialized fixed process. Each block takes two implicit states as input, and for each implicit state, selects an operation and outputs it. The specific method of generating each basic block includes the following five steps:
[0041] 1) Select a hidden state and use it as the first input of the block;
[0042] 2) Select a hidden state and use it as the second input of the block;
[0043] 3) Select an operation for the first input of the block;
[0044] 4) Select an operation for the second input of the block;
[0045] 5) Select an operation to combine the results of the two input operations.
[0046] The schematic diagram of the basic block generation process is as follows Figure 2 As shown in the figure, the hidden state refers to the convolution features in all existing convolutional neural networks. The merging operation includes addition and concatenation. The operations performed on the input include the following twelve: identity mapping, 1x3 convolution, 3x1 convolution, 1x7 convolution, 7x1 convolution, 3x3 diagonal convolution, 3x3 average pooling, 3x3 maximum pooling, 5x5 maximum pooling, 7x7 maximum pooling, 1x1 convolution, 3x3 convolution.
[0047] The difference between ordinary cells and simple cells lies in the different ways of stacking basic blocks. Simple cells can be generated by sequentially stacking several basic blocks.
[0048] The generation process of the simplified unit is as follows Figure 3 As shown in the figure. The first basic block selects two hidden states from all the hidden states as inputs, and generates a new hidden layer state by performing operations on the two input hidden states and merging them. The newly generated hidden layer state is added to the candidate hidden layer state pool, and then two hidden layer states are selected from the hidden layer state pool as inputs to build the next basic block. This is repeated B times until B blocks are built. By stacking a number of basic blocks, the generation of simple units can be achieved.
[0049] Select two inputs from the same implicit state pool for each of the B basic blocks and perform operations to obtain the outputs of the B basic blocks. Concatenate the outputs of the B basic blocks to obtain the output of the common unit. The generation process of the common unit is as follows: Figure 4 shown.
[0050] (1.2) A complete network is formed by stacking several basic units and simplified units; the common units and simplified units constructed in step (1.1) are set; the number of blocks in the basic units or simplified units at different positions is calculated differently; for different data sets and training tasks, the number of basic units and simplified units stacked is also different. The composition of the complete network is as follows Figure 5 As shown. Where N represents the same basic unit or simplified unit repeated N times.
[0051] (1.3) Through the construction of the complete network, the global space of neural architecture search is transformed into a modular search space. The converted modular search space contains the following search parameters:
[0052] 1) The number of times N that simple units and basic units are stacked;
[0053] 2) The number of different types of simplified units in the complete network L1;
[0054] 3) The number of different types of basic units in the complete network L2;
[0055] 4) The number of basic blocks within the minimalistic unit
[0056] 5) The number of basic blocks within the basic unit
[0057] According to the above method, a modular search space based on basic blocks can be constructed.
[0058] (2) The reinforcement learning algorithm is used as the search algorithm for neural architecture search; in the process of searching the neural network structure, a world model is constructed based on the data set, the world model is used to enhance the training data, and an actor-critic training method is constructed to optimize the policy network. This process is repeated until the training effect converges.
[0059] The step (2) specifically includes the following sub-steps:
[0060] (2.1) Construct the reinforcement learning algorithm as a search algorithm for neural architecture search; regard the neural architecture search problem as a reinforcement learning problem to learn a policy network that can produce the optimal network architecture parameters; set the structural parameters in the neural structure search space as the actions output by the reinforcement learning network; set all the structural parameters generated in the neural structure search space as the state of reinforcement learning; set the performance value of the neural network constructed by the searched parameters in the validation set as the reward for reinforcement learning; in order to solve the problem that the structural parameters of the neural network change with the changes in the overall hyperparameters of the structure, design a recurrent neural network as the policy network of the reinforcement learning algorithm.
[0061] The reinforcement learning algorithm can be viewed as a Markov decision process (MDP), which contains several core elements: state s τ , reward r τ ~q(r τ |s τ ), action a τ ~q(a τ |s τ ), transfer function s τ ~q(s τ |s τ-1 ,a τ-1 ) and discount rate γ; the goal of reinforcement learning is to make the cumulative discounted return Maximize. The neural architecture search problem is regarded as a reinforcement learning problem to learn a policy network that can produce the optimal network architecture parameters. In order to use reinforcement learning to construct a search algorithm for neural architecture search in a modular search space, the modular neural network design problem can be regarded as a sequential decision problem. The structural parameters in the neural structure search space are used as reinforcement learning network actions. The neural network first outputs the overall structural hyperparameters such as the number of stacking times N of the simple unit and the basic unit, and then outputs the five structural parameters in each basic block. All structural parameters generated in the neural structure search space are used as the state of reinforcement learning. The performance value of the neural network constructed based on the searched parameters in the validation set is used as the reward for reinforcement learning. Here it is set that if and only if the sequential decision of all structural parameters is completed, the intelligent body in the reinforcement learning will receive a reward, and the reward at other times is zero. Therefore, this reinforcement learning problem is a reinforcement learning problem with sparse rewards.
[0062] Since the number of structural parameters of the neural network changes with the overall hyperparameters of the structure, a policy network that can handle variable-length sequences is required in the reinforcement learning problem. Therefore, a recurrent neural network (RNN) is selected as the policy network of the reinforcement learning algorithm. The general workflow of the recurrent neural network in this decision problem is shown in the figure. At each moment, the recurrent neural network generates a structural parameter, and at the next moment, the structural parameter is used as input again to obtain the next output. This cycle repeats until a sufficient number of network structural parameters are output. The overall framework is as follows Figure 6 shown.
[0063] (2.2) Training the world model neural network: In the reinforcement learning problem constructed in step (2.1), in order to improve the training rate of the reinforcement learning search algorithm, a world model is constructed; a neural network is designed to represent this world model; the input of the world model network is set as the network structure parameter, and the output is the predicted reward; in order to construct a data set for training the world model neural network, the neural architecture parameters output by the policy network are tested on the validation set to obtain the true value of the reward; the loss is calculated by comparing the predicted reward with the actual reward, and the world model is trained by backpropagating the loss, so that the trained world model neural network can predict the reward more accurately, thereby constructing a large number of imaginary network structure parameter groups and corresponding rewards to greatly improve the training efficiency.
[0064] The function performed by this world model is to map the network structure parameter group to obtain the corresponding reward value:
[0065] q θ (r τ |s τ );
[0066] The optimization goal of this world model is to increase its variational lower bound (ELBO). The variational lower bound can be transformed into the optimization of the probability of reward value reconstruction:
[0067]
[0068] A neural network is designed to represent this world model. The input of the world model network is set as the network structure parameters, and the output is the predicted reward. In order to construct a data set for training the world model neural network, the neural architecture parameters output by the policy network are tested on the validation set to obtain the true value of the reward. The loss is calculated by comparing the predicted reward with the actual reward, and the world model is trained by backpropagating the loss, so that the trained world model neural network can predict the reward more accurately.
[0069] After optimizing and obtaining a world model of the reward function, it can be used together with the policy network to generate an imaginary network structure parameter group. Specifically, when in the initial state, the policy network generates the first network structure parameter, the world model predicts the first reward, and then the generated structure parameter is sent back to the input to obtain the second network structure parameter and the predicted second reward. In this way, many groups of imaginary network structure parameter groups and corresponding predicted rewards can be obtained over and over again.
[0070] (2.3) Training the strategy network: Based on the world model established in step (2.2) and the neural architecture search Markov process transformed in step (2.1), an actor critic-like algorithm is designed to optimize network performance. The algorithm includes an action network and a value network. τ ~q φ (a τ |s τ ) is set as the policy network, so that the next optimal network structure parameters are predicted according to the current network structure parameter group; the action network and the value network are collaboratively optimized in a policy iteration manner; the optimization goal of the value network is set to maximize the expected cumulative discounted reward, and the optimization goal of the value network is set to be as close to the true value of the state value as possible; in order to solve the problem that the true value of the state value is difficult to obtain, a method of combining the predicted values of the multiple world model networks at different time steps is designed to estimate the state value.
[0071] In order to optimize network performance, an actor critic algorithm is designed; the algorithm contains an action network and a value network. The action network is also the policy network, which predicts the next optimal network structure parameters based on the current network structure parameter group:
[0072] a τ ~q φ (a τ |s τ );
[0073] The value network estimates the cumulative discounted rewards generated based on the current network structure parameters:
[0074]
[0075] The action network and the value network are collaboratively optimized in a policy iteration manner. The goal of the value network is to maximize the estimated cumulative discounted reward, while the goal of the value network is to be consistent with the true value and to change with the action.
[0076] In order to better model the strategy, the action network adds a Gaussian distribution output layer on the basis of the ordinary recurrent neural network. This output layer ensures that the gradient can be back-propagated along the sampled actions during training:
[0077] a τ =tanh(μ φ (s τ )+σ φ (s τ )∈),∈~Normal(0,I);
[0078] In order to train the action and value networks, it is necessary to evaluate the value return corresponding to the imaginary network structure parameter group. In order to balance the variance and offset during the evaluation process, the following method is adopted to evaluate the true state value:
[0079]
[0080] Among them, V R Refers to the cumulative value return from the current time to the completion of network parameter generation. V is the cumulative value return within k steps from the current start. λ Combining the first two together can balance the variance and bias that may be caused by the estimation method.
[0081] Therefore, the overall learning goal is to optimize the action network so that the predicted state value is maximized, and optimize the value network so that the error between the predicted state value and the true evaluated state value is minimized:
[0082]
[0083] (2.4) Based on the above steps (2.1), (2.2) and (2.3), a complete model-based reinforcement learning algorithm is constructed. The overall flow chart of the algorithm is as follows: Figure 7 shown.
[0084] (3) Generate a neural network architecture using the network structure parameter set generated by the policy network trained by reinforcement learning. Randomly initialize the generated network parameters, train the network with the training set data until convergence, and test its performance in the test set.
[0085] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A neural architecture search method based on reinforcement learning, characterized in that: The following steps are involved: (1) Constructing common units and simplified units to generate a modular search space for neural architecture search, and perform simplified model and computation generation; (2) Use the reinforcement learning algorithm as the search algorithm for neural architecture search; in the process of searching for the neural network structure, build a world model based on the data set, use the world model to enhance the training data, and build an actor-critic training method to optimize the policy network. This process is repeated until the training effect converges; (3) Generate a neural network architecture using a set of network structure parameters generated by a policy network trained by reinforcement learning; The generated network parameters are randomly initialized, and the network is trained with the training set data until convergence, and its performance is tested in the test set.
2. The neural architecture search method based on reinforcement learning according to claim 1, characterized in that: The step (1) specifically includes the following sub-steps: (1.1) Constructing common modules to ensure that the input and output sizes are the same, so that higher-level features can be extracted while maintaining the same image resolution; constructing simple units so that the height and width of the output image are half of the input image, so that the image resolution can be reduced; both adopt a modular serialization generation method, by selecting an operation for each of the two implicit states and then outputting; (1.2) A complete network is formed by stacking several basic units and simplified units; the common units and simplified units constructed in step (1.1) are set; the number of blocks in the basic units or simplified units at different positions is calculated differently; the number of basic units and simplified units stacked is also different for different data sets and training tasks; (1.3) By constructing a complete network, the global space of neural architecture search is transformed into a modular search space.
3. The neural architecture search method based on reinforcement learning according to claim 1, characterized in that: The step (2) specifically includes the following sub-steps: (2.1) Construct the reinforcement learning algorithm as a search algorithm for neural architecture search; treat the neural architecture search problem as a reinforcement learning problem to learn a policy network that can produce the optimal network architecture parameters; set the structural parameters in the neural structure search space as the actions output by the reinforcement learning network; set all the structural parameters generated in the neural structure search space as the state of reinforcement learning; set the performance value of the neural network constructed by the searched parameters in the validation set as the reward for reinforcement learning; in order to solve the problem that the structural parameters of the neural network change with the changes in the overall hyperparameters of the structure, design a recurrent neural network as the policy network of the reinforcement learning algorithm; (2.2) Training the world model neural network: In the reinforcement learning problem constructed in step (2.1), in order to improve the training rate of the reinforcement learning search algorithm, a world model is constructed; a neural network is designed to represent this world model; the input of the world model network is set as the network structure parameter, and the output is the predicted reward; in order to construct a data set for training the world model neural network, the neural architecture parameters output by the policy network are tested on the validation set to obtain the true value of the reward; the loss is calculated by comparing the predicted reward with the actual reward, and the world model is trained by backpropagating the loss, so that the trained world model neural network can predict the reward more accurately, thereby constructing a large number of imaginary network structure parameter groups and corresponding rewards to greatly improve the training efficiency; (2.3) Training the strategy network: Based on the world model established in step (2.2) and the neural architecture search Markov process transformed in step (2.1), an actor critic-like algorithm is designed to optimize network performance. The algorithm includes an action network and a value network. τ ~q φ (a τ |s τ ) is set as a policy network, so that the next optimal network structure parameters are predicted according to the current network structure parameter group; the action network and the value network are collaboratively optimized in a policy iteration manner; the optimization goal of the value network is set to maximize the estimated cumulative discount reward, and the optimization goal of the value network is set to be as close to the true value of the state value as possible; in order to solve the problem that the true value of the state value is difficult to obtain, a design is used to estimate the state value by combining the predicted values of the multiple world model networks at different time steps; (2.4) Based on the above steps (2.1), (2.2) and (2.3), construct a complete model-based reinforcement learning algorithm.
Citation Information
Cited By
Sewage aeration control method, device and equipment and storage medium
CN122287914A
A sewage aeration control method, device, equipment and storage medium
CN122287914B
