A multi-scale neural network method for fitting multi-scale datasets
By introducing scale effect coefficients and multi-scale cost functions into the neural network, the problem of inconsistent learning effects when fitting multi-scale data sets in the existing technology is solved, achieving accurate fitting of multi-scale data and improving the learning effect.
Patent Information
- Application Number
- CN202011030196.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-25
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2040-09-25
AI Technical Summary
Existing neural networks ignore the scale effect of data when fitting multi-scale data sets, resulting in inconsistent learning effects on data of different scales and the inability to accurately learn and predict multi-scale data.
By determining the scale effect coefficient c of the data sample and constructing a multi-scale cost function suitable for multi-scale data, we ensure that the neural network can accurately learn the multi-scale characteristics of the data, including determining the neural network structure and weight update gradient, and iteratively training until it reaches the predetermined level. Set conditions.
It achieves accurate fitting of multi-scale data sets, improves data fitting accuracy and learning effect, and overcomes the shortcomings of traditional neural networks in multi-scale data learning.
Smart Images

Figure CN114254728B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of neural networks, and in particular to a multi-scale neural network method for fitting multi-scale data sets. Background Art
[0002] Neural networks are an important method for processing nonlinear data relationships. The main uses of neural networks include data fitting, data classification, and data cluster analysis. In the process of fitting multi-scale data sets, there is a large deviation in the fitting results of neural network models for specific data. Multi-scale data sets refer to data sets composed of multiple data magnitudes with large magnitude differences between data. When fitting data, existing neural network models often ignore the scale effect of the data itself and use the same data processing and modeling methods for data of different scales. Ultimately, the existing neural network models have different learning effects on data of different scales in multi-scale data sets. This difference effect is manifested in the good learning effect on data of larger magnitude and the poor learning effect on data of smaller magnitude. Therefore, it is necessary to consider the multi-scale characteristics of the data itself and determine to establish different neural networks.
[0003] After searching the existing technical literature, it was found that the multi-scale characteristics of the data were not considered when neural networks were used to fit multi-scale data in various fields. Xiang Hua et al. used a neural network method to fit machine tool error data in the article "Neural Network-based Machine Tool Error Data Fitting and Prediction Method" published in "Combined Machine Tools and Automated Processing Technology" in 2019; Li Kegang et al. used a neural network to describe the multi-scale stress-strain relationship of sandstone in the article "Neural Network Simulation of Mechanical Properties and Constitutive Model of Sandstone under Dry-Wet Cycles" published in "Rock and Soil Mechanics" in 2013; Ghaboussi et al. used a neural network to fit the stress-strain behavior of saturated sand under drainage and undrained conditions, as well as multi-scale confining pressure conditions in the article "New nested adaptive neural networks (NANN) for constitutive modeling" published in "Computers and Geotechnics" in 1998. However, the above methods do not consider the scale effect of the data itself, so the results have large deviations. At present, there is no neural network method that considers the scale effect of multi-scale data sets. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a multi-scale neural network method for fitting multi-scale data sets. The defect that traditional neural networks cannot accurately learn and predict multi-scale data can be overcome, and the multi-scale effect of data is calibrated by using scale effect coefficients, and a cost function suitable for multi-scale data is constructed, thereby ensuring that the neural network can accurately learn the multi-scale characteristics of the data. The method is simple and easy to promote.
[0005] In order to solve the above technical problems, the present invention provides a multi-scale neural network method for fitting a multi-scale data set, comprising the following steps:
[0006] The first step is to determine the scale effect coefficient c of the data sample label data for the training set in the data set;
[0007] Preferably, the data set refers to: a collection of data samples that the neural network needs to fit;
[0008] Preferably, the training set refers to: selecting a certain proportion of data samples in the data set for training the neural network;
[0009] Preferably, data samples other than the training set in the data set are used as a test set for testing the neural network;
[0010] Preferably, the data sample refers to: the minimum data composition required to complete one training iteration of the neural network, including input data and label data;
[0011] Preferably, the scale effect coefficient c refers to: a coefficient that measures the degree of scale effect of the multi-scale data set. The larger the coefficient, the more obvious the scale effect is, satisfying formula (1):
[0012] c=log(|y| max )-log(|y| min ) (1)
[0013] Among them, y is the label data set of all data samples in the training set.
[0014] More preferably, the input data refers to: data input into the neural network;
[0015] More preferably, the label data refers to: target output data of the neural network.
[0016] The second step is to determine the neural network structure and multi-scale cost function J;
[0017] Preferably, the neural network structure refers to: an input layer, a fully connected hidden layer and an output layer;
[0018] Preferably, the multi-scale cost function J refers to: a function that measures the gap between the output data of the neural network output layer and the label data of the data sample, and the multi-scale cost function J satisfies formula (2):
[0019]
[0020] Where m is the number of data samples, y o iis the output data of the neural network for the i-th data sample, y i is the label data of the i-th data sample, is the L2 regularization coefficient, and w j is the jth weight in the model, N w is the number of weights of the neural network, c is the scale effect coefficient, δ is the Kronecker operator, when log|y i |=log|y| min When they are equal, the value is 1, and when they are not equal, the value is 0;
[0021] More preferably, the hidden layer is composed of hidden layer nodes, and the hidden layer nodes use activation functions to perform nonlinear processing on data. The number of nodes N h Satisfies formula (3):
[0022] N h =a×N c +b×N v (3)
[0023] Among them, N c N is the number of constant variables in the input data of the data sample that does not change over time. v is the number of variable variables that change over time in the input data of the data sample, a is the constant variable coefficient, which is generally 2, and b is the variable variable coefficient, which is generally 5;
[0024] More preferably, the activation function refers to: a nonlinear mapping function in a hidden layer node, generally a sigmoid function and a hyperbolic tangent function;
[0025] More preferably, the input layer refers to: a data layer where data samples are input into the neural network, the number of nodes in the input layer is equal to the number of variables of the input data, and the input data of the input layer is directly input into the fully connected hidden layer as the output data of the layer;
[0026] More preferably, the fully connected hidden layer refers to a data layer composed of fully connected node units, and the number of hidden layer nodes is N h , its input data is the output data of the input layer, and its output data is input to the output layer;
[0027] More preferably, the output layer refers to: a data layer composed of output unit nodes, the number of output layer nodes is 1, its input is the output data of the fully connected hidden layer, and the output data is the output data of the neural network.
[0028] The third step is to input the input data of the training set into the neural network and determine the multi-scale cost function value through the forward calculation process;
[0029] Preferably, the forward calculation process refers to a calculation process in which data flows from the input layer to the hidden layer and finally flows out from the output layer, and the data flows forward, satisfying formula (4):
[0030]
[0031] Among them, x i is the input data of the i-th sample input into the neural network, is the input data of the hidden layer nodes, h i It is the output data of the hidden layer node after nonlinear mapping using the activation function f. is the input data of the output layer, is the output data of the output layer, W h and W o are the weight parameters of the hidden layer and the output layer, respectively, h and b o are the bias parameters of the hidden layer and the output layer respectively.
[0032] Step 4: Determine the error components of the output layer and hidden layer of the neural network based on the multi-scale cost function value;
[0033] Preferably, the error components of the output layer and the hidden layer refer to the error components of the multi-scale cost function J distributed in the output layer and the hidden layer, satisfying formula (5):
[0034]
[0035] Among them, ⊙ represents the product operation of the elements in the same position of the matrix of the same dimension, (W o ) T is the transpose of the output layer weight parameters, is the error component of the i-th sample in the output layer, δh i is the error component of the i-th sample in the hidden layer;
[0036] Step 5: Determine the weight update gradient of the neural network according to the error component and update the weight parameters;
[0037] Preferably, the weight update gradient refers to: a gradient value used to update the weight parameters of the neural network, satisfying formula (6):
[0038]
[0039] Preferably, the updated weight parameter satisfies formula (7):
[0040]
[0041] Where W is W h and W o, b is b h and b o .
[0042] Step 6: Return to step 3 and iteratively train the neural network until the cost function J of the neural network is less than the preset value χ or reaches the predetermined number of iterative training times Iter;
[0043] Compared with the prior art, the present invention has the following beneficial effects:
[0044] The present invention uses scale effect coefficients to calibrate the multi-scale effects of data and constructs a cost function suitable for multi-scale data, thereby ensuring that the neural network can accurately learn the multi-scale features of the data. The method is simple, practical, easy to promote, and has great application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A neural network flow chart applicable to a multi-scale data set according to an embodiment of the present invention;
[0046] Figure 2 This is a multi-scale neural network effect diagram of an embodiment of the present invention. DETAILED DESCRIPTION
[0047] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings.
[0048] A data set contains 13 data samples, and the sample data ranges from 0.01 to 1.
[0049] like Figure 1 - Figure 2 As shown, this embodiment provides a multi-scale neural network method for fitting a multi-scale data set, and the method is implemented by the following steps:
[0050] Step 1: For the training set in the data set, determine the scale effect coefficient c of the data sample label data;
[0051] In this embodiment, the data set consists of 13 data samples, the input data X of the data samples are 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 0.08, 0.15, 0.25, and the label data y=X 2 , i.e. 0.01, 0.04, 0.09, 0.16, 0.25, 0.36, 0.49, 0.64, 0.81, 1, 0.0064, 0.0225, 0.0625;
[0052] In this embodiment, the training set is the first ten data samples of the data set, that is, the input data of the training set is 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, and the label data of the training set is 0.01, 0.04, 0.09, 0.16, 0.25, 0.36, 0.49, 0.64, 0.81, 1;
[0053] In this embodiment, the test set is the other three samples of the data set, that is, the input data of the test set is 0.08, 0.15, and 0.25, and the label data of the test set is 0.0064, 0.0225, and 0.0625;
[0054] In this embodiment, the scale effect coefficient c satisfies formula (1):
[0055] c=log(1)-log(0.01)=2 (1)
[0056] Step 2: Determine the neural network structure and multi-scale cost function J;
[0057] In this embodiment, the neural network includes an input layer, a fully connected hidden layer and an output layer;
[0058] In this embodiment, the multi-scale cost function J satisfies formula (2):
[0059]
[0060] In this embodiment, the number of nodes in the hidden layer is N h is equal to 5, satisfying formula (3):
[0061] N h =a×N c +b×N v =5×1=5 (3)
[0062] In this embodiment, the activation function is a sigmoid function;
[0063] Step 3: Input the input data of the training set into the neural network, and determine the multi-scale cost function value through the forward calculation process;
[0064] In this embodiment, the forward calculation process refers to the calculation process in which data flows from the input layer to the hidden layer and finally flows out from the output layer, and the data flows forward, satisfying formula (4):
[0065]
[0066] Step 4: Determine the error components of the output layer and hidden layer of the neural network according to the multi-scale cost function value;
[0067] In this embodiment, the error components of the output layer and the hidden layer refer to the error components of the multi-scale cost function J distributed in the output layer and the hidden layer, satisfying formula (5):
[0068]
[0069] Step 5: Determine the weight update gradient of the neural network according to the error component and update the weight parameters;
[0070] In this embodiment, the weight update gradient refers to: the gradient value used to update the neural network weight parameter, which satisfies formula (6):
[0071]
[0072] In this embodiment, the updated weight parameter satisfies formula (7):
[0073]
[0074] Step 6: Return to step 3 and iteratively train the neural network until the cost function J of the neural network is less than a preset value χ or reaches a predetermined number of iterative training times Iter;
[0075] like Figure 2 As shown, compared with traditional neural networks, multi-scale neural networks have better fitting accuracy and lower error for data of different scales when learning multi-scale data sets.
[0076] The multi-scale neural network determination method suitable for multi-scale data set fitting in the present invention can quickly and accurately fit a data set with multi-scale characteristics, which is of great significance for improving data fitting accuracy. The method is simple, practical, easy to promote, and has great application value.
[0077] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art may make various modifications or variations within the scope of the claims, which do not affect the essence of the present invention.
Claims
1. A multi-scale neural network method for fitting multi-scale data sets, characterized in that: The following steps are involved: S1: Determine the scale effect coefficient c of the data sample label data for the training set in the data set; S2: Determine a neural network structure and a multi-scale cost function J; the neural network structure includes an input layer, a fully connected hidden layer and an output layer, and the multi-scale cost function J satisfies the formula: Where m is the number of data samples, y o i is the output data of the neural network for the i-th data sample, y i is the label data of the i-th data sample, λ is the L2 regularization coefficient, w j is the jth weight in the model, N w is the number of weights of the neural network, c is the scale effect coefficient, δ is the Kronecker operator, when log|y i |=log|y| min When they are equal, the value is 1, and when they are not equal, the value is 0; S3: Input the input data of the training set into the neural network, and determine the value of the multi-scale cost function through a forward calculation process, wherein the forward calculation process is a calculation process in which data flows from the input layer to the hidden layer and finally flows out from the output layer, and the data flows forward; S4: determining error components of the output layer and the hidden layer of the neural network according to the multi-scale cost function value; S5: Determine the weight update gradient of the neural network according to the error component and update the weight parameters; S5 returns to S3 and iteratively trains the neural network until the cost function J of the neural network is less than a preset value χ or reaches a predetermined number of iterative training times Iter.
2. The multi-scale neural network method for fitting a multi-scale data set according to claim 1, characterized in that: The calculation formula of the scale effect coefficient c is: c=log(|y| max )-log(|y| min ) Among them, y is the label data set of all data samples in the training set.
3. The multi-scale neural network method for fitting a multi-scale data set according to claim 1, characterized in that: The fully connected hidden layer is composed of hidden layer nodes, and the hidden layer nodes use activation functions to perform nonlinear processing on the data. The number of nodes N h Satisfy the formula N h =a×N c +b×N v Among them, N c N is the number of constant variables in the input data of the data sample that does not change over time. v is the number of variable variables that change over time in the input data of the data sample, a is the constant variable coefficient, and b is the variable variable coefficient.
4. The multi-scale neural network method for fitting a multi-scale data set according to claim 1, characterized in that: The forward calculation process satisfies the formula: z i h =W h ×x i +b h h i =f(z i h ) z i o =W o ×h i +b o y i o =f(z i o ) Among them, x i is the input data of the i-th sample input into the neural network, is the input data of the hidden layer nodes, h i It is the output data after the hidden layer node uses the activation function f for nonlinear mapping. is the input data of the output layer, is the output data of the output layer, W h and W o are the weight parameters of the hidden layer and the output layer, respectively, h and b o are the bias parameters of the hidden layer and the output layer respectively.
5. The multi-scale neural network method for fitting a multi-scale data set according to claim 1, characterized in that: The error component satisfies the formula: δh i =(W o ) T ×δy i o ⊙f′(h i ) Among them, ⊙ represents the product operation of the elements in the same position of the matrix of the same dimension, (W o ) T is the transpose of the output layer weight parameters, is the error component of the i-th sample in the output layer, δh i is the error component of the i-th sample in the hidden layer.
6. The multi-scale neural network method for fitting a multi-scale data set according to claim 1, characterized in that: The gradient value of the weight update gradient satisfies the formula: The updated weight parameters satisfy the formula Where W is W h and W o , b is b h and b o .
