Balance propagation optimization method and system based on deep convolutional neural network
By constructing a general network structure and adding additional connections, the problem of poor training effect of the balanced propagation algorithm in deep convolutional neural networks is solved, achieving higher accuracy and generalization ability, avoiding gradient disappearance, speeding up training, and supporting Development of balanced propagation algorithms for complex tasks.
Patent Information
- Application Number
- CN202310397400.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-06
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2043-04-06
AI Technical Summary
The classic balanced propagation algorithm has poor training effect in deep convolutional neural networks. It is especially difficult to learn on complex visual tasks and is prone to gradient reduction or disappearance, making it difficult for the network to converge and find the lowest energy point.
By constructing a general network structure, adding additional connections to determine the embedding space, and defining the adjacency matrix to establish the connection relationship between network layers, extending energy calculation to three stages, using stable point information to speed up the search for the lowest energy point, combined with layer skip information support Gradient transfer.
It improves the accuracy and generalization ability of the model, avoids the vanishing gradient problem, speeds up training, ensures that the network can converge to the lowest energy point faster, and supports the development of balanced propagation algorithms in complex task scenarios.
Smart Images

Figure CN118780324A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of neural network optimization, and in particular to a balanced propagation optimization method and system based on a deep convolutional neural network. Background Art
[0002] Backpropagation (BP) of errors supports the ability of state-of-the-art deep neural networks to learn useful representations from structured data such as speech, vision, and text. BP is currently the most successful algorithm for training artificial neural networks. There is a crucial question in the training process: how should the synaptic connections be modified to make the network fit the instructions given by the target function? This is a difficult problem because a single synapse may have complex effects on downstream processing. BP solves the error propagation problem through the chain derivative rule. Although BP has been effectively implemented in practical applications, it is difficult to imagine how BP can be implemented in biological systems. Because BP connects between neurons, it requires two separate stages: a nonlinear forward pass to propagate neuronal activity and a linear backward pass to carry the signed gradient signal. These two types of processing are also inconvenient for training physical neural networks because both should be processed by the same circuit. Despite its implausibility, representations learned using BP can obtain better embedded representations and stronger representational power than networks trained using purely biological learning rules such as STDP.
[0003] Balanced Propagation (EP) is an alternative to backpropagation for performing state and weight updates in dynamical systems that converge to a fixed point, such as models based on a continuous Hopfield energy function. EP also proceeds in two phases: In the first phase, the dynamical system is presented with static input data until the states throughout the network have settled to an equilibrium or fixed point. We call this state a free equilibrium. In the second phase, a teacher signal nudges the specified output unit slightly towards the target value until the dynamics settle to a second equilibrium, called a nudged equilibrium. EP estimates the loss gradient by comparing the neuronal activity between two different equilibrium phases. EP is attractive because the resulting learning rule is spatially local when the energy function consists of two interacting forces, such as in a continuous Hopfield network. Furthermore, EP has been shown to approximate the true gradient produced by backpropagation learning when the nudge factor approaches 0. More generally, the implicit differentiation performed by EP makes it more suitable for meta-learning, where explicitly backpropagating the error through the inner optimization loop becomes impractical due to the high memory requirements of storing the intermediate time steps used for conventional automatic differentiation.
[0004] However, classic EP has several limitations. First, the gradient estimate of EP is close to the actual loss gradient only when the nudged scaling factor approaches 0 infinitely. This requirement allows noise to confuse small-amplitude teaching signals, which is impractical in neurodynamic systems and is also impractical for models of brain learning that strongly regulate feedback processing. In addition, the mechanisms of how biological circuits and human brain circuits learn better remain elusive, and it is difficult to give a clear conclusion at present whether the operating mechanisms of real biological brains can match the mechanisms currently assumed. Finally, whether it is possible to make stronger and deeper extensions to complex visual tasks and further extend its characteristics to text and video tasks are also urgent issues to be solved in the future.
[0005] How synapses in hierarchical neural circuits are adjusted during learning remains a challenging problem known as the credit assignment problem. Balanced Propagation (EP) offers a more biologically plausible solution to this problem in artificial neural networks. EP is an algorithm for converging recurrent neural networks (RNNs) that, by definition, are given static inputs and whose recursive dynamics converge to a steady state corresponding to the network's predictions. EP proceeds in two phases, where in the first phase of EP the network is brought to a first steady state according to a free fall of energy, and then the output layer of the network is pushed towards the true prediction target until a second steady state is reached. In the second phase of EP, perturbations originating in the output layer are propagated forward in time to upstream layers, producing a local error signal that exactly matches the signal computed by backpropagation through time (BPTT), the classical approach to training RNNs. A comparison between EP and recurrent backpropagation can be seen, and due to this strong theoretical guarantee, EP can provide clues for understanding biological learning. Moreover, the spatial locality of the learning rule prescribed by EP and the possibility to make it also local in time are very attractive for designing energy-efficient neuromorphic hardware implementations of gradient-based learning algorithms.
[0006] However, to meet these expectations, EP should be able to scale to complex tasks. So far, work on EP has limited their experiments to the MNIST classification task and shallow network architectures. Despite the theoretical guarantees of EP, the literature shows that implementations of EP have not so far successfully matched the performance of standard deep learning methods for training deep networks on harder vision tasks. This problem is even more challenging when using more biologically plausible topologies, where the synaptic connections of the network are unidirectional. In this case, some existing improvements to EP lead to a drop in accuracy on MNIST compared to standard EP.
[0007] Other biologically plausible alternatives to backpropagation (BP) have been tried to scale to complex vision tasks. The use of feedback alignment and target propagation variants on CIFAR-10 and ImageNet shows that their performance is significantly lower than that of backpropagation. When the alignment between the forward and backward weights is enhanced by an additional mechanism, feedback alignment performs better than sign symmetry on ImageNet, where the feedback weights are treated as the sign of the forward weights and are almost the same as backpropagation. However, in feedback alignment and target propagation, the error feedback does not affect the forward neural activity, but is linked through different backward paths, which is a problem that EP avoids. Related learning rules also address this problem, which are rate-based equivalent rules and rely on dedicated synapses and complex network topologies, which have been compared with CIFAR-10 and ImageNet. Related work on implicit models shows that training deep networks can be framed as solving fixed-point (steady-state) equations, allowing for more accurate backward propagation. This framework has been shown to solve challenging vision tasks. Although EP usually uses a steady state, the process of reaching the steady state as well as the learning rules are different. Compared to these methods, EP provides minimal circuit requirements for handling inference and gradient computation, which makes it an outstanding candidate for energy-efficient neuromorphic learning hardware design. However, its application on deep convolutional neural networks and complex vision tasks remains a pain point.
[0008] As the application demand for balanced propagation increases, it is particularly important to produce network models with strong representation and generalization capabilities. Existing work on balanced propagation has focused too much on the design of neural circuits, using neural circuits to improve the calculation speed of balanced propagation algorithms. However, there is little work on solving theoretical problems.
[0009] For the classic balanced propagation, the error between the two-stage steady-state gradient differences is used to update the weights. This method provides a novel strategy for weight update, which allows it to make a relatively close estimate of the weights based on the existing gradients. However, this method introduces first-order gradient bias to a certain extent, which to a certain extent hinders the effectiveness of balanced propagation on more complex visual tasks. At the same time, it also creates great difficulties for the learning and training of deep neural networks. The three-stage balanced propagation alleviates the problem of first-order gradient bias by introducing a negative scaling factor. In theory, when the scaling factor is infinitely close to 0, this calculation is to a certain extent similar to the gradient calculated by back propagation. However, it is still difficult for the dynamic system to find a suitable embedding for the last layer. It only relies on the energy function to update the state of the nodes in the network. It is not only difficult to find a suitable embedding representation for each layer of neurons, but also difficult to find the lowest energy point in a short time. This directly affects the efficiency of the balanced propagation algorithm and leads to the expansion of balanced propagation on more difficult tasks. At the same time, the training process will also consume a lot of resources.
[0010] In deep neural networks trained using the back-propagation algorithm, there will be problems with reduced or even vanishing gradients. However, in the process of training deep neural networks using the balanced propagation algorithm, the problem of reduced or even vanishing gradients is particularly prominent due to inappropriate learning rates and network structures. The emergence of these problems will directly lead to the difficulty of deep neural networks based on the balanced propagation algorithm to converge, further affecting the network's ability to reach the lowest energy point. The energy function needs to be adjusted according to different network structures to ensure that the network can always converge to the lowest energy point during each energy iteration calculation. However, this design is both inconvenient and impractical. The practice of designing a new energy function every time a new network structure is used makes the balanced propagation algorithm not universal.
[0011] In the process of calculating energy by classical equilibrium propagation, for each batch of data, the lowest energy point may not be reached within a limited number of iterative calculations, and during the training process, the energy changes in a dynamic oscillation process, and the lowest energy point cannot be found quickly. The time cost is high. Summary of the invention
[0012] The present invention aims to solve the problems that the classical balanced propagation algorithm has poor training effect in deep convolutional neural networks and is difficult to learn on complex visual data sets; thus, a balanced propagation optimization scheme based on deep convolutional neural networks is proposed.
[0013] The first aspect of the present invention discloses a balanced propagation optimization method based on a deep convolutional neural network. The method comprises: step S1, constructing a general network structure form based on the gradient and energy distribution of energy calculation in the original network; step S2, defining an additional connection on the last node of the general network structure form, determining the projection of the last node through the additional connection, thereby determining the embedding space to obtain a complete network structure; step S3, defining the adjacency matrix between the nodes in the complete network structure according to the node topology relationship of the original network, and the adjacency matrix is used to establish the connection relationship between the network layers in the complete network structure; step S4, taking the preprocessed image as the input of the complete network structure, calculating the stable point of the complete network structure at different energy drop stages, and determining the lowest energy point with a stable point, thereby completing the balanced propagation optimization of the deep convolutional neural network.
[0014] According to the method of the first aspect of the present invention, in the step S1: based on the gradient of energy calculation and energy distribution in the original network, the number of network layers L of the general network structure form and the number of network channels of the first K layers of the network are set, and the first K layers of the network are built in a manner from small to large according to the number of network channels; for the latter LK layers of the network, a convolution layer with a convolution kernel size of 1×1 is used, and the number of channels is consistent with that of the Kth layer of the network, L and K are both positive integers and L>K.
[0015] According to the method of the first aspect of the present invention, the step S2 specifically includes: taking the network node of the L-th layer network as the last node, obtaining the number of channels of the L-th layer network, and establishing a mapping layer of the last node after the L-th layer network with the number of channels of the L-th layer network as the L+1-th layer network, and the mapping layer is a fully connected layer or the convolutional layer; adding a fully connected layer after the L+1-th layer network as the L+2-th layer network, the number of channels of the L+2-th layer network is consistent with the number of target classifiers, and encapsulating the L+1-th layer network and the L+2-th layer network in an additional list; obtaining the node state of the last node located in the L-th layer network through the additional connection, and passing the node state to the additional list, so as to calculate the projection of the last node in the two-layer network contained in the additional list, so as to establish the embedding space, thereby obtaining a complete network structure.
[0016] According to the method of the first aspect of the present invention, in step S3, based on the node topology relationship of the original network, the adjacency matrix between the nodes in the complete network structure is defined, and the mapping type of each adjacency matrix is determined, and the connection relationship between the various network layers in the complete network structure is established according to the adjacency matrix and the corresponding mapping type.
[0017] According to the method of the first aspect of the present invention, in step S4, the energy is gradually reduced, and each time the energy is reduced, the preprocessed image is used as the input of the complete network structure, and the convergence state of the complete network structure is analyzed as the stable point of the current energy reduction stage, until the lowest energy point with a stable point is determined, thereby completing the balanced propagation optimization of the deep convolutional neural network.
[0018] According to the method of the first aspect of the present invention, in step S4, preprocessing of the image includes data enhancement, image flipping, edge cropping and type conversion, and the preprocessed image is of tensor type.
[0019] The second aspect of the present invention discloses a balanced propagation optimization system based on a deep convolutional neural network. The system includes: a first processing unit, configured to: construct a general network structure based on the gradient and energy distribution of energy calculation in the original network; a second processing unit, configured to: define an additional connection on the last node of the general network structure, determine the projection of the last node through the additional connection, thereby determining the embedding space to obtain a complete network structure; a third processing unit, configured to: define the adjacency matrix between the nodes in the complete network structure according to the node topology of the original network, and the adjacency matrix is used to establish the connection relationship between the network layers in the complete network structure; a fourth processing unit, configured to: use the preprocessed image as the input of the complete network structure, calculate the stable point of the complete network structure at different energy reduction stages, and determine the lowest energy point with a stable point, thereby completing the balanced propagation optimization of the deep convolutional neural network.
[0020] According to the system of the second aspect of the present invention, the first processing unit is specifically configured as follows: based on the gradient of energy calculation and energy distribution in the original network, the number of network layers L of the general network structure form and the number of network channels of the first K layers of the network are set, and the first K layers of the network are built in a manner from small to large in terms of the number of network channels; for the latter LK layers of the network, a convolution layer with a convolution kernel size of 1×1 is used, and the number of channels is consistent with that of the Kth layer of the network, L and K are both positive integers and L>K.
[0021] According to the system of the second aspect of the present invention, the second processing unit is specifically configured to: take the network node of the L-th layer network as the last node, obtain the number of channels of the L-th layer network, and establish a mapping layer of the last node after the L-th layer network with the number of channels of the L-th layer network as the L+1-th layer network, and the mapping layer is a fully connected layer or the convolutional layer; add a fully connected layer after the L+1-th layer network as the L+2-th layer network, the number of channels of the L+2-th layer network is consistent with the number of target classifiers, and encapsulate the L+1-th layer network and the L+2-th layer network in an additional list; obtain the node state of the last node located in the L-th layer network through the additional connection, and pass the node state to the additional list to calculate the projection of the last node in the two-layer network contained in the additional list to establish the embedding space, thereby obtaining a complete network structure.
[0022] According to the system of the second aspect of the present invention, the third processing unit is specifically configured to: define the adjacency matrix between the nodes in the complete network structure according to the node topology relationship of the original network, and determine the mapping type of each adjacency matrix, and establish the connection relationship between the network layers in the complete network structure according to the adjacency matrix and the corresponding mapping type.
[0023] According to the system of the second aspect of the present invention, the fourth processing unit is specifically configured to: gradually reduce the energy, use the preprocessed image as the input of the complete network structure each time the energy is reduced, and analyze the convergence state of the complete network structure as the stable point of the current energy reduction stage, until the lowest energy point with a stable point is determined, thereby completing the balanced propagation optimization of the deep convolutional neural network.
[0024] According to the system of the second aspect of the present invention, the fourth processing unit is specifically configured to: preprocess the image including data enhancement, image flipping, edge cropping and type conversion, and the preprocessed image is of tensor type.
[0025] The third aspect of the present invention discloses an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps in the balanced propagation optimization method based on a deep convolutional neural network described in the first aspect of the present disclosure are implemented.
[0026] The fourth aspect of the present invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the balanced propagation optimization method based on a deep convolutional neural network described in the first aspect of the present disclosure are implemented.
[0027] In summary, the technical solution proposed in the present invention extends the energy calculation to three stages, and uses the equilibrium state to further find the minimum value; adds additional mapping outside the network structure involved in the energy calculation to speed up the search for suitable embedding; establishes a connection between the low network layer and the high network layer to support gradient transfer between networks. On the basis of classical balanced propagation, the present invention fully exploits the gradient and energy distribution between network layers, combines the information obtained by skipping layers, and effectively realizes the search for stable points. The model is more accurate and generalizable than the classical balanced propagation algorithm, and at the same time strongly supports the development of the balanced propagation algorithm in complex task scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0029] Figure 1 is an operation flow chart according to an embodiment of the present invention;
[0030] Figure 2 A network structure diagram according to an embodiment of the present invention;
[0031] Figure 3 The figure is a structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0033] The first aspect of the present invention discloses a balanced propagation optimization method based on a deep convolutional neural network. The method comprises: step S1, constructing a general network structure form based on the gradient and energy distribution of energy calculation in the original network; step S2, defining an additional connection on the last node of the general network structure form, determining the projection of the last node through the additional connection, thereby determining the embedding space to obtain a complete network structure; step S3, defining the adjacency matrix between the nodes in the complete network structure according to the node topology relationship of the original network, and the adjacency matrix is used to establish the connection relationship between the network layers in the complete network structure; step S4, taking the preprocessed image as the input of the complete network structure, calculating the stable point of the complete network structure at different energy drop stages, and determining the lowest energy point with a stable point, thereby completing the balanced propagation optimization of the deep convolutional neural network.
[0034] In some embodiments, in the step S1: based on the gradient and energy distribution of energy calculation in the original network, the number of network layers L of the general network structure form and the number of network channels of the first K layers of the network are set, and the first K layers of the network are built in a manner from small to large according to the number of network channels; for the latter LK layers of the network, a convolution layer with a convolution kernel size of 1×1 is used, and the number of channels is consistent with that of the Kth layer of the network, L and K are both positive integers and L>K.
[0035] In some embodiments, step S2 specifically includes: taking the network node of the Lth layer network as the last node, obtaining the number of channels of the Lth layer network, and establishing a mapping layer of the last node after the Lth layer network with the number of channels of the Lth layer network as the L+1th layer network, and the mapping layer is a fully connected layer or the convolutional layer; adding a fully connected layer after the L+1th layer network as the L+2th layer network, the number of channels of the L+2th layer network is consistent with the number of target classifiers, and encapsulating the L+1th layer network and the L+2th layer network in an additional list; obtaining the node state of the last node located in the Lth layer network through the additional connection, and passing the node state to the additional list to calculate the projection of the last node in the two-layer network contained in the additional list to establish the embedding space, thereby obtaining a complete network structure.
[0036] In some embodiments, in step S3, based on the node topology of the original network, the adjacency matrix between the nodes in the complete network structure is defined, and the mapping type of each adjacency matrix is determined, and the connection relationship between the network layers in the complete network structure is established based on the adjacency matrix and the corresponding mapping type.
[0037] In some embodiments, in step S4, the energy is gradually reduced, and each time the energy is reduced, the preprocessed image is used as the input of the complete network structure, and the convergence state of the complete network structure is analyzed as the stable point of the current energy reduction stage until the lowest energy point with a stable point is determined, thereby completing the balanced propagation optimization of the deep convolutional neural network.
[0038] In some embodiments, in step S4, preprocessing of the image includes data enhancement, image flipping, edge cropping and type conversion, and the preprocessed image is of tensor type.
[0039] Specifically, we explore the gradient and energy distribution in the energy calculation process in the network and design a general network structure; define an additional connection (external-link) on the last node of the network, read the state of the last node, use the additional connection to find the projection of the last node, and find a suitable embedding space; define a large-scale topological adjacency matrix of the network, and establish mutual connections between network layers (skip-layer) based on the adjacency matrix; obtain the stable point information at different stages of energy calculation, use the stable point information multiple times, and further find the lowest energy point on its basis (repeat); combine Figure 1 shown.
[0040] Mining the gradient and energy distribution in the energy calculation process in the network, designing a general network structure, specifically including: building a convolutional neural network with a small to large number of channels, upsampling the data to avoid the loss of information after each calculation, and then maintaining the same number of output channels as the last layer of the convolutional network built, and continuing to add convolutional layers with a convolution kernel size of 1×1 until the addition is completed.
[0041] Define additional connections on the last node of the network. Reading out the state of the last node specifically includes: reading out the number of output channels of the last layer of the network structure, using it as the number of input channels, and establishing a mapping, which includes but is not limited to fully connected layers and convolutional layers. With the number of dimensions you want to map at the end as the target, add a fully connected layer, map the number of channels of the last layer of the network to the number of classifiers, and encapsulate these mapping layers in an additional list, separated from the network layer that previously calculated the energy function. Read out the state of the last output node after the last layer, and pass this state to the additional list for calculation to find a suitable embedding for the last layer.
[0042] Define the large-scale topological adjacency matrix of the network, and establish the interconnection between network layers according to the adjacency matrix. Specifically, it includes: establishing the adjacency relationship between each other according to the topological structure that the user wants to establish, defining the adjacency matrix, and defining the mapping type between each relationship. According to the established adjacency matrix, according to the mapping and mapping type between each connection, establish the network structure, pass the low-level information to the high-level, and establish the completed example as follows Figure 2 shown.
[0043] Obtain the stable point information at different stages of energy calculation, use the stable point information multiple times, and further find the lowest energy point based on it. Specifically, it includes: obtaining the input image, performing data enhancement on the input image, obtaining the flipped and cropped data image, and converting it into a tensor type. Train the network according to the prescribed process, obtain the steady-state information and save it. Using the steady-state information, repeatedly calculate the energy function multiple times to make the model move faster toward the lowest energy point and accelerate the convergence speed.
[0044] The technical effects of the present invention include: (1) avoiding gradient vanishing and speeding up training. Deep BP convolutional networks have the problem of gradient reduction, which was first solved in ResNet with skip connections. Skip connections send lower-layer information close to the input directly to higher layers close to the output, and help to quickly calculate gradients to support parameter updates. (2) Regarding external links, it automatically searches for projections that minimize the loss function. This is equivalent to the update rule of the BP network, which helps the network quickly find a suitable embedding space for the last layer. The inference result is not read directly from the last node, but has a linear mapping as read-out. (3) Using the information of the stable point, further search for the lowest energy point to speed up convergence.
[0045] Example: Load the cifar10 and mnist datasets, process the datasets, complete ablation experiments on each dataset, and compare the results without using external-link, without using skip-layer, and with their addition. The experiment also proves that the effect of adding all of them is completely due to the effect of not adding or adding less.
[0046] Experiments were conducted on the MNIST dataset to verify the training and test accuracy with and without external-link and skip-layer. It can be found that adding them leads to faster convergence and higher accuracy. Obviously, for balanced propagation of deep convolutional networks, learning on MNIST is too difficult.
[0047] Experiments were conducted on the cifar10 dataset to verify the training and test accuracy with and without skip-layer. It can be found that skip-layer converges faster and has higher accuracy. Obviously, for balanced propagation of deep convolutional networks, learning cifar10 is too difficult.
[0048] The second aspect of the present invention discloses a balanced propagation optimization system based on a deep convolutional neural network. The system includes: a first processing unit, configured to: construct a general network structure based on the gradient and energy distribution of energy calculation in the original network; a second processing unit, configured to: define an additional connection on the last node of the general network structure, determine the projection of the last node through the additional connection, thereby determining the embedding space to obtain a complete network structure; a third processing unit, configured to: define the adjacency matrix between the nodes in the complete network structure according to the node topology of the original network, and the adjacency matrix is used to establish the connection relationship between the network layers in the complete network structure; a fourth processing unit, configured to: use the preprocessed image as the input of the complete network structure, calculate the stable point of the complete network structure at different energy reduction stages, and determine the lowest energy point with a stable point, thereby completing the balanced propagation optimization of the deep convolutional neural network.
[0049] In some embodiments, the first processing unit is specifically configured to: set the number of network layers L of the general network structure form and the number of network channels of the first K layers of the network based on the gradient of energy calculation and energy distribution in the original network, and build the first K layers of the network in a manner from small to large according to the number of network channels; for the latter LK layers of the network, a convolution layer with a convolution kernel size of 1×1 is used, and the number of channels is consistent with that of the Kth layer of the network, L and K are both positive integers and L>K.
[0050] In some embodiments, the second processing unit is specifically configured to: take the network node of the L-th layer network as the last node, obtain the number of channels of the L-th layer network, and establish a mapping layer of the last node after the L-th layer network with the number of channels of the L-th layer network as the L+1-th layer network, and the mapping layer is a fully connected layer or the convolutional layer; add a fully connected layer after the L+1-th layer network as the L+2-th layer network, the number of channels of the L+2-th layer network is consistent with the number of target classifiers, and encapsulate the L+1-th layer network and the L+2-th layer network in an additional list; obtain the node state of the last node located in the L-th layer network through the additional connection, and pass the node state to the additional list to calculate the projection of the last node in the two-layer network contained in the additional list to establish the embedding space, thereby obtaining a complete network structure.
[0051] In some embodiments, the third processing unit is specifically configured to: define the adjacency matrix between the nodes in the complete network structure according to the node topology relationship of the original network, determine the mapping type of each adjacency matrix, and establish the connection relationship between the network layers in the complete network structure according to the adjacency matrix and the corresponding mapping type.
[0052] In some embodiments, the fourth processing unit is specifically configured to: gradually reduce the energy, and each time the energy is reduced, the preprocessed image is used as the input of the complete network structure, and the convergence state of the complete network structure is analyzed as the stable point of the current energy reduction stage, until the lowest energy point with a stable point is determined, thereby completing the balanced propagation optimization of the deep convolutional neural network.
[0053] In some embodiments, the fourth processing unit is specifically configured to: preprocess the image including data enhancement, image flipping, edge cropping and type conversion, and the preprocessed image is of tensor type.
[0054] The third aspect of the present invention discloses an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps in the balanced propagation optimization method based on a deep convolutional neural network described in the first aspect of the present disclosure are implemented.
[0055] Figure 3 is a structural diagram of an electronic device according to an embodiment of the present invention, such as Figure 3 As shown, the electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, near field communication (NFC) or other technologies. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covered on the display screen, or a button, a trackball or a touch pad set on the housing of the electronic device, or an external keyboard, touch pad or mouse, etc.
[0056] Those skilled in the art will understand that Figure 3The structure shown in the figure is only a structural diagram of the part related to the technical solution of the present disclosure, and does not constitute a limitation on the electronic device to which the technical solution of the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0057] The fourth aspect of the present invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the balanced propagation optimization method based on a deep convolutional neural network described in the first aspect of the present disclosure are implemented.
[0058] In summary, the technical solution proposed in the present invention extends the energy calculation to three stages, and uses the equilibrium state to further find the minimum value; adds additional mapping outside the network structure involved in the energy calculation to speed up the search for suitable embedding; establishes a connection between the low network layer and the high network layer to support gradient transfer between networks. On the basis of classical balanced propagation, the present invention fully exploits the gradient and energy distribution between network layers, combines the information obtained by skipping layers, and effectively realizes the search for stable points. The model is more accurate and generalizable than the classical balanced propagation algorithm, and at the same time strongly supports the development of the balanced propagation algorithm in complex task scenarios.
[0059] In deep convolutional neural networks, it is difficult for existing technologies to work on complex visual tasks. First, deep networks make it more difficult to transfer and calculate gradients in the network, and it is easy to have problems with gradient reduction or disappearance, resulting in the failure to update the parameters of each network layer and the difficulty of learning new patterns. Secondly, in complex tasks, the calculation of energy functions is more difficult, and it is difficult for dynamic systems to find the lowest energy point in high-dimensional space. At the same time, it is also difficult to find a suitable embedding for the state of nodes in the network. Under this condition, it is difficult for dynamic systems to reach a steady state through energy decline. Finally, for each batch of data, the energy function cannot reach the lowest energy point within a limited number of iterations, and the process of energy decline is oscillating and jittering, the convergence time is long, and training is difficult. In response to the above problems, the present invention proposes a post-connected additional connection, which does not participate in the calculation of the energy function. In the update process, it is equivalent to using the BP update rule to speed up the system to find the most suitable embedding for the last layer of nodes, which directly promotes the search for the lowest point of steady-state energy and accelerates the convergence speed. The present invention establishes connections between layers, transmits low-level information to high-level layers, and helps the transmission of gradients during reverse updates. The present invention analyzes the value of each round of energy calculation, further utilizes the steady-state information, starts from the steady-state, accelerates reaching the energy minimum point, further shortens the training and learning time, and accelerates the convergence of the network.
[0060] The present invention uses Skip-layer to avoid gradient vanishing, speed up training, and help quick gradient calculation to support parameter update. The present invention uses external-link to automatically find the projection that minimizes the loss function, which helps the network to quickly find a suitable embedding space for the last layer. The present invention uses Repeat to use the information of the stable point to further find the lowest energy point and speed up convergence.
[0061] Please note that the technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification. The above-mentioned embodiments only express several implementation methods of the present application, and their descriptions are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, without departing from the concept of the present application, several variations and improvements can be made, which all belong to the scope of protection of the present application. Therefore, the scope of protection of the patent in this application shall be based on the attached claims.
Claims
1. A balanced propagation optimization method based on deep convolutional neural network, It is characterized in that The method comprises: Step S1, constructing a general network structure based on the energy calculated gradient and energy distribution in the original network; Step S2, defining an additional connection on the last node of the general network structure form, determining the projection of the last node through the additional connection, thereby determining the embedding space to obtain a complete network structure; Step S3: defining an adjacency matrix between the nodes in the complete network structure according to the node topology relationship of the original network, wherein the adjacency matrix is used to establish a connection relationship between the network layers in the complete network structure; Step S4: using the preprocessed image as the input of the complete network structure, calculating the stable point of the complete network structure at different energy drop stages, and determining the lowest energy point with a stable point, thereby completing the balanced propagation optimization of the deep convolutional neural network.
2. According to claim 1, a balanced propagation optimization method based on deep convolutional neural network, It is characterized in that In step S1: The number of network layers L of the general network structure and the number of network channels of the first K-layer network are set based on the gradient of energy calculation and energy distribution in the original network, and the first K-layer network is built in a manner from small to large in terms of the number of network channels; For the last LK layers of the network, a convolutional layer with a convolution kernel size of 1×1 is used, and the number of channels is consistent with that of the Kth layer of the network. L and K are both positive integers and L>K.
3. According to claim 2, a balanced propagation optimization method based on deep convolutional neural network, It is characterized in that The step S2 specifically includes: Taking the network node of the L-th layer network as the last node, obtaining the number of channels of the L-th layer network, and establishing a mapping layer of the last node after the L-th layer network with the number of channels of the L-th layer network as the L+1-th layer network, wherein the mapping layer is a fully connected layer or the convolutional layer; A fully connected layer is added after the L+1th network layer as the L+2th network layer, the number of channels of the L+2th network layer is consistent with the number of target classifiers, and the L+1th network layer and the L+2th network layer are encapsulated in an additional list; The node state of the last node located in the L-th layer network is obtained through the additional connection, and the node state is passed to the additional list to calculate the projection of the last node in the two-layer network included in the additional list to establish the embedding space, thereby obtaining a complete network structure.
4. According to claim 3, a balanced propagation optimization method based on deep convolutional neural network, It is characterized in that In step S3, based on the node topology of the original network, the adjacency matrix between the nodes in the complete network structure is defined, and the mapping type of each adjacency matrix is determined, and the connection relationship between the network layers in the complete network structure is established based on the adjacency matrix and the corresponding mapping type.
5. According to claim 4, a balanced propagation optimization method based on deep convolutional neural network, It is characterized in that In step S4, the energy is gradually reduced. Each time the energy is reduced, the preprocessed image is used as the input of the complete network structure, and the convergence state of the complete network structure is analyzed as the stable point of the current energy reduction stage until the lowest energy point with a stable point is determined, thereby completing the balanced propagation optimization of the deep convolutional neural network.
6. A balanced propagation optimization method based on deep convolutional neural network according to claim 5, It is characterized in that In step S4, preprocessing of the image includes data enhancement, image flipping, edge cropping and type conversion, and the preprocessed image is of tensor type.
7. A balanced propagation optimization system based on deep convolutional neural network, It is characterized in that The system comprises: The first processing unit is configured to: construct a general network structure form based on the energy calculation gradient and energy distribution in the original network; A second processing unit is configured to: define an additional connection on the last node of the general network structure form, determine the projection of the last node through the additional connection, thereby determining the embedding space to obtain a complete network structure; A third processing unit is configured to: define an adjacency matrix between the nodes in the complete network structure according to the node topology relationship of the original network, wherein the adjacency matrix is used to establish a connection relationship between the network layers in the complete network structure; The fourth processing unit is configured to: use the preprocessed image as the input of the complete network structure, calculate the stability point of the complete network structure at different energy reduction stages, and determine the lowest energy point with a stable point, thereby completing the balanced propagation optimization of the deep convolutional neural network.
8. The balanced propagation optimization system based on deep convolutional neural network according to claim 7, characterized in that: The first processing unit is specifically configured as follows: The number of network layers L of the general network structure and the number of network channels of the first K-layer network are set based on the gradient of energy calculation and energy distribution in the original network, and the first K-layer network is built in a manner from small to large in terms of the number of network channels; For the last LK layers, a convolutional layer with a convolution kernel size of 1×1 is used, and the number of channels is consistent with that of the Kth layer network. L and K are both positive integers and L>K; The second processing unit is specifically configured as follows: Taking the network node of the L-th layer network as the last node, obtaining the number of channels of the L-th layer network, and establishing a mapping layer of the last node after the L-th layer network with the number of channels of the L-th layer network as the L+1-th layer network, wherein the mapping layer is a fully connected layer or the convolutional layer; A fully connected layer is added after the L+1th network layer as the L+2th network layer, the number of channels of the L+2th network layer is consistent with the number of target classifiers, and the L+1th network layer and the L+2th network layer are encapsulated in an additional list; The node state of the last node located in the L-th layer network is obtained through the additional connection, and the node state is passed to the additional list to calculate the projection of the last node in the two-layer network included in the additional list to establish the embedding space, thereby obtaining a complete network structure.
9. An electronic device, It is characterized in that The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it implements the balanced propagation optimization method based on a deep convolutional neural network as described in any one of claims 1 to 6.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, it implements the balanced propagation optimization method based on a deep convolutional neural network as described in any one of claims 1 to 6.
Citation Information
Patent Citations
A multi-modal deep network embedding method for fusing structure and attribute information
CN109376857A
A method for optimizing neuron spatial arrangement in a convolutional neural network
CN109740734A
Image classification method and system of neural network based on gradient direction parameter optimization
CN113052239A
Network link attribute relation prediction method and device based on graph neural network
CN113988464A
Multi-target influence maximization seed node recognition algorithm based on discrete differential evolution algorithm
CN115392424A
Cited By
Balanced perception enhancement system and method based on neural feedback
CN120346420A
