An image classification method and system based on a hierarchical competitive pulse neural network
By introducing a hierarchical competition strategy and an adaptive joint learning algorithm into the SNN network, the problems of weak feature representation ability and training difficulty in traditional image classification methods are solved, thereby improving the accuracy and efficiency of image classification.
Patent Information
- Application Number
- CN202411330049.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2044-09-24
AI Technical Summary
Traditional image classification methods rely on manually designed features, which makes it difficult to capture the complexity and diversity of images. Furthermore, SNN networks have weak feature representation capabilities and are difficult to train when classifying images, resulting in inaccurate classification results and low efficiency.
An image classification method based on hierarchical competitive spiking neural networks is adopted, which introduces a competition strategy and an adaptive joint learning algorithm. Different competition mechanisms are designed through convolutional layers and fully connected layers, and local and global learning rules are combined to enhance feature representation ability and training efficiency.
It improves the accuracy and computational efficiency of image classification, enhances the network's ability to capture image complexity and diversity, and achieves better pattern recognition results.
Smart Images

Figure CN119295810B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image classification, and particularly relates to an image classification method and system based on a hierarchical competitive spiking neural network. BACKGROUND
[0002] Traditional image classification methods rely on manually designed features, including color and texture of images, which are difficult to fully capture the complexity and diversity of images. In addition, traditional image classification methods often lack robustness and generalization ability, and the classification results may be different for images under different scenes and lighting conditions.
[0003] Spiking Neural Network (SNN) is a third-generation neural network computing model. It uses discrete pulses instead of traditional continuous activation values to encode and transmit information, and is a neural network model that is closer to biological neural processing mechanism and has higher computing efficiency. When using traditional SNN network for image classification task, two main problems will be encountered. One is that the information transmission between SNN network layers uses discrete pulses instead of traditional continuous activation values to encode and transmit information, resulting in weak feature expression ability, which makes the image classification result accuracy not high. The second is that the pulse neuron model is used instead of the original activation function, which cannot be trained using traditional gradient descent method, and at the same time introduces the concept of time step, which makes the training difficult and affects the efficiency of image classification. SUMMARY
[0004] In view of the above analysis, the embodiments of the present application aim to provide an image classification method and system based on a hierarchical competitive spiking neural network, to solve the problems of inaccurate classification results of existing image classification methods, weak feature expression ability of existing SNN network in image classification, and large training difficulty.
[0005] In one aspect, the embodiments of the present application provide an image classification method based on a hierarchical competitive spiking neural network, comprising:
[0006] preprocessing image data;
[0007] inputting the preprocessed image data into a trained SNN network to obtain a predicted classification label of the image; wherein a competition strategy is introduced to the SNN network, comprising:
[0008] obtaining a feature map from the input image data through a convolution layer, sorting the feature responses at each position in the feature map, and using the sorting results to realize excitation or inhibition of the feature map, wherein the size of excitation or inhibition is obtained by excitation coefficient and inhibition coefficient respectively; and sorting different pulse neurons based on sensitivity, and using the sorting results to realize excitation or inhibition of the pulse neurons;
[0009] The training of the SNN network comprises assigning weights to each convolution kernel in the convolution layer in the SNN network, assigning weights to each neuron in the fully connected layer, calculating a loss value of the SNN network training, and using the loss value for back propagation to calculate the weights of each convolution kernel, the weights of each neuron, an excitation coefficient and an inhibition coefficient.
[0010] Based on the further improvement of the above method, the feature maps at different positions of the input image data are sorted, and the sorting result is used to realize excitation or inhibition of the feature maps, comprising:
[0011] The input image data is subjected to a convolution layer to obtain feature maps, and the feature responses at each position of the feature maps are divided into three categories according to the response intensity, wherein: using a first mapping function, the k1 features with the strongest response are positively excited based on an excitation coefficient, the features with the response ranking after k1 and the response value being above 0 are inhibited based on an inhibition coefficient, and the features with the response being less than 0 are set to 0.
[0012] Based on the further improvement of the above method, the sorting of the feature maps at different positions of the input image data is realized by using the following formula, and the sorting result is used to realize excitation or inhibition of the feature maps:
[0013]
[0014] wherein t represents a time step in the SNN network, n represents the nth feature map obtained after feature extraction by the convolution layer, the first mapping function represents the mapped value of the feature value at the (x, y) position in the nth feature map, represents the feature response at the (x, y) position in the nth feature map, represents the value of the feature response at the (x, y) position in all feature maps obtained by the convolution layer, which is ranked k1, wherein the ranking is arranged in the order of feature value from large to small; and β r and β l are hyperparameters, respectively representing the excitation coefficient and the inhibition coefficient.
[0015] Based on the further improvement of the above method, the different pulse neurons are sorted based on the sensitivity, and the sorting result is used to realize excitation or inhibition of the pulse neurons, comprising:
[0016] Using a second mapping function, the k2 pulse neurons most sensitive to the input information are retained with the original response, the pulse neurons with the sensitivity ranking after k2 and the sensitivity being above 0 are inhibited, and the pulse neurons with no response to the input information are set to 0.
[0017] Based on the further improvement of the above method, the different pulse neurons are sorted based on the sensitivity using the following formula, and the excitation or inhibition of the pulse neurons is realized using the sorting result:
[0018]
[0019] Wherein, t represents the time step in the SNN network, the second mapping function o t,m represents the response value of the mth pulse neuron after mapping, f t,m represents the output response value of the mth pulse neuron, f t,to represents the k2th response value obtained by sorting the response values of all pulse neurons in the fully connected layer from large to small.
[0020] Based on the further improvement of the above method, the weights of each neuron in the fully connected layer are allocated, including: in the back propagation process, the global learning weight, the local learning weight of the neuron, and the weight distribution ratio between the global learning weight and the local learning weight are calculated.
[0021] Based on the further improvement of the above method, the weights of each neuron in the fully connected layer are calculated using the following formula:
[0022]
[0023] Wherein, is a hyperparameter, representing the weight distribution ratio, represents the global learning weight of the corresponding neuron, represents the local learning weight of the corresponding neuron, l represents the number of pulse neurons in the fully connected layer, and N represents the number of convolutional layers.
[0024] Based on the further improvement of the above method, the training of the SNN network further includes:
[0025] Using the STDP rule, the synaptic weight is enhanced or weakened by the pulse correlation of the pulse neurons in the front and rear layers, including: when the pulse correlation of the pulse neurons in the front and rear layers exists time causal relationship, the synaptic connection is strengthened; otherwise, the synaptic connection is weakened.
[0026] In another aspect, the embodiment of the present application provides an image classification system based on hierarchical competitive pulse neural network, comprising an image acquisition module, an image preprocessing module, an SNN network module and a training module, wherein:
[0027] The image acquisition module is used for acquiring images;
[0028] The image preprocessing module is used for preprocessing the acquired image data;
[0029] The SNN network module is configured to calculate a predicted classification label of an image by using preprocessed image data, and the SNN network module introduces a competition strategy, including:
[0030] The input image data is subjected to a convolution layer to obtain a feature map, the feature responses at each position in the feature map are sorted, and the sorted results are used to realize excitation or inhibition of the feature map, wherein the sizes of the excitation or inhibition are obtained by an excitation coefficient and an inhibition coefficient, respectively, and different pulse neurons are sorted based on sensitivity, and the sorted results are used to realize excitation or inhibition of the pulse neurons.
[0031] The training module is configured to assign weights to each convolution kernel in the convolution layer in the SNN network, assign weights to each neuron in the fully connected layer, calculate a loss value of the SNN network training, and use the loss value for back propagation to calculate the weights of each convolution kernel, the weights of each neuron, the excitation coefficient and the inhibition coefficient.
[0032] Based on the further improvement of the above system, the weights of each neuron in the fully connected layer are calculated by using the following formula:
[0033]
[0034] wherein, is a hyperparameter, representing a weight distribution ratio, represents a global learning weight of the corresponding neuron, represents a local learning weight of the corresponding neuron, l represents the number of pulse neurons in the fully connected layer, and N represents the number of convolution layers.
[0035] Compared with the prior art, the present application can at least achieve one of the following beneficial effects:
[0036] 1. The present application adopts an image classification method based on a hierarchical competitive pulse neural network, a hierarchical heterogeneous competition strategy is introduced in the traditional SNN network, different competition mechanisms are designed for the convolution layer and the fully connected layer, the first mapping function is used for local feature learning in the convolution layer, the second mapping function is used for global feature aggregation in the fully connected layer, the feature expression ability of the SNN network for picture data is enhanced, the network can learn more diverse feature representations, the complexity and diversity of the image can be captured, and the discrimination ability of the model and the accuracy of the image classification are improved.
[0037] 2. The application proposes an adaptive joint learning method. The method combines a global backpropagation algorithm based on supervised learning, a local synaptic plasticity algorithm based on unsupervised learning, and a local unsupervised learning algorithm based on competitive learning. Local learning rules are used during network forward propagation, and global learning rules are used to adjust parameters during backpropagation. In addition, the method can also adaptively adjust the weight distribution of global learning and local learning, reduce the manual parameter adjustment process, and make the network training more robust to tasks and data sets.
[0038] 3. The adaptive joint learning algorithm introduced in the application can quickly provide a training direction in the early stage using global feedback signals, improve the convergence speed, and increase the dependence on local learning in the later stage. Compared with a single learning rule, the method can achieve a better training curve, significantly reduce redundant calculations, and improve the computational efficiency of image recognition.
[0039] In the application, the above technical solutions can be combined with each other to achieve more preferred combination solutions. Other features and advantages of the application will be described in the subsequent specification, and some advantages will become apparent from the specification or by implementing the application. The purpose and other advantages of the application can be achieved and obtained from the contents specifically pointed out in the specification and the drawings. BRIEF DESCRIPTION OF DRAWINGS
[0040] The accompanying drawings are included to provide a better understanding of the application, and are not considered limiting the application. Throughout the drawings, the same reference numerals refer to the same components;
[0041] Figure 1 A flowchart of an image classification method based on a hierarchical competitive spiking neural network according to an embodiment of the application;
[0042] Figure 2 A structure diagram of a WRLP competition strategy according to an embodiment of the application;
[0043] Figure 3 A structure diagram of a KWTA competition strategy according to an embodiment of the application;
[0044] Figure 4 A flowchart of an adaptive joint learning method according to an embodiment of the application;
[0045] Figure 5 A block diagram of an image classification system based on a hierarchical competitive spiking neural network according to an embodiment of the application. DETAILED DESCRIPTION
[0046] Preferred embodiments of the present application will be described in detail below with reference to the drawings, wherein the drawings constitute a part of this application, and illustrate embodiments of the present application together with the principles of the present application, but are not intended to limit the scope of the present application.
[0047] One specific embodiment of the present application discloses an image classification method based on a hierarchical competitive spiking neural network, as shown in the formula (I), comprising: Figure 1
[0048] S11: preprocessing the image data.
[0049] Wherein, the image refers to the picture taken by the camera or the picture downloaded from the website.
[0050] Specifically, the collected image data is normalized, denoised and cropped to ensure the quality and consistency of the input image data. S12: input the preprocessed image data into the trained SNN network to obtain the predicted classification label of the image; the exemplary image classification label adopts the common single label, including person, animal, plant, food, vehicle and daily necessities, and the predicted classification label of the image is obtained by using the SNN network.
[0051] Wherein, the SNN network is introduced into the competition strategy, including:
[0052] The input image data is processed through a convolution layer to obtain a feature map, the feature responses of each position in the feature map are sorted, and the sorting results are used to realize the excitation or inhibition of the feature map, wherein the size of the excitation or inhibition is obtained by excitation coefficient and inhibition coefficient respectively; and the different pulse neurons are sorted based on the sensitivity, and the sorting results are used to realize the excitation or inhibition of the pulse neurons.
[0053] The training of the SNN network includes: allocating weights to each convolution kernel in the convolution layer in the SNN network, allocating weights to each neuron in the fully connected layer; calculating the loss value of the SNN network training; using the loss value for back propagation to calculate the weights of each convolution kernel, the weights of each neuron, the excitation coefficient and the inhibition coefficient.
[0054] It should be noted that based on the characteristics of different network layers in the SNN network, the present application proposes a hierarchical heterogeneous competition strategy, different competition strategies are adopted for different structural levels of the SNN network, when a neuron generates a pulse, it will inhibit the activity of other neurons around it, so that different neurons are gradually specialized to respond to different input modes, so as to enhance the expression ability of the network. Different competition mechanisms are designed for the convolution layer and the fully connected layer in this embodiment to match their respective calculation characteristics. Under this competition strategy, the SNN network produces feature differentiation and sparse coding under unsupervised conditions, simulating the development process of the biological nervous system.
[0055] Specifically, when the preprocessed image data is input into the convolution layer, each convolution kernel in the convolution layer extracts local features from the image data to obtain a plurality of groups of feature maps. Since the convolution layer learns local features, the competitive learning process must also be localized to enhance the learning of local features. To achieve this, the present application sorts the feature maps at different positions of the input image data, and uses the sorting results to stimulate or inhibit the feature maps, which is called the Winner Reward Loser Punish (WRLP) competition strategy, as shown in Figure 2 The method comprises the following steps: inputting image data into a convolution layer to obtain feature maps, and dividing the feature responses at each position in the feature maps into three categories according to the response intensity, wherein: a first mapping function is used to give positive stimulation to the k1 features with the strongest responses based on a stimulation coefficient, to inhibit the features with responses ranked after the k1 features and response values greater than 0 based on an inhibition coefficient, and to set the features with response values less than 0 to 0. Through this mapping method, the feature values of the convolution layer can be discretely learned and expressed in the feature space, reducing information loss and improving feature learning ability.
[0056] The WRLP competition strategy for a convolution layer in the network is implemented by using the following formula:
[0057]
[0058] wherein t represents a time step in the SNN network, n represents the nth feature map obtained after feature extraction by the convolution layer, the first mapping function represents the mapped value of the feature value at the (x, y) position in the nth feature map, represents the feature response at the (x, y) position in the nth feature map, represents the value ranked k1th in the feature responses at the (x, y) position in all the feature maps obtained by the convolution layer, wherein the ranking is in the order of feature values from large to small; β r and β l are hyperparameters, respectively representing the stimulation coefficient and the inhibition coefficient; when β r and β l are both 0, it means that the competition strategy is not used. The obtained LIF neuron of the input SNN network. The value of K1 can be obtained by comparing multiple experiments, and exemplarily, K1 is 5.
[0059] The WRLP competition strategy is adopted for each convolutional layer in the SNN network, and the data output by the last convolutional layer is sequentially input into the full connection layer for feature aggregation after passing through the pooling layer, the flattening layer and the linear layer. In the full connection layer, the 'k Winners Take All' (kWTA) strategy is adopted for the competition learning of global features to enhance the performance. Since the full connection layer has a global perception field, a more stringent method is adopted to allow the neurons in the layer to compete with each other.
[0060] Specifically, the different pulse neurons are sorted based on the sensitivity, and the excitation or inhibition of the pulse neurons is realized by using the sorting result, which is called the kWTA competition strategy, as shown in Figure 3 The second mapping function is used to retain the original response of the k2 pulse neurons most sensitive to the input information, to inhibit the response of the pulse neurons with a sensitivity ranking after k2 and a sensitivity above 0, and to set the pulse neurons with no response to the input information to 0. The sensitivity refers to the degree of response of the output of the pulse neuron to the change of the input pulse signal. The value of k2 can be obtained through multiple experimental comparisons. Exemplarily, k2 is 5.
[0061] The response value of the full connection layer using the kWTA strategy is obtained by the following formula:
[0062]
[0063] Wherein, t represents the time step in the SNN network, the second mapping function o t,m represents the response value output by the mth pulse neuron after mapping, f t,m represents the output response value of the mth pulse neuron, f t,topk2 represents the k2th response value obtained by sorting the response values of the pulse neurons in the full connection layer from large to small. The kWTA strategy is more stringent than the WRLP strategy, which is beneficial to improve the accuracy of the classification task. The obtained o t,m The LIF neuron of the input SNN network outputs the final prediction classification label of the image.
[0064] In the training process of the SNN network, the adaptive joint learning method is adopted, which combines local unsupervised learning, global supervised learning and competition learning, as shown in Figure 4 The preprocessed image data and the corresponding labels are input into the SNN network as the training set. By comparing the prediction classification label of the image output by the SNN network with the actual label corresponding to the image, the loss value of the SNN network training is obtained, the network parameters are adjusted according to the global back propagation algorithm and the local synaptic plasticity algorithm, and the learning weight is adaptively adjusted through the weight distribution ratio, including:
[0065] In the forward propagation process of the SNN network, a local learning rule and a competition strategy are used to adjust the synaptic weight according to the time correlation of neuron pulses; for example, the local learning rule adopts the STDP (Spike Timing Dependent Plasticity) rule, which uses the pulse correlation of the pulse neurons in the front and rear layers to strengthen or weaken the synaptic weight, including: when the pulse correlation of the pulse neurons in the front and rear layers exists a time causal relationship, the synaptic connection is strengthened; otherwise, the synaptic connection is weakened.
[0066] In the backward propagation process of the SNN network, an event-based back propagation algorithm BPTT is used, which only propagates error signals when pulses occur, and minimizes the output classification error through gradient descent. The back propagation adjusts the forward connection weight between layers, thereby achieving better pattern recognition. The weight distribution ratio autonomously adjusts the fusion of global and local learning rules according to different data sets, improving the model's adaptation ability to different task scenarios.
[0067] In addition, the embodiment integrates the competitive parameters and the weight distribution ratio between the global and local learning methods into the back propagation update. This enables the network to adaptively cooperate to perform a given pattern recognition task, achieving adaptive control of the entire network.
[0068] Specifically, the picture X obtained after preprocessing is input into the SNN network, and t represents the time step in the SNN network; the present application sets a global learning weight W for each convolution kernel in the convolution layer t Input the SNN network, t represents the time step in the SNN network; the present application sets a global learning weight W for each convolution kernel in the convolution layer Wherein, n represents the convolution layer number, n takes a value from 1 to N, N represents the number of convolution layers, and c represents the serial number of the convolution kernel in the corresponding convolution layer; the extracted feature data is obtained through the convolution layer of the SNN network
[0069] The obtained is mapped to obtain
[0070] The N convolution layers of the SNN network are sequentially passed through, and the WRLP competition strategy is used for each convolution layer;
[0071] The feature data output by the last convolution layer is mapped to obtain After sequentially passing through the pooling layer, the flattening layer, and the linear layer, the feature data is input into the fully connected layer for feature aggregation, including:
[0072] A learning weight W is set for each neuron in the fully connected layer N+1 , and the weighted is obtained Where l represents the number of spiking neurons in the fully connected layer; the learning weights include the global learning weights and local learning weights of the neurons;
[0073] Using kWTA competition strategy Perform mapping to obtain
[0074] The predicted classification label of the image output by the SNN network is compared with the actual label of the image to obtain the loss value L of the SNN network training. t .
[0075] Using L t Perform backpropagation and calculate... W N+1 β l β r And ∝.
[0076] Furthermore, weights W are assigned to each neuron in the fully connected layer. N+1 ,include:
[0077] During backpropagation, the global learning weight, local learning weight, and weight distribution ratio between the global and local learning weights of the neuron are calculated.
[0078] The weights of each neuron in the fully connected layer can be calculated using the following formula:
[0079]
[0080] Where ∝ is a hyperparameter representing the weight allocation ratio. This represents the global learning weights of the corresponding neuron. The values represent the local learning weights of the corresponding neurons, l represents the number of spiking neurons in the fully connected layer, and N represents the number of convolutional layers; ∝、W N+1 , and It is learned using backpropagation.
[0081] Compared with the prior art, the embodiment provides an image classification method based on a hierarchical competitive spiking neural network, a hierarchical heterogeneous competitive strategy is introduced into a traditional SNN network, different competitive mechanisms are designed for a convolutional layer and a fully connected layer, the convolutional layer is used for local feature learning by using a first mapping function, and the fully connected layer is used for global feature aggregation by using a second mapping function, the feature expression capability of the SNN network for image data is enhanced, the network can learn more diverse feature representations, the complexity and diversity of images can be captured, and the image distinguishing capability of the model is improved; an adaptive joint learning method is adopted to organically combine a global back propagation algorithm based on supervised learning, a local synaptic plasticity algorithm based on unsupervised learning, and a local unsupervised learning algorithm based on competitive learning, that is, a local learning rule is used when the network is forward propagated, and a global learning rule is used to adjust parameters when the network is backward propagated, the weight distribution of global learning and local learning is adaptively adjusted, the manual parameter adjustment process is reduced, the network training is more robust to tasks and data sets, the training direction is quickly provided by using global feedback signals in the early stage, and the convergence speed is improved; in the later stage, the dependence on local learning is increased, better training curves can be obtained, redundant calculation can be significantly reduced, and the calculation efficiency of image recognition is improved.
[0082] One specific embodiment of the present application discloses an image classification system based on an SNN network, as shown in the accompanying drawings, comprising: an image acquisition module 51, an image preprocessing module 52, an SNN network module 53 and a training module 54, wherein: Figure 5
[0083] The image acquisition module 51 is used for acquiring images.
[0084] The image preprocessing module 52 is used for preprocessing the acquired image data.
[0085] The SNN network module 53 is used for calculating the predicted classification label of the image by using the preprocessed image data; the SNN network module introduces a competitive strategy, comprising:
[0086] The input image data is subjected to a convolutional layer to obtain a feature map, the feature responses of each position in the feature map are sorted, and the sorting results are used to realize excitation or inhibition of the feature map, wherein the sizes of excitation or inhibition are obtained by excitation coefficients and inhibition coefficients respectively; and different pulse neurons are sorted based on sensitivity, and the sorting results are used to realize excitation or inhibition of the pulse neurons.
[0087] The training module 54 is configured to assign weights to each convolution kernel in the convolution layer and each neuron in the full connection layer in the SNN network, calculate a loss value of the SNN network training, and perform back propagation using the loss value to calculate the weights of each convolution kernel, the weights of each neuron, an excitation coefficient and an inhibition coefficient.
[0088] It should be noted that the system and method of the present application are based on the same inventive concept, and the specific content can be mutually referred to, which will not be described again here. It includes the network training process, the preprocessing process, etc.
[0089] Those skilled in the art can understand that all or part of the processes of the above-mentioned embodiments can be completed by a computer program instructing related hardware, and the program can be stored in a computer readable storage medium. The computer readable storage medium includes a magnetic disk, an optical disk, a read-only memory, a random access memory, etc.
[0090] The above is only a preferred embodiment of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application.
Claims
1. A method for image classification based on a hierarchical competitive spiking neural network, characterized in that, The method comprises: preprocessing image data; inputting the preprocessed image data into a trained SNN network to obtain a predicted classification label of the image; wherein a competition strategy is introduced into the SNN network, comprising: obtaining a feature map from the input image data through a convolution layer, sorting the feature responses at each position in the feature map, and using the sorting result to realize excitation or inhibition of the feature map, wherein the size of excitation or inhibition is obtained from an excitation coefficient and an inhibition coefficient; and sorting different pulse neurons based on sensitivity, and using the sorting result to realize excitation or inhibition of the pulse neurons; the training of the SNN network comprises: assigning weights to each convolution kernel in the convolution layer in the SNN network, assigning weights to each neuron in the fully connected layer; calculating the loss value of the SNN network training; using the loss value for back propagation to calculate the weights of each convolution kernel, the weights of each neuron, the excitation coefficient and the inhibition coefficient; sorting the feature responses at each position in the feature map, and using the sorting result to realize excitation or inhibition of the feature map, comprising: obtaining a feature map from the input image data through a convolution layer, and dividing the feature responses at each position in the feature map into three categories according to the response intensity, wherein: using a first mapping function, giving positive excitation to the k1 features with the strongest response based on the excitation coefficient, inhibiting the features with response ranking after k1 and response value above 0 based on the inhibition coefficient, and setting the features with response less than 0 to 0; the sorting of the feature responses at each position in the feature map is realized by using the following formula, and the sorting result is used to realize excitation or inhibition of the feature map: ; Where t represents the time step in the SNN network, and n represents the nth time step obtained after feature extraction by the convolutional layer. Feature maps, first mapping function The nth feature map The value after mapping the feature value of the location. Indicates the first Each feature map The characteristic response of the location, This represents all feature maps obtained after passing through the convolutional layer. Location-based characteristic response ranking The values are arranged in descending order of the feature values; and These are hyperparameters, representing the excitation coefficient and inhibition coefficient, respectively; sorting different pulse neurons based on sensitivity, and using the sorting result to realize excitation or inhibition of the pulse neurons, comprising: using a second mapping function, keeping the original response of the k2 pulse neurons most sensitive to the input information, inhibiting the response of the pulse neurons with sensitivity ranking after k2 and sensitivity above 0, and setting the pulse neurons with no response to the input information to 0; the sorting of different pulse neurons based on sensitivity is realized by using the following formula, and the sorting result is used to realize excitation or inhibition of the pulse neurons: ; Where t represents the time step in the SNN network, and the second mapping function... Indicates the first The response value output by each spiking neuron after mapping. Indicates the first The output response value of each spiking neuron This represents the result of sorting the response values of each spiking neuron in the fully connected layer from largest to smallest. Each response value.
2. The image classification method based on hierarchical competitive pulse neural network according to claim 1, characterized in that, the assignment of weights to each neuron in the fully connected layer comprises: in the process of back propagation, the global learning weight, the local learning weight of the neuron, and the weight distribution ratio between the global learning weight and the local learning weight are calculated.
3. The image classification method based on a hierarchical competitive pulse-coupled neural network according to claim 1 or 2, characterized in that, the weights of each neuron in the fully connected layer are calculated by using the following formula: + ; wherein, is a hyperparameter representing a weight distribution ratio, represents a global learning weight of the corresponding neuron, represents a local learning weight of the corresponding neuron, represents the number of pulse neurons in the fully connected layer, and N represents the number of convolutional layers.
4. The image classification method based on hierarchical competitive pulse neural network according to claim 1, characterized in that, the training of the SNN network further comprises: using the STDP rule to enhance or weaken the synaptic weight by using the pulse correlation of the front and rear layer pulse neurons, comprising: when the pulse correlation of the front and rear layer pulse neurons exists a time causal relationship, strengthening the synaptic connection; otherwise, weakening the synaptic connection.
5. An image classification system based on a hierarchical competitive spiking neural network, characterized in that, It comprises an image acquisition module, an image preprocessing module, an SNN network module and a training module, wherein: the image acquisition module is used for acquiring images; the image preprocessing module is used for preprocessing the acquired image data; The SNN network module is configured to calculate a predicted classification label of an image by using preprocessed image data, and the SNN network module introduces a competition strategy, including: The feature map is obtained by performing a convolution operation on the input image data, the feature responses at each position in the feature map are sorted, and the sorted results are used to stimulate or inhibit the feature map, wherein the stimulation or inhibition is obtained by using a stimulation coefficient and an inhibition coefficient, respectively; and different pulse neurons are sorted based on sensitivity, and the sorted results are used to stimulate or inhibit the pulse neurons; The training module is configured to assign weights to each convolution kernel in the convolution layer in the SNN network and assign weights to each neuron in the fully connected layer, calculate a loss value of the SNN network training, and perform back propagation by using the loss value to calculate the weights of each convolution kernel, the weights of each neuron, the stimulation coefficient, and the inhibition coefficient; The feature responses at each position in the feature map are sorted, and the sorted results are used to stimulate or inhibit the feature map, including: The feature map is obtained by performing a convolution operation on the input image data, the feature responses at each position in the feature map are divided into three categories according to the response intensity, wherein: a first mapping function is used to positively stimulate the k1 features with the strongest responses based on a stimulation coefficient, to inhibit the features with responses ranked after k1 and response values above 0 based on an inhibition coefficient, and to set the features with responses less than 0 to 0; The feature map at different positions of the input image data is sorted by using the following formula, and the sorted results are used to stimulate or inhibit the feature map: ; wherein t represents a time step in the SNN network, n represents the nth feature map obtained after extracting features by the convolutional layer, the first mapping function maps a feature value of a position in the nth feature map to a value after mapping, the second mapping function maps a feature value of a position in the nth feature map to a value after mapping, the third mapping function maps a feature value of a position in the nth feature map to a feature response, the fourth mapping function maps a feature value of a position in the nth feature map to a value after sorting, the fifth mapping function maps a feature value of a position in the nth feature map to a value after sorting, wherein the sorting is arranged in a descending order of feature values; and are hyperparameters, respectively representing an excitation coefficient and an inhibition coefficient; Different pulse neurons are sorted based on sensitivity, and the sorted results are used to stimulate or inhibit the pulse neurons, including: A second mapping function is used to retain the original responses of the k2 pulse neurons that are most sensitive to the input information, to inhibit the responses of the pulse neurons with sensitivity ranked after k2 and sensitivity above 0, and to set the pulse neurons with no response to the input information to 0; The different pulse neurons are sorted based on sensitivity by using the following formula, and the sorted results are used to stimulate or inhibit the pulse neurons: ; wherein t represents a time step in the SNN network, the second mapping function represents a response value output by the i-th pulse neuron after mapping, represents an output response value of the i-th pulse neuron, represents the i-th response value obtained by sorting the response values of the pulse neurons in the fully connected layer from large to small, and the second mapping function is a function of the response value of the i-th pulse neuron. 6. The layered competitive pulse coupled neural network based image classification system of claim 5, wherein, The weights of each neuron in the fully connected layer are calculated by using the following formula: + ; wherein, is a hyperparameter representing a weight distribution ratio, represents a global learning weight of the corresponding neuron, represents a local learning weight of the corresponding neuron, represents the number of pulse neurons in the fully connected layer, and N represents the number of convolutional layers.
Citation Information
Patent Citations
Increment neural network and sub-graph code based image classification method
CN103116766A
Multilayer image classification method based on delay mechanism
CN113408611A