Novel pulse neural network synaptic weight adjustment method

By introducing Leaky Integrate and Fired algorithm and Q learning mechanism into pulsed neural networks, combined with Gaussian pulse timing dependence plasticity rules, the shortcomings of traditional rules in weight adjustment are solved, and more efficient pulsed neural network weight adjustment and classification task accuracy are achieved.

CN119647531AActive Publication Date: 2025-03-18KUNMING UNIV OF SCI & TECH

Patent Information

Application Number
CN202411458895.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-03-18
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

The weight adjustment results of traditional pulse timing-dependent plasticity rules in pulse neural networks are not ideal, and the global adjustment of neuronal weights cannot be achieved.

Method used

By introducing the Leaky Integrate and Fired algorithm, the pulse neural network model is built, and the time interval between neurons before and after synapses is tracked, local weight adjustment is performed in combination with Gaussian pulse timing dependence rules, and global weight adjustment is achieved through the Q-learning mechanism.

Benefits of technology

The accuracy of pulsed neural networks in classification tasks is improved, effective local and global regulation of synaptic weights is achieved, and effective connections between neurons are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119647531A_ABST
    Figure CN119647531A_ABST
Patent Text Reader

Abstract

The invention relates to a novel pulse neural network synaptic weight adjustment method, and belongs to the field of artificial intelligence. Firstly, a traditional pulse time sequence dependence plasticity rule is improved based on the distribution trend of a Gaussian function, so that the weight change corresponding to the optimized synaptic plasticity rule when the time interval tends to 0 is larger, and when the time interval is gradually increased, the weight change is in an accelerated descending trend; the method comprises the following steps: firstly, performing synaptic weight local regulation on a neuron model to improve the local regulation capability of the synaptic plasticity of the neuron, then introducing reinforcement learning, associating Q learning with the synaptic plasticity in the neuron model, and realizing the global regulation and control of the plasticity on the basis of the synaptic weight local regulation. According to the above synaptic plasticity rule, the spiking neural network constructed based on Leaky Integrating and Fire is subjected to weight adjustment, so that the spiking neural network has better performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a novel pulse neural network synapse weight adjustment method, belonging to the field of artificial intelligence. Background Art

[0002] In the field of exploring the process of pulse transmission between neurons, the pulse timing-dependent plasticity rule has attracted much attention due to its biological rationality and high computational efficiency. However, the performance of the spiking neural network based on the traditional pulse timing-dependent plasticity regulation rule still has room for improvement. In order to more accurately simulate the influence of neurotransmitters on the action potential of postsynaptic neurons and realize local and global regulation of synaptic plasticity, we have made innovative improvements to the traditional pulse timing-dependent plasticity rule, optimized the local adjustment of synaptic weights, and introduced the Q learning mechanism to realize the global regulation of synaptic connections, thus constructing a new type of spiking neural network synaptic plasticity rule. Summary of the invention

[0004] The technical problem to be solved by the present invention is that the weight adjustment result of the traditional pulse timing-dependent plasticity rule for the pulse neural network is not ideal and the global adjustment of the neuron weight cannot be achieved.

[0005] The technical solution of the present invention is: a novel method for adjusting synaptic weights of a pulse neural network, comprising:

[0006] Step 1: Build a spiking neural network model based on the Leaky Integrate and Fired algorithm, track the time interval between the presynaptic neuron firing a pulse and the postsynaptic neuron firing a pulse in the spiking neural network model, and obtain the change information of the synaptic weight through the time interval.

[0007] The Step 1 is specifically as follows:

[0008] Step 1.1: Initialize the Leaky Integrate and Fired algorithm model, and simulate the process of accumulating membrane potential and emitting pulses through Leaky Integrate and Fired. The process of accumulating membrane potential is:

[0009]

[0010] In the formula, l is the number of layers of the neural network, t is the time step, V (l) [t] is the membrane potential of layer l at time step t, τ is the time constant, V reset Represents the resting potential. When the membrane potential exceeds the threshold, a pulse is emitted and the membrane potential is reset to the resting potential value.

[0011] The membrane potential accumulation process of the Leaky Integrate and Fired model is tracked, and a pulse is emitted when the membrane potential accumulation exceeds the set threshold. The expression of the process is as follows:

[0012]

[0013] In the formula, S (l-1) is the pulse input of the previous layer, W (l) is the synaptic weight of the lth layer, and the initial membrane potential is the resting potential, that is, V rest =0, V th is the threshold of membrane potential, Θ(·) is a step function. When the membrane potential value gradually accumulates and exceeds the threshold, the neuron will emit a pulse. After the pulse is emitted, the membrane potential will be reset to the resting state, that is, V reset =V rest = 0, the mechanism of pulse emission is defined as the following function:

[0014]

