A temporal task classification method based on novel spiking neuron dynamics

By introducing new spiking neuron dynamics with regional current aggregation and multiple triggering mechanisms, the existing spiking neuron model's insufficient learning ability and gradient saturation problems in backpropagation training are solved, achieving stronger memory and classification accuracy. .

CN118349894BActive Publication Date: 2024-10-22WUHAN UNIV OF TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410775864.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2024-10-22
Estimated Expiration
2044-06-17

AI Technical Summary

Technical Problem

Existing spiking neuron models face problems such as weak learning ability, network degradation, gradient saturation, and heterogeneous learning when trained using the backpropagation algorithm, which limits the learning ability of SNNs.

Method used

A sequential task classification method based on new spiking neuron dynamics is proposed. By establishing a spiking neural network, introducing regional current aggregation equations and multiple triggering mechanisms, the memory and learning capabilities of neurons are enhanced, and the network's performance is improved through channel learning strategies. Heterogeneity and learnability.

Benefits of technology

It effectively enhances the memory and learning ability of spiking neurons, solves the problems of long-term memory and gradient saturation, and improves the classification accuracy of sequential tasks and the robustness of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118349894B_ABST
    Figure CN118349894B_ABST
Patent Text Reader

Abstract

The invention discloses a method for classifying time series tasks based on novel pulse neuron dynamics, comprising the following steps: step S1: establishing a pulse neural network, the pulse neural network obtains regional current by aggregating input signals of neurons within a period of time, uses the regional current to charge the voltage of the postsynaptic membrane to enhance the retention of past time series information by neurons, and establishes a reset equation to reset the regional current and membrane voltage; adopts a back propagation algorithm to train the pulse neural network; step S2: acquiring a data set, adopting a sliding window with multiple time sampling points to perform non-overlapping sampling on the data set, preprocessing the sampled data, and inputting the preprocessed data into the trained pulse neural network to achieve classification of time series tasks. The regional current can aggregate the input within a period of time, complete the charging of the membrane voltage, thereby enhancing the memory of the pulse neuron, which is conducive to the learning of time series information within a long step length.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of brain-like intelligence and deep learning technology, and specifically to a temporal task classification method based on novel pulse neuron dynamics. Background Art

[0002] In recent years, artificial neural networks (ANNs) have developed rapidly and have been widely used in various fields and achieved significant results, such as human-computer interaction, computer vision, intelligent manufacturing, and medical imaging. In addition, the introduction of key technologies such as attention mechanism, residual structure, batch normalization, and non-Euclidean learning strategy has improved the generalization ability and model parameter quantity of deep ANNs, so that they can be effectively applied to complex scenarios. Although ANNs have many advantages over other machine learning and deep learning methods, ANNs use an inefficient information processing method, and deep ANNs require a lot of energy consumption, which will become a challenge under limited resources.

[0003] Spiking neural networks (SNNs) are known as the third generation of neural network models. Due to their high biological interpretability, low energy consumption, event-driven properties, and powerful spatiotemporal information processing capabilities, SNNs are considered to be a strong competitor to ANNs. First, under the event-driven rules, neurons in SNNs communicate with asynchronous pulse signals, which means that the computing unit only needs to be activated when there is a pulse trigger, thereby saving computing time and resource consumption; secondly, SNNs adopt a new brain-like information computing paradigm. In each layer of the network, the presynaptic neurons in the receptive field will first gather information to the postsynaptic neurons to complete the spatial feature extraction within each time step, and then the postsynaptic neurons will learn the temporal features according to the inherent recursive dynamics, and encode the spatiotemporal features into binary digital signals for storing and representing the spatiotemporal information in the receptive field. This computational paradigm gives SNNs a powerful ability to learn spatiotemporal features from local to global perspectives; finally, unlike ANNs which only have a small number of types of neurons, SNNs can have a variety of neuron types and obey Dale's law, thereby improving the robustness of the network.

[0004] However, existing advanced neuron models, including leaky aggregate trigger (LIF), adaptive leaky aggregate trigger (ALIF), parameterized leaky aggregate trigger (PLIF) and afterhyperpolarization neuron (AHP-neuron), have failed to solve the four challenging problems faced by SNNs trained by the alternative gradient backpropagation algorithm, including long-term memory, network degradation, gradient saturation and heterogeneous learning, which greatly limits the learning ability of SNNs. Summary of the invention

[0005] The present invention proposes a temporal task classification method based on novel pulse neuron dynamics, which solves the problem that the existing neuron model has weak learning ability when trained by back propagation algorithm.

[0006] To solve the above technical problems, the present invention provides a method for classifying sequential tasks based on novel pulse neuron dynamics, comprising the following steps:

[0007] Step S1: establishing a pulse neural network, wherein the neurons of the pulse neural network are connected through synapses, and the output signals of the neurons are transmitted to other neurons through synapses; obtaining regional currents by aggregating the output signals of neurons within a set time period, using the regional currents to charge the membrane voltages of neurons receiving the signals to enhance the neurons' retention of past timing information, and establishing a reset equation to reset the regional currents and membrane voltages; and training the pulse neural network using a back propagation algorithm;

[0008] Step S2: Acquire a data set, perform non-overlapping sampling on the data set using a sliding window with multiple time sampling points, preprocess the sampled data, and input the preprocessed data into a trained spiking neural network to achieve classification of time series tasks.

[0009] Preferably, the spiking neural network obtains the input of the next neuron by aggregating and normalizing the outputs of multiple neurons:

[0010] ;

[0011] ;

[0012] ;

[0013] In the above formula, is the number of neurons that output signals; and Respectively The synaptic weights and outputs of the neurons that output the signal; The neurons that receive the signal are Input of time; Express Perform time and space normalization; For the The scale parameter on each channel; For the The input of the neuron on the channel; and They are The mean and biased estimate variance of ; For the Offset parameters on each channel; is set to To prevent the denominator of the fraction from being ; represents the time step; , is the input space size.

[0014] Preferably, after a neuron receives a signal, the membrane voltage changes, and when the voltage change reaches a set voltage threshold, multiple trigger mechanisms are activated, and the neuron generates a pulse signal and transmits it to other neurons.

[0015] Preferably, the multiple triggering mechanisms include dendrite triggering and axon triggering, wherein the dendrite triggering compares the membrane voltage of the neuron with a set voltage threshold to generate a dendrite pulse, and the axon triggering converts the dendrite pulse into binary to obtain an axon pulse;

[0016] The expression of the forward propagation of the dendrite triggering is:

[0017] ;

[0018] In the formula, x is the membrane voltage of the neuron; is the voltage threshold of membrane voltage;

[0019] The expression of the alternative derivative function of the dendrite-triggered backpropagation is:

[0020] ;

[0021] In the formula, To tune the hyperparameters of the alternative derivative function;

[0022] The expression of the forward propagation of the axon triggering is:

[0023] ;

[0024] The expression of the alternative derivative function of the axon-triggered backpropagation is:

[0025] .

[0026] Preferably, under the multiple triggering mechanism, the membrane voltage The expression of the gradient is:

[0027] ;

[0028] In the formula, is the forward propagation loss of the spiking neural network; is the membrane time parameter; It is a ternary dendritic pulse; express Number of time steps from time instant without pulse release.

[0029] Preferably, the expression for charging the membrane voltage of the neuron receiving the signal by using the regional current in step S1 is:

[0030] ;

[0031] In the above formula, and They are The regional current and the membrane voltage of the neuron before the moment pulse is triggered; and They are The regional current and the membrane voltage of the neuron after the moment pulse is triggered; Indicates The forgetting coefficient on the channel; represents the membrane time parameter; represents the synaptic decay parameter; is the resting potential of the membrane voltage.

[0032] Preferably, the expression of the reset equation in step S1 is:

[0033] ;

[0034] In the formula, , They are The regional current and the membrane voltage of the neuron after the moment pulse triggers; and Represent the reset voltage and reset current respectively; Dendritic impulses.

[0035] Preferably, the spiking neural network deploys neurons using a channel learning strategy, which deploys independently learnable parameters in the neurons of each channel of the spiking neural network, so that the parameters of the neurons of each channel are adaptively adjusted during the training process.

[0036] Preferably, the method for preprocessing the sampled data in step S2 includes: the data set includes a static timing task and a dynamic timing task, extracting differential entropy features of 5 frequency bands from each sample of the static timing task, expanding the differential entropy features in the time dimension to obtain dynamic differential entropy features, and using the dynamic differential entropy features as input of the pulse neural network.

[0037] The present invention also provides an electronic device, comprising: a memory, a processor and a computer program, wherein the computer program is stored in the memory and is configured to be executed by the processor to implement the above-mentioned method for classifying sequential tasks based on the novel pulse neuron dynamics.

[0038] The benefits of the present invention include at least:

[0039] Existing pulse neuron models such as LIF, PLIF, and ALIF only use membrane voltage to retain and forget timing information, but the attenuation mechanism of membrane voltage often makes neurons only have short-term memory ability. The present invention introduces a new internal state variable, namely regional current, into the dynamics of neurons by constructing a regional current aggregation equation. The regional current can aggregate inputs over a period of time and complete the charging of membrane voltage, thereby enhancing the memory of pulse neurons, which is beneficial to the learning of timing information within a long step and preventing the loss of key information. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is a flow chart of a method according to an embodiment of the present invention;

[0041] Figure 2 A schematic diagram of the process of constructing a CRIMF neuron in an embodiment of the present invention;

[0042] Figure 3 Schematic diagram of the forward propagation and reverse propagation process of CRIMF neurons in an embodiment of the present invention;

