A multi-layer pulse neural network construction and training method and device and electronic equipment

By introducing an adaptive pulse firing mechanism and the STBP learning algorithm, the problems of uncontrollable pulse firing and non-differentiability in the LIF model in multilayer spiking neural networks are solved, realizing efficient construction and training of multilayer spiking neural networks and improving computational efficiency and recognition accuracy.

CN117114060BActive Publication Date: 2025-12-19CHINA UNIV OF GEOSCIENCES (WUHAN)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311018327.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-11
Publication Date
2025-12-19
Estimated Expiration
2043-08-11

AI Technical Summary

Technical Problem

In existing technologies, the uncontrollable pulse delivery and discrete pulse sequence of LIF models make it difficult to construct and train multilayer spiking neural networks, especially in terms of computational efficiency and training algorithms.

Method used

An adaptive pulse firing mechanism is introduced to form an IALIF spiking neuron model. The maximum membrane voltage decoding method and STBP learning algorithm are combined to control the pulse firing frequency and solve the non-differentiability problem during the training process.

Benefits of technology

It improves the computational efficiency and recognition accuracy of multilayer spiking neural networks, and enables effective support for various visual recognition tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117114060B_ABST
    Figure CN117114060B_ABST
Patent Text Reader

Abstract

The present application provides a kind of multilayer pulse neural network construction and training method, device and electronic equipment, in the iterative form of LIF model, adaptive pulse firing mechanism is introduced, i.e.Iterative Adaptive Leaky Integrate-and-Fire (IALIF) pulse neuron model, to control its pulse firing, reduce pulse firing frequency, for constructing multilayer pulse neural network, improve the computing efficiency of network;And maximum membrane voltage decoding mechanism is proposed in the output layer of multilayer pulse neural network to decode the output of network;For the training problem of multilayer pulse neural network, spatial temporal back propagation (STBP) learning algorithm is proposed based on back propagation algorithm, and proxy gradient function is used to solve the non-differentiable problem in training process.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of artificial intelligence and deep learning, and in particular to a multi-layer spiking neural network construction and training method and device and electronic equipment. BACKGROUND

[0002] With the development of artificial intelligence technology, more and more intelligent algorithms are proposed and applied in natural language processing, pattern recognition and other application fields, but how to truly construct a brain-like intelligent model is still a problem. Artificial neural networks in deep learning provide a way and method for constructing a brain-like intelligent model. Traditional artificial neural networks only focus on the design of network architecture, greatly simplifying the simulation of network micro-level mechanisms such as biological neurons and synapses. Spiking neurons simulate the dynamic model of biological neurons, whose membrane voltage can change over time, and they can fire discrete pulse sequences according to the change of membrane voltage. Therefore, spiking neural networks composed of spiking neurons have complex dynamic characteristics and bionics, and are the basis for constructing a brain-like intelligent model.

[0003] Through the research of scholars at home and abroad in recent years, many spiking neuron models have been proposed, such as the rotating firing neuron model, the leaky integrate-and-fire (LIF) model and the probabilistic-based separate synapse model. Due to the simple form and small amount of calculation of the LIF model compared to other models, it is often used to construct spiking neural networks. However, due to the uncontrollability of its pulse firing, i.e., the number of pulses cannot be controlled, excessive pulse firing will affect the computational efficiency of the network, which brings difficulties to the construction of multi-layer spiking neural networks.

[0004] As for the training algorithm of spiking neural networks, current research can be divided into two categories: unsupervised learning methods based on Spike Timing Dependent Plasticity (STDP) rules; and supervised learning methods based on Gradient Descent (GD) and Back Propagation (BP). Due to the discreteness of the pulse sequence fired by the LIF model, i.e., the pulse sequence is a discrete binary sequence, there is a problem of non-differentiability in the calculation process of the learning method, which leads to the fact that the above two algorithms are mostly suitable for training single-layer spiking neural networks, so there are difficulties in training multi-layer spiking neural networks.

[0005] Due to the uncontrollability of the pulse firing of the LIF model and the discreteness of the pulse sequence fired by it, it brings difficulties to the construction of multi-layer spiking neural networks and the training of the network. Therefore, how to improve the LIF model to construct multi-layer spiking neural networks and research its training algorithm is particularly important for the implementation of brain-like intelligent models. SUMMARY

[0006] The present application mainly solves the technical problem of large-scale construction and training difficulty of the pulse neural network in the implementation of the brain-like intelligent model. In order to solve the technical problem, the present application introduces an adaptive pulse firing mechanism to obtain a multi-layer pulse neural network construction and training method, device and electronic equipment. The adaptive pulse firing mechanism is introduced in the iterative form of the LIF model, that is, the Iterative Adaptive Leaky Integrate-and-Fire (IALIF) pulse neuron model, to control the pulse firing and reduce the pulse firing frequency, so as to construct a multi-layer pulse neural network and improve the calculation efficiency of the network. A maximum membrane voltage decoding mechanism is proposed for the output layer of the multi-layer pulse neural network to decode the output of the network. For the training problem of the multi-layer pulse neural network, a Spatial Temporal Back Propagation (STBP) learning algorithm is proposed based on the back propagation algorithm, and a proxy gradient function is used to solve the non-differentiable problem in the training process.