[0015] Step 1.2: Track the accumulation process of membrane potential. When the accumulated membrane potential exceeds the threshold, pulses are emitted and the pulse emission time is recorded, thereby obtaining the time when the presynaptic neuron and the postsynaptic neuron in the spiking neural network emit pulses. According to the regulation mechanism of the synaptic neural network, the change of synaptic weight is related to the time interval between the presynaptic neuron and the postsynaptic neuron. The time interval is used as the basis for weight adjustment. Let the time interval be Δt. The calculation method of Δt is as follows:

[0016]

[0017] In the formula, is the time when the presynaptic neuron fires a spike, The time at which the postsynaptic neuron fires a spike.

[0018] Step 2: According to the changing trend of the Gaussian function, the traditional pulse timing-dependent plasticity rule is improved. The improved Gaussian pulse timing-dependent plasticity rule can be used to locally adjust the weights in the pulse neural network, enhance the probability of connection between neurons with strong correlation, and reduce the probability of connection between neurons with weak correlation, so that the pulse neural network conforms to the Hebbian learning theory and the lateral inhibition phenomenon in biological neurology.

[0019] In Step 2, the local adjustment mechanism for the weights of the spiking neural network includes:

[0020] Since all neurons in the established spiking neural network are fully connected, the weights are updated by the time interval between the presynaptic neuron emitting a pulse and the postsynaptic neuron emitting a pulse.

[0021] If the presynaptic neuron fires slightly later than the postsynaptic neuron, and the time interval approaches 0, the weight between the corresponding neurons increases.

[0022] If the presynaptic neuron fires a spike slightly earlier than the postsynaptic neuron, and the time interval approaches 0, the weight between the corresponding neurons decreases.

[0023] If the presynaptic neuron fires later than the postsynaptic neuron, or the presynaptic neuron fires earlier than the postsynaptic neuron but with a longer time interval, the weight change between the corresponding neurons is small.

[0024] The weight changes between neurons change with the time interval, and the change trend is similar to that of the Gaussian function. When the time interval approaches 0, the corresponding weight change is large. As the time interval increases, the corresponding weight change shows an accelerated decay trend.

[0025] The weights of the pulse neural network are locally adjusted according to the weight change mechanism.

[0026] The Gaussian pulse timing-dependent plasticity rule obtained in Step 2 is specifically:

[0027] Step 2.1: Initialize the traditional spike timing-dependent plasticity rule. The weight update mechanism in the spike neural network is defined as the following function:

[0028]

[0029] In the formula, Δw is the weight change value, A pre and A post represent the amplitude parameters of long-term potentiation and long-term depression, τ pre and τ post They represent the time constants of long-term potentiation and long-term depression, respectively, and the parameter τ pre Determines the decay rate of the weight when Δt>0, parameter τ post Determines the speed of weight enhancement when Δt < 0. If the presynaptic neuron fires a pulse slightly later than the postsynaptic neuron, the weight increases, corresponding to the long-term potentiation effect; if the presynaptic neuron fires a pulse before the postsynaptic neuron, the weight decreases, corresponding to the long-term inhibition effect;

[0030] Step 2.2: According to the changing trend of the Gaussian function, the traditional pulse timing-dependent plasticity rule is modified to obtain the Gaussian pulse timing-dependent plasticity rule. The modified Gaussian pulse timing-dependent plasticity rule formula is as follows:

[0031]

[0032] According to the modified Gaussian pulse timing-dependent plasticity rule, when the time interval approaches 0, the corresponding weight change increases, and vice versa, when the time interval gradually increases, the corresponding weight change shows an accelerated downward trend. Specifically, when the postsynaptic neuron emits a pulse slightly earlier than the presynaptic neuron, and the time interval approaches 0, the weight increase under the Gaussian pulse timing-dependent plasticity rule will be higher than the weight increase under the traditional pulse timing-dependent plasticity regulation. Conversely, when the presynaptic neuron emits a pulse slightly earlier than the postsynaptic neuron, and the time interval approaches 0, the weight decrease is higher than the weight change based on the traditional pulse timing-dependent plasticity rule; when the absolute value of the above time interval gradually increases, the weight change will show an accelerated downward trend. Under the same time interval, the modified plasticity rule can make the weight change smaller than the weight change based on the original plasticity rule.

[0033] Step 3: Establish global weight adjustment rules through Q learning, and globally adjust the weights of the pulse neural network based on the local weight adjustment in Step 2 to strengthen the effective connections between neurons and weaken the invalid connections between neurons.

[0034] In the global adjustment rule, the value of the Q function is the object for the agent to perform actions. The agent updates the value of the Q function according to the reward signal and enhances the weights between neurons.

[0035] The event that the presynaptic neuron fires a pulse slightly later than the postsynaptic neuron is set as a reward signal. The agent explores and exploits with an ε-greedy strategy. When a reward signal in the environment is identified, the weight of the source of the reward signal is enhanced. This rule can enhance the effective connections in neurons.