[0043] Figure 4 A schematic diagram of a process for evaluating static time sequence tasks and dynamic time sequence tasks according to an embodiment of the present invention;

[0044] Figure 5 It is a structural framework diagram of a spiking neural network for processing static timing tasks in an embodiment of the present invention;

[0045] Figure 6 It is a structural framework diagram of a spiking neural network for processing dynamic timing tasks in an embodiment of the present invention;

[0046] Figure 7 is the classification accuracy obtained when the CRIMF-based SNNs process static time series tasks in an embodiment of the present invention;

[0047] Figure 8 t-SNE visualization of the hidden layer output in SEED-static of an embodiment of the present invention;

[0048] Fig. 9 is the pulse triggering rate of the first hidden layer in the SNNs based on CRIMF and other SNNs with a single triggering mechanism in the embodiment of the present invention;

[0049] Fig.10 Graph showing the membrane voltage gradient distribution of the first hidden layer in the CRIMF-based SNNs and other SNNs with a single trigger mechanism in an embodiment of the present invention. DETAILED DESCRIPTION

[0050] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of the present invention.

[0051] In spiking neural networks, neurons are the basic units of information processing, and synapses are the structures that transmit information between neurons.

[0052] A synapse is composed of a presynaptic membrane, a synaptic cleft, and a postsynaptic membrane. Each synapse connects a pair of neurons, called the presynaptic neuron and the postsynaptic neuron. The presynaptic neuron is the neuron used to send signals. When the presynaptic neuron is activated, it releases neurotransmitters at the synaptic terminal. Neurotransmitters are chemicals that cross the synaptic cleft and bind to receptors on the postsynaptic neuron. The postsynaptic neuron is the neuron used to receive signals. The membrane of the postsynaptic neuron contains receptors for neurotransmitters. When neurotransmitters bind to receptors, electrical signals are generated on the postsynaptic neuron.

[0053] Neurons are made up of a cell body, dendrites, and an axon. The main function of dendrites is to receive signals from other neurons. The main function of the axon is to transmit electrical signals from the cell body to other neurons.

[0054] The relationship between these components is: dendrites receive signals from other neurons, the cell body and dendrites of the neuron integrate the received signals, the axon transmits the integrated signals to other neurons in the form of electrical signals, and the synapse acts as a medium for signal transmission, connecting different neurons.

[0055] like Figure 1 As shown, an embodiment of the present invention provides a method for classifying time series tasks based on novel pulse neuron dynamics, comprising the following steps:

[0056] Step S1: Figure 2As shown, a channel-wise regionalintegrate and multiple firing (CRIMF) spiking neuron with a new type of dynamics is established, whose discrete form of dynamical behaviors includes spatial feature extraction, input normalization, regional current aggregation, membrane voltage charging, dendritic triggering, axonal triggering, membrane voltage resetting, and regional current resetting.

[0057] Step S11: Aggregate the outputs of the presynaptic neurons in the receptive field to obtain the inputs of the postsynaptic neurons to complete the extraction of spatial features at each time step. Since the update of synaptic weights during training will form an unstable input distribution, the inputs of the postsynaptic neurons are normalized in the spatiotemporal dimension to avoid network degradation caused by input.

[0058] Specifically, the output of the presynaptic neuron is aggregated to obtain the input of the postsynaptic neuron to complete the spatial feature extraction:

[0059] ;

[0060] in, is the number of presynaptic neurons in the receptive field, where for the number of the presynaptic neurons in the layer; and Respectively The synaptic weights and outputs of the presynaptic neurons; The postsynaptic neuron The input received at any time, is the spatial position of the postsynaptic neuron, It is the channel in which the postsynaptic neuron is located.

[0061] During the training process of the pulse neural network, the synaptic weights are constantly updated and affect Distribution, and inappropriate input distribution will cause network degradation. When the input is too small, the neuron will release a small amount or no pulse, hindering the forward propagation of spatiotemporal information. When the input is too large, the neuron will release pulses at every moment, making the output insensitive to changes in the input, thereby reducing the network's ability to distinguish different types of data. Therefore, the network is completed on each channel. Normalization in space-time dimensions:

[0062]

[0063] in, For the The scale parameter on each channel, For the Offset parameters on channels, trainable parameters and are initialized to 1 and 0; is set to To prevent the denominator of the fraction from being ; Indicates The overall spatiotemporal input in channels, where represents the time step, , is the input space size.

[0064] and for The mean and biased estimate variance of can be expressed as:

[0065] .

[0066] Then, the input distribution of the postsynaptic neuron will be adjusted to , and the voltage threshold is set to To match distribution, thereby overcoming the network degradation phenomenon caused by unstable input distribution.