[0007] According to a first aspect of the present application, a multi-layer pulse neural network construction and training method comprises:

[0008] An adaptive pulse firing mechanism is introduced based on the iterative form of the LIF model to form an IALIF pulse neuron model and construct a multi-layer pulse neural network.

[0009] A maximum membrane voltage decoding method is used to decode the output of the multi-layer pulse neural network.

[0010] An STBP learning algorithm is used to train the multi-layer pulse neural network to obtain a trained multi-layer pulse neural network for implementing image recognition of various visual recognition tasks.

[0011] Further, the step of introducing an adaptive pulse firing mechanism based on the iterative form of the LIF model to form an IALIF pulse neuron model and construct a multi-layer pulse neural network comprises:

[0012] The LIF model abstracts a biological neuron as a parallel circuit of a resistor and a capacitor, and uses a first-order linear differential equation to describe the dynamic change of the membrane voltage of the neuron, that is,

[0013]

[0014] Wherein, u(t) is the membrane voltage of the neuron, t is the time, R m is the membrane resistance, C m is the membrane capacitance, and I(t) represents the external input current.

[0015] The LIF model is transformed into an iterative form, and the transformed neuron membrane voltage is expressed as:

[0016]

[0017] in, Let be the membrane voltage of the i-th neuron in the n-th layer of a multilayer spiking neural network at discrete time k+1. This indicates the memory and reset characteristics of spiking neurons; The membrane voltage decay coefficient represents the accumulation of the membrane voltage u in the time domain, where Δt is the time-domain constant. arrive Time step, τ u It is the time constant of the membrane voltage; This represents the pulse fired by the i-th neuron in the n-th layer at time k. When the neuron fires a pulse, at this time If the value is zero, the membrane voltage is reset; otherwise, the membrane voltage decays by β. Indicates input current The effect on membrane voltage, λ=Δt / τ is the input enhancement factor, τ=R m C m The time constant of the neuron model; It is the trigger threshold deviation of the i-th neuron in the n-th layer;

[0018] In a multilayer spiking neural network, the input current of the postsynaptic neuron generated by the firing of pulses by the presynaptic neuron accumulates continuously in the spatial domain; simultaneously, due to the memory characteristics of the synapse, the input current of the postsynaptic neuron accumulates in the time domain. The input current is expressed as...

[0019]

[0020] Where α is the attenuation coefficient of the input current, and l(n-1) is the number of neurons in the (n-1)th layer of the network. Let I be the synaptic weight between the j-th presynaptic neuron in layer n-1 and the i-th postsynaptic neuron in layer n. n (k) represents the input current of the nth layer of the network at time k. This refers to the pulse fired by the j-th neuron in the (n-1)-th layer of the network at time k+1.

[0021] The output pulse of the i-th spiking neuron in the n-th layer of the network at time k+1 is represented as:

[0022]

[0023] Where g(·) is the output activation function, i.e.

[0024]

[0025] where θ and u are the firing threshold and membrane voltage, respectively;

[0026] An adaptive spiking mechanism is introduced into the iterative LIF model to realize adaptive spiking frequency, and a multi-layer spiking neural network model is constructed.

[0027] θ(k+1)=γθ(k)+(1-γ)o(k),

[0028] At this time, θ is the adaptive firing threshold, is the decay coefficient of θ, τ θ is the time constant of θ.

[0029] Further, the step of introducing an adaptive spiking mechanism into the iterative LIF model comprises:

[0030] The firing threshold of the iterative LIF model is proportional to the spiking activity to form an IALIF spiking neuron model.

[0031] Further, the step of decoding the output of the multi-layer spiking neural network using the maximum membrane voltage decoding method comprises:

[0032] The output layer neurons of the multi-layer spiking neural network are the same as the IALIF spiking neuron model, and the expression of the maximum membrane voltage decoding method is as follows:

[0033]

[0034] where, is the membrane voltage of the i-th neuron in the output layer, i.e., the N-th layer of the network, at time k, U i represents the maximum membrane voltage output of the i-th neuron in the output layer of the network, and T is the simulation time of the network; when the output layer neuron fires a spike, its membrane voltage is not reset, but accumulates according to the subsequent input.

[0035] Further, in the step of training the multi-layer spiking neural network using the STBP learning algorithm, the multi-layer spiking neural network uses a cross-entropy loss function as the loss function, i.e.,

[0036]

[0037] where l(N) is the number of output layer neurons; y i is the teacher signal, which is the one-hot encoding of the classification label, and has a i is the predicted probability of the i-th neuron in the output layer of the network, which is obtained from the maximum membrane voltage Ui After Softmax regression.