[0036] The Step 3 is specifically as follows:

[0037] Step 3.1: Associate Q learning with the weights of the neural network. The value of the Q function is defined as the agent. The event that the presynaptic neuron emits a pulse slightly later than the postsynaptic neuron and the time interval tends to 0 is set as the reward signal. The exploration decision and utilization decision of Q learning are determined by the ε-greedy strategy. ε is a parameter between 0 and 1, which determines the probability of the agent to explore at each decision. ε will gradually decrease, so that the agent changes from exploration-oriented to utilization-oriented.

[0038] Step 3.2: According to the setting of Step 3.1, the agent continues to perform global regulation on the basis of the local adjustment of the neural network weights in Step 2. According to the ε-greedy strategy, the agent will perform exploration actions with a probability of ε and perform utilization actions with a probability of (1-ε). When the agent explores the reward signal during the learning process of the spiking neural network regulated by the Gaussian pulse timing-dependent plasticity rule, the agent updates the value of the Q function and increases the weights between neurons. The agent's behavior of updating the Q function is iterative, and ε gradually decays. The agent updates the Q function using known behaviors. When all training samples complete the learning process in the spiking neural network, the agent immediately stops iteratively updating the Q function. The update formula of the Q function is as follows:

[0039] Q(s,a)←Q(s,a)+α[r+γmax a′ Q(s′,a′)-Q(s,a)]

[0040] Where s is the state, a is the action, Q(s,a) is the Q value of taking action a in state s, that is, the weight update value between neurons, α is the learning rate, r is the immediate reward received after executing the action, γ is the discount factor, s′ is the new state reached after executing the action, and max a′ Q(s′,a′) is the maximum Q value of all possible actions in the new state.

[0041] Step 4: Use the convolutional attention module to preprocess the data that needs to perform the classification task, extract the key features of the data, use the key features as the input of the pulse neural network model, and adjust the weights of the pulse neural network through local and global adjustment rules of the pulse neuron weights to complete the classification task.

[0042] The Step 4 is specifically as follows:

[0043] Step 4.1: Obtain the data to be classified, randomly select a portion of the data as training samples, and obtain the category labels corresponding to the selected training samples;

[0044] Step 4.2: Construct a channel attention module. The input training samples will be processed by global average pooling and global maximum pooling respectively. The two processing results are shared in a network structure. The network structure consists of a multi-layer perceptron with a hidden layer. The results of global average pooling and global maximum pooling are summed and merged. The calculation formula of channel attention is as follows:

[0045]

[0046] In the formula, σ(·) is the sigmoid function, MLP(·) is the multi-layer perceptron computing model, AvgPool(F) represents the average pooling of input features, and MaxPool(F) represents the maximum pooling of input features. and Corresponding to the features after average pooling and maximum pooling, W0 and W1 are the weights of MLP(·) multilayer perceptron, and finally the channel attention feature M is obtained. c (F);

[0047] Step 4.3: Construct a spatial attention module, perform average pooling and maximum pooling operations along the channel axis of the input data, and then connect the two to form spatial features. The calculation formula for spatial attention is as follows:

[0048]

[0049] In the formula, f 7×7 (·) represents the filter convolution operation with a size of 7×7. AvgPool(·) and MaxPool(·) represent the average pooling and maximum pooling operations in the convolution operation, respectively. and Represent the average pooling feature and global pooling feature in the spatial attention mechanism respectively, and the channel attention feature M is obtained according to the calculation s (F);

[0050] Step 4.4: Build a convolutional attention model. By connecting the channel attention module and the spatial attention module in series, the calculation formula of convolutional attention is as follows:

[0051]

[0052] In the formula, F is the original data input, M c is the channel attention operation, M s is the spatial attention operation;

[0053] Step 4.5: Using the training samples as the input of the constructed convolutional attention model, and obtaining the key features of the extracted training samples according to the convolutional attention calculation, wherein the key features are the correlation features that are beneficial to the learning and training effects of the spiking neural network after the redundant features and noise of the training samples are eliminated, and the key features are used as the input of the spiking neural network model for training, and the weights between the spiking neurons are adjusted using the local adjustment and global adjustment rules of the neuron weights during the sample training process, and the pulse sequence tensor is obtained after the training is completed;

[0054] Step 4.6: Build a fully connected classifier with a three-layer structure. The number of neurons in the first layer of the classifier is equal to the product of the original data size of the training sample, the number of neurons in the second layer of the classifier is equal to 128, and the number of neurons in the third layer of the classifier is equal to the number of categories. The classifier training is implemented based on the built three-layer full connection. The pulse sequence tensor generated by the sample training process of Step 6.5 is used as the training sample of the classifier. After the preset number of iterations, the classifier is obtained;

[0055] Step 4.7: Use the pulse neural network to obtain the pulse sequence of the data to be classified, and then pass the obtained pulse sequence through the trained classifier to complete the data classification.

[0056] The present invention proposes a novel synaptic plasticity rule to optimize the weights of the spiking neural network, thereby improving the accuracy of the spiking neural network in performing classification tasks.

[0057] The beneficial effects of the present invention are: modifying the traditional pulse timing dependent plasticity rule operation formula, and locally optimizing the weights between the neurons of the pulse neural network through the rule; introducing Q learning, updating the neuron weights according to the update of the Q function, and enhancing the weights between neurons with strong correlations, thereby realizing global adjustment of the weights of the pulse neural network. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 It is an implementation flow chart of the present invention. DETAILED DESCRIPTION

[0059] The present invention will be further described below in conjunction with the accompanying drawings and specific implementation methods.

[0060] Example 1: Figure 1 As shown in the figure, the pulse neural network is optimized based on the new weight adjustment mechanism. The specific steps are:

[0061] Step 1: First, obtain the training data of the target dataset, and randomly select 5000 data as training data, and record the category labels corresponding to the selected training data; randomly select 5000 data and corresponding labels from the MNIST, Fashion MNIST and CIFAR10 datasets as training data.

[0062] Step 2: Build a convolutional attention model through the channel attention model and the spatial attention model, use the convolutional attention model to refine the selected 5000 training samples and extract data feature values; calculate the feature values ​​of the training samples randomly selected in Step 1 through the convolutional attention model.

[0063] Step 3: Use Leaky Integrate and Fired technology to build a spiking neural network. The initial pulse of the spiking neural network is a random value of 0-1, and the training sample feature value calculated in Step 2 is used as the input of the network structure.

[0064] Step 4: Optimize the pulse neural network of Step 3 according to the local adjustment mechanism of Gaussian pulse timing-dependent plasticity weights and the global adjustment mechanism of Q learning weights, calculate the training results based on the neural network, and obtain the pulse tensor and network model.

[0065] Step 5: Establish a three-layer fully connected structure, take the pulse tensor calculated in Step 4 and the classification label in Step 1 as input, train the classifier according to the set epoch value, and obtain the pulse classifier.

[0066] Step 6: Calculate the pulse sequence of the data to be classified according to the network model obtained in Step 4, and classify the obtained pulse sequence according to the classifier in Step 5.

[0067] The present invention is described in detail below through specific examples.

[0068] Step 1: Simulation environment and experimental parameter settings;

[0069] The present invention uses Python programming speech, MNIST data set, Fashion MNIST data set and CIFAR10 data set to conduct simulation experiments. Figure 1 The method flow shown realizes image data classification. A novel pulse neural network synaptic weight adjustment method proposed in the present invention optimizes the pulse neural network. Three public data sets perform classification tasks according to the optimized model.

[0070] Step 2: Overall implementation process;

[0071] like Figure 1 As shown, the specific implementation process of the present invention is:

[0072] First, obtain the MNIST, Fashion MNIST, and CIFAR10 data sets, randomly select 5,000 data from the training sets of the three data sets as training samples, and obtain the category labels corresponding to the training samples.

[0073] Secondly, the convolutional attention module is used to calculate the features of the selected training samples and extract the features corresponding to each training data.

[0074] Then, a spiking neural network is built using the Leaky Integrate and Fired technology. The initial pulse of the spiking neural network is a random value of 0-1. The spiking neural network model is initialized, and the training features are used as the input of the spiking neural network model for training. The weights of the spiking neural network model are locally adjusted using the Gaussian pulse timing-dependent plasticity rule, and the model weights are globally adjusted using the global weight adjustment mechanism based on Q learning. The spiking neural network model is updated, and the pulse tensor is obtained.

[0075] Subsequently, a three-layer fully connected structure is built, and the pulse tensor and sample labels are used as input for training to obtain the pulse classifier.

[0076] Finally, the data to be classified obtains the pulse sequence according to the pulse neural network, and obtains the classification result according to the fully connected classifier.

[0077] Step 3: Build a pulse neural network and initialize the model;

[0078] Step 3.1: Initialize the Leaky Integrate and Fired algorithm model, and simulate the process of accumulating membrane potential and emitting pulses through Leaky Integrate and Fired. The process of accumulating membrane potential is:

[0079]

[0080] In the formula, l is the number of layers of the neural network, t is the time step, V (l) [t] is the membrane potential of layer l at time step t, τ is the time constant, V reset Represents the resting potential. When the membrane potential exceeds the threshold, a pulse is emitted and the membrane potential is reset to the resting potential value.

[0081] The membrane potential accumulation process of the Leaky Integrate and Fired model is tracked, and a pulse is emitted when the membrane potential accumulation exceeds the set threshold. The expression of the process is as follows:

[0082]