[0067] Step S12: Establish the regional current aggregation equation of the CRIMF neuron. Considering that when only relying on one internal state variable, membrane voltage, to store timing information, the attenuation mechanism of membrane voltage will make the pulse neuron have only short-term memory function, a new internal state variable is added to the dynamics of the CRIMF neuron: regional current. The regional current can aggregate the input within a period of time and complete the charging of the membrane voltage, enhance the memory of the neuron, help learn the timing characteristics within a long step length, and prevent the forgetting of key information.

[0068] Specifically, a new internal state variable, namely the regional current, is introduced into the dynamics of CRIMF neurons. The regional current can aggregate the input over a period of time and be transmitted to the postsynaptic membrane to complete the charging of the membrane voltage. The corresponding regional current aggregation equation and membrane voltage charging equation are as follows:

[0069] ;

[0070] and yes Regional current and membrane voltage after the moment pulse triggering; and yes Regional current and membrane voltage before the moment pulse triggers; Indicates The forgetting coefficient on the channel; represents the membrane time parameter; represents the synaptic decay parameter; is the resting potential.

[0071] To illustrate that regional current has the function of improving neuronal memory, LIF neurons without and with regional current were constructed, and the superscripts were ignored. and subscript , , where the dynamic equation of the LIF neuron without area current is as follows:

[0072] ;

[0073] in, is the pulse triggering determination equation; for Binary pulses triggered at any moment. Membrane voltage at time Exceeding the threshold voltage The postsynaptic neuron releases a pulse , and the membrane voltage will be reset On the contrary, neurons in Always in a state of rest , the membrane voltage remains unchanged .

[0074] The dynamic equation of the LIF neuron with regional current (LIF-RC) is expressed as follows:

[0075] ;

[0076] in and are the reset voltage and reset current respectively. Assuming the time There is no pulse output in the LIF neuron without regional current. The membrane voltage at the moment The partial derivative of the input at time instant can be given by:

[0077] ;

[0078] The partial derivatives in the LIF-RC neuron can be expressed as follows:

[0079]

[0080] because , so there is , indicating that the partial derivatives in LIF-RC neurons are larger than those in LIF neurons, and that This phenomenon becomes more obvious with the increase of . This can be described as the regional current enhancing the retention of past temporal information in neurons, thus forming long-term memory. This means that the firing of pulses in LIF-RC neurons is more closely related to the input over a period of time, preventing the loss of key information.

[0081] Step S13: Introduce a multi-trigger mechanism into the dynamics of CRIMF neurons. The multi-trigger mechanism includes two processes: dendrite triggering and axon triggering. Under the condition of ensuring the biological interpretability of neurons and not changing the output complexity, the membrane voltage distribution and membrane voltage gradient distribution in a single trigger mechanism are adjusted. The dendrite pulse has two symmetrical voltage thresholds. and , used to generate ternary dendritic pulses Axon firing converts dendritic impulses into binary axonal impulses , and as The output pulse of the neuron at that moment.

[0082] Existing advanced neurons use a single trigger mechanism to complete the release of pulses. However, the single trigger mechanism will drive the membrane voltage distribution to shift to negative values, resulting in under-activation problems and reducing the ability of SNNs to distinguish different categories of data. In addition, under the single trigger mechanism, the membrane voltage at most time steps will be in an interval with a small alternative derivative, and a large number of membrane voltage gradients will diffuse during the back propagation process, causing the update of synaptic weights to only depend on the membrane voltage at a small number of time steps, which interferes with the back propagation in the time dimension and cannot fully utilize the timing information to train SNNs. The forward propagation of the single trigger mechanism can be expressed as:

[0083] ;

[0084] In the formula, x is the membrane voltage of the neuron; is the voltage threshold of the membrane voltage.

[0085] The alternative derivative function during backpropagation is expressed as:

[0086] ;

[0087] in, is set to ; is a step function, and since its derivative is Dirac function, so the derivative is replaced by the sigmoid function during back propagation, so that when hour .

[0088] Under a single trigger mechanism, neurons release a pulse when the membrane voltage exceeds the voltage threshold, and then reset the membrane voltage to avoid excessive positive voltage causing high-frequency pulse generation, while constraining the positive voltage to always be distributed around the voltage threshold. , which means that negative voltage will continue to accumulate, and excessive negative voltage will induce inhibition for a long time, leading to the under-activation problem in the forward propagation.

[0089] Furthermore, assuming that the neuron Trigger on time step and There is no pulse release within, and the back propagation between layers is set to , then the membrane voltage The gradient of can be calculated as:

[0090] ;

[0091] in, represents the forward propagation loss of the spiking neural network.

[0092] Because the distribution of membrane voltage under a single trigger mechanism shifts to the negative direction, and when and hour Therefore, in most time steps, not only is the value of the second term in the above equation very small due to the influence of the membrane voltage attenuation mechanism, but the value of the first term is also very small, which causes a large amount of membrane voltage gradients to diffuse during directional propagation, resulting in a gradient saturation problem.