[0038] Further, the step of training the multi-layer spiking neural network using the STBP learning algorithm comprises:

[0039] The STBP learning algorithm is used to minimize the loss function of the multi-layer spiking neural network, and the STBP learning algorithm comprises backpropagation in the spatial domain and the temporal domain.

[0040] The backpropagation in the spatial domain requires the gradient of the loss function to be obtained and propagated backward through the multi-layer spiking neural network. Assuming a neuron m, the synaptic weight w and the firing threshold bias b of the network are updated using the gradient descent method, and have

[0041]

[0042]

[0043] wherein

[0044]

[0045] In the above formula, L is the loss function, is the synaptic weight between the jth presynaptic neuron of the (n-1)th layer and the ith postsynaptic neuron of the nth layer of the network, is the membrane voltage of the ith neuron of the nth layer of the network, and l(n-1) is the number of neurons in the (n-1)th layer of the network, is the spike fired by the jth neuron of the (n-1)th layer of the network, is the firing threshold bias of the ith neuron of the nth layer.

[0046] In order to perform backpropagation in the spatial domain in the network, it is necessary to solve and The solution of and can be obtained by first calculating the c1 is a constant, and then performing backpropagation from the output layer to obtain

[0047] The derivative of the Sigmoid function is selected as the proxy gradient function to approximate the solution of

[0048] In the temporal domain of the spiking neural network, backpropagation is achieved by updating the membrane voltage decay coefficient β

[0049]

[0050] wherein L is the loss function, is the membrane voltage of the ith neuron of the nth layer of the network at time k. The subsequent calculation can be obtained according to the formula of the spatial domain backpropagation Further, the time domain back propagation is continued.

[0051] Further, after the step of training the multi-layer spiking neural network using the STBP learning algorithm, the method further comprises:

[0052] The trained multi-layer spiking neural network is verified by using a plurality of visual recognition task data sets, and the recognition accuracy is obtained.

[0053] According to a second aspect of the present application, a multi-layer spiking neural network construction and training device comprises the following modules:

[0054] The construction module is configured to introduce an adaptive spiking mechanism on the basis of the iterative form of the LIF model to form an IALIF spiking neuron model and construct a multi-layer spiking neural network.

[0055] The decoding module is configured to decode the output of the multi-layer spiking neural network using a maximum membrane voltage decoding method.

[0056] The training module is configured to train the multi-layer spiking neural network using an STBP learning algorithm to obtain a trained multi-layer spiking neural network, and to realize image recognition for a plurality of visual recognition tasks.

[0057] According to a third aspect of the present application, an electronic device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the steps of the multi-layer spiking neural network construction and training method.

[0058] In addition, a storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of the multi-layer spiking neural network construction and training method.

[0059] The technical solution provided by the present application has the following beneficial effects:

[0060] Since too high pulse firing frequency means that neurons always fire a large number of pulses, which reduces the computing efficiency of the network, the present application introduces an adaptive pulse firing mechanism in the iterative form of the LIF model, that is, the Iterative Adaptive Leaky Integrate-and-Fire (IALIF) pulse neuron model, to control the pulse firing, so as to realize sparse pulse firing, so as to construct a multi-layer pulse neural network, which can improve the computing efficiency of the network. The present application proposes a maximum membrane voltage decoding mechanism in the output layer of the multi-layer pulse neural network to decode the output of the network. When the output layer neuron fires a pulse, the membrane voltage is not reset, but accumulates according to the subsequent input, so that the membrane voltage of the output layer neuron is continuously differentiable, which helps the back propagation in the multi-layer pulse neural network. The present application proposes a Spatial Temporal Back Propagation (STBP) learning algorithm based on the back propagation algorithm for the training problem of the multi-layer pulse neural network, and uses a proxy gradient function to solve the non-differentiable problem in the training process, so that the training of the multi-layer pulse neural network is well realized. The present application can be used for various visual recognition tasks by constructing and training a multi-layer pulse neural network model based on the adaptive pulse firing mechanism, has good applicability, and improves the recognition accuracy and efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0061] The present application will be further described below in combination with the drawings and examples, and the drawings are as follows:

[0062] Figure 1 is the overall flow chart of the multi-layer pulse neural network construction and training method of the present application;

[0063] Figure 2 is the pulse firing frequency of the IALIF pulse neuron model of the method of the present application;

[0064] Figure 3 is the membrane voltage of the IALIF pulse neuron model of the method of the present application;

[0065] Figure 4 is the hidden layer pulse output of the multi-layer pulse neural network constructed by the IALIF pulse neuron model of the present application;

[0066] Figure 5 is the hidden layer pulse output of the pulse neural network composed of the LIF model;

[0067] Figure 6 is the output layer membrane voltage of the multi-layer pulse neural network constructed by the IALIF pulse neuron model of the present application;

[0068] Figure 7 to be the membrane voltage of the output layer of the pulse neural network composed of the LIF model;

[0069] Figure 8 to be a structural schematic diagram of a multi-layer pulse neural network construction and training device of the present application;

[0070] Figure 9 to be a structural schematic diagram of an electronic device of the present application. DETAILED DESCRIPTION

[0071] In order to have a clearer understanding of the technical features, objects and effects of the present application, the specific embodiments of the present application will be described in detail with reference to the drawings.

[0072] Please refer to Figure 1 The present application provides a multi-layer pulse neural network construction and training method, and the specific implementation steps are as follows:

[0073] 1) Introducing an adaptive pulse firing mechanism to construct a multi-layer pulse neural network:

[0074] The commonly used pulse neuron model, i.e. the LIF model, abstracts a biological neuron as a resistance-capacitance parallel circuit, and uses a first-order linear differential equation to describe the dynamic change of the neuron membrane voltage, i.e.

[0075]

[0076] Where u(t) is the neuron membrane voltage, t is the time, R m is the membrane resistance, C m is the membrane capacitance, and I(t) represents the external input current. With the increase of the input current, the neuron membrane voltage continuously rises. When the membrane voltage reaches the trigger threshold, the neuron fires a pulse, and the membrane voltage is immediately reset.

[0077] By converting the LIF model into an iterative form, the simulation of a large-scale pulse neural network can be realized, and the neuron membrane voltage after conversion can be expressed as

[0078]

[0079] Where is the membrane voltage of the i-th neuron of the n-th layer of the multi-layer pulse neural network at discrete time (k+1). represents the memory and reset characteristics of the pulse neuron. is the membrane voltage decay coefficient, representing the accumulation of the membrane voltage u in the time domain, Δt is the time step from to , and τ u is the time constant of the membrane voltage. denotes the input current of the ith neuron in the nth layer at time k, and At this time is zero, and the membrane voltage is reset; otherwise, the membrane voltage decays by β. denotes the input current to the membrane voltage, λ = Δt / τ is the input enhancement factor, and τ = R m C m is the time constant of the neuron model. is the firing threshold bias of the ith neuron in the nth layer.

[0080] In a multi-layer spiking neural network, the input current of the post-synaptic neuron generated by the presynaptic neuron firing pulse is continuously accumulated in the spatial domain; at the same time, due to the memory characteristics of the synapse, the input current of the post-synaptic neuron is accumulated in the time domain. The input current has the above dynamic characteristics, and therefore it can be expressed as

[0081]

[0082] where α is the decay coefficient of the input current, l(n-1) is the number of neurons in the (n-1)th layer of the network, is the synaptic weight between the jth presynaptic neuron in the (n-1)th layer of the network and the ith post-synaptic neuron in the nth layer, I n (k) is the input current of the nth layer of the network at time k, is the pulse fired by the jth neuron in the (n-1)th layer of the network at time k+1.

[0083] The output pulse of the ith spiking neuron in the nth layer of the network at time (k+1) can be expressed as

[0084]

[0085] where g(·) is the output activation function, i.e.

[0086]

[0087] where θ and u are the firing threshold and the membrane voltage, respectively.

[0088] Pulse frequency adaptation refers to the ability of the pulse firing frequency to gradually decrease after increasing, rather than always increasing. A too high pulse firing frequency means that the neuron always fires a large number of pulses, which will reduce the computational efficiency of the network.

[0089] Therefore, an adaptive pulse firing mechanism is introduced into the iterative LIF model, i.e. the firing threshold of the iterative LIF model is proportional to the pulse firing activity, to form an IALIF spiking neuron model, which can realize pulse frequency adaptation. The adaptive pulse firing mechanism can be expressed as

[0090] θ(k+1) = γθ(k) + (1-γ)θ(k), (6)

[0091] θ is the adaptive threshold value at this time, which can be substituted into formula (5), is the decay coefficient of θ, τ θ is the time constant of θ.

[0092] By introducing the adaptive pulse firing mechanism, the IALIF pulse neuron model can reduce its pulse firing frequency to achieve sparse pulse firing and improve the efficiency of network calculation, and therefore can be used to construct a multi-layer pulse neural network.

[0093] 2) Output decoding of the multi-layer pulse neural network:

[0094] In order to cooperate with the IALIF pulse neuron model, the present application proposes a maximum membrane voltage decoding method. The output layer neuron is the same as the IALIF pulse neuron model, and the maximum membrane voltage decoding method is shown in formula (7)

[0095]

[0096] wherein, is the membrane voltage of the i-th neuron of the N-th layer of the output layer of the network at time k, U i represents the maximum membrane voltage output of the i-th neuron of the output layer of the network, and T is the simulation time of the network. When the output layer neuron fires a pulse, the membrane voltage is not reset, but is always accumulated according to the subsequent input, so that the membrane voltage of the output layer neuron is continuously differentiable, which is helpful for the derivation of the back propagation in the multi-layer pulse neural network.

[0097] 3) Training of the multi-layer pulse neural network:

[0098] The multi-layer pulse neural network constructed by the present application adopts a cross-entropy loss function as the loss function, i.e.

[0099]

[0100] wherein l(N) is the number of output layer neurons. y i is the teacher signal, which is the one-hot encoding of the classification label, and has a i is the predicted probability of the i-th neuron of the output layer of the network, which is obtained by the maximum membrane voltage U i of the neuron through Softmax regression.

[0101] The training target of the multi-layer pulse neural network is to minimize the loss function L, which can be realized by the STBP learning algorithm proposed by the present application, and the back propagation in the spatial domain and the time domain of the algorithm is described below.

[0102] The reverse propagation in the spatial domain needs to obtain the gradient of the loss function and propagate it through the multi-layer spiking neural network. The following takes a neuron m as an example to derive the formula of the spatial domain reverse propagation, and adopts the gradient descent method to update the synaptic weight w and the trigger threshold deviation b of the network, that is,

[0103]

[0104]

[0105] wherein

[0106]

[0107] In the above formula, L is a loss function, is a synaptic weight between the jth presynaptic neuron of the n-1th layer and the ith postsynaptic neuron of the nth layer of the network, is a membrane voltage of the ith neuron of the nth layer of the network, and l(n-1) is the number of neurons of the n-1th layer of the network, is a spike fired by the jth neuron of the n-1th layer of the network, is a trigger threshold deviation of the ith neuron of the nth layer.

[0108] It can be known from formula (11) that, in order to perform the reverse propagation in the spatial domain of the network, it is necessary to solve and The solving of and can be achieved by first calculating the c1 is a constant, and then obtaining it from the output layer by reverse propagation.

[0109] It can be known from formula (5) that the output function g(·) of the spiking neuron is a step function, and therefore There is a non-differentiable problem, that is, a gradient explosion or a gradient disappearance problem. In order to solve these problems, the derivative of the Sigmoid function is selected as a proxy gradient function to approximate the solution of

[0110] In the time domain of the spiking neural network, it can be found that the membrane voltage decay coefficient β affects the change of the membrane voltage of the neuron in time. Therefore, the reverse propagation in the time domain of the network can be achieved by updating the membrane voltage decay coefficient β

[0111]

[0112] wherein L is a loss function, is a membrane voltage of the ith neuron of the nth layer of the network at the kth time. The subsequent can be calculated according to the formula of the spatial domain reverse propagation to obtain and then continue to perform the reverse propagation in the time domain.

[0113] Through the above steps, the multi-layer pulse neural network construction and training of introducing the adaptive pulse firing mechanism can be realized.

[0114] In a specific embodiment, a visual recognition experiment is designed based on a Pytorch deep learning platform to verify the effectiveness of the method. The experiment uses the IALIF pulse neuron model proposed in the application to construct a multi-layer pulse neural network of different structures according to different data sets, uses the maximum membrane voltage decoding method proposed in the application for network decoding, and trains the network using the STBP learning algorithm proposed in the application on different data sets, so as to verify the effectiveness of the application. The flow chart is as shown in Figure 1

[0115] The experimental data used is a typical visual recognition task data set, namely the UCI, MNIST and Fashion-MNIST data sets. The UCI data set contains Iris, Breast Cancer and Digits three data sets, and the number of classes, the number of samples and the number of features of the three data sets are different, which can simply verify the effectiveness of the application; the MNIST data set is a general data set for verifying the effectiveness of the application, wherein each image has a size of 28x28, and there are 10 classes of handwritten digital images; the image quantity and image size of the Fashion-MNIST data set are exactly the same as those of the MNIST data set, but the image content is 10 classes of commodity images, so the image is more complex than the handwritten digital image of the MNIST data set, which helps to more significantly reflect the effectiveness of the application.

[0116] In the experiment, the commonly used Gaussian distribution method is selected for the initialization of the synaptic weight in the network, that is,

[0117]

[0118] wherein μ is the average value of the synaptic weight, σ is the standard deviation, s represents the weight ratio, and m is the number of input features.

[0119] Table 1 shows the parameters of the multi-layer pulse neural network. The simulation time depends on the maximum membrane voltage decoding method. Biological studies show that the neuron excitation response period is 1 millisecond, so the time step is set to 1 millisecond. The decay coefficient is set according to the discharge characteristics of the pulse neuron.

[0120] The learning rate is a key factor affecting the performance of the STBP learning algorithm, so a segmented learning rate rule is used to dynamically adjust the learning rate at different stages of the experiment. In addition, the batch normalization method is also used in the experiment to balance the performance of the network between optimization and generalization.

[0121] Table 1: Network parameters in the experiment​

[0122]

[0123] The adaptive spike generation mechanism is introduced to construct a multi-layer spiking neural network:

[0124] For the Fashion-MNIST dataset, the multi-layer spiking neural network structure constructed by the IALIF spiking neuron model is 784-100-10. After training on the dataset by the STBP learning algorithm, the IALIF spiking neuron model in the hidden layer and the output layer of the network is analyzed.

[0125] Firstly, the spike firing frequency of the IALIF spiking neuron model in the hidden layer of the multi-layer spiking neural network is analyzed. As shown in FIG. 6, after introducing the adaptive spike generation mechanism, the spike firing frequency of the IALIF spiking neuron model decreases significantly under the regulation of the adaptive spike generation mechanism. Figure 2 Further verification of this result is that after each spike firing of the IALIF spiking neuron model, the adaptive trigger threshold increases and then slowly decays. This process leads to an increase in the spike firing interval of the IALIF spiking neuron model, thereby reducing the spike firing frequency. Figure 3 Secondly, the spike output of the IALIF spiking neuron model in the hidden layer of the multi-layer spiking neural network is analyzed.

[0126] and Figure 4 The spike outputs of the 100 spiking neurons in the hidden layer of the spiking neural network before and after introducing the adaptive spike generation mechanism are visualized. The spike output graph is drawn according to the spike firing activity of the neurons. A point in the graph represents that the spiking neuron fired a spike at the current time, and vice versa. By comparing FIG. 7 and FIG. 8, it can be found that the spike output of the IALIF spiking neuron model in the hidden layer is obviously more sparse after introducing the adaptive spike generation mechanism, which again illustrates that the adaptive trigger threshold can reduce the spike firing frequency of the network, thereby improving the computational efficiency of the network. The method proposed in the present application can successfully construct a multi-layer spiking neural network. Figure 5 Figure 4 Finally, the membrane voltage dynamic change of the IALIF spiking neuron model in the output layer of the multi-layer spiking neural network is analyzed. Figure 5 and FIG. 9 and FIG. 10 show the dynamic changes of the membrane voltage of the spiking neurons in the output layer of the spiking neural network before and after introducing the adaptive trigger threshold, respectively after 4 training. The 10 lines in the graph represent the membrane voltage change curves of the 10 spiking neurons in the output layer. By comparing FIG. 9 and FIG. 10, it can be found that the membrane voltage of the spiking neurons in the output layer of the spiking neural network is more stable after introducing the adaptive trigger threshold, which again illustrates that the adaptive trigger threshold can reduce the spike firing frequency of the network, thereby improving the computational efficiency of the network. The method proposed in the present application can successfully construct a multi-layer spiking neural network.

[0127] Figure 6 Figure 7 Figure 6 ​​​It can be seen that, after introducing the adaptive spiking mechanism, the dynamic change of membrane voltage of IALIF spiking neuron model is more stable. This shows that the introduction of the adaptive spiking mechanism reduces the sharp change of membrane voltage caused by spiking, so that the change of membrane voltage is more stable, which improves the dynamic characteristics of the network and enhances the advantages of the proposed maximum membrane voltage decoding method. Figure 7 Figure 6 The dynamic change of membrane voltage of IALIF spiking neuron model is more stable. This shows that the introduction of the adaptive spiking mechanism reduces the sharp change of membrane voltage caused by spiking, so that the change of membrane voltage is more stable, which improves the dynamic characteristics of the network and enhances the advantages of the proposed maximum membrane voltage decoding method.

[0128] Output decoding of multi-layer spiking neural network:

[0129] For the MNIST dataset, the multi-layer spiking neural network structure constructed by the IALIF spiking neuron model is 784-100-10. After training on this dataset by the STBP learning algorithm, the recognition performance of the network using the maximum membrane voltage decoding method under different pulse time encoding methods is compared. As shown in Table 2, under different pulse time encoding methods (i.e. first pulse encoding, delay encoding and group encoding), the multi-layer spiking neural network achieves good recognition performance on the MNIST dataset, with an accuracy of more than 96%.

[0130] Table 2: Classification accuracy of the network using the maximum membrane voltage decoding method under different pulse time encoding methods

[0131]

[0132] Training of multi-layer spiking neural network:

[0133] First, the method is simply and preliminarily verified using the UCI dataset. In this experiment, the recognition accuracy is selected as the performance indicator, and the k-fold cross-validation method is used to evaluate the algorithm. As shown in Table 3, the multi-layer spiking neural network has good recognition accuracy on the three datasets, with an accuracy of more than 99%, which preliminarily verifies the effectiveness of the STBP learning algorithm for training the multi-layer spiking neural network. Then, the MNIST dataset is used to further verify the method, and the multi-layer spiking neural network structure is 784-100-10. After training on this dataset by the STBP learning algorithm, the training results of the network are shown in Table 4, which further verifies that the method can successfully train the multi-layer spiking neural network.

[0134] Table 3: Training results of the network on the UCI dataset

[0135]

[0136] Table 4: Training results of the network on the MNIST dataset

[0137]

[0138] A multi-layer spiking neural network construction and training device is described below. The multi-layer spiking neural network construction and training device described below can be used in conjunction with the multi-layer spiking neural network construction and training method described above.