[0083] In the formula, S (l-1) is the pulse input of the previous layer, W (l) is the synaptic weight of the lth layer, and the initial membrane potential is the resting potential, that is, V rest =0, V th is the threshold of membrane potential, Θ(·) is a step function. When the membrane potential value gradually accumulates and exceeds the threshold, the neuron will emit a pulse. After the pulse is emitted, the membrane potential will be reset to the resting state, that is, V reset =V rest= 0, the mechanism of pulse emission is defined as the following function:

[0084]

[0085] Step 3.2: Track the accumulation process of membrane potential. When the accumulated membrane potential exceeds the threshold, pulses are emitted and the pulse emission time is recorded, thereby obtaining the time when the presynaptic neuron and the postsynaptic neuron in the spiking neural network emit pulses. According to the regulation mechanism of the synaptic neural network, the change of synaptic weight is related to the time interval between the pulse emitted by the presynaptic neuron and the pulse emitted by the postsynaptic neuron. The time interval is used as the basis for weight adjustment. Let the time interval be Δt. The calculation method of Δt is as follows:

[0086]

[0087] In the formula, is the time when the presynaptic neuron fires a spike, The time at which the postsynaptic neuron fires a spike.

[0088] Step 4: Construct Gaussian pulse timing-dependent plasticity rules:

[0089] Step 4.1: Initialize the traditional spike timing-dependent plasticity rule. The weight update mechanism in the spike neural network is defined as the following function:

[0090]

[0091] In the formula, Δw is the weight change value, A pre and A post represent the amplitude parameters of long-term potentiation and long-term depression, τ pre and τ post They represent the time constants of long-term potentiation and long-term depression, respectively, and the parameter τ pre Determines the decay rate of the weight when Δt>0, parameter τ post Determines the speed of weight enhancement when Δt < 0. If the presynaptic neuron fires a pulse slightly later than the postsynaptic neuron, the weight increases, corresponding to the long-term potentiation effect; if the presynaptic neuron fires a pulse before the postsynaptic neuron, the weight decreases, corresponding to the long-term inhibition effect;

[0092] Step 4.2: According to the changing trend of the Gaussian function, the traditional pulse timing-dependent plasticity rule is modified to obtain the Gaussian pulse timing-dependent plasticity rule. The modified Gaussian pulse timing-dependent plasticity rule formula is as follows:

[0093]

[0094] According to the modified Gaussian pulse timing-dependent plasticity rule, when the time interval approaches 0, the corresponding weight change increases, and vice versa, when the time interval gradually increases, the corresponding weight change shows an accelerated downward trend. Specifically, when the postsynaptic neuron emits a pulse slightly earlier than the presynaptic neuron, and the time interval approaches 0, the weight increase under the Gaussian pulse timing-dependent plasticity rule will be higher than the weight increase under the traditional pulse timing-dependent plasticity regulation. Conversely, when the presynaptic neuron emits a pulse slightly earlier than the postsynaptic neuron, and the time interval approaches 0, the weight decrease is higher than the weight change based on the traditional pulse timing-dependent plasticity rule; when the absolute value of the above time interval gradually increases, the weight change will show an accelerated downward trend. Under the same time interval, the modified plasticity rule can make the weight change smaller than the weight change based on the original plasticity rule.

[0095] Step 5: Construct global regulation rules of pulse neural network based on Q learning.

[0096] Step 5.1: Associate Q learning with the weights of the neural network. The value of the Q function is defined as the agent. The event that the presynaptic neuron emits a pulse slightly later than the postsynaptic neuron and the time interval tends to 0 is set as the reward signal. The exploration decision and utilization decision of Q learning are determined by the ε-greedy strategy. ε is a parameter between 0 and 1, which determines the probability of the agent to explore at each decision. ε will gradually decrease, so that the agent changes from exploration-oriented to utilization-oriented.

[0097] Step 5.2: According to the setting of Step 3.1, the agent continues to perform global regulation on the basis of the local adjustment of the neural network weights in Step 2. According to the ε-greedy strategy, the agent will perform exploration actions with a probability of ε and perform utilization actions with a probability of (1-ε). When the agent explores the reward signal during the learning process of the spiking neural network regulated by the Gaussian pulse timing-dependent plasticity rule, the agent updates the value of the Q function and increases the weights between neurons. The agent's behavior of updating the Q function is iterative, and ε gradually decays. The agent updates the Q function using known behaviors. When all training samples complete the learning process in the spiking neural network, the agent immediately stops iteratively updating the Q function. The update formula of the Q function is as follows:

[0098] Q(s,a)←Q(s,a)+α[r+γmax a′ Q(s′,a′)-Q(s,a)]

[0099] Where s is the state, a is the action, Q(s,a) is the Q value of taking action a in state s, that is, the weight update value between neurons, α is the learning rate, r is the immediate reward received after executing the action, γ is the discount factor, s′ is the new state reached after executing the action, and max a′ Q(s′,a′) is the maximum Q value of all possible actions in the new state.