[0093] To address the defects of a single trigger mechanism, multiple trigger mechanisms were introduced into the dynamics of CRIMF neurons, involving two processes: dendritic triggering and axonal triggering. Figure 3 The figure shows the flow chart of forward propagation and reverse propagation of CRIMF neurons in the embodiment of the present invention. First, the dendrite triggers the membrane voltage Comparison with two symmetrical voltage thresholds to generate ternary dendritic pulses The forward propagation of dendrite firing can be expressed mathematically as:

[0094] .

[0095] The alternative derivative function for dendrite firing during backpropagation is defined as:

[0096] ;

[0097] in ; is a hyperparameter used to tune the alternative derivative function and is also set to .

[0098] When CRIMF neurons release dendritic impulses or When the voltage is reset, both the regional current and the membrane voltage are reset, thereby avoiding excessive accumulation of negative and positive voltages. Then, axon triggering converts the ternary dendritic pulses into binary axon pulses to ensure that CRIMF neurons are biologically interpretable and reduce the complexity of spatiotemporal representation. The forward propagation of axon triggering can be expressed mathematically as:

[0099] ;

[0100] The alternative derivative function for axon firing during backpropagation is constructed as:

[0101] .

[0102] According to the mapping relationship between membrane voltage and output pulse in a single trigger mechanism, and Considered as inhibitory, is considered as excitatory and is converted into and This also shows that the multi-trigger mechanism can solve the under-activation problem without changing the output complexity.

[0103] In addition, under multiple triggering mechanisms, the membrane voltage The gradient of can be rewritten as:

[0104]

[0105] Dendrites trigger as membrane voltage reaches a voltage threshold Nearby, providing appropriate partial derivatives, axon firing ensures that , in order to update during training and consistency. , and The expression of can be obtained:

[0106]

[0107] Therefore, at most time steps, the membrane voltage gradient in the multiple triggering mechanism is much higher than that in the single triggering mechanism, thereby avoiding the gradient diffusion of a large amount of membrane voltage to solve the gradient saturation problem.

[0108] The multiple triggering mechanism proposed in the present invention can adjust the membrane voltage distribution and the membrane voltage gradient distribution while ensuring the biological interpretability of neurons and without changing the output complexity, thereby solving the under-activation and gradient saturation problems in a single triggering mechanism.

[0109] Step S14: constructing a regional current reset equation of the CRIMF neuron. The regional current reset equation and the membrane voltage reset equation realize the reset of two internal state variables according to the release of dendritic pulses at this moment.

[0110] Specifically, the regional current reset equation of the CRIMF neuron is constructed, and the membrane voltage and regional current reset equations are as follows:

[0111] ;

[0112] in and Represent the reset voltage and reset current respectively. Dendritic pulses are generated at every moment or , the regional current and membrane voltage will be reset to and , otherwise when They will remain unchanged, i.e. and , thereby preventing the sustained release of dendritic impulses to balance the impulse firing rate.

[0113] Step S15: Deploy CRIMF neurons using a channel learning strategy so that CRIMF neurons in different channels of each layer of the network have independent learnable dynamic equations, thereby improving the heterogeneity and learnability of neurons and the diversification of the spiking neural network structure, thereby learning different types of timing features in a targeted manner.

[0114] Existing research on SNNs ignores the fact that different channels in the network represent different types of temporal features, and only uses one type of neuron to learn all types of temporal features, and the dynamic equation of the neuron is fixed. The channel learning strategy proposed in this invention enables the spiking neurons of different channels to have independent and learnable dynamic equations, improves the heterogeneity and learnability of neurons, and can adaptively extract different types of features, thereby enhancing the spatiotemporal learning performance of SNNs.

[0115] Specifically, the channel learning strategy is used to deploy CRIMF neurons to ensure that the first The neurons in each channel have independent learnable parameters. , and , so that the dynamic equation of each channel can be adaptively adjusted during the training process, forming a temporal learning of channel association. In addition, , and The following conversion method is used:

[0116] ;

[0117] in , and are directly trainable parameters and are initialized to This conversion formula ensures that during the training process , and For the rest of the parameters in the CRIMF neuron, set as well as , to match the input distribution obtained by the spatiotemporal normalization equation, thereby overcoming the network degradation problem caused by unstable input distribution.

[0118] The final dynamic equation of the CRIMF neuron in discrete form can be described as:

[0119] ;