[0139] As shown in Figure 8 , a multi-layer spiking neural network construction and training device is exemplified, which includes the following modules:

[0140] The construction module 810 is configured to introduce an adaptive spiking mechanism on the basis of the iterative form of the LIF model to form an IALIF spiking neuron model and construct a multi-layer spiking neural network.

[0141] The decoding module 820 is configured to decode the output of the multi-layer spiking neural network using a maximum membrane voltage decoding method.

[0142] The training module 830 is configured to train the multi-layer spiking neural network using an STBP learning algorithm to obtain a trained multi-layer spiking neural network for image recognition of various visual recognition tasks.

[0143] As shown in Figure 9 , an entity structure diagram of an electronic device is exemplified, which can include a processor 910, a communications interface 920, a memory 930, and a communications bus 940. The processor 910, the communications interface 920, and the memory 930 can communicate with each other through the communications bus 940. The processor 910 can invoke the logical instructions in the memory 930 to execute the steps of the multi-layer spiking neural network construction and training method described above, specifically including: introducing an adaptive spiking mechanism on the basis of the iterative form of the LIF model to form an IALIF spiking neuron model and construct a multi-layer spiking neural network; decoding the output of the multi-layer spiking neural network using a maximum membrane voltage decoding method; training the multi-layer spiking neural network using an STBP learning algorithm to obtain a trained multi-layer spiking neural network for image recognition of various visual recognition tasks.

[0144] Moreover, the logic instructions in the memory 930 described above can be implemented in the form of software functional units and sold or used as independent products, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0145] In yet another aspect, the embodiments of the present application also provide a storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-mentioned multi-layer pulse neural network construction and training method, and specifically includes: introducing an adaptive pulse firing mechanism on the basis of the iterative form of the LIF model to form an IALIF pulse neuron model and construct a multi-layer pulse neural network; decoding the output of the multi-layer pulse neural network using a maximum membrane voltage decoding method; training the multi-layer pulse neural network using an STBP learning algorithm to obtain a trained multi-layer pulse neural network for realizing image recognition for various visual recognition tasks.

[0146] The embodiments of the present application implement a multi-layer pulse neural network construction and training method, device and electronic equipment. An adaptive pulse firing mechanism is introduced in the iterative form of the LIF model, that is, an IALIF pulse neuron model, to control the pulse firing and reduce the pulse firing frequency, for constructing a multi-layer pulse neural network and improving the computing efficiency of the network. A maximum membrane voltage decoding mechanism is proposed for decoding the output of the network in the output layer of the multi-layer pulse neural network. For the training problem of the multi-layer pulse neural network, an STBP learning algorithm is proposed based on the back propagation algorithm, and a proxy gradient function is used to solve the non-differentiable problem in the training process.

[0147] It should be noted that, in the present document, the terms "comprising", "comprising" or any other variant thereof are intended to cover non-exclusive inclusions, so that a process, method, article or system that includes a list of elements not only includes those elements, but also includes other elements not explicitly listed, or inherent to such a process, method, article or system. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of other identical elements in the process, method, article or system that includes the element.

[0148] The above-mentioned embodiment numbers of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments. In the unit claims of several devices, several of these devices can be embodied by the same hardware item. The use of the words first, second, and third does not represent any order, and these words can be interpreted as identification.

[0149] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the content of the present application specification and drawings, or directly or indirectly applied to other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for constructing and training a multilayer spiking neural network, characterized in that, The method comprises the following steps: An adaptive pulse firing mechanism is introduced on the basis of an iterative form of a LIF model to form an IALIF pulse neuron model and construct a multi-layer pulse neural network; An output of the multi-layer pulse neural network is decoded using a maximum membrane voltage decoding method; The multi-layer pulse neural network is trained using an STBP learning algorithm to obtain a trained multi-layer pulse neural network for image recognition of multiple visual recognition tasks; The step of introducing the adaptive pulse firing mechanism on the basis of the iterative form of the LIF model to form the IALIF pulse neuron model and construct the multi-layer pulse neural network comprises: The LIF model abstracts a biological neuron as a resistance-capacitance parallel circuit and adopts a first-order linear differential equation to describe dynamic changes of a neuron membrane voltage, namely wherein, is the membrane voltage of the neuron, is time, is the membrane resistance, is the membrane capacitance, denotes the external input current; The LIF model is converted into an iterative form, and the converted neuron membrane voltage is represented as in, For the multilayer spiking neural network The first layer A neuron at discrete time The membrane voltage at that time; This indicates the memory and reset characteristics of spiking neurons; The membrane voltage attenuation coefficient represents the membrane voltage. Accumulation in the time domain, From arrive Time step It is the time constant of the membrane voltage; Indicates the first The first layer One neuron in The pulses are emitted continuously; when a neuron fires a pulse, ,at this time The value is zero, and the membrane voltage is reset; otherwise, the membrane voltage is adjusted according to... attenuation; Indicates input current Effect on membrane voltage To input the enhancement factor, The time constant of the neuron model; It is the first Layer Trigger threshold deviation of individual neurons; In the multi-layer pulse neural network, input current of a postsynaptic neuron produced by pulse firing of a presynaptic neuron is accumulated in a spatial domain; meanwhile, due to a memory characteristic of a synapse, the input current of the postsynaptic neuron is accumulated in a time domain, and the input current is represented as wherein, is a decay coefficient for the input current, is the number of neurons of the network's layer, is the synaptic weight between the pre-synaptic neuron of the network's layer and the post-synaptic neuron of the network's layer, is the input current of the network's layer at time , is the pulse fired by the neuron of the network's layer at time ; the network layer at time is represented as the output spike of the wherein, is an output activation function, i.e. wherein, and are the triggering threshold and the membrane voltage, respectively; The adaptive pulse firing mechanism is introduced in the iterative LIF model to realize adaptive pulse frequency and construct a multi-layer pulse neural network model; the adaptive pulse firing mechanism is represented as at this time is an adaptive trigger threshold, is is a decay coefficient, is is a time constant.

