Deep learning training and optimization method and system based on new wavelet excitation function
By using the tight-frame Gaussian wavelet function as the excitation function in the deep neural network, the problems of gradient instability and low training efficiency are solved, and fast convergence and high-precision training effects are achieved.
Patent Information
- Application Number
- CN202010450014.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-25
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-05-25
AI Technical Summary
There are problems in deep neural networks such as gradient instability, which leads to gradient explosion or disappearance, over-fitting, slow training speed, and easy divergence of data propagation, resulting in low training accuracy and low efficiency.
The tight-frame Gaussian wavelet function is used as the excitation function of the deep neural network, and its specific formulas in the forward propagation and back propagation processes ensure that the data energy propagation is constant and avoid divergence, and the hyperparameters are optimized through the Bayesian optimization method to improve Model performance.
It achieves rapid convergence and high training accuracy of deep neural networks, avoids gradient explosion and over-fitting problems, and improves data processing effects.
Smart Images

Figure CN111680783B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of deep neural networks, and in particular to a deep learning training and optimization method and system based on a novel wavelet excitation function. Background Art
[0002] At present, deep neural networks have been widely used in various industries and daily life, improving the level of intelligence in life and production. For example, they are used in the fields of information, medicine, transportation, agriculture, etc. However, deep neural networks have the following problems: the instability of gradients can easily lead to gradient explosion or disappearance, overfitting; the training speed is slow, data is easy to diverge during the propagation process, and the training accuracy is low. This leads to low training accuracy and low training efficiency of deep neural networks. Summary of the invention
[0003] The purpose of the present invention is to solve at least one of the technical problems existing in the prior art and to provide a deep learning training and optimization method and system based on a novel wavelet excitation function.
[0004] The technical solution adopted by the present invention to solve the problem is:
[0005] A first aspect of the present invention provides a deep learning training and optimization method based on a novel wavelet excitation function, comprising the following steps:
[0006] Input the training data into the deep neural network for training;
[0007] Input the data to be processed into the trained deep neural network for processing, and output the processing result;
[0008] The deep neural network includes an input layer, a hidden layer and an output layer, and the excitation function of the deep neural network adopts a tight frame Gaussian wavelet function.
[0009] According to the first aspect of the present invention, the tight frame Gaussian wavelet function is specifically a Mexican hat Gaussian wavelet with a tight frame.
[0010] According to the first aspect of the present invention, in the forward propagation process, the formula of the tight frame Gaussian wavelet function is specifically:
[0011]
[0012] According to the first aspect of the present invention, in the back propagation process, the formula of the tight frame Gaussian wavelet function is specifically:
[0013]
[0014] The second aspect of the present invention is a deep learning training and optimization system based on a novel wavelet excitation function, comprising:
[0015] A training module, used to input training data into a deep neural network for training;
[0016] A processing module, used to input the data to be processed into the trained deep neural network for processing and output the processing results;
[0017] The deep neural network includes an input layer, a hidden layer and an output layer, and the excitation function of the deep neural network adopts a tight frame Gaussian wavelet function.
[0018] According to the second aspect of the present invention, the tight frame Gaussian wavelet function is specifically a Mexican hat Gaussian wavelet with a tight frame.
[0019] According to the second aspect of the present invention, in the forward propagation process, the formula of the tight frame Gaussian wavelet function is specifically:
[0020]
[0021] According to the second aspect of the present invention, in the back propagation process, the formula of the tight frame Gaussian wavelet function is specifically:
[0022]
[0023] The above scheme has at least the following beneficial effects: using tight frame Gaussian wavelet as the excitation function of the deep neural network can make the propagation of data energy constant, and will not make the data diverge during the propagation process, ensuring the convergence of the training process; making the deep neural network have strong nonlinear fitting characteristics and can converge quickly, and at the same time, it also overcomes the gradient instability in the deep neural network, which easily leads to gradient explosion or disappearance and overfitting in the training process. As a result, the deep neural network can complete fast training of a large amount of data with high training accuracy, improving the data processing effect.
[0024] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The present invention will be further described below in conjunction with the accompanying drawings and examples.
[0026] Figure 1 is a flow chart of a deep learning training and optimization method based on a novel wavelet excitation function according to an embodiment of the present invention;
[0027] Figure 2 It is the basic structure diagram of a deep neural network;
[0028] Figure 3 It is the waveform diagram of the tight frame Gaussian wavelet function of the forward propagation process;
[0029] Figure 4 It is the waveform diagram of the tight frame Gaussian wavelet function of the back propagation process;
[0030] Figure 5 It is a comparison chart of the training loss curves of a deep neural network using a tight frame Gaussian wavelet function and a deep neural network using other functions as the excitation function for a deep neural network with three hidden layers;
[0031] Figure 6 It is a comparison chart of the training loss curves of a deep neural network using a tight frame Gaussian wavelet function and a deep neural network using other functions as the excitation function for a deep neural network with ten hidden layers;
[0032] Figure 7 This is a comparison chart of the Jacobian matrix of a deep neural network using a tight frame Gaussian wavelet function and a deep neural network using other functions as the excitation function for a deep neural network with three hidden layers;
[0033] Figure 8 This is a comparison chart of the Jacobian matrix of a deep neural network using a tight frame Gaussian wavelet function and a deep neural network using other functions as the excitation function for a deep neural network with ten hidden layers. DETAILED DESCRIPTION
[0034] This section will describe in detail the specific embodiments of the present invention. The preferred embodiments of the present invention are shown in the accompanying drawings. The purpose of the accompanying drawings is to supplement the description of the text part of the specification with graphics, so that people can intuitively and vividly understand each technical feature and the overall technical solution of the present invention, but it cannot be understood as a limitation on the scope of protection of the present invention.
[0035] Reference Figure 1 Some embodiments of the present invention provide a deep learning training and optimization method based on a novel wavelet excitation function, comprising the following steps:
[0036] Step S100, inputting the training data into the deep neural network for training;
[0037] Step S200: input the data to be processed into the trained deep neural network for processing, and output the processing result;
[0038] Among them, refer to Figure 2 The deep neural network includes an input layer 10, a hidden layer 20 and an output layer 30, and the excitation function of the deep neural network adopts a tight frame Gaussian wavelet function.
[0039] Specifically, the tight frame Gaussian wavelet function is specifically a Mexican hat Gaussian wavelet with a tight frame.
[0040] Furthermore, in the forward propagation process, the formula of the tight frame Gaussian wavelet function is specifically: Its waveform reference Figure 3 .
[0041] Furthermore, in the back-propagation process, the formula of the tight frame Gaussian wavelet function is as follows:
[0042]
[0043] Its waveform reference Figure 4 .
[0044] In step S100, when inputting training data to the deep neural network for training, an optimization algorithm is usually used to optimize the weight value w and the hyperparameter θ to best map the input to the output. However, due to deceptive local minima, it is difficult to obtain a good weight value w or hyperparameter θ during the training process, which may also lead to a longer training time and may also cause training failure.
[0045] For deep neural networks, the gradient tends to decrease from the input layer 10 to the hidden layer 20. Due to the instability of the gradient, it is easy to cause the problem of gradient disappearance or gradient explosion.
[0046] In step S100, the training process of the deep neural network includes a forward propagation process and a back propagation process. The purpose of the forward propagation process is to calculate the error value between the output of the deep neural network model and the actual true value based on a predefined loss function. In the back propagation process, the weight value w and the bias are mainly updated. The error value obtained from the loss function is propagated back to the input layer 10 from the output layer 30, and then the error of each hidden layer 20 is calculated in turn, and the gradient of the trainable parameters is calculated according to the respective error values, and finally different gradient-based optimizers are used to update the weight value w and the bias.
[0047] For deep neural networks, the input data can be nonlinearly mapped to the hyperplane so that more features hidden in the input data can be detected. This nonlinear fitting ability mainly comes from the activation function of the deep neural network.
[0048] For deep neural networks, a tight frame Gaussian wavelet function is used as the excitation function. Its output is Gaussian at every point at any position. It can establish the relationship between the performance of the deep neural network model and the hyperparameters, and solve the posterior from the prior to the updated optimization equation through the Bayesian optimization method, so as to find the optimized hyperparameters and improve the various performance indicators of the deep neural network model. In addition, due to the sparsity of the tight frame Gaussian wavelet function, some weight values can be set to zero during the training process, which can reduce the complexity of the calculation and the connection between layers, thereby simplifying the structure of the deep neural network and improving the training speed. The energy of the tight frame Gaussian wavelet function is constant and depends on the frame boundary. The energy of the tight frame Gaussian wavelet function can be specifically expressed as: Among them, A and B are the upper and lower boundaries of the tight frame Gaussian wavelet function, respectively. 0 is the parameter obtained by discretizing the magnified parameter a, b 0 is the parameter obtained by discretizing the moving parameter b. When the tight frame Gaussian wavelet function is used as the excitation function of the deep neural network, the propagation of data energy is constant and will not cause the data propagation process to diverge, thus ensuring the convergence of the deep neural network during training.
[0049] The input-output relationship of a deep neural network can be expressed as: y = Ax + e, where A is the weight set and e is the error. i =w ij x i-1 +b i and a=f(x i-1 ), the gradual update of the weight values of the weight set can minimize the error. That is, as the weights change in the direction of gradient descent, as a way to update and adjust the weights, the adjustment of the weights varies according to the difference between the input and the actual output of each layer. This can speed up the convergence process, where larger adjustments are made when the difference is large and smaller adjustments are made when the difference is small. This can also avoid divergence, which occurs when adjustments are too large or too small.
[0050] The tight frame Gaussian wavelet function is used as the excitation function, which has a good Gaussian process. The Gaussian process uses the Bayesian method for the observed data and provides the function of the complete posterior probability distribution. In Bayesian reasoning, the probability distribution describes the possibility of the value of a finite-dimensional variable. The Gaussian process is an extension of the Gaussian distribution of the function, which is the distribution of the function space, and its output is Gaussian at every point at any position. Like the Gaussian process, the Gaussian distribution depends entirely on its mean and variance. The mean m(x) and variance k(x) are both functions and can vary in the input space. In addition, the Gaussian process can also establish the relationship between the performance of the deep neural network model and the hyperparameters (such as the learning rate of the deep neural network, the number of hidden layers, etc.), and solve the posterior from the prior to the update optimization equation through the Bayesian optimization method, so as to find the optimized hyperparameters and improve the various performance indicators of the deep neural network model.
[0051] For the function value f at input position x, if the prior distribution of the unknown variable f is p(f), then the likelihood of the function variable f established by the relationship between input x and observed output y is p(y|f,x). According to Bayes' rule, given the observation results, the posterior probability can be updated as: p(y|x) is used to ensure the normalization of the posterior probability. Then the probability distribution of the function value on a specific input f(x) can be obtained. All function values of the Gaussian process are Gaussian, so we have where x 1 ,…,x N is the input value, then the formula can be expressed as According to the prior distribution of Gaussian process on the function value The posterior distribution is
[0052]
[0053] It can be concluded that by deriving the posterior distribution according to the Bayesian rule and Gaussian process based on the prior distribution, there will be no problem of data overfitting for unknown variables, and the regression of the Bayesian feature space can be realized, and the feature space is also Gaussian.
[0054] The distribution of the Gaussian process for training data and test data is multidimensional Gaussian, and the predicted distribution can be estimated based on the processing of the training data. 1 ,θ 2 ,…,θ N′ ], whose posterior distribution is The optimal value can be obtained by the Bayesian optimization method through the posterior distribution from the prior distribution to the updated optimization equation. Using a Gaussian prior distribution can make the change of the deep neural network model smoother by setting a relatively small weight as the more likely prior distribution, thus overcoming the overfitting problem and enabling the deep neural network model to converge rapidly in the direction of the smallest deviation.
[0055] Using the tight-frame Gaussian wavelet function as the activation function, the properties of the wavelet transform of the tight-frame Gaussian wavelet function can speed up the training of the deep neural network and have the effect of noise reduction, thus enabling a more accurate input-output model to be established. Wavelets are unconditional bases in various function spaces, which means that the energy of the signal is compressed into a small number of coefficients obtained by wavelet transform, having sparsity. These coefficients in the wavelet domain can represent the original data, which helps to reduce the computational complexity and the required hardware resources.
[0056] The wavelet transform is defined as the inner product of the signal x(t) and the two-parameter family ψ a,b (t): where ψ a,b (t) is the magnification and translation of the wavelet basis function ψ(t), is the complex conjugate of ψ.
[0057] ψ a,b (t) is specifically where b ∈ R, a ∈ R + and a ≠ 0. ψ(t) satisfies is the frequency description of the Fourier transform of ψ(t), and there is
[0058] For a deep neural network, the logits data of the l-th hidden layer can be expressed by the inverse wavelet transform as Since the training process of a deep neural network is to find the optimal weight values, the sparsity of the wavelet transform sets some of the weight values to zero in the training process of the deep neural network, which can reduce the computational complexity and also reduce the connections between layers, thus simplifying the structure of the deep neural network and improving the training speed.
[0059] For the tight-frame Gaussian wavelet function, the frame is defined on the discrete wavelet family. The discrete wavelet family is expressed as: ψ m,n (t) = a 0 -m / 2 ψ(a 0 -m t - nb 0 ). When there exist 0 < A, B < ∞, if there is A||x|| 2 ≤ ∑ m,n |〈x, ψ m,n >| 2 ≤ B||x||2 , then a frame is formed, and A and B are the upper and lower boundaries of the frame respectively. When A=B, there is a tight frame. The energy of the discrete wavelet family is expressed as:
[0060]
[0061] When m=1, For ω≠0, if ψ m,n To form a frame with A and B as boundaries, we have When m = 1, we have For 1≤|ω|≤a 0 , we can get Therefore, there is Then when A=B, the energy of the tight frame Gaussian wavelet function is expressed as: It can be concluded that the tight frame Gaussian wavelet function is constant and depends on the frame boundary. When the tight frame Gaussian wavelet function is used as the excitation function and differential function of the deep neural network, the propagation of the signal energy is constant and will not cause the signal propagation process to diverge, thus ensuring convergence.
[0062] For the Mexican Hat Gaussian wavelet with a tight frame, its normalized form can be expressed as and where the universal number ‖ψ‖=1, and Then the wavelet frame is ψ m,n (t) = a 0 -m / 2 ψ(a 0 -m t-nb 0 ).
[0063] when b 0 =0.25, m=1, n=1, then A=B, then in the forward propagation process, the formula of the tight frame Gaussian wavelet function is:
[0064] In the back propagation process, the formula of the tight frame Gaussian wavelet function is specifically:
[0065]
[0066] Both are Gaussian, where f mexh The mean and variance of (x) are 0 and 0.05 respectively, g mexh The mean and variance of (x) are 0 and 0.088 respectively.
[0067] The deep neural network using the tight frame Gaussian wavelet function is compared with the deep neural network using other functions as the excitation function, such as the Morlet function, sigmoid function, ReLU function, LeReLU function and ELU function. Multiple sequential data samples are used as input. Figure 5 It can be seen that for a deep neural network with three hidden layers and 20, the deep neural network using the tight frame Gaussian wavelet function has the best and most stable performance compared to other deep neural networks. During the training process, the loss can quickly approach zero and remain at zero with little fluctuation. Figure 6 ,Similarly, it can be seen that for the deep neural network with ten hidden layers 20, the deep neural network using the tight frame Gaussian wavelet function has the best and most stable performance compared to the other deep neural networks.
[0068] The Jacobian matrix is used to quantify the changes in the distribution of each layer of the deep neural network model, thereby describing the stability of the training process. Figure 7 , it can be seen that for a deep neural network with three hidden layers 20, the deep neural network using the tight frame Gaussian wavelet function has higher stability than the deep neural network using other functions as the excitation function. Figure 8 ,Similarly, it can be seen that for the deep neural network with ten hidden layers 20, the deep neural network using the ,tight frame Gaussian wavelet function has higher stability than the deep ,neural network using other functions as the excitation function.
[0069] Comprehensive comparison shows that the deep neural network using tight frame Gaussian wavelet function has the best and stable performance regardless of the deep neural network with three hidden layers and 20 layers or the deep neural network with ten hidden layers and 20 layers; the Morlet function is used as the excitation function only in the deep neural network with three hidden layers and 20 layers to make the deep neural network converge; the ReLU function and LeReLU function are used as the excitation function only in the deep neural network with ten hidden layers and 20 layers to make the deep neural network converge; the ELU function and the sigmoid function perform poorly for the above two deep neural networks.
[0070] In summary, using tight frame Gaussian wavelet as the excitation function of deep neural network can make the propagation of data energy constant, prevent data from diverging during propagation, and ensure the convergence of training process; make deep neural network have strong nonlinear fitting characteristics and can converge quickly, and also overcome the problem of gradient instability in deep neural network that easily leads to gradient explosion or disappearance and overfitting in training process. Therefore, deep neural network can complete fast training of large amount of data with high training accuracy, and improve data processing effect.
[0071] This data processing method can be applied to big data scenarios, such as face recognition and drone navigation, which improves the speed and accuracy of data training, and also significantly improves the speed and accuracy of subsequent data processing.
[0072] Certain embodiments of the present invention provide a deep learning training and optimization system based on a novel wavelet excitation function, including:
[0073] A training module, used to input training data into a deep neural network for training;
[0074] The processing module is used to input the data to be processed into the trained deep neural network for processing and output the processing results;
[0075] The deep neural network includes an input layer 10, a hidden layer 20 and an output layer 30, and the excitation function of the deep neural network adopts a tight frame Gaussian wavelet function.
[0076] Specifically, the tight frame Gaussian wavelet function is specifically a Mexican hat Gaussian wavelet with a tight frame.
[0077] Furthermore, in the forward propagation process, the formula of the tight frame Gaussian wavelet function is specifically:
[0078]
[0079] Furthermore, in the back-propagation process, the formula of the tight frame Gaussian wavelet function is as follows:
[0080]
[0081] Some embodiments of the present invention provide an electronic device, the electronic device comprising:
[0082] a memory storing at least one instruction; and
[0083] The processor executes the instructions stored in the memory to implement the data processing method as described in the method embodiment.
[0084] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card, a secure digital card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0085] The memory may be an external memory and / or an internal memory of an electronic device. Furthermore, the memory may be a circuit with a storage function in an integrated circuit without a physical form, such as a RAM, a FIFO, etc. Alternatively, the memory may also be a physical memory, such as a memory stick, a TF card, etc.
[0086] The processor executes the operating system of the electronic device and various installed applications. The processor executes the application to implement the steps in the method embodiment. Alternatively, the processor implements the functions of each module in the device embodiment when executing the computer program.
[0087] Certain embodiments of the present invention provide a storage medium storing executable instructions. The executable instructions can be executed by an electronic device to enable the electronic device to execute the data processing method described in the method embodiment.
[0088] Examples of storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk-read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
[0089] The above is only a preferred embodiment of the present invention. The present invention is not limited to the above implementation mode. As long as the technical effect of the present invention is achieved by the same means, it should belong to the protection scope of the present invention.
Claims
1. Deep learning training and optimization system based on new wavelet excitation function, It is characterized in that Applied to face recognition or drone navigation, the system includes: A training module, used to input training data into a deep neural network for training; A processing module, used to input the data to be processed into the trained deep neural network for processing and output the processing results; The deep neural network includes an input layer, a hidden layer and an output layer, and the excitation function of the deep neural network adopts a tight frame Gaussian wavelet function; The tight frame Gaussian wavelet function is specifically a Mexican hat Gaussian wavelet with a tight frame; in the forward propagation process, the formula of the tight frame Gaussian wavelet function is specifically: In the back propagation process, the formula of the tight frame Gaussian wavelet function is specifically:
