A learning method for spiking neural networks based on synapse-threshold collaboration

Through the synaptic-threshold collaborative learning method, the neuronal threshold and synaptic weight of the pulsed neural network are optimized, and the problems of insufficient performance and high energy consumption of pulsed neural networks in the existing technology are solved, achieving efficient and low-power learning effects.

CN115809700BActive Publication Date: 2025-08-12UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210644672.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-09
Publication Date
2025-08-12
Estimated Expiration
2042-06-09

AI Technical Summary

Technical Problem

The existing pulsed neural network learning methods fail to effectively combine the endogenous mechanism of neurons, resulting in insufficient performance of intelligent tasks in complex scenarios and high energy consumption.

Method used

The synaptic-threshold collaboration learning method is adopted to coordinately optimize the performance of the pulsed neural network by adjusting the neuronal threshold and synaptic weight, reducing the network discharge rate and improving robustness.

Benefits of technology

It improves the accuracy and robustness of the pulsed neural network, while reducing the energy consumption of the hardware system, and achieving efficient learning with low power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115809700B_ABST
    Figure CN115809700B_ABST
Patent Text Reader

Abstract

This invention discloses a spiking neural network learning method based on synaptic-threshold collaboration, comprising the following steps: building a spiking neural network; initializing spiking neural network parameters; encoding input data; forward propagating data; backward propagating data; and testing network accuracy. This method parameterizes neuron thresholds, enabling collaborative learning of synaptic weights and neuron thresholds. This method improves the performance of spiking neural networks by increasing neuron threshold heterogeneity and balancing the relationship between thresholds and synaptic weights. Furthermore, by adjusting the distribution of neuron thresholds, the method further reduces the overall discharge rate of spiking neural networks on deep networks, enabling the network to operate normally on hardware systems with low power consumption, thus saving energy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of brain-like intelligence technology, and specifically relates to a pulse neural network learning method. Background Art

[0002] Spiking Neural Networks (SNNs), considered the third generation of neural networks, are gaining increasing attention. Unlike currently popular artificial neural networks, SNNs are inspired by real brain mechanisms and utilize more biologically reliable spiking neurons as their fundamental information processing structure. They encode and transmit information through discrete temporal spike events. This precise timing-based information processing and encoding makes SNNs an effective tool for processing complex spatiotemporal information. Compared to artificial neural networks, they demonstrate superior robustness, energy efficiency, and accuracy.

[0003] Limited by the discrete nature of spike events and the complexity of neuronal dynamics, developing efficient learning methods for spiking neural networks has become an important and pressing issue. Existing SNN learning methods can be categorized as unsupervised learning, indirect learning, directly supervised learning, and fusion learning, and have achieved some success. However, these learning methods are all based on synaptic plasticity, but in the real brain, the learning process is also significantly influenced by non-synaptic endogenous mechanisms of neurons. By deeply integrating synaptic and endogenous non-synaptic mechanisms, developing new and efficient learning methods for SNNs is expected to improve their performance in complex intelligent tasks. Summary of the Invention

[0004] In response to the above problems existing in the prior art, the present invention proposes a spiking neural network learning method based on synapse-threshold collaboration.

[0005] The specific technical solution of the present invention is: a spiking neural network learning method based on synapse-threshold collaboration, comprising the following steps:

[0006] S1. Build a spiking neural network;

[0007] S2. Initialize the spiking neural network parameters: including synaptic weights, neuron thresholds, neuron membrane potentials, neuron membrane time constants, time window lengths, and network optimizer parameters.

[0008] S3. Input data encoding: Each pixel in an image or each channel in an audio signal is encoded by a corresponding spiking neuron. The encoded pulses are then passed to the hidden layer for information processing.

[0009] S4. Data forward propagation: The encoded spikes are fed into the spiking neural network. The neuron membrane potential is updated based on the synaptic weights and neuron thresholds, generating neuron spikes. The network output is obtained through the decoding layer. Finally, the network supervision error is obtained using the loss function and data labels.

[0010] S5. Data backpropagation: Update synaptic weights and neuron thresholds based on the synapse-threshold collaborative learning method;

[0011] S6. Test network accuracy: If the network accuracy is stable, stop network training.