2. The method of claim 1, wherein, The step of introducing the adaptive pulse firing mechanism in the iterative LIF model comprises: The trigger threshold of the iterative LIF model is proportional to pulse firing activity to form the IALIF pulse neuron model.

3. The method of claim 1, wherein, The step of decoding the output of the multi-layer pulse neural network using the maximum membrane voltage decoding method comprises: Output layer neurons of the multi-layer pulse neural network are the same as the IALIF pulse neuron model, and an expression of the maximum membrane voltage decoding method is as follows: in, For the output layer, i.e., the network's first... Layer One neuron in Membrane voltage at time , Indicates the network output layer number 1 The maximum membrane voltage output of a single neuron The simulation time is for the network; when the output layer neuron fires a pulse, its membrane voltage is not reset, but accumulates continuously based on subsequent inputs.

4. The method of claim 1, wherein, In the step of training the multi-layer pulse neural network using the STBP learning algorithm, the multi-layer pulse neural network adopts a cross-entropy loss function as a loss function, namely wherein, is the number of output layer neurons; is the teacher signal, which is a one-hot encoding of the classification label, and has ; is the predicted probability of the output of the th neuron of the network output layer, which is obtained by the Softmax regression of the maximum membrane voltage of the neuron.

5. The method of claim 1, wherein, The step of training the multi-layer pulse neural network using the STBP learning algorithm comprises: The STBP learning algorithm is used to realize minimization of the loss function of the multi-layer pulse neural network, and the STBP learning algorithm comprises back propagation in the spatial domain and the time domain; Backpropagation in spatial domain requires the gradient of the loss function to be obtained and backpropagated through the multi-layer spiking neural network, setting a neuron , using gradient descent to update the synaptic weights and the trigger threshold bias , have After the step of training the multi-layer pulse neural network using the STBP learning algorithm to obtain the trained multi-layer pulse neural network, the following step is further included: In the above equation is the loss function, is the synaptic weight between the pre-synaptic neuron of the layer and the post-synaptic neuron of the layer , is the membrane voltage of the neuron of the layer , is the number of neurons of the layer , is the pulse emitted by the neuron of the layer , is the deviation of the firing threshold of the neuron of the layer , is the layer , is the layer , is the layer To perform spatial domain backpropagation in a network, one needs to solve and ; The solution is obtained by first computing the , as a constant, and then backpropagating from the output layer. The derivative of the sigmoid function is selected as a proxy gradient function to approximate the solution ; In the time domain of the spiking neural network, the backpropagation is implemented by updating the membrane voltage decay coefficient ​ wherein is a loss function, is the network's layer's neuron's membrane voltage at time ; the subsequent can be calculated according to the formula of the spatial domain back propagation , and then continue to carry out the time domain back propagation.

6. The method of claim 1, wherein, The trained multi-layer pulse neural network is verified using multiple visual recognition task data sets to obtain recognition accuracy. The method comprises the following modules:

7. An apparatus for implementing the method of claim 1, wherein, A construction module is configured to introduce an adaptive pulse firing mechanism on the basis of an iterative form of a LIF model to form an IALIF pulse neuron model and construct a multi-layer pulse neural network; A decoding module is configured to decode an output of the multi-layer pulse neural network using a maximum membrane voltage decoding method; A training module is configured to train the multi-layer pulse neural network using an STBP learning algorithm to obtain a trained multi-layer pulse neural network for image recognition of multiple visual recognition tasks. ​ 8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor, when executing the program, implements the steps of the multilayer spiking neural network construction and training method according to any one of claims 1-6.

9. A storage medium having stored thereon a computer program, characterized in that The computer program, when executed by the processor, implements the steps of the multilayer spiking neural network construction and training method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Impulse neural network training method, data processing method, electronic equipment and medium

    CN112734012A

  • Simulation and training method of pulse neural network with pulse moment offset

    CN113935475A