[0120] The first of these is the aggregation of the outputs of presynaptic neurons to achieve Spatial feature extraction at the moment, by gathering spatial information in the receptive field The input to the postsynaptic neuron at that moment ; The second is the space-time normalization equation, the scale parameter and offset parameters are initialized to and , the normalized input The distribution is adjusted to ; The third and fourth are the regional current aggregation equation and membrane voltage charging equation, respectively, forgetting the parameter and membrane time parameters Used to control the leakage of two internal state variables over time, the synaptic decay parameter Used to control the attenuation of regional current when it is transmitted to the cell membrane; the fifth and sixth represent the dendrite triggering and axon triggering processes, respectively. Dendrite triggering has two symmetrical voltage thresholds and , used to generate ternary dendritic pulses , then the axon triggers Reconversion of axonal impulses into binary , and as in The seventh and eighth are the membrane voltage reset equation and the regional current reset equation, respectively. The release of the dendritic pulse at moment 1 realizes the reset of the internal state variables.

[0121] Step S2: Acquire a data set, use a sliding window with multiple time sampling points to perform non-overlapping sampling on the data set, preprocess the sampled data, and input the preprocessed data into a trained spiking neural network to achieve classification of time series tasks.

[0122] like Figure 4 FIG. 1 is a flow chart of evaluating static sequential tasks and dynamic sequential tasks according to an embodiment of the present invention.

[0123] Most representative studies only use SNNs for static time series tasks such as static image classification and target detection. Although the input of the network in this task has both spatiotemporal dimensions, it can only be regarded as an extension of static data in the time dimension. Such tasks cannot verify the performance of SNNs sequence learning. Some studies apply SNNs to dynamic time series tasks such as neuromorphic image classification and electrocardiogram recognition. The existing research on dynamic time series tasks has low requirements for the network's time series learning ability, and the data used only has a small number of time steps, which is not enough to prove the effectiveness of SNNs in long sequence learning. The present invention selects two EEG emotion datasets and performs evaluations based on manual features and raw EEG signals on the two datasets to verify the performance of CRIMF-based SNNs on static time series tasks and dynamic time series tasks. In addition, the present invention also designs two baseline spiking neural network frameworks for static time series tasks and dynamic time series tasks. In static time series tasks, CRIMF-based SNNs achieved an average accuracy of 92.657% and 85.063% in SEED and SEED-IV, respectively, and outperformed the most advanced methods. In dynamic timing tasks, CRIMF-based SNNs achieved the highest average accuracy of 96.376% and 89.001% on SEED and SEED-IV, respectively, indicating that CRIMF neurons are superior to existing advanced spiking neurons and recurrent units in ANNs.

[0124] The embodiment of the present invention uses two emotional EEG datasets SEED and SEED-IV to verify the performance of CRIMF neurons. In order to verify the performance of SNNs based on CRIMF in static and dynamic time series tasks, evaluation based on manual features and original EEG signals is performed on both datasets, where manual features refer to differential entropy features in five frequency bands, including , , , and .

[0125] For the static time series task in SEED, the first 9 trials of a session for each subject were used as the training set, and the remaining 6 were used as the test set. Then a sliding window with 200 time sampling points was used to non-overlap the data, and 5 frequency bands were extracted from each sample ( ). Since each sample does not have a time dimension after feature extraction and sequence learning is no longer required, the resulting dataset is called SEED-static. In order to make the shape of the sample match the input of SNNs, the sample is expanded in the time dimension and the shape of the sample is converted to , is set to , is the number of electrodes and also the number of spatial nodes. The average accuracy and standard deviation of all 15 subjects in the first two sessions were used as evaluation indicators.

[0126] For the dynamic timing task in SEED, in one session of one subject, the previous The data is used as the training set, and the remaining As the test set. Then a sliding window with 200 time sampling points is used to perform non-overlapping sampling on the data, and the original EEG signal is directly used as the sample. The shape of the sample can be described as The resulting dataset is called SEED-dynamic. Experiments are then performed on the first session of all subjects to compare the performance of CRIMF neurons, advanced spiking neurons, and recurrent units in ANNs.

[0127] For the static time series task in SEED-IV, the first 16 trials are used as the training set and the last 8 trials are used as the test set. Then the same window sampling and feature extraction as SEED-static are performed, except that the number of time sampling points in the sliding window is expanded to 800, and the SEED-IV-static dataset is obtained. The average accuracy and standard deviation of all 15 subjects in 3 sessions are used as evaluation indicators.

[0128] For the dynamic timing tasks in SEED-IV, the experimental settings and evaluation criteria of SEED-IV-dynamic are consistent with those of SEED-dynamic.

[0129] Figure 5 and Figure 6The two baseline pulse neural network frameworks proposed by the embodiments of the present invention for static time series tasks and dynamic time series tasks, the network models corresponding to different data sets under the same task all have auto-encoding layers, hidden layers and linear layers, and only differ in channel settings. Table 1 shows the model structure for SEED-static and SEED-IV-static data sets, and Table 2 shows the model structure for SEED-dynamic and SEED-IV-dynamic data sets.

[0130] Table 1: Spiking neural network structures of SEED-static and SEED-IV-static

[0131]

[0132] Table 2: SEED-dynamic spiking neural network structure

[0133]

[0134] During training, the CRIMF-based SNNs are trained using a surrogate gradient-based spatiotemporal back-propagation learning rule. Specifically, the designed surrogate derivative function Substitute the derivative of the non-differentiable dendritic firing equation using the substitute derivative function Substitute the derivative of the axon firing equation, which is not differentiable. Furthermore, in the backpropagation, the dendritic impulse The computational graph is stripped from the membrane voltage reset equation and the area current reset equation to optimize the learning process of the spiking neural network.

[0135] The multi-task classification performance of CRIMF-based SNNs is evaluated in static time series tasks and dynamic time series tasks, and the hyperparameter settings of the corresponding tasks are shown in Table 3.

[0136] Table 3: Hyperparameter settings for static and dynamic time series tasks

[0137]

[0138] In static timing tasks, Figure 7 The classification accuracy of CRIMF-based SNNs in different sessions of different subjects is shown, which describes that impressive results are achieved in most experiments, indicating that CRIMF-based SNNs have strong generalization capabilities.

[0139] The average accuracy and standard deviation are used to compare the CRIMF-based SNNs with the state-of-the-art methods, where the average accuracy is used as the dominant indicator to evaluate the performance of the model. It can be seen that most of the compared models are graph convolutional neural networks, which have excellent performance in the derivative structure of ANNs. However, as shown in the experimental results in Table 4, the CRIMF-based SNNs achieved and The average accuracy of and , which fully demonstrates the excellent performance of this model.

[0140] Table 4: Comparison of methods on static timing tasks

[0141]

[0142] Figure 8 The output of the hidden layer of the network is visualized using the t-distributed stochasticneighbour embedding (t-SNE) algorithm in SEED-static. It can be found that points of the same category, that is, points of the same category with the same color are clustered together, while there is a certain distance between clusters of points of different categories, which proves the reliability of the classification results of CRIMF-based SNNs in static time series tasks.

[0143] In the dynamic time series task, the comparison results of CRIMF neurons with advanced spiking neurons and recurrent units in ANNs are shown in Table 5. Table 5 reports the computing power (Flops), parameter count, and classification accuracy of all networks. Obviously, the Flops and parameter count of SNNs are only 2.3 times that of ANNs. and , and the average accuracy of SNNs is higher than that of ANNs on SEED-dynamic , on SEED-IV-dynamic high , which indicates that SNNs can save energy consumption to a great extent and have the potential to surpass ANNs in dynamic time series tasks. In addition, Table 5 also shows that on the two datasets, CRIMF-based SNNs are and The average accuracy of SNNs based on other neurons is improved by , while the increase in Flops and parameters is less than , and the standard deviation of CRIMF-based SNNs is also the lowest, which proves that the performance of CRIMF neurons is excellent.

[0144] Table 5 Comparison of methods on dynamic time series tasks

[0145]

[0146] Fig. 9 The pulse trigger rate distribution of the first hidden layer in CRIMF-based SNNs is compared with that in other SNNs with a single trigger mechanism. It can be seen that since the single trigger mechanism does not take any action on negative voltage, excessively negative voltage will cause inhibition within a long step, causing a large number of neurons to not release or release a small number of pulses, hindering the forward propagation of information. In contrast, the multiple trigger mechanism can prevent the continuous inhibition of excessively negative voltage and regulate the membrane voltage distribution without changing the complexity of the output spatiotemporal representation.

[0147] Fig.10 The distribution of membrane voltage gradients in the first hidden layer of CRIMF-based SNNs and other SNNs with a single trigger mechanism is compared. It can be found that in SNNs with a single trigger mechanism, the membrane voltage gradients at most time steps are very small, resulting in the weight update relying only on the membrane voltage at a small number of time steps, which hinders the back propagation in the temporal dimension and cannot fully utilize the temporal information to train SNNs. In contrast, in CRIMF-based SNNs, a large number of membrane voltage gradients are improved, and the average gradient is higher than that of other SNNs. times, and the results fully support that CRIMF neurons can effectively solve the gradient saturation in a single trigger mechanism.

[0148] Finally, the data to be detected is input into the CRIMF-based SNNs, and the category with the highest pulse triggering frequency is taken as the predicted classification result of the input.

[0149] The training and testing processes in the static timing tasks and dynamic timing tasks of the embodiments of the present invention are completed in the Python 3.6 and PyTorch 1.7.0 environments.

[0150] The present invention also proposes an electronic device, comprising: a memory, a processor and a computer program, wherein the computer program is stored in the memory and is configured to be executed by the processor to implement the above-mentioned method for classifying sequential tasks based on the novel pulse neuron dynamics.

[0151] The present invention further provides a computer-readable storage medium, in which a computer program is stored. The computer program is executed by a processor to implement the above-mentioned method for classifying sequential tasks based on novel pulse neuron dynamics.

