Neural network output post-processing method of multi-model mechanism
By setting up multiple model layers after the output layer of the neural network and merging the output results of multiple models, the problem of slow training speed of traditional neural networks is solved, achieving more efficient training and higher recognition or prediction accuracy.
Patent Information
- Application Number
- CN202110688138.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-06-11
- Filing Date
- 2021-06-21
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2041-06-21
AI Technical Summary
Traditional neural network training methods are slow, computationally intensive, and have limited accuracy improvement in regression problems.
A neural network output post-processing method employing a multi-model mechanism is proposed. A multi-model layer is set after the output layer of the neural network, and the output results are merged by solving multiple models with different weights. During training, there is no need to fix the output range, and the weights are adjusted using the softmax function.
It improves training efficiency, reduces the initial loss function value, reduces the number of training iterations, and enhances the recognition or prediction accuracy of neural networks.
Smart Images

Figure CN115470883B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a neural network post-processing method, in particular to a neural network output post-processing method with a multi-model mechanism, and belongs to the field of artificial intelligence technology. Background Art
[0002] With the development of computer computing power and storage capacity, neural networks that can analyze large amounts of data have been widely used in various aspects.
[0003] The output of a neural network is affected by a variety of factors, including initialization methods and model structure. Its output range is highly random at the beginning of training. Therefore, when using neural networks for regression problems, the training process must first bring the neural network's output within the desired range before further fine-tuning it.
[0004] Traditional neural network training methods slow down the training speed of neural networks, waste a lot of computing power and time, and are not conducive to improving the output accuracy of neural networks.
[0005] Therefore, it is necessary to study a method that can improve the training speed of neural networks in regression problems. Summary of the Invention
[0006] In order to overcome the above problems, the inventors have conducted intensive research. On the one hand, they have designed a neural network output post-processing method with a multi-model mechanism. By setting a multi-model layer after the neural network output layer, multiple models are set in the multi-model layer, and the multiple models solve the results of the neural network output layer with different weights and then merge them to obtain the final regression result.
[0007] Furthermore, the method comprises the following steps:
[0008] S1. Set up a neural network with multiple model layers;
[0009] S2. Train the neural network with multiple model layers.
[0010] Furthermore, in step S1, the setting of the neural network of the multi-model layer includes setting the neural network and setting the multi-model layer.
[0011] The neural network is any known neural network;
[0012] The setting of the multi-model layer includes setting the number of models in the multi-model layer and the state matrix R, which is used to record the state values R of different models. j , expressed as R=[R1,R2,...,R j ...,R p ].
[0013] Preferably, the number p of models is 2 to 10.
[0014] Preferably, the state values of the multiple models are B, Among them, j represents different models, D represents the maximum value of the output range required by the neural network, and B represents the minimum value of the output range required by the neural network.
[0015] Furthermore, in step S1, a weight coefficient G is set for each model. j , G j The specific value of is obtained during the neural network training process, constraining the weight coefficients G of multiple models j The sum of the weight coefficients is 1.
[0016] Furthermore, in step S2, the neural network of the multi-model layer is trained using training samples. During the training process, the activation function from the output layer of the neural network to the multi-model layer is a softmax function.
[0017] Preferably, in step S2, the output N of the multi-layer model layer is:
[0018]
[0019] Among them, G represents the weight matrix of different models, and R represents the state matrix of the model state value.
[0020] Preferably, the weight matrices of different models are obtained by the following formula:
[0021] G=[G1,G2,...,G p ] T =S(w out h+b out )
[0022] Among them, h represents the output of the neural network output layer, w out represents the transfer matrix from the output layer to the multi-model layer, b out Represents the bias of the output layer, and S() represents the activation function from the output layer to the multi-model layer.
[0023] On the other hand, the present invention also provides a neural network system with a multi-model mechanism, including a neural network module and a multi-model layer module.
[0024] The neural network module includes an input layer, a hidden layer and an output layer;
[0025] The multi-model layer module includes multiple models, and the multiple models are respectively connected to the output layer of the neural network. Each model takes the output result of the neural network as input. The output results of multiple models are combined to obtain a regression result, which is the output of the neural network system of the multi-model mechanism.
[0026] The beneficial effects of the present invention include:
[0027] (1) During the training process, there is no need to train the output of the neural network to the required range, which improves the training efficiency;
[0028] (2) The initial loss function value of the neural network training is reduced. The loss function decreases quickly during the training process, which can reduce the number of training times and shorten the training time.
[0029] (3) The final loss function value is small, which improves the recognition or prediction accuracy of the neural network. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A schematic diagram of the neural network system structure of a multi-model mechanism according to a preferred embodiment of the present invention is shown.
[0031] Figure 2 Shows a schematic diagram of the traditional neural network results;
[0032] Figure 3 A schematic diagram of the GRU neural network structure in Example 1 is shown;
[0033] Figure 4 The figure shows the loss function of the neural network after training in Example 1 and Comparative Example 1 when the number of training times is 1 to 1000;
[0034] Figure 5 The loss functions of the neural networks after training in Example 1 and Comparative Example 1 are shown when the number of training times is 1,000 to 10,000. DETAILED DESCRIPTION
[0035] The present invention will be described in further detail below with reference to the accompanying drawings and examples, through which the features and advantages of the present invention will become more clearly understood.
[0036] The word "exemplary" is used exclusively herein to mean "serving as an example, example, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. Although various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
[0037] On the one hand, the present invention proposes a neural network system with a multi-model mechanism, including a neural network module and a multi-model layer module, such as Figure 1 shown.
[0038] Furthermore, the neural network module includes an input layer, a hidden layer and an output layer, such as Figure 2 shown.
[0039] The input layer is used to process input data;
[0040] The hidden layer is connected to the input layer, performs operations on the data output by the input layer, and outputs the results to the output layer;
[0041] The output layer is a fully connected layer that receives data transmitted by the hidden layer and combines the results of the hidden layer to obtain a regression result, which is the output result of the neural network.
[0042] The multi-model layer module is connected to the output layer of the neural network and includes multiple models. The multiple models are respectively connected to the output layer of the neural network. Each model takes the output result of the neural network as input, outputs the output result of the model after solving, and merges the output results of the multiple models to obtain a regression result as the output result of the multi-model layer. The regression result is the output of the neural network system of the multi-model mechanism.
[0043] Furthermore, the number of models in the multi-model layer module is set before the neural network training. Preferably, the number of models p is 2 to 10. The specific number of models can be determined by those skilled in the art through multiple experiments.
[0044] Furthermore, in the multi-model layer module, different models are assigned different state values R j , R j Pre-set and unchanged during training.
[0045] Status value R j The specific preset value of can be determined based on multiple experiments, or can be freely set by those skilled in the art based on experience.
[0046] In a preferred embodiment, the state values R of the multiple models j They are B, Among them, j represents different models, D represents the maximum value of the output range required by the neural network, B represents the minimum value of the output range required by the neural network, and the state matrix R of multiple model state values is expressed as R=[R1,R2,...,R j ...,R p ].
[0047] Furthermore, in the multi-model layer module, each model has a weight, and the sum of the weights of all models is 1, which is expressed as:
[0048]
[0049] Among them, G represents the weight matrix of different models, h represents the output of the neural network output layer, and w out represents the transfer matrix from the output layer to the multi-model layer, b out Represents the bias of the output layer, and S() represents the activation function from the output layer to the multi-model layer.
[0050] Preferably, the activation function S() is a softmax function.
[0051] Furthermore, the output N of the multi-model layer module is:
[0052]
[0053] On the other hand, the present invention proposes a neural network output post-processing method with a multi-model mechanism. Unlike the traditional neural network output layer that directly outputs the regression result, in the present invention, during the training process, a multi-model layer is set after the neural network output layer, and multiple models are set in the multi-model layer. The multiple models solve and merge the results of the neural network output layer with different weights to obtain the final regression result.
[0054] Specifically, the method comprises the following steps:
[0055] S1. Set up a neural network with multiple model layers;
[0056] S2. Train the neural network with multiple model layers.
[0057] In step S1, setting a neural network with multiple model layers includes setting a neural network and setting multiple model layers.
[0058] In the present invention, the specific type of the neural network is not particularly limited, and it can be any known neural network, such as a BP neural network, a RN neural network, and the like.
[0059] The setting of the multi-model layer includes setting the number of models in the multi-model layer.
[0060] Preferably, the number p of models is 2 to 10.
[0061] Furthermore, the setting of the multi-model layer also includes setting a state matrix R of the multi-model layer, and the state matrix is used to record the state values R of different models. j , expressed as R=[R1,R2,...,R j ...,R p ].
[0062] Furthermore, different model state values R jThe specific preset value can be determined by multiple experiments, or can be freely set by those skilled in the art based on experience. Preferably, the state values of the multiple models are B, Among them, j represents different models, D represents the maximum value of the output range required by the neural network, and B represents the minimum value of the output range required by the neural network.
[0063] Furthermore, a weight coefficient G is set for each model j , G j The specific value of is obtained during the neural network training process.
[0064] Furthermore, the weight coefficients G of multiple models are constrained j The sum of the weight coefficients is 1, that is,
[0065] In step S2, the neural network of the multi-model layer is trained using training samples.
[0066] Different from the training of traditional neural networks, at the beginning of training, since the weight coefficients of multiple models are 1, there is no need to first train the output of the neural network output layer to the required range. During the training process, the weight coefficients G of different models in the multi-model layer are j Self-adjustment ensures that the neural network output results of the multi-model mechanism are within the required range.
[0067] Preferably, during the training process, the activation function from the neural network output layer to the multi-model layer is a softmax function.
[0068] Furthermore, the output N of the multi-layer model layer is:
[0069]
[0070] Among them, G represents the weight matrix of different models, and R represents the state matrix of the model state value.
[0071] Furthermore, the weight matrices of different models are obtained as follows:
[0072] G=[G1,G2,...,G p ] T =S(w out h+b out )
[0073] Among them, h represents the output of the neural network output layer, w out represents the transfer matrix from the output layer to the multi-model layer, b out Represents the bias of the output layer, and S() represents the activation function from the output layer to the multi-model layer.
[0074] Furthermore, through training, the weights of different models can be obtained. Compared with traditional neural networks, the method in the present invention emphasizes the weights of different models rather than the absolute output results, so that the loss function decreases faster during training and the final loss function value is smaller.
[0075] The trained multi-model neural network can be used for identification or prediction.
[0076] The multi-model mechanism neural network trained by this method has higher accuracy in identification or prediction than traditional neural networks.
[0077] In a preferred embodiment, the neural network of the multi-model mechanism can be applied to interceptor missile guidance law identification.
[0078] When the neural network of the multi-model mechanism is applied to interceptor missile guidance law identification, the method further includes:
[0079] S3, obtaining the kinematic information of the aircraft and the interceptor missile, and converting the kinematic information of the aircraft and the interceptor missile into the neural network input information of the multi-model mechanism;
[0080] S4. Using the input information as input to the neural network of the multi-model mechanism, and outputting a predicted value of the interceptor missile guidance law through the neural network of the multi-model mechanism;
[0081] S5. The aircraft evades the interceptor missile based on the predicted value of the interceptor missile guidance law.
[0082] In step S3, there is no limitation on the method for acquiring the kinematic information of the aircraft and the interceptor missile, and any method may be used, such as sensor detection, visual detection, etc.
[0083] Furthermore, the method of converting motion information into neural network input information of the multi-model mechanism adopts the method of obtaining sample input information involved in the literature [Wang Yinhan, Fan Shipeng, Wu Guang, Wang Jiang, He Shaoming. Rapid identification method of enemy interceptor guidance law based on GRU [J / OL]. Acta Aeronautica Sinica: 1-11 [2021-06-09].
[0084] In step S5, the motion trajectory of the interceptor missile is obtained according to the predicted guidance law of the interceptor missile, and the motion trajectory of the aircraft is changed so that the motion trajectory of the aircraft does not overlap with the motion trajectory of the interceptor missile, thereby achieving evasion of the interceptor missile.
[0085] Example
[0086] Example 1
[0087] Conduct experiments to set up a neural network system with a multi-model mechanism based on a certain neural network and train it.
[0088] The neural network system of multi-model mechanism includes neural network and multi-model layer, and its structure is as follows: Figure 3 As shown, the neural network adopts the GRU neural network involved in the literature [Wang Yinhan, Fan Shipeng, Wu Guang, Wang Jiang, He Shaoming. Rapid identification method of enemy interceptor guidance law based on GRU [J / OL]. Acta Aeronautica Sinica: 1-11 [2021-06-09].], with 3 hidden layers and 80 GRU neurons in each hidden layer; the sample source is consistent with the model and method proposed in the literature, and the sample output is the guidance law parameter with an output range of 2.5 to 5.5, that is, the maximum value that the neural network needs to output is 5.5 and the minimum value is 2.5.
[0089] Furthermore, the multi-model layer has three models, the state matrix of the multi-model layer is R = [R1, R2, R3] = [2.5, 4.0, 5.5], and the activation function from the neural network output layer to the multi-model layer is the softmax function.
[0090] The weight matrices of different models are obtained as follows:
[0091] G=[G1,G2,G3] T =S(w out h+b out )
[0092] Among them, h represents the output of the neural network output layer, w out represents the transfer matrix from the output layer to the multi-model layer, b out Represents the bias of the output layer, S() represents the softmax function;
[0093] The output N of the multi-layer model layer is:
[0094]
[0095] Among them, G represents the weight matrix of different models, and R represents the state matrix of the model state value.
[0096] Example 2
[0097] According to the method in Example 1, the neural network of the multi-model mechanism in Example 1 is trained 1000 times to obtain the trained neural network of the multi-model mechanism. A simulation experiment is set up to use the trained neural network to quickly identify the guidance law of the interceptor missile, wherein the guidance law of the interceptor missile adopts the proportional guidance method.
[0098] The interceptor missile guidance law identification includes the following steps:
[0099] S3, obtaining the kinematic information of the aircraft and the interceptor missile, and converting the kinematic information of the aircraft and the interceptor missile into the neural network input information of the multi-model mechanism;
[0100] S4. Using the input information as input to the neural network of the multi-model mechanism, and outputting a predicted value of the interceptor missile guidance law through the neural network of the multi-model mechanism;
[0101] S5. The aircraft evades the interceptor missile based on the predicted value of the interceptor missile guidance law.
[0102] In step S3, the motion information is converted into the neural network input information of the multi-model mechanism by adopting the method of obtaining sample input information involved in the literature [Wang Yinhan, Fan Shipeng, Wu Guang, Wang Jiang, He Shaoming. Rapid identification method of enemy interceptor guidance law based on GRU [J / OL]. Acta Aeronautica Sinica: 1-11 [2021-06-09].
[0103] In step S5, the trajectory of the interceptor missile is obtained based on the predicted guidance law of the interceptor missile. According to the method described in the literature [Vitaly, Shaferman, Tal, et al. Cooperative Multiple-Model Adaptive Guidance for an Aircraft Defending Missile [J]. Journal of Guidance, Control, and Dynamics, 2010.], the trajectory of the aircraft is changed so that the trajectory of the aircraft and the trajectory of the interceptor missile do not overlap, thereby achieving evasion of the interceptor missile.
[0104] Simulation experiments show that the aircraft can effectively evade interceptor missiles based on the identified interceptor missile guidance law.
[0105] Comparative Example 1
[0106] The same experiment as Example 1 was performed, except that the multi-model layer was not set and only the neural network was trained.
[0107] Experimental example
[0108] The loss function is used to characterize the gap between the forward calculation result of each iteration of the neural network and the true value. The smaller the loss function, the closer the neural network output is to the true value.
[0109] When the statistical training times are 1 to 1000, the loss function of the neural network after training in Example 1 and Comparative Example 1 is as follows: Figure 4As shown, the loss function of the neural network after training by the method in comparative example 1 is 0.2957, while the initial loss function of the neural network after training by the method in embodiment 1 is 0.0477, that is, the initial loss function value of the training is greatly reduced, and it can be seen from the figure that the loss function in embodiment 1 decreases faster during the training process, that is, the method in embodiment 1 requires fewer training times to achieve the same recognition accuracy as the method in comparative example 1.
[0110] When the number of statistical training times is 1000 to 10000, the loss function of the neural network after training in Example 1 and Comparative Example 1 is as follows: Figure 5 As shown in the figure, it can be seen that after a large amount of training, the final loss function value of the neural network trained by the method of Example 1 is smaller, and the loss function decreases faster during the training process, that is, under the same number of training times, the recognition accuracy of the neural network obtained in Example 1 is higher.
[0111] The present invention has been described in detail above with reference to specific embodiments and exemplary examples. However, these descriptions are not to be construed as limiting the present invention. Those skilled in the art will appreciate that, without departing from the spirit and scope of the present invention, various equivalent substitutions, modifications, or improvements may be made to the technical solutions and implementations of the present invention, all of which fall within the scope of the present invention.
Claims
1. A neural network output post-processing method with a multi-model mechanism, characterized in that: The method comprises the following steps: setting a multi-model layer after the neural network output layer, setting multiple models in the multi-model layer, solving the results of the neural network output layer with different weights and then merging the multiple models to obtain the final regression result. S1. Set up a neural network with multiple model layers; S2, training the neural network of multiple model layers; S3, obtaining the kinematic information of the aircraft and the interceptor missile, and converting the kinematic information of the aircraft and the interceptor missile into the neural network input information of the multi-model mechanism; S4. Using the input information as input to the neural network of the multi-model mechanism, and outputting a predicted value of the interceptor missile guidance law through the neural network of the multi-model mechanism; S5. The aircraft evades the interceptor missile based on the obtained prediction value of the interceptor missile guidance law; In step S1, the setting of the neural network of the multi-model layer includes setting the neural network and setting the multi-model layer. The neural network is any known neural network; The setting of the multi-model layer includes setting the number of models in the multi-model layer and the state matrix R, which is used to record the state values R of different models. j , expressed as R=[R1,R2,…,R j …,R p ]; The status values of multiple models are: Among them, j represents different models, D represents the maximum value of the output range required by the neural network, and B represents the minimum value of the output range required by the neural network; In step S1, set the weight coefficient G for each model j , G j The specific value of is obtained during the neural network training process, constraining the weight coefficients G of multiple models j The sum of the weight coefficients is 1; In step S2, the output N of the multi-layer model layer is: Among them, G represents the weight matrix of different models, and R represents the state matrix of the model state value; The weight matrices of different models are obtained as follows: G=[G1,G2,…,G p ] T =s(w out h+b out ) Among them, h represents the output of the neural network output layer, w out represents the transfer matrix from the output layer to the multi-model layer, b out Represents the bias of the output layer, and S() represents the activation function from the output layer to the multi-model layer.
2. The neural network output post-processing method of the multi-model mechanism according to claim 1, characterized in that: The number p of models is 2 to 10.
3. The neural network output post-processing method of the multi-model mechanism according to claim 1, characterized in that: In step S2, the neural network of the multi-model layer is trained using training samples. During the training process, the activation function from the output layer of the neural network to the multi-model layer is a softmax function.
4. A neural network system with a multi-model mechanism, configured using the method according to any one of claims 1 to 3, comprising a neural network module and a multi-model layer module, characterized in that: The neural network module includes an input layer, a hidden layer and an output layer; The multi-model layer module includes multiple models, and the multiple models are respectively connected to the output layer of the neural network. Each model takes the output result of the neural network as input. The output results of multiple models are combined to obtain a regression result, which is the output of the neural network system of the multi-model mechanism.
Citation Information
Patent Citations
Speech recognition model establishing method based on bottleneck characteristics and multi-scale and multi-headed attention mechanism
CN110211574A
Method and apparatus for classifying video
US20210019531A1