A method for image data analysis based on two-dimensional-incremental random weight network
By using a two-dimensional incremental random weight network in image data analysis, combined with a supervision mechanism and a global optimization algorithm, the dimensionality disaster and structural compactness problems of fully connected neural networks in image data modeling are solved, and the Compact network structure and efficient image processing effects.
Patent Information
- Application Number
- CN202111013453.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-31
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-08-31
AI Technical Summary
Existing fully connected neural networks are prone to encounter the problems of dimensionality disaster and spatial information loss in image data modeling, and existing network structures that directly process two-dimensional inputs have local minimum traps, slow convergence speeds, or inconsistent structures. Tight problem.
An image data analysis method based on a two-dimensional-incremental random weight network is used to incrementally construct hidden layer nodes, combined with a supervision mechanism and a global optimization algorithm, to build a compact network structure to avoid the disaster of dimensionality and improve generalization performance. .
It effectively avoids the disaster of dimensionality, builds a compact network structure, improves the modeling performance and generalization ability of image data analysis, and achieves efficient image processing effects.
Smart Images

Figure CN114494759B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image classification, and in particular to an image data analysis method based on a two-dimensional-incremental random weight network. Background Art
[0002] With the rising tide of deep learning, neural networks with mature learning algorithms and strong representation capabilities are widely used in data analysis. Fully connected neural networks usually take vector inputs as inputs to the input layer. In image data modeling, this vector operation makes it possible to calculate the dot product between the input weights and the inputs, but it inevitably leads to two problems: 1) When the training samples are limited, the curse of dimensionality will occur; 2) The spatial information of the original multi-dimensional input will be destroyed, resulting in unsatisfactory modeling performance. Therefore, it is necessary to establish a fully connected neural network that can directly process multi-dimensional inputs to obtain high-quality modeling performance.
[0003] At present, there are two types of networks that can directly process two-dimensional inputs: 1) Matrix neural networks, which use a slower training method based on gradient descent to obtain network parameters. This type of method is prone to falling into local minima and has a slow convergence rate; 2) Random learning technology. Two representative random learner models are random weight networks and random configuration networks. The random weight network first randomly selects hidden layer parameters in a fixed interval, and then obtains the output weights of the network by solving a linear equation. This method is completely independent of the training data and randomly selects hidden layer parameters, which has a certain degree of blindness. The random configuration network uses a supervision mechanism to constrain the selection of hidden layer parameters, obtains high-quality hidden layer parameters during the network training process, and has universal approximation characteristics. However, the constraint strength of the supervision mechanism of this method is limited, and it is easy to generate redundant hidden layer nodes, resulting in a loose structure and increased computer storage pressure. Summary of the invention
[0004] Purpose of the invention: In view of the above problems, the present invention proposes an image data analysis method based on a two-dimensional-incremental random weight network, which not only has a compact network structure, but also exhibits good generalization performance and can show great potential in image data analysis.
[0005] Technical solution: To achieve the purpose of the present invention, the technical solution adopted by the present invention is: an image data analysis method based on a two-dimensional incremental random weight network. The structure of the two-dimensional incremental random weight network is composed of three parts: an input layer, a hidden layer and an output layer, wherein an incremental construction algorithm is used to obtain the number of hidden layer nodes. The steps are as follows:
[0006] S1, obtain the image sample set and set the initial parameters of the two-dimensional incremental random weight network model;
[0007] S2, based on the characteristics that the network residual needs to be gradually reduced during the model construction process, a supervision mechanism is established and a candidate hidden layer node pool is generated;
[0008] S3, in the candidate hidden layer node pool, add the hidden layer node corresponding to the fastest decrease in model residual to the current model;
[0009] S4, after the new hidden layer nodes are added, a global optimization algorithm is used to obtain the output weights of the entire network; when the number of nodes in the network reaches the preset number of hidden layer nodes or the network residual meets the expected accuracy, the construction process of the entire network is terminated, and finally a two-dimensional incremental random weight network model is obtained;
[0010] S5, uses the constructed two-dimensional-incremental random weight network model to analyze two-dimensional image data, and finally optimizes the image processing effect.
[0011] Furthermore, the step S1 includes:
[0012] First, given a set of training inputs x i is the i-th input image in the image sample set, N is the number of training samples, d1×d2 is the image matrix; the output is T={t1,t2,...,t N},t i ∈R m , t i is the i-th output in the image sample set, and m is the number of sample outputs;
[0013] Then, the model parameters involved in the two-dimensional incremental random weight network model are defined, including: the expected accuracy of the model ε, the preset maximum network size L max , the value range of the hidden layer parameter Υ: = {λ min :Δλ:λ max}, where [-λ min ,λ min ] is the starting range of hidden layer parameter selection, Δλ is the change in range, [-λ max ,λ max ] is the maximum range of hidden layer parameters; the number of hidden layer nodes that can be configured in each hidden layer parameter range is T max , adjust the factor γ, learn the parameter r, denote Θ1 as the initial size of the model, denote the model residual as e0, and let e0 equal the output T of the training sample.
[0014] Furthermore, the step S2 includes:
[0015] Assume that the current model has k-1 hidden layer nodes. When the next hidden layer node is to be established, it is selected from three variable symmetric intervals. Hidden layer parameters are randomly selected from [-λλ] and where λ is from λ min Start by gradually increasing Δλ until λ max End; w k is the left projection vector, v k is the right projection vector, b k is bias;
[0016] Substitute the randomly selected hidden layer parameters into the activation function Get the output of the kth hidden layer node:
[0017] Configure T in each variable symmetry interval max The hidden layer nodes that meet the following conditions are placed in the candidate hidden layer node pool:
[0018]
[0019] In the formula, e k-1 (x) is the current network residual.
[0020] Furthermore, the step S3 includes:
[0021] Calculate ξ for each node in the candidate hidden layer node pool k Values, forming a variable set
[0022] From this set of variables, find the largest ξ k , and use the hidden layer parameters it contains as the optimal model parameters for the newly added hidden layer nodes and
[0023] If no hidden layer node that meets the conditions is found in the current variable symmetric interval, the range of the hidden layer parameters is adaptively adjusted, and the learning parameter r is adjusted accordingly, that is:
[0024] Increase the value of r, r = r + τ, τ is randomly generated in the interval (0, 1-r), and repeat steps S2 and S3 until the candidate hidden layer node pool is not empty and the optimal parameters are found; the size of the model increases from Θ1, and the hidden layer nodes that meet the supervision mechanism are added to the model one by one;
[0025] Get the hidden layer output matrix H of the current network k :
[0026]
[0027] in,
[0028] Further, the step S4 includes:
[0029] Use the global optimization algorithm to calculate the output weight β of the current network ★ :
[0030]
[0031] The residual of the current network is: e k =TH k β * ;
[0032] If the residual e of the current network k The expected accuracy ε is reached or the current network size exceeds the preset maximum network size L max , the construction of the network model is stopped and the modeling is completed.
[0033] Beneficial effects: Compared with the prior art, the technical solution of the present invention has the following beneficial technical effects:
[0034] The image data analysis method based on the two-dimensional-incremental random weight network of the present invention uses left projection vectors and right projection vectors to replace vector operations, which can effectively avoid the dimensionality curse and efficiently build a model. In addition, the method starts to build a model from a small-sized network, and selects the best model training parameters through a supervision mechanism with stronger constraints, so as to obtain a hidden layer node that contributes the most to modeling. At the same time, a global optimization algorithm is used to obtain the output weights of the model. Finally, a two-dimensional-incremental random weight network with simple structure, easy implementation, compact structure and strong generalization performance is established, and can show good application potential in image analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a flow chart of an image data analysis method based on a two-dimensional-incremental random weight network. DETAILED DESCRIPTION
[0036] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0037] like Figure 1 As shown, the image data analysis method based on the two-dimensional-incremental random weight network of the present invention comprises the following specific steps:
[0038] S1, obtain an image sample set and set the initial parameters of the two-dimensional incremental random weight network model.
[0039] First, given a set of training inputs x iis the i-th input image in the image sample set, N is the number of training samples, d1×d2 is the image matrix; the output is T={t1,t2,...,t N},t i ∈R m , t i is the i-th output in the image sample set, and m is the number of sample outputs;
[0040] Then, the model parameters involved in the two-dimensional incremental random weight network model are defined, including: the expected accuracy of the model ε, the preset maximum network size L max , the value range of the hidden layer parameter Υ: = {λ min :Δλ:λ max}, where [-λ min ,λ min ] is the starting range of hidden layer parameter selection, Δλ is the change in range, [-λ max ,λ max ] is the maximum range of hidden layer parameters; the number of hidden layer nodes that can be configured in each hidden layer parameter range is T max , adjust the factor γ, learn the parameter r, denote Θ1 as the initial size of the model, denote the model residual as e0, and let e0 equal the output T of the training sample.
[0041] S2, according to the characteristics that the network residual needs to be gradually reduced during the model construction process, a supervision mechanism is established and a candidate hidden layer node pool is generated.
[0042] Assume that the current model has k-1 hidden layer nodes. When the next hidden layer node (kth hidden layer node) is to be established, first, according to the number of configurations, select from three variable symmetric intervals: and randomly select T from [-λλ] max Group hidden layer parameters and where λ is from λ min Start by gradually increasing Δλ until λ max End; w k is the left projection vector, v k is the right projection vector, b k is bias;
[0043] Then substitute the randomly selected hidden layer parameters into the activation function Get the output of the kth hidden layer node:
[0044]
[0045] Configure T in each variable symmetry interval maxThe hidden layer nodes that meet the following conditions (supervision mechanism) are placed in the candidate hidden layer node pool:
[0046]
[0047] In the formula, e k-1 (x) is the current network residual.
[0048] It should be pointed out that after adding the kth hidden layer node, the decrease in network residual can be expressed as:
[0049]
[0050] in,
[0051] is the intermediate variable of the output weight of the connection between the kth hidden layer node to be added and the output layer. Therefore, the above supervision mechanism can be used to achieve the optimization of hidden layer parameters.
[0052] S3, in the candidate hidden layer node pool, add the hidden layer node corresponding to the fastest decrease in model residual to the current model.
[0053] In the candidate hidden layer node pool, find the hidden layer parameters that make the current network residual drop the fastest as the optimal parameters for this construction, and send them to the selected activation function to form the kth hidden layer node of the network. If there are no hidden layer nodes in the candidate hidden layer node pool, it means that no hidden layer nodes that meet the conditions are found, then the value range of the hidden layer parameters will be changed, and the constraints on the hidden layer parameters will be reduced, as follows:
[0054] Calculate ξ for each node in the candidate hidden layer node pool k Values, forming a variable set
[0055] From this set of variables, use the max function to find the largest ξ k , and use the hidden layer parameters it contains as the optimal model parameters for the newly added hidden layer nodes and
[0056] If no hidden layer node that meets the conditions is found in the current variable symmetric interval (there is no candidate hidden layer node in the candidate hidden layer node pool, which means that the required hidden layer node cannot be found using the current conditions, then the conditions need to be modified, that is, expand the parameter selection range of the hidden layer parameters and relax the constraint scale of the hidden layer parameters), then the range of the hidden layer parameters is adaptively adjusted, and the learning parameter r is adjusted accordingly, that is:
[0057] Increase the value of r to reduce the constraint of the supervision mechanism on the hidden layer parameters, r = r + τ, τ is randomly generated in the interval (0, 1-r), and repeat steps S2 and S3 until the candidate hidden layer node pool is not empty and the optimal parameters are found; the size of the model increases from Θ1, and the hidden layer nodes that meet the supervision mechanism are added to the model one by one; it should be pointed out that the closer the value of r is to 1, the easier it is to find hidden layer parameters that meet the constraints.
[0058] At this point, the hidden layer output matrix H of the entire network k :
[0059]
[0060] in,
[0061] S4, after the new hidden layer nodes are added, a global optimization algorithm is used to obtain the output weights of the entire network
[0062] The residual of the current network is: e k =TH k β * ;
[0063] If the residual e of the current network k The expected accuracy ε is reached or the current network size exceeds the preset maximum network size L max , then the construction of the network model is stopped, the modeling is completed, and a two-dimensional-incremental random weight network model is obtained.
[0064] S5, uses the constructed two-dimensional-incremental random weight network model to analyze two-dimensional image data, and finally optimizes the image processing effect.
[0065] The ORL face database is used to illustrate the method of the present invention in detail. The details of the ORL face database are as follows:
[0066] The ORL face dataset includes 10 images of 40 different people with a resolution of 112×92, a total of 400 images. These images vary in shooting time, lighting conditions, facial expressions, facial details, etc.
[0067] First, in the ORL face dataset, a part of face images are randomly selected as training sets, and the rest are used as test sets; the initial parameters of the two-dimensional incremental random weight network model are set; according to the characteristics that the network residual needs to be gradually reduced during the model construction process, a supervision mechanism is established and used to generate a candidate hidden layer node pool; in the candidate hidden layer node pool, the hidden layer nodes corresponding to the fastest decrease in model residual are added to the current model; after the new hidden layer nodes are added, the global optimization algorithm is used to obtain the output weights of the entire network. When the number of nodes in the network reaches the pre-set number of hidden layer nodes or the network residual meets the expected accuracy, the entire network construction process is terminated, and finally a two-dimensional incremental random weight network model is obtained; finally, the model performance test is completed on the ORL face database test set.
[0068] With reference to the above embodiment, the steps of the image data analysis method based on a two-dimensional incremental random weight network in the embodiment of the present invention are as follows:
[0069] Step 1: Given the initial parameters of the 2D-incremental random weight network model, for each person's image, randomly select 5 images as training samples, and the remaining 5 images as test data sets, using numbers 1-40 to represent human category labels; other parameter settings of the learning model are as follows:
[0070] The model pre-defined maximum size is L max =50, expected error ε = 0.02, adjustment factor γ = 10, learning parameter r = 0.9, number of times the hidden layer parameters are generated in each variable interval T max =200, the hidden layer parameter variable symmetric interval Υ: ={1:1:250}, the learning model starts to build from the hidden layer node number Θ1=1, where the residual is e0=T, and the Sigmoid function is selected as the activation function of the hidden layer node.
[0071] Step 2: When constructing the kth hidden layer node of the model, in the given hidden layer parameter value interval [-1,1], according to the pre-set number of random parameter generation, 200 sets of hidden layer parameters are generated ( and ), and substitute it into the activation function to form the corresponding hidden layer node output matrix h k Then substitute all 200 output matrices into the inequality constraints
[0072]
[0073] And the hidden layer nodes that meet the conditions are put into the candidate hidden layer node pool for storage.
[0074] Step 3: Use the max function to find the largest ξ in the candidate hidden layer node pool k, the corresponding hidden layer parameters are the optimal parameters required for this construction, and they are substituted into the activation function to form a new hidden layer node, and the output matrix of the kth hidden layer node of the network is obtained. When the candidate hidden layer node pool is empty, it is necessary to change the value interval of the hidden layer parameters and change the value of r to relax the constraints of the supervision mechanism on parameter generation, that is, the variable interval becomes [-1-Δ, 1+Δ], where Δ=1 is the step size, r=r+τ, where τ∈(0,1-r), and then repeat the second and third steps until the optimal parameters are found.
[0075] Step 4: The best output matrix found after steps 2 and 3 Added to the current network, the output matrix of the entire network can be expressed as Then use the global optimization algorithm to get the output weight of the network
[0076] Then the current network residual can be calculated as e k =TH k β * .
[0077] When the number of hidden layer nodes contained in the model is greater than or equal to 50 or the network residual is less than 0.02, the construction of the model will be terminated and the entire modeling process will end.
[0078] The remaining 5 pictures of each person are used as tests, and the running results are as follows:
[0079] The training accuracy is 0.99, and the test accuracy is 0.965. From the above results, it can be seen that the model established by the present invention has a simple structure, a small model scale, and has high learning ability and generalization performance, which shows that the present invention shows good classification and modeling effects in the two-dimensional image modeling process.
Claims
1. An image data analysis method based on a two-dimensional incremental random weight network, characterized in that: The following steps are involved: S1, obtain the image sample set and set the initial parameters of the two-dimensional incremental random weight network model; First, given a set of training inputs x i is the i-th input image in the image sample set, N is the number of training samples, d1×d2 is the image matrix; the output is T={t1,t2,...,t N },t i ∈R m , t i is the i-th output in the image sample set, and m is the number of sample outputs; Then, the model parameters involved in the two-dimensional incremental random weight network model are defined, including: the expected accuracy of the model ε, the preset maximum network size L max , the value range of the hidden layer parameter Υ: = {λ min :△λ:λ max }, where [-λ min ,λ min ] is the starting range of hidden layer parameter selection, △λ is the change in range, [-λ max ,λ max ] is the maximum range of hidden layer parameters; the number of hidden layer nodes that can be configured in each hidden layer parameter range is T max , adjustment factor γ, learning parameter r, Θ1 is recorded as the initial size of the model, the model residual is recorded as e0, and e0 is set equal to the output T of the training sample; S2, based on the characteristics that the network residual needs to be gradually reduced during the model construction process, a supervision mechanism is established and used to generate a candidate hidden layer node pool; Assume that the current model has k-1 hidden layer nodes. When the next hidden layer node is to be established, it is selected from three variable symmetric intervals. Hidden layer parameters are randomly selected from [-λ λ] and where λ is from λ min Start by gradually increasing △λ until λ max End; w k is the left projection vector, v k is the right projection vector, b k is bias; Substitute the randomly selected hidden layer parameters into the activation function Get the output of the kth hidden layer node: Configure T in each variable symmetry interval max The hidden layer nodes that meet the following conditions are placed in the candidate hidden layer node pool: In the formula, e k-1 (x) is the current network residual; S3, in the candidate hidden layer node pool, add the hidden layer node corresponding to the fastest decrease in model residual to the current model. The process is as follows: Calculate ξ for each node in the candidate hidden layer node pool k Values, forming a variable set From this set of variables, find the largest ξ k , and use the hidden layer parameters it contains as the optimal model parameters for the newly added hidden layer nodes and If no hidden layer node that meets the conditions is found in the current variable symmetric interval, the range of the hidden layer parameters is adaptively adjusted, and the learning parameter r is adjusted accordingly, that is: Increase the value of r, r = r + τ, τ is randomly generated in the interval (0, 1-r), and repeat steps S2 and S3 until the candidate hidden layer node pool is not empty and the optimal parameters are found; the size of the model increases from Θ1, and the hidden layer nodes that meet the supervision mechanism are added to the model one by one; Get the hidden layer output matrix H of the current network k : in, S4, after the new hidden layer nodes are added, a global optimization algorithm is used to obtain the output weights of the entire network; when the number of nodes in the network reaches the preset number of hidden layer nodes or the network residual meets the expected accuracy, the construction process of the entire network is terminated, and finally a two-dimensional incremental random weight network model is obtained; Use the global optimization algorithm to calculate the output weight β of the current network * : The residual of the current network is: e k =TH k β * ; If the residual e of the current network k The expected accuracy ε is reached or the current network size exceeds the preset maximum network size L max , then the construction of the network model is stopped and the modeling is completed; S5, uses the constructed two-dimensional-incremental random weight network model to analyze two-dimensional image data, and finally optimizes the image processing effect.