[0152] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. Only the preferred embodiments of the present invention are expressed. The description is more specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. As long as there is no contradiction in the combination of these technical features, they should be considered as the scope recorded in this specification.

[0153] It should be noted that, for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these modifications and improvements all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A method for classifying sequential tasks based on novel spiking neuron dynamics, characterized by: The following steps are involved: Step S1: establishing a pulse neural network, wherein the neurons of the pulse neural network are connected through synapses, and the output signals of the neurons are transmitted to other neurons through synapses; obtaining regional currents by aggregating the output signals of neurons within a set time period, using the regional currents to charge the membrane voltages of neurons receiving the signals to enhance the neurons' retention of past timing information, and establishing a reset equation to reset the regional currents and membrane voltages; and training the pulse neural network using a back propagation algorithm; Step S2: obtaining a data set of EEG signals, performing non-overlapping sampling on the data set using a sliding window with multiple time sampling points, preprocessing the sampled data, and inputting the preprocessed data into a trained spiking neural network to achieve classification of the time series task; The expression of the dynamic equation of the pulse neural network is: In the formula, is the input of the postsynaptic neuron at time t; N is the number of neurons that output signals; ω i is the synaptic weight of the neuron that outputs the ith signal; o i (t) is the output of the neuron at time t of the i-th output signal; is the normalized input of the postsynaptic neuron at time t; c is the scale parameter; β c is the offset parameter; mean(X c ) and var(X c ) are X c The mean and biased estimate variance of X c is the input of the neuron on the cth channel; ε is set to 1×10 -6 To prevent the denominator of the fraction from being 0; and They are the regional current and the membrane voltage of the neuron before the pulse is triggered at time t; and They are the regional current and the membrane voltage of the neuron after the pulse triggering at time t-1; is the forgetting parameter; is the membrane time parameter; is the synaptic decay parameter; is the resting potential of the membrane voltage; is the dendritic pulse; for axonal impulses; is the voltage threshold; and Represent the reset voltage and reset current respectively; Θ() is the forward propagation triggered by dendrites; Ψ() is the forward propagation triggered by axons.

2. The method for classifying time series tasks based on novel spiking neuron dynamics according to claim 1 is characterized in that: After a neuron receives a signal, the membrane voltage changes. When the voltage change reaches the set voltage threshold, multiple trigger mechanisms are activated, and the neuron generates a pulse signal and transmits it to other neurons.

3. The method for classifying sequential tasks based on novel spiking neuron dynamics according to claim 2 is characterized in that: The multiple triggering mechanisms include dendrite triggering and axon triggering, wherein the dendrite triggering compares the membrane voltage of the neuron with a set voltage threshold to generate a dendrite pulse, and the axon triggering converts the dendrite pulse into binary to obtain an axon pulse; The expression of the forward propagation of the dendrite triggering is: Where x is the membrane voltage of the neuron; V th is the voltage threshold of membrane voltage; The expression of the alternative derivative function of the dendrite-triggered backpropagation is: Where α is a hyperparameter for adjusting the alternative derivative function; The expression of the forward propagation of the axon triggering is: The expression of the alternative derivative function of the axon-triggered backpropagation is:

4. The method for classifying sequential tasks based on novel spiking neuron dynamics according to claim 2, characterized in that: Under the multiple triggering mechanism, the gradient of the membrane voltage U(t) is expressed as: Where L is the forward propagation loss of the spiking neural network; is the membrane time parameter; P(t)∈{-1,0,1} is the ternary dendritic pulse; Δt represents the number of time steps without pulse release from time t.

5. The method for classifying sequential tasks based on novel spiking neuron dynamics according to claim 1, characterized in that: The pulse neural network deploys neurons using a channel learning strategy, which deploys independent learnable parameters in the neurons of each channel of the pulse neural network, so that the parameters of the neurons of each channel are adaptively adjusted during the training process.

6. The method for classifying time series tasks based on novel spiking neuron dynamics according to claim 1, characterized in that: The method for preprocessing the sampled data in step S2 includes: the data set includes a static time series task and a dynamic time series task, the differential entropy features of 5 frequency bands are extracted from each sample of the static time series task, the differential entropy features are expanded in the time dimension to obtain dynamic differential entropy features, and the dynamic differential entropy features are used as the input of the pulse neural network.

7. An electronic device comprising: A memory, a processor and a computer program, characterized in that: the computer program is stored in the memory and is configured to be executed by the processor to implement a temporal task classification method based on novel pulse neuron dynamics as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Spiking neural network and image recognition method

    CN113962355A

  • Multi-input neuron circuit for spiking neural network

    CN114528984A

  • Pulse nerve brain-like intelligent classification method based on neuron complex dynamics

    CN114861838A

  • Long short-term memory using a spiking neural network

    US20160034812A1