[0012] Beneficial effects of the present invention: The method of the present invention parameterizes the neuron threshold, realizes the collaborative learning of synaptic weights and neuron thresholds, and improves the performance of the pulse neural network by increasing the heterogeneity of neuron thresholds and the relationship between the balance threshold and synaptic weights, including improving network accuracy and network robustness. At the same time, the present invention further reduces the overall discharge rate of the pulse neural network on the deep network by adjusting the distribution of neuron thresholds, so that the network can operate normally on the hardware system in a low-power manner, saving electricity. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 This is a schematic diagram of the feedforward pulse neural network structure of an embodiment of the present invention.

[0014] Figure 2 This is a schematic diagram of synapse-threshold collaborative learning according to an embodiment of the present invention.

[0015] Figure 3 This is a flow chart of a pulse neural network learning method based on synapse-threshold collaboration according to an embodiment of the present invention.

[0016] Figure 4 This is a diagram showing the results of the spiking neural network learning method based on synapse-threshold collaboration according to an embodiment of the present invention. DETAILED DESCRIPTION

[0017] The following describes the embodiments of the present invention in detail with reference to the accompanying drawings and examples so that those skilled in the art can better understand the present invention.

[0018] A large number of experiments have shown that the discharge threshold of neurons, as an important endogenous feature in the nervous system, exhibits rich dynamic characteristics on the millisecond time scale and is considered to be an important potential mechanism for promoting neural information processing. Inspired by the above experimental findings, a new SNN learning method based on "synapse-threshold" collaborative training was constructed, which achieved a significant improvement in the SNN training effect, and has important significance and reference value for the in-depth development of efficient SNN collaborative learning strategies inspired by the biological brain. Therefore, the present invention draws on biological mechanisms and develops a pulse neural network learning method based on synapse-threshold collaboration through the regulatory effect of neuron discharge threshold on network homeostasis, thereby further improving the performance of pulse neural networks.

[0019] The technical solution of the present invention is as follows: the present invention is oriented to a spiking neural network, and by drawing on the internal plasticity mechanism of neurons, a learning method for synaptic weights and neuron thresholds is developed. The spiking neural network involved in the present invention includes an information encoding layer, a hidden layer (convolutional layer and fully connected layer) and an information decoding layer. The information processed by the present invention includes but is not limited to static images, neuromorphic images, and audio signals. For different input information, the encoding layer can adopt two schemes for data preprocessing: (1) at each moment in the time window, the static value of the input data is encoded into a pulse through a Bernoulli random number generator and passed to the hidden layer; (2) at each moment in the time window, the original data is directly received, and the pulse is generated by the encoding layer neurons and passed to the hidden layer. The hidden layer extracts and classifies the spatiotemporal features of the data through structures such as convolution and full connection. The decoding layer obtains the network output by counting the neuron discharge rate. The network uses spiking neurons as basic information processing units, and the neurons in adjacent layers are connected using forward synapses. All neurons are configured with independently trainable thresholds. Network training methods include but are not limited to approximate gradient spatiotemporal backpropagation (STBP), spike timing-dependent plasticity (STDP), reinforcement learning, etc.

[0020] See Figure 1 The pulse neural network involved in the present invention is a feedforward cascade structure, consisting of three parts: an information encoding layer, a hidden layer, and an information decoding layer. The details are as follows:

[0021] 1. Coding layer: The information processed by the present invention includes but is not limited to static images, neuromorphic images, and audio signals. In a specific embodiment of the present invention, for the image classification network model, MNIST handwritten digital images are used as data input, and a uniformly distributed random number generator with an interval of [0,1] is used to generate random values, and the image pixels and the generated random values are compared in size. When the pixel value ≥ the random value: the coding neuron inputs a pulse (1) to the hidden layer; when the pixel value < the random value: the coding neuron inputs a non-pulse (0) to the hidden layer. In another specific embodiment of the present invention, for the image classification network model, the neuromorphic image CIFAR10-DVS is used as data input. The neuromorphic image is time series data with positive and negative dual channels, and the data representation is pulse (1) and non-pulse (0), so the coding layer directly accepts the original data and inputs it into the hidden layer.

[0022] 2. Hidden layer: Each layer can be set to a convolutional structure or a fully connected structure, and the number of hidden layers and the specific conditions of each layer can be set according to specific tasks and requirements.

[0023] 3. Decoding Layer: The information decoding layer is used to count neuron firing rates and obtain network outputs. In one embodiment of the present invention, for classification tasks, neurons in the decoding layer correspond to specific data categories, and the category neuron with the highest firing rate in the time window determines the network's prediction result.

[0024] See Figure 1 and Figure 2 In a specific embodiment of the present invention, the spiking neural network is composed of leaky integrate-and-fire (LIF) spiking neurons. A leaky integrate-and-fire spiking neuron is a spatiotemporal information processing model that can inherit its own membrane potential state while simultaneously receiving external current. The LIF neurons involved in this specific embodiment are discrete, and the formula is as follows:

[0025]

[0026]

[0027]

[0028] Among them, the neuronal membrane potential of the i-th neuron at time t is The membrane potential at time t-1 is The neuron pulse emission of the i-th neuron at time t is The pulse emission at time t-1 is The membrane potential decay constant of the i-th neuron is δ i , is the input information of the i-th neuron at time t, is the pulse emission of the jth neuron at time t. In this embodiment, the synaptic weight connecting the i-th neuron and the j-th neuron is and neuron threshold v th,i These are all trainable parameters.

[0029] See Figure 3 In a specific embodiment of the present invention, the complete steps of the synapse-threshold collaborative learning method are as follows:

[0030] S1: Build a pulse neural network: According to the specific task, select the encoding scheme and set the number of neurons in the decoding layer, set the depth of the hidden layer and the structure of each layer, and define the loss function. In a specific embodiment of the present invention, a convolutional pulse neural network is built for the classification task on the MNIST dataset. The encoding layer uses a Bernoulli generator to convert the raw data into pulses. The decoding layer consists of 10 neurons representing 10 digital categories. The network contains two convolutional layers, two pooling layers, and two fully connected layers. BatchNorm and Dropout techniques are used to prevent gradient disappearance and overfitting.

[0031] S2: Initialize the pulse neural network parameters: the network synaptic weight W obeys a uniform distribution Among them, fan i n is the number of elements in the weighted tensor; the initial threshold value of the neuron v th,i ; The initial membrane potential of neurons is all set to 0mV; the neuron decay constant δ i ; Time window length T. In a specific embodiment of the present invention, for the classification task on the MNIST dataset, the network synaptic weights Initial threshold v of all neurons th,i =2.0mA, neuron decay constant δ i =0.5, the time window length T is 4ms, the network optimizer is Adam, the learning rate decays exponentially, the epoch is 100, and the batch size is 50;

[0032] S3: Input data encoding: Each pixel of the image or each channel of the audio signal will be encoded by a spiking neuron;

[0033] S4: Data forward propagation: The encoded pulse sequence is passed into the spiking neural network, the membrane potential is updated according to the iterative formula of the spiking neuron membrane potential, the neuron pulse emission is obtained according to the neuron threshold, and the pulse emission of the upper layer of neurons will enter the lower layer of neurons as a medium for information transmission. In the spiking neural network, the forward propagation process is iterated based on the time window, the network output is calculated by the decoding layer, and the network supervision error is finally calculated by the loss function and the data label value. In a specific embodiment of the present invention, for the classification task on the MNIST data set, the mean square error (MSE) is selected as the loss function, and the formula is as follows:

[0034]

[0035] Among them, S is the number of samples, N represents the coding layer, T represents the time window length, y s is the label of sample s, It is the pulse emission of the coding layer at time t after the spiking neural network receives sample s.

[0036] S5: Data back propagation: According to the chain rule, the partial derivative formula of the loss function with respect to neuronal spike firing and neuronal membrane potential is as follows:

[0037]

[0038]

[0039] in, is the pulse emission of the i-th neuron in the n-th layer at time t, is the neuronal membrane potential of the i-th neuron in the n-th layer at time t, and l(n+1) represents the number of neurons in the n+1-th layer.

[0040] Based on the above formula, the partial derivatives of the loss function with respect to the synaptic weights and neuron thresholds of each layer can be obtained:

[0041]

[0042]

[0043] Among them, W n is a matrix representing the synaptic weight of the n-th layer neurons; u t,n , x t,n , o t,n is a column vector, representing the membrane potential, input information and pulse emission of the n-th layer neurons at time t; is a column vector representing the discharge threshold of the n-th layer neurons.

[0044] Limited by the fact that the process of spiking neurons firing pulses is a non-differentiable activation function, the present invention uses a substitution function to approximate the process of firing pulses during the spatiotemporal backpropagation process. The substitution function formula is as follows:

[0045]

[0046] Among them, arctan() represents the inverse tangent function, is the neuron membrane potential of the i-th neuron in the n-th layer at time t, is the discharge threshold of the i-th neuron in the n-th layer.

[0047] Through spatiotemporal backpropagation and the chain derivative rule, the partial derivatives of the supervised error with respect to the trainable parameters "synaptic weight" and "neuron threshold" are obtained, and the parameter updates are achieved through the gradient descent algorithm.

[0048] S6: Test network accuracy: If the network accuracy is stable, stop network training.

[0049] Figure 4 This figure shows the results of a spiking neural network learning method based on synaptic-threshold collaboration, according to an embodiment of the present invention. The shaded area in the figure represents the actual training curve, and the black line represents the training curve after 10 epochs of smoothing. By observing the training curves for synaptic learning and synergetics, it can be seen that collaborative learning can significantly improve network accuracy.

Claims

1. A spiking neural network learning method based on synapse-threshold collaboration, comprising the following steps: S1. Build a spiking neural network; S2. Initialize the spiking neural network parameters: including synaptic weights, neuron thresholds, neuron membrane potentials, neuron membrane time constants, time window lengths, and network optimizer parameters. S3. Input data encoding: Each pixel in an image or each channel in an audio signal is encoded by a corresponding spiking neuron. The encoded pulses are then passed to the hidden layer for information processing. S4. Data forward propagation: The encoded spikes are fed into the spiking neural network. The neuron membrane potential is updated based on the synaptic weights and neuron thresholds, generating neuron spikes. The network output is obtained through the decoding layer. Finally, the network supervision error is obtained using the loss function and data labels. S5. Data backpropagation: Update synaptic weights and neuron thresholds based on the synapse-threshold collaborative learning method; The specific process is as follows: According to the chain rule, the partial derivative formula of the loss function with respect to neuronal pulse emission and neuronal membrane potential is as follows: in, is the pulse emission of the i-th neuron in the n-th layer at time t, is the neuronal membrane potential of the ith neuron in the nth layer at time t, l(n+1) represents the number of neurons in the n+1th layer; Based on the above formula, the partial derivatives of the loss function with respect to the synaptic weights and neuron thresholds of each layer are obtained: Among them, W n is a matrix representing the synaptic weight of the n-th layer neurons; u t,n , x t,n , o t,n is a column vector, representing the neuron membrane potential, input information and pulse emission of the nth layer at time t; is a column vector, representing the discharge threshold of the n-th layer neuron; In the process of spatiotemporal backpropagation, a substitution function is used to approximate the process of pulse emission. The substitution function formula is as follows: Among them, arctan() represents the inverse tangent function, is the neuron membrane potential of the i-th neuron in the n-th layer at time t, is the discharge threshold of the i-th neuron in the n-th layer; S6. Test network accuracy: If the network accuracy is stable, stop network training.

2. The spiking neural network learning method based on synapse-threshold collaboration according to claim 1, characterized in that: The spiking neural network described in step S1 is composed of leaky integrate and release LIF spiking neurons. The LIF spiking neurons are discrete and the formula is as follows: Among them, the neuronal membrane potential of the i-th neuron at time t is The membrane potential at time t-1 is The pulse emitted by the i-th neuron at time t is The pulse emission at time t-1 is The membrane potential decay constant of the i-th neuron is δ i , is the input information of the i-th neuron at time t, is the pulse emission of the jth neuron at time t, is the synaptic weight connecting the i-th neuron and the j-th neuron, v th,i is the neuron threshold of the i-th neuron.

3. The spiking neural network learning method based on synapse-threshold collaboration according to claim 2, characterized in that: The synaptic weight W described in step S2 obeys a uniform distribution Among them, fan_in is the number of elements of the weighted tensor; the initial threshold value v of the neuron th,i ; Neuronal initial membrane potential All set to 0mV.

4. The spiking neural network learning method based on synapse-threshold collaboration according to claim 3, characterized in that: Step S4 selects mean square error (MSE) as the loss function, and the formula is as follows: Among them, S is the number of samples, N represents the coding layer, T represents the time window length, y s is the label of sample s, It is the pulse emission of the coding layer at time t after the spiking neural network receives sample s.

Citation Information

Patent Citations

  • Ultra-low delay pulse neural network based on space-time information and learning method

    CN114091659A

  • Hardware-friendly STDP learning method and system based on threshold adaptive neurons

    CN114118378A