[0100] Step 6: Extract data samples, obtain the pulse neural network model and the corresponding classifier, and realize data classification.

[0101] Step 6.1: Get the MNIST, Fashion MNIST and CIFAR10 data sets, randomly select 5,000 data from the training sets of the three data sets as training samples, and obtain the category labels corresponding to the training samples. ;

[0102] Step 6.2: Construct a channel attention module. The input training samples will be processed by global average pooling and global maximum pooling respectively. The two processing results are shared in a network structure. The network structure consists of a multi-layer perceptron with a hidden layer. The results of global average pooling and global maximum pooling are summed and merged. The calculation formula of channel attention is as follows:

[0103]

[0104] In the formula, σ(·) is the sigmoid function, MLP(·) is the multi-layer perceptron computing model, AvgPool(F) represents the average pooling of input features, and MaxPool(F) represents the maximum pooling of input features. and Corresponding to the features after average pooling and maximum pooling, W0 and W1 are the weights of MLP(·) multilayer perceptron, and finally the channel attention feature M is obtained. c (F);

[0105] Step 6.3: Construct a spatial attention module, perform average pooling and maximum pooling operations along the channel axis of the input data, and then connect the two to form spatial features. The calculation formula for spatial attention is as follows:

[0106]

[0107] In the formula, f 7×7 (·) represents the filter convolution operation with a size of 7×7. AvgPool(·) and MaxPool(·) represent the average pooling and maximum pooling operations in the convolution operation, respectively. and Represent the average pooling feature and global pooling feature in the spatial attention mechanism respectively, and the channel attention feature M is obtained according to the calculation s (F);

[0108] Step 6.4: Build a convolutional attention model. By connecting the channel attention module and the spatial attention module in series, the calculation formula of convolutional attention is as follows:

[0109]

[0110] In the formula, F is the original data input, M c is the channel attention operation, M s is the spatial attention operation;

[0111] Step 6.5: Using the training samples as the input of the constructed convolutional attention model, and obtaining the key features of the extracted training samples according to the convolutional attention calculation, wherein the key features are the correlation features that are beneficial to the learning and training effects of the spiking neural network after the redundant features and noise of the training samples are eliminated, and the key features are used as the input of the spiking neural network model for training, and the weights between the spiking neurons are adjusted using the local adjustment and global adjustment rules of the neuron weights during the sample training process, and the pulse sequence tensor is obtained after the training is completed;

[0112] Step 6.6: Build a fully connected classifier with a three-layer structure. The number of neurons in the first layer of the classifier is equal to the product of the original data size of the training sample, the number of neurons in the second layer of the classifier is equal to 128, and the number of neurons in the third layer of the classifier is equal to the number of categories. The classifier training is implemented based on the built three-layer full connection. The pulse sequence tensor generated by the sample training process of Step 6.5 is used as the training sample of the classifier. After a preset number of iterations, the classifier is obtained.

[0113] Step 6.7: Use the pulse neural network to obtain the pulse sequence of the data to be classified, and then pass the obtained pulse sequence through the trained classifier to complete the data classification.

[0114] As shown in Table 1, Table 2, and Table 3, in order to prove the effectiveness of the Gaussian pulse timing-dependent plasticity weight local adjustment rule and the weight global adjustment rule based on Q learning in the present invention, experiments and evaluations were conducted on MNIST, Fashion MNIST, and CIFAR10 data sets by using the accuracy index. At the same time, the existing work based on the pulse neural network model was investigated, and the classification accuracy data of the existing work on the three same data sets were listed as a comparison. It can be seen that the Gaussian pulse timing-dependent plasticity weight local adjustment rule and the weight global adjustment rule based on Q learning in the present invention enable the pulse neural network to maintain a high accuracy rate in performing classification tasks. Among them, Table 1 is the classification accuracy and comparison experiment of the pulse neural network using the new synaptic weight adjustment rule of the present invention to optimize the classification accuracy of the MNIST data set, Table 2 is the classification accuracy and comparison experiment of the Fashion MNIST data set using the new synaptic weight adjustment rule of the present invention to optimize the pulse neural network, and Table 3 is the classification accuracy and comparison experiment of the CIFAR10 data set using the new synaptic weight adjustment rule of the present invention to optimize the pulse neural network.

[0115] Table 1 Classification accuracy of MNIST dataset optimized by the novel synaptic weight adjustment rule of the present invention and comparative experiments

[0116]

[0117] Table 2 Classification accuracy of Fashion MNIST dataset using the novel synaptic weight adjustment rule of the present invention to optimize the pulse neural network and comparative experiments

[0118]

[0119]

[0120] Table 3 Classification accuracy of CIFAR10 dataset and comparative experiments using the novel synaptic weight adjustment rule of the present invention to optimize the pulse neural network

[0121]

[0122] The specific implementation modes of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above implementation modes, and various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.

Claims

1. A novel synaptic weight adjustment method for a pulse neural network, characterized in that: Step 1: Build a spiking neural network model based on the Leaky Integrate and Fired algorithm, track the time interval between the presynaptic neuron and the postsynaptic neuron in the spiking neural network model, and obtain the change information of the synaptic weight through the time interval; Step 2: Establish the Gaussian pulse timing-dependent plasticity rule to adjust the weight locally, forming a local adjustment rule for the weight of the spiking neuron; Step 3: Introduce reinforcement learning based on the Gaussian pulse timing-dependent plasticity rule to form a global regulation rule for the weights of pulse neurons; Step 4: Use the convolutional attention module to preprocess the data that needs to perform the classification task, extract the key features of the data, use the key features as the input of the pulse neural network model, and adjust the weights of the pulse neural network through local and global adjustment rules of the pulse neuron weights to complete the classification task.

2. A novel pulse neural network synaptic weight adjustment method according to claim 1, characterized in that: The Step 1 is specifically as follows: Step 1.1: Initialize the Leaky Integrate and Fired algorithm model, and simulate the process of spiking neurons accumulating membrane potential and emitting pulses through Leaky Integrate and Fired. The process of accumulating membrane potential is: In the formula, l is the number of layers of the neural network, t is the time step, V (l) [t] is the membrane potential of layer l at time step t, τ is the time constant, V reset Represents the resting potential. When the membrane potential exceeds the threshold, a pulse is emitted and the membrane potential is reset to the resting potential value. The membrane potential accumulation process of the Leaky Integrate and Fired model is tracked, and a pulse is emitted when the membrane potential accumulation exceeds the set threshold. The expression of the process is as follows: In the formula, S (l-1) is the pulse input of the previous layer, W (l) is the synaptic weight of the lth layer, and the initial membrane potential is the resting potential, that is, V rest =0, V th is the threshold of membrane potential, Θ(·) is a step function. When the membrane potential value gradually accumulates and exceeds the threshold, the neuron will emit a pulse. After the pulse is emitted, the membrane potential will be reset to the resting state, that is, V reset =V rest = 0, the mechanism of pulse emission is defined as the following function: Step 1.2: Track the accumulation process of membrane potential. When the accumulated membrane potential exceeds the threshold, pulses are emitted and the pulse emission time is recorded, thereby obtaining the time when the presynaptic neuron and the postsynaptic neuron in the spiking neural network emit pulses. According to the regulation mechanism of the synaptic neural network, the change of synaptic weight is related to the time interval between the presynaptic neuron and the postsynaptic neuron. The time interval is used as the basis for weight adjustment. Let the time interval be Δt. The calculation method of Δt is as follows: In the formula, is the time when the presynaptic neuron fires a spike, The time it takes for the postsynaptic neuron to fire a spike.

3. A novel pulse neural network synaptic weight adjustment method according to claim 1, characterized in that: In Step 2, the Gaussian pulse timing-dependent plasticity rule is to improve the original pulse timing-dependent plasticity rule according to the change trend of the Gaussian function, and to achieve local regulation of the synaptic weights of the spiking neurons by adjusting the weight changes at different time intervals, specifically: Step 2.1: Initialize the traditional spike timing-dependent plasticity rule. The weight update mechanism in the spike neural network is defined as the following function: In the formula, Δw is the weight change value, A pre and A post represent the amplitude parameters of long-term potentiation and long-term depression, τ pre and τ post They represent the time constants of long-term potentiation and long-term depression, respectively, and the parameter τ pre Determines the decay rate of the weight when Δt>0, parameter τ post Determines the speed of weight enhancement when Δt < 0. If the presynaptic neuron fires a pulse slightly later than the postsynaptic neuron, the weight increases, corresponding to the long-term potentiation effect; if the presynaptic neuron fires a pulse before the postsynaptic neuron, the weight decreases, corresponding to the long-term inhibition effect; Step 2.2: According to the changing trend of the Gaussian function, the traditional pulse timing-dependent plasticity rule is modified to obtain the Gaussian pulse timing-dependent plasticity rule. The modified Gaussian pulse timing-dependent plasticity rule formula is as follows: According to the modified Gaussian pulse timing-dependent plasticity rule, when the time interval approaches 0, the corresponding weight change increases. Conversely, when the time interval gradually increases, the corresponding weight change shows an accelerated downward trend.

4. A novel pulse neural network synaptic weight adjustment method according to claim 1, characterized in that: In Step 3, the introduction of reinforcement learning is to introduce Q learning and ε-greedy strategy to achieve global adjustment of the synaptic weights of spiking neurons, specifically: Step 3.1: Associate Q learning with the weights of the neural network. The value of the Q function is defined as the agent. The event that the presynaptic neuron emits a pulse slightly later than the postsynaptic neuron and the time interval tends to 0 is set as the reward signal. The exploration decision and utilization decision of Q learning are determined by the ε-greedy strategy. ε is a parameter between 0 and 1, which determines the probability of the agent to explore at each decision. ε will gradually decrease, so that the agent changes from exploration-oriented to utilization-oriented. Step 3.2: According to the setting of Step 3.1, the agent continues to perform global regulation on the basis of the local adjustment of the neural network weights in Step 2. According to the ε-greedy strategy, the agent will perform exploration actions with a probability of ε and perform utilization actions with a probability of (1-ε). When the agent explores the reward signal during the learning process of the spiking neural network regulated by the Gaussian pulse timing-dependent plasticity rule, the agent updates the value of the Q function and increases the weights between neurons. The agent's behavior of updating the Q function is iterative, and ε gradually decays. The agent updates the Q function using known behaviors. When all training samples complete the learning process in the spiking neural network, the agent immediately stops iteratively updating the Q function. The update formula of the Q function is as follows: Q(s,a)←Q(s,a)+α[r+γmax a′ Q(s′,a′)-Q(s,a)] Where s is the state, a is the action, Q(s,a) is the Q value of taking action a in state s, that is, the weight update value between neurons, α is the learning rate, r is the immediate reward received after executing the action, γ is the discount factor, s′ is the new state reached after executing the action, and max a′ Q(s′,a′) is the maximum Q value of all possible actions in the new state.

5. A novel pulse neural network synaptic weight adjustment method according to claim 1, characterized in that: In Step 4, the convolutional attention module is composed of a channel attention module and a spatial attention module, and the classification task is specifically completed as follows: Step 4.1: Obtain the data to be classified, randomly select a portion of the data as training samples, and obtain the category labels corresponding to the selected training samples; Step 4.2: Construct a channel attention module. The input training samples will be processed by global average pooling and global maximum pooling respectively. The two processing results are shared in a network structure. The network structure consists of a multi-layer perceptron with a hidden layer. The results of global average pooling and global maximum pooling are summed and merged. The calculation formula of channel attention is as follows: In the formula, σ(·) is the sigmoid function, MLP(·) is the multi-layer perceptron computing model, AvgPool(F) represents the average pooling of input features, and MaxPool(F) represents the maximum pooling of input features. and Corresponding to the features after average pooling and maximum pooling, W0 and W1 are the weights of MLP(·) multilayer perceptron, and finally the channel attention feature M is obtained. c (F); Step 4.3: Construct a spatial attention module, perform average pooling and maximum pooling operations along the channel axis of the input data, and then connect the two to form spatial features. The calculation formula for spatial attention is as follows: In the formula, f 7×7 (·) represents the filter convolution operation with a size of 7×7. AvgPool(·) and MaxPool(·) represent the average pooling and maximum pooling operations in the convolution operation, respectively. and Represent the average pooling feature and global pooling feature in the spatial attention mechanism respectively, and the channel attention feature M is obtained according to the calculation s (F); Step 4.4: Build a convolutional attention model. By connecting the channel attention module and the spatial attention module in series, the calculation formula of convolutional attention is as follows: In the formula, F is the original data input, M c is the channel attention operation, M s is the spatial attention operation; Step 4.5: Using the training samples as the input of the constructed convolutional attention model, and obtaining the key features of the extracted training samples according to the convolutional attention calculation, wherein the key features are the correlation features that are beneficial to the learning and training effects of the spiking neural network after the redundant features and noise of the training samples are eliminated, and the key features are used as the input of the spiking neural network model for training, and the weights between the spiking neurons are adjusted using the local adjustment and global adjustment rules of the neuron weights during the sample training process, and the pulse sequence tensor is obtained after the training is completed; Step 4.6: Build a fully connected classifier with a three-layer structure. The neurons in the three-layer structure are all fully connected. The pulse sequence tensor generated during the sample training process is used as the training sample of the classifier. After the preset number of iterations, the classifier training is completed; Step 4.7: Use the pulse neural network to obtain the pulse sequence of the data to be classified, and then pass the obtained pulse sequence through the trained classifier to complete the data classification.

Citation Information

Patent Citations

  • Synaptic weight training method, electronic equipment and computer readable medium

    CN113269313A

  • Image classification learning method based on multi-scale pulse convolutional neural network

    CN118447317A

  • Feedback-tolerant method and device producing weight-adjustment factors for pre-synaptic neurons in artificial neural networks

    US7814038B1

Cited By

  • MSWI air volume control method and system based on bionic hybrid model and dynamic modeling

    CN120426568A

  • Electric signal detection method and system based on neural medium

    CN120458605A

  • Oil reservoir water flooded layer intelligent recovery system based on spiking neural network

    CN120802369A