Signal processing method, task processing method and device based on spiking neural network

By setting a time window in the pulse neural network and selecting parallel or serial processing methods based on the issuance prediction information, the problem of inefficiency of the pulse neural network when processing timing data is solved, and more efficient resource utilization and processing capabilities are achieved.

CN118886459APending Publication Date: 2024-11-01LYNXI TECH CO LTD

Patent Information

Application Number
CN202411045022.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

When processing time sequence data, pulsed neural networks have poor parallelism in the time dimension due to serial calculations and low processing efficiency, which limits their application on large-scale networks and long-sequence data sets.

Method used

By setting a time window in the pulsed neural network and determining the execution method of signal distribution based on the neuron's issuance prediction information within the time window, parallel or serial methods are used to realize parallel calculations in the time dimension.

Benefits of technology

It improves the efficiency of signal processing, improves the resource utilization of hardware devices, and is suitable for processing large-scale networks and long-sequence data sets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118886459A_ABST
    Figure CN118886459A_ABST
Patent Text Reader

Abstract

The invention provides a pulse neural network-based signal processing method and device, and a task processing method and device, and belongs to the technical field of computers. The signal processing method comprises: for a current time window, according to distribution prediction information of neurons in the current time window, determining an execution mode of signal distribution of the neurons in the current time window, each time window comprising a plurality of time steps, the execution mode comprising a parallel mode or a serial mode; and under the condition that the execution mode of signal distribution of the neurons in the current time window is a parallel mode, signal distribution of the neurons in multiple time steps in the current time window is executed in parallel, and a parallel processing result of the current time window is obtained. According to the embodiment of the invention, whether the neurons can adopt a parallel processing mode or a serial processing mode is determined according to the distribution prediction, the signal processing flexibility and efficiency can be effectively improved, and the resource utilization rate of hardware equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a signal processing method based on a pulse neural network, a task processing method based on a pulse neural network, a signal processing device based on a pulse neural network, a task processing device based on a pulse neural network, an electronic device and a computer-readable storage medium. Background Art

[0002] Compared with artificial neural networks commonly used in the field of deep learning, spiking neural networks (SNNs) have the characteristics of state memory, support for analog computing, and information transmission through binary pulses. They can show complex dynamic behaviors and are very suitable for processing spatiotemporal data. When processing data based on spiking neural networks, it is usually necessary to calculate information such as the membrane potential or gradient of neurons step by step, which leads to poor parallelism in the time dimension and low processing efficiency. Summary of the invention

[0003] The present disclosure provides a signal processing method based on a pulse neural network, a task processing method based on a pulse neural network, a signal processing device based on a pulse neural network, a task processing device based on a pulse neural network, an electronic device and a computer-readable storage medium.

[0004] In a first aspect, the present disclosure provides a signal processing method based on a pulse neural network, wherein the pulse neural network includes multiple neurons, and the signal processing method includes: for a current time window, according to the emission prediction information of the neuron in the current time window, determining the execution mode of the neuron to emit signals in the current time window, each time window includes multiple time steps, and the execution mode includes a parallel mode or a serial mode; when the execution mode of the neuron to emit signals in the current time window is a parallel mode, executing the signal emission of the neuron in multiple time steps in the current time window in parallel to obtain a parallel processing result of the current time window.

[0005] In a second aspect, the present disclosure provides a task processing method based on a pulse neural network, wherein the pulse neural network includes multiple neurons, and the task processing method includes: pulse encoding the data to be processed corresponding to a preset task to obtain an input pulse signal corresponding to multiple time steps; inputting the input pulse signal into the pulse neural network for signal processing to obtain output pulse signals of multiple neurons in the pulse neural network; determining the processing result of the preset task based on the output pulse signals of the multiple neurons; wherein the neurons in the pulse neural network are used to execute the signal processing method based on the pulse neural network described in any one of the embodiments of the present disclosure.

[0006] In a third aspect, the present disclosure provides a signal processing device based on a pulse neural network, wherein the pulse neural network includes multiple neurons, and the signal processing device includes: a first determination module, for determining, with respect to a current time window, an execution mode of the signal emission of the neuron in the current time window according to the emission prediction information of the neuron in the current time window, wherein the execution mode includes a parallel mode or a serial mode; an execution module, for executing the signal emission of the neuron in the current time window in parallel for multiple time steps in the current time window, when the execution mode of the signal emission of the neuron in the current time window is a parallel mode, to obtain a parallel processing result of the current time window.

[0007] In a fourth aspect, the present disclosure provides a task processing device based on a pulse neural network, wherein the pulse neural network includes multiple neurons, and the task processing device includes: an encoding module, used to pulse encode the data to be processed corresponding to a preset task, and obtain an input pulse signal corresponding to multiple time steps; a processing module, used to input the input pulse signal into the pulse neural network for signal processing, and obtain output pulse signals of multiple neurons in the pulse neural network; a second determination module, used to determine the processing result of the preset task based on the output pulse signals of the multiple neurons; wherein the neurons in the pulse neural network are used to execute the signal processing method based on the pulse neural network described in any one of the embodiments of the present disclosure.

[0008] In a fifth aspect, the present disclosure provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, and one or more of the computer programs are executed by the at least one processor so that the at least one processor can execute the signal processing method based on a pulse neural network or the task processing method based on a pulse neural network as described in any one of the embodiments of the present disclosure.

[0009] In a sixth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor / processing core, implements the signal processing method based on a pulse neural network or the task processing method based on a pulse neural network as described in any one of the embodiments of the present disclosure.

[0010] The embodiments provided by the present disclosure, for a pulse neural network including multiple neurons, for the current time window, according to the emission prediction information of the neuron in the current time window, determine the execution mode of the neuron to emit signals in the current time window, each time window includes multiple time steps, and the execution mode includes parallel mode or serial mode; when the execution mode of the neuron to emit signals in the current time window is parallel mode, the signal emission of the neuron in multiple time steps in the current time window is executed in parallel to obtain the parallel processing result of the current time window.

[0011] It can be seen that in the embodiments of the present disclosure, a time window is set in the signal processing process of the pulse neural network, and in each time window, the possibility of the neuron issuing an output pulse signal in the time window is reflected according to the neuron's emission prediction information. If the possibility of the neuron issuing an output pulse signal in the time window is low, then the probability that the determination of the membrane potential of the neuron at each time step depends on the output pulse signal of the previous time step is relatively small, which provides a basis for parallel processing of the signal emission of neurons. Based on this, it can be judged whether the neuron can adopt a parallel method in the time window according to the emission prediction information; further, if it is determined that a parallel method can be adopted, the signal emission of multiple time steps in the time window is executed in parallel, so as to realize parallel computing in the time dimension. Compared with the related technology that the membrane potential of the current time step depends on the output pulse signal of the previous time step, and a serial processing method needs to be adopted, the embodiments of the present disclosure can effectively improve the efficiency of signal processing, thereby improving the resource utilization of hardware devices.

[0012] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. The above and other features and advantages will become more apparent to those skilled in the art by describing detailed example embodiments with reference to the accompanying drawings, in which:

[0014] Figure 1 A flowchart of a signal processing method based on a pulse neural network provided in an embodiment of the present disclosure.

[0015] Figure 2 A schematic diagram of a neuron model provided in an embodiment of the present disclosure.

[0016] Figure 3A schematic diagram of a probability-difference curve provided in an embodiment of the present disclosure.

[0017] Figure 4 A flowchart of a signal processing method based on a pulse neural network provided in an embodiment of the present disclosure.

[0018] Figure 5 A flowchart of a task processing method based on a pulse neural network provided in an embodiment of the present disclosure.

[0019] Figure 6 A block diagram of a signal processing device based on a pulse neural network provided in an embodiment of the present disclosure.

[0020] Figure 7 A block diagram of a task processing device based on a pulse neural network provided in an embodiment of the present disclosure.

[0021] Figure 8 A block diagram of an electronic device provided in accordance with a first embodiment of the present disclosure.

[0022] Fig. 9 A block diagram of an electronic device provided in Embodiment 2 of the present disclosure. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0024] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.

[0025] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0026] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a" and "the" are also intended to include plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "including" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded. "Connected" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

[0027] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.

[0028] In related technologies, pulse neural networks can be used to build models for processing various tasks. When training such models, an important factor affecting the computational efficiency is serial computation, that is, in forward and backward computations, information such as the neuron's membrane potential or gradient needs to be calculated time-step by time-step, resulting in poor parallelism in the time dimension.

[0029] For example, in the forward calculation, when calculating the membrane potential at the i+1th time step, the pulse output signal Oi at the i-th time step is needed. This serial calculation along the time dimension depends on the membrane potential reset mechanism of the neuron. In the membrane potential reset mechanism, when Oi=1, the membrane potential is reset to 0 after the pulse is released, and when Oi=0, the membrane potential is not reset.

[0030] When the sequence length of the data to be processed is large, it is difficult to perform parallel calculations in the time dimension. Therefore, the computing utilization rate of the hardware equipment is low and the time consumption is long, making it difficult to expand to large-scale networks and the processing of large-scale long sequence data sets, which limits the application of pulse neural networks.

[0031] In view of this, the embodiments of the present disclosure provide a signal processing method based on a pulse neural network, a task processing method based on a pulse neural network, a signal processing device based on a pulse neural network, a task processing device based on a pulse neural network, an electronic device and a computer-readable storage medium.

[0032] In the embodiments of the present disclosure, a time window is set in the signal processing process of the pulse neural network, and in each time window, the possibility of the neuron issuing an output pulse signal in the time window is reflected according to the neuron's emission prediction information. If the possibility of the neuron issuing an output pulse signal in the time window is low, the probability that the determination of the membrane potential of the neuron at each time step depends on the output pulse signal of the previous time step is relatively small, which provides a basis for parallel processing of the signal emission of the neuron. Based on this, it can be judged whether the neuron can adopt a parallel method in the time window according to the emission prediction information; further, if it is determined that a parallel method can be adopted, the signal emission of multiple time steps in the time window is executed in parallel, so as to realize parallel computing in the time dimension. Compared with the related technology that the membrane potential of the current time step depends on the output pulse signal of the previous time step, and a serial processing method needs to be adopted, the embodiments of the present disclosure can effectively improve the efficiency of signal processing, thereby improving the resource utilization of hardware devices.

[0033] A first aspect of an embodiment of the present disclosure provides a signal processing method based on a pulse neural network.

[0034] Figure 1 The present invention provides a flowchart of a signal processing method based on a pulse neural network, wherein the pulse neural network includes a plurality of neurons. Figure 1 , the signal processing method based on pulse neural network may include the following steps.

[0035] Step S11, for the current time window, according to the prediction information of the neuron's emission in the current time window, determine the execution mode of the neuron's signal emission in the current time window, each time window includes multiple time steps, and the execution mode includes parallel mode or serial mode.

[0036] Step S12, when the execution mode of the neuron to perform signal emission in the current time window is a parallel mode, the signal emission of the neuron in multiple time steps in the current time window is executed in parallel to obtain the parallel processing result of the current time window.

[0037] It can be seen that in the embodiment of the present disclosure, a time window is set for the signal processing of neurons, the execution mode of neurons is determined with the time window as the granularity, and the signal is issued based on the determined execution mode within the corresponding time window, wherein the execution mode includes a parallel mode and a serial mode. In other words, for some time windows, the signal issuance of neurons can be executed in the time dimension in a parallel manner. Compared with the related art that can only execute signal issuance based on a serial mode, the signal processing method of the embodiment of the present disclosure can improve the signal processing efficiency.

[0038] In other words, by setting the time window, it is equivalent to providing a "speculative" signal processing method, so that for several time steps, a "speculative" parallel method can be used for signal processing in the time dimension; at the same time, for some time steps that are pre-speculated to be unable to be processed in parallel, the serial method is still retained for signal processing. On the whole, since at least some time steps of neurons are processed in parallel in the time dimension, the parallel degree of signal processing is improved, and the corresponding signal processing efficiency can also be improved. In addition, for the hardware equipment that carries the pulse neural network, due to the change in the signal processing method, the scheduling method and resource overhead of the hardware equipment resources (such as computing resources, storage resources, and bandwidth resources, etc.) during the signal processing process will also have a corresponding impact.

[0039] In summary, in the embodiments of the present disclosure, a time window is set in the signal processing process of the pulse neural network, and in each time window, the possibility of the neuron issuing an output pulse signal in the time window is reflected according to the neuron's emission prediction information. If the possibility of the neuron issuing an output pulse signal in the time window is low, then the probability that the determination of the membrane potential of the neuron at each time step depends on the output pulse signal of the previous time step is relatively small, which provides a basis for parallel processing of the signal emission of the neuron. Based on this, it can be judged whether the neuron can adopt a parallel method in the time window according to the emission prediction information; further, if it is determined that a parallel method can be adopted, the signal emission of multiple time steps in the time window is executed in parallel, so as to realize parallel computing in the time dimension. Compared with the related technology that the membrane potential of the current time step depends on the output pulse signal of the previous time step, and a serial processing method needs to be adopted, the embodiments of the present disclosure can effectively improve the efficiency of signal processing, thereby improving the resource utilization of hardware devices.

[0040] The signal processing method based on the pulse neural network in the embodiment of the present disclosure is described in detail below.

[0041] In some optional implementations, the spiking neural network (SNN) uses spiking neurons as computing units, which can imitate the information encoding and processing process of the human brain. SNN usually uses discrete events (pulse signals) to encode and process data. Compared with networks such as artificial neural networks (ANN), its energy consumption is significantly reduced, and its computing power is more outstanding. It has been widely used in speech recognition, visual processing, medical diagnosis and other fields.

[0042] For neurons in a spiking neural network, once a neuron reaches a certain potential, a pulse will appear, and then the neuron that reaches the potential will be reset. The most common neuron models include the Leaky Integrate and Fire (LIF) model, the Adaptive Exponential Integrate-and-Fire (AdEx) model, and the Izhikevich model, etc., which are not limited in the embodiments of the present disclosure.

[0043] In some optional implementations, the time window is a time granularity used to determine the execution mode of neuron signal emission. Generally, a time window may include multiple time steps. That is, the execution mode of the signal emission of a neuron at multiple time steps within a time window is the same. In addition, the length of the time window (i.e., the window length) may be a fixed value or a variable value, which is not limited in the embodiments of the present disclosure.

[0044] In some optional implementations, the execution mode of the neuron signal emission includes a parallel mode or a serial mode. The parallel mode means that the signal emission of multiple time steps of the neuron can be executed in parallel in the time dimension, and the serial mode means that the signal emission of multiple time steps of the neuron needs to be executed serially in the time dimension.

[0045] In some optional implementations, for any time window, the execution mode of the neuron's signal emission in the time window can be determined based on the emission prediction information of the neuron in the time window. The emission prediction information can represent the probability of the neuron emitting an output pulse signal in the current time window. In other words, by the emission prediction information, it can be preliminarily determined whether the neuron will emit an output pulse signal in the current time window.

[0046] Furthermore, when the neuron's membrane potential is higher or the neuron's input pulse signal is stronger, the neuron is more likely to send out an output pulse signal. For example, for the i-th time step, when the neuron's membrane potential V i Greater than the release threshold V th When the output pulse signal is i (such as o i =1), therefore, if the membrane potential V i The smaller it is, the more it produces o i The smaller the probability, the smaller the V i+1 The calculation of depends on the pulse output o at the i-th time step iIn this case, the probability that the signal emission processing of multiple time steps can be performed in parallel in the time dimension is higher, and thus the probability of using a parallel approach is higher.

[0047] In addition, for a certain neuron, if the input pulse signal at the i-th time step is larger, the possibility of the neuron generating an output pulse signal is greater. Conversely, if the input pulse signal at the i-th time step is smaller, the possibility of the neuron generating an output pulse signal is smaller. Correspondingly, V i+1 The calculation of depends on the pulse output o at the i-th time step i Therefore, when the input pulse signal is small, the probability of executing multiple time steps of signal emission processing in parallel in the time dimension is higher, and thus the probability of using parallel method is higher. It can be seen that whether a neuron emits a pulse is closely related to the size of its membrane potential and the size of the input pulse signal.

[0048] In some optional implementations, the firing prediction information is related to the membrane potential difference of the neuron in the current time window and / or the input pulse signal in the current time window, and the membrane potential difference is the difference between the firing threshold of the neuron and the initial membrane potential of the neuron in the current time window.

[0049] For example, if the current time window corresponds to the i-th time step to the i+k-th time step (k>1), and the release threshold is V th , the initial membrane potential of the neuron in the current time window is the membrane potential V at the i-th time step i , then the membrane potential difference D of the neuron in the current time window can be represented as D = V th -V i Furthermore, a neuron may have multiple input pulse signals in the current time window. Through the multiple input pulse signals and the synaptic weight of the neuron, the input current I of the neuron in the current time window can be determined, and the input current I can be characterized as Among them, w is the synaptic weight of the neuron, s j Represents the input pulse signal of the neuron at the jth time step, and the value range of j is [i,i+k].

[0050] In some optional implementations, the execution mode of the neuron's signal emission in the current time window is determined based on the neuron's emission prediction information in the current time window, including: determining the execution mode of the neuron's signal emission in the current time window based on the membrane potential difference of the neuron in the current time window and / or the input pulse signals of the neuron at multiple time steps in the current time window.

[0051] That is to say, based on the membrane potential difference of the neuron in the current time window and / or the input pulse signals of the neuron at multiple time steps in the current time window, the possibility of the neuron issuing an output pulse signal in the current time window can be judged or predicted, and then the execution mode of the neuron issuing the signal in the current time window can be determined.

[0052] For example, if it is predicted that the neuron is more likely to emit pulses in the current time window, then it is determined that the membrane potential of the neuron at each time step depends on the output pulse signal of the previous time step, and therefore, it is determined that the neuron emits signals in a serial manner in the current time window; if it is predicted that the neuron is less likely to emit pulses in the current time window, then it is determined that the membrane potential of the neuron at each time step does not need to depend on the output pulse signal of the previous time step, and therefore, it is determined that the neuron can emit signals in a parallel manner in the current time window.

[0053] It can be seen that in some optional implementations, if it is predicted that a neuron will not emit a pulse signal in a certain time window, the signal processing of the neuron at multiple time steps in the time window is not limited by the time dimension, and a parallel method can be adopted. If it is predicted that a neuron will emit a pulse signal in a certain time window, it can be known from the neuron model based on the relevant technology that the signal processing of the neuron at multiple time steps in the time window needs to be executed serially, which is limited in the time dimension, so a parallel method cannot be adopted. Taking this problem into consideration, the embodiment of the present disclosure further proposes an improved neuron model, through which the limitation of the time dimension can be removed when the neuron emits a pulse, and the corresponding output pulse signal can be determined more accurately.

[0054] In some optional implementations, for any time window (corresponding to the i-th time step to the i+k-th time step), it is assumed that the membrane potential difference corresponding to the time window is V th -V i , and the corresponding input current I can be determined according to the input pulse signal number in the time window, Accordingly, the improved neuron model is implemented as follows:

[0055] If I <V th -V i , indicating that the input pulse signal in the current time window cannot cause the neuron to emit pulses. Within this time window, the signal can be emitted in parallel in the time dimension for multiple time steps, where there is no output pulse signal for multiple time steps in this time window.

[0056] If V th -V i ≤I<(V th -V i )+(Vth -V reset ), then directly issue an output pulse signal and V i+k Set to V reset , where V reset is the reset potential, usually 0.

[0057] If (V th -V i )+(V th -V reset )≤I<(V th -V i )+2*(V th -V reset ), then two output pulse signals are directly issued, and V i+1 Set to V reset .

[0058] Similarly, if (V th -V i )+n*(V th -V reset )≤I, indicating that the input pulse signal of the current time window is large, which is likely to cause the neuron to emit pulses. Therefore, the signal emission of the neuron can be processed serially over multiple time steps of the time window. Among them, n is a value that can be preset based on experience, statistical data, simulation data, etc.

[0059] In the above improved neuron model, the first threshold level includes V th -V i ,(V th -V i )+(V th -V reset )、(V th -V i )+2*(V th -V reset ),……,(V th -V i )+n*(V th -V reset ). The above first threshold level is only an example, and the embodiment of the present disclosure does not limit this.

[0060] In summary, the above improved neuron model actually uses the accumulated input pulse signal in the time window to approximate the actual pulse emission situation. And if (V th -V reset ) is smaller, the better the approximation effect is likely to be.

[0061] Figure 2 A schematic diagram of a neuron model provided by an embodiment of the present disclosure. Figure 2 , 6 first threshold levels are pre-set, namely, first threshold level 1, first threshold level 2, ..., first threshold level 6, and the values ​​increase in sequence. After the input current I of the current time window is determined according to the input pulse signal of the current time window, I is compared with each first threshold level. If 0≤I<first threshold level 1, no output pulse signal is issued; if the first threshold level 1≤I<first threshold level 2, 1 output pulse signal (such as square wave signal, sine wave signal, triangle wave signal, etc.) is issued; if the first threshold level 2≤I<first threshold level 3, 2 output pulse signals are issued; if the first threshold level 3≤I<first threshold level 4, 3 output pulse signals are issued; if the first threshold level 4≤I<first threshold level 5, 4 output pulse signals are issued; if the first threshold level 5≤I<first threshold level 6, 5 output pulse signals are issued; if the first threshold level 6≤I, the output pulse signal is issued step by step, that is, the issuance of the signal is executed serially in the time dimension.

[0062] From this we can see that Figure 2 The neuron model shown can determine the corresponding input current as long as the input pulse signal in the current time window is clear, and then determine the corresponding output pulse signal through the relationship between the input current and the value of the first threshold level. Therefore, the neuron has no dynamic dependence in time and can achieve complete parallel execution in the time dimension. At the same time, since the time dynamic behavior of the neuron model is simulated, the simulation performance of the neuron model is better.

[0063] It should be noted that, through the improved neuron model, even if a pulse needs to be emitted, the corresponding output pulse signal can be determined by comparing the input current with the first threshold level, thereby eliminating the limitation in the time dimension. In other words, for a certain time window, even if it is determined that the neuron may emit a pulse within the time window based on the prediction information of the neuron's emission within the time window, the improved neuron model can be used to adopt a corresponding parallel execution method, thereby further improving the parallel processing rate in the signal processing process and improving the signal processing efficiency.

[0064] Furthermore, different processing methods can be used for the parallel processing of neurons at multiple time steps, that is, there can be multiple different specific processing methods for the parallel processing.

[0065] In some optional implementations, the parallel mode includes a first parallel mode and a second parallel mode. In the first parallel mode, the membrane potential of the neuron at each time step is determined according to the input pulse signal within the first preset time step, and there is no output pulse signal at each time step, and the first preset time step includes the current time step and multiple time steps adjacent to the current time step and before the current time step; in the second parallel mode, the membrane potential of the neuron at the end of the current time window is the resting potential, and the output pulse signal of the neuron in the current time window is determined according to the input pulse signal of the neuron in the current time window and multiple preset first threshold levels.

[0066] In the related art, the membrane potential update process of the LIF model can be represented in the form of formula 1:

[0067]

[0068] Among them, V i+1 represents the initial membrane potential of the neuron at the i+1th time step, V i represents the membrane potential of the neuron at the i-th time step, λ represents the attenuation factor (0<λ<1), w represents the synaptic weight of the neuron, S i+1 represents the input pulse signal of the target neural network at the i+1th time step, w×S i+1 Characterization of w and S i+1 The linear operations between them can include matrix-vector multiplication, convolution and other operations. i represents the output pulse signal of the neuron at the i-th time step, H() represents the signal processing function of the neuron, T d is the delay time, and τ is the time constant. Since the membrane potential at the i+1th time step is related to the output pulse signal at the ith time step, the membrane potential update process of the LIF model depends on the reset mechanism and cannot achieve parallel processing in the time dimension.

[0069] For the first parallel processing method, since there is no output pulse signal in each time step, there is no O in the neuron membrane potential update process. i Based on this, the neuron membrane potential update process corresponding to the first parallel processing method can be represented as formula 2:

[0070]

[0071] Furthermore, if a time window corresponds to the i+1th time step to the i+kth time step (k>1), the initial membrane potential of the neuron entering the time window is V i , then based on formula 2, we can infer the membrane potential V at the i+1th time step i+1 It can be represented by formula 3:

[0072] V i+1 =V i ×λ+w×S i+1 3

[0073] Furthermore, the membrane potential V at the i+2th time step is inferred i+2 It can be represented by formula 4:

[0074]

[0075] Similarly, the membrane potential V at the i+3th time step is i+3 It can be represented by formula 5:

[0076]

[0077] By analogy, the membrane potential V at the i+kth time step can be determined i+k It can be represented by formula 6:

[0078]

[0079] In summary, for the time window corresponding to the i-th time step to the i+k-th time step, the membrane potential of any time step is only related to the initial membrane potential of the time window and the input pulse signal from the i+1-th time step to the current time step. It can be seen that there is no dependency in the time dimension for determining the membrane potential, and therefore the parallel signal processing of the above multiple time steps can be performed in parallel.

[0080] In some optional implementations, the second parallel method can be implemented by improving the neuron model, that is, the output pulse signal of the neuron can be determined more conveniently through the improved neuron model. Based on this, even if it is predicted that the neuron is more likely to emit a pulse in the current time window, the signal emission can still be executed in a parallel manner.

[0081] In some optional implementations, determining the execution mode of the neuron to emit a signal in the current time window according to the membrane potential difference value of the neuron in the current time window and / or the input pulse signals of the neuron at multiple time steps in the current time window includes:

[0082] Determine the parallel execution probability of the neuron performing signal emission in the current time window according to the membrane potential difference of the neuron in the current time window and / or the input pulse signals of the neuron at multiple time steps in the current time window;

[0083] When the parallel execution probability is greater than or equal to a preset probability threshold, determining that the execution mode of the neuron for signal emission in the current time window is the first parallel mode;

[0084] When the parallel execution probability is less than a preset probability threshold, it is determined that the execution mode of the neuron for signal emission in the current time window is the second parallel mode or the serial mode.

[0085] It can be seen from this that the parallel execution probability of the neuron performing signal emission in the current time window can be determined based on the membrane potential difference of the neuron in the current time window, or the input pulse signals of the neuron at multiple time steps in the current time window, or a combination of the two, and the probability of whether the neuron can perform signal emission in parallel can be characterized by the parallel execution probability. If the parallel execution probability is large, the first parallel method can be used to execute the signal emission of the neuron in the current time window. If the parallel execution probability is small, the second parallel method or serial method can be used to execute the signal emission of the neuron in the current time window.

[0086] In some optional implementations, the parallel execution probability of the neuron issuing a signal in the current time window is determined based on the membrane potential difference of the neuron in the current time window and / or the input pulse signals of the neuron at multiple time steps in the current time window, including: determining the parallel execution probability of the neuron issuing a signal in the current time window based on a preset probability difference correspondence relationship and the membrane potential difference of the current time window.

[0087] Exemplarily, the preset probability difference correspondence can be a probability-difference curve, which reflects the correspondence between the parallel execution probability and the membrane potential difference. Therefore, when the membrane potential difference of the current time window is determined, the value of the parallel execution probability corresponding to the membrane potential difference of the current time window can be determined through the probability-difference curve, thereby determining the parallel execution probability of the neuron issuing signals in the current time window.

[0088] Figure 3 A schematic diagram of a probability-difference curve provided in an embodiment of the present disclosure. Figure 3 The probability-difference curve is set in a coordinate system with the membrane potential difference as the horizontal axis and the parallel execution probability as the vertical axis. Figure 3 As shown, when the membrane potential difference D is in the range of [0, D1), the parallel execution probability is 0; when the membrane potential difference D is in the range of [D1, D2), the parallel execution probability is p1; when the membrane potential difference D is in the range of [D2, D3), the parallel execution probability is p2; when the membrane potential difference D is in the range of [D3, D4), the parallel execution probability is p3; when the membrane potential difference D is in the range of [D4, D5), the parallel execution probability is p4; when the membrane potential difference D is in the range of [D5, D6], the parallel execution probability is 1.

[0089] It should be noted that the above probability-difference curve is only an example, and the embodiments of the present disclosure are not limited to this.

[0090] In some optional implementations, determining the parallel execution probability of the neuron performing signal emission in the current time window according to the membrane potential difference value of the neuron in the current time window and / or the input pulse signals of the neuron at multiple time steps in the current time window includes:

[0091] Determine the input current of the neuron in the current time window based on the synaptic weight of the neuron and the input pulse signals of the neuron at multiple time steps in the current time window;

[0092] According to the preset probability current correspondence relationship and the input current of the current time window, the parallel execution probability of the neuron performing signal emission in the current time window is determined.

[0093] For example, the current time window corresponds to the i-th time step to the i+k-th time step (k>1), and the neuron has multiple input pulse signals in the current time window. Through the multiple input pulse signals and the synaptic weight of the neuron, the input current I of the neuron in the current time window can be determined, and the input current I can be characterized as Among them, w is the synaptic weight of the neuron, s j Represents the input pulse signal of the neuron at the jth time step, and the value range of j is [i,i+k].

[0094] Furthermore, the preset probability-current correspondence can be a probability-current curve, which reflects the correspondence between the parallel execution probability and the input current. Therefore, when the input current of the current time window is determined, the value of the parallel execution probability corresponding to the input current of the current time window can be determined through the probability-current curve, thereby determining the parallel execution probability of the neuron sending signals in the current time window.

[0095] In some optional implementations, the execution mode of the neuron's signal emission in the current time window can also be determined based on the membrane potential difference of the neuron in the current time window and the input pulse signals of the neuron at multiple time steps in the current time window.

[0096] Exemplarily, according to the membrane potential difference of the neuron in the current time window and / or the input pulse signals of the neuron at multiple time steps in the current time window, the execution mode of the neuron to emit signals in the current time window is determined, including: determining the input current of the neuron in the current time window based on the synaptic weight of the neuron and the input pulse signals of the neuron at multiple time steps in the current time window; determining the membrane potential difference of the neuron in the current time window according to the emission threshold and the initial membrane potential of the neuron in the current time window; determining the result of comparing the input current in the current time window with the membrane potential difference in the current time window; and determining the execution mode of the neuron to emit signals in the current time window according to the result of the value comparison.

[0097] Exemplarily, based on the value comparison result, the execution mode of the neuron to emit signals in the current time window is determined, including: when the value comparison result indicates that the input current of the current time window is less than the membrane potential difference of the current time window, determining that the execution mode of the neuron to emit signals in the current time window is a parallel mode; when the value comparison result indicates that the input current of the current time window is greater than or equal to the membrane potential difference of the current time window, determining that the execution mode of the neuron to emit signals in the current time window is a serial mode.

[0098] For example, if the input current of the current time window is I, the membrane potential difference of the current time window is V th -V i , then compare the input current with the membrane potential difference. If I ≥ V th -V i , then we return to the traditional serial execution method to process the signal emission of neurons in multiple time steps in this time window; if I <V th -V i , the signal emission of multiple time steps within the time window can be executed in parallel in the time dimension.

[0099] Exemplarily, the parallel mode includes a first parallel mode and a second parallel mode; accordingly, based on the value comparison result, the execution mode of the neuron to emit signals in the current time window is determined, including: when the value comparison result indicates that the input current of the current time window is less than the membrane potential difference of the current time window, determining that the execution mode of the neuron to emit signals in the current time window is the first parallel mode; when the value comparison result indicates that the input current of the current time window is greater than or equal to the membrane potential difference of the current time window, determining that the execution mode of the neuron to emit signals in the current time window is the second parallel mode or the serial mode.

[0100] It can be seen that if the parallel mode includes the first parallel mode and the second parallel mode, for I <V th -V iIn the case of I≥V th -V i In this case, the second parallel method or the serial method can be used. That is to say, if the input current is greater than or equal to the membrane potential difference, it means that the neuron is more likely to emit pulses in the current time window. For this case, in addition to using the serial method to execute signal emission in the time dimension, the improved neuron model can also be used to conveniently determine the corresponding output pulse signal according to the comparison result between the input current and the first threshold level, thereby removing the limitation in the time dimension and executing the signal emission of multiple time steps within the time window in the time dimension based on the parallel method.

[0101] In some optional implementations, after step S11, if it is determined that the execution mode of the neuron in the current time window is a serial mode, the signal emission of multiple time steps in the current time window is serially executed in the time dimension.

[0102] In some optional implementations, after determining the execution mode of the neuron to emit signals in the current time window, the method may further include: when the execution mode of the neuron to emit signals in the current time window is a serial mode, serially executing the signal emission of the neuron in multiple time steps in the current time window to obtain a serial processing result of the current time window.

[0103] Furthermore, as mentioned above, the time window includes a fixed-length time window and a variable-length time window, wherein the fixed-length time window means that the length of the time window is a fixed value, and the variable-length time window means that the length of the time window is an adjustable value.

[0104] In some optional implementations, the method may also include: when the time window is a variable-length time window, determining the window length of the next time window based on the membrane potential difference of the current time window; or, determining the window length of the next time window based on the end membrane potential and the release threshold of the current time window; or, determining the window length of the next time window based on the input current of the current time window; or, determining the window length of the next time window based on historical time window information.

[0105] That is to say, it is possible to infer whether the pulse will be released after a long period of time or in a short time according to the membrane potential difference, the end membrane potential and the release threshold, the input current or the historical time window information of the current time window, and then predict the window length of the next time window; wherein the historical time window information includes at least one of the execution mode, membrane potential difference and input pulse signal corresponding to the multiple time windows before the current time window. If it is inferred that the pulse will be released after a long time, the window length of the next time window is set to a larger value to reduce the number of times the execution mode is judged; if it is inferred that the pulse will be released in a short time, the window length of the next time window is set to a smaller value to try to make the next time window still use the parallel method to execute the signal release, thereby improving the signal processing efficiency.

[0106] For example, if the membrane potential difference value of the current time window is high, since there may already be a certain input pulse signal in the current time window, and there may also be input pulse signals in the next time window, the possibility of issuing pulses in the next time window is higher. Based on this, in order to increase the probability that the next time window can adopt a parallel method, the window length of the next time window can be set to a smaller value.

[0107] Exemplarily, based on the end membrane potential and the firing threshold of the current time window, the difference between the firing threshold and the end membrane potential can be determined. If the difference is small, the possibility of firing a pulse in the next time window is high. Based on this, in order to increase the probability that the next time window can adopt a parallel method, the window length of the next time window can be set to a smaller value. Conversely, if the difference is large, the possibility of firing a pulse in the next time window is low. Based on this, the window length of the next time window can be set to a larger value (that is, even if the window length of the next time window is large, the possibility of firing a pulse in the time window is still low, so the probability of using a parallel method is higher).

[0108] For example, if the input current of the current time window is high, then since there may already be a certain input pulse signal in the current time window, and there may also be an input pulse signal in the next time window, the possibility of issuing a pulse in the next time window is higher. Based on this, in order to increase the probability that the next time window can adopt a parallel method, the window length of the next time window can be set to a smaller value.

[0109] Exemplarily, based on the historical time window information, a first proportion of multiple historical time windows using a parallel method and a second proportion using a serial method can be determined. If the second proportion is larger, the window length of the next time window can be set to a smaller value. If the first proportion is larger, the window length of the next time window can be set to a larger value.

[0110] In some optional implementations, the above-mentioned multiple information may be combined to jointly determine the window length of the next time window, which is not limited in the embodiments of the present disclosure.

[0111] In summary, if a fixed-length time window is used, there is no need to adjust the length of the time window, which is relatively simple to implement. If a variable-length time window is used, the length of the time window can be adaptively adjusted to make the length of the time window more reasonable, thereby increasing the probability of taking a parallel approach within the time window, thereby further improving the signal processing efficiency.

[0112] In some optional implementations, after executing the signal emission of a certain time window in parallel, if the membrane potential of the neuron is high, the parallel processing result of the time window can be rolled back, and then the signal emission of the neuron in multiple time steps within the time window can be executed in serial mode. In this way, the situation of parallel processing of signal emission due to misjudgment can be corrected in time.

[0113] In some optional implementations, after obtaining the parallel processing results of the current time window, the method may also include: determining the end membrane potential of the neuron in the current time window; when the end membrane potential is less than a preset emission threshold, executing signal processing of the neuron in the next time window; when the end membrane potential is greater than or equal to the emission threshold, rolling back the parallel processing results of the current time window, and executing the signal emission of the neuron in multiple time steps within the current time window in a serial manner.

[0114] In other words, if the neuron's membrane potential has not reached the release threshold after completing the parallel signal release processing of a time window, the next time window can be processed. If the release threshold is reached, the parallel execution result of the time window is rolled back, and the neuron's membrane potential is reset to before the parallel execution signal release of the time window, and then the signal release of each time step is executed in serial manner in the time dimension (i.e., the conventional SNN release method).

[0115] It should be noted that although the embodiment of the present disclosure only changes the execution method of the neurons to emit signals, since the pulse neural network must be carried by the corresponding hardware devices, the change in the signal processing method will undoubtedly change the resource scheduling method and resource overhead of the hardware devices that carry the pulse neural network.

[0116] In other words, even if the pulse neural network is carried by the same hardware device, in the related art, since neurons execute pulse emission time-step by time-step and there is mutual influence between adjacent time-steps, the hardware device also needs to execute the signal processing of neurons time-step by time-step and serially in the time dimension; correspondingly, for the hardware device, resource scheduling is also a serial scheduling method. Even if the resources of the hardware device are relatively abundant, since the resources can only be scheduled serially, the resource overhead per unit time is relatively small and the resources cannot be fully utilized; in the embodiment of the present disclosure, since signal emission can be executed in parallel within some time windows, it is equivalent to lifting the pulse emission restriction of neurons in the time dimension. Therefore, the hardware device can execute the signal processing of neurons in multiple time steps in parallel in the time dimension, and the resource scheduling method is also adjusted to a parallel scheduling method. The resource overhead per unit time is increased, and the resource utilization rate of the hardware device is effectively improved.

[0117] In some optional implementations, the spiking neural network can be deployed on different types of hardware devices to utilize the resources of these hardware devices (e.g., computing resources, bandwidth resources, storage resources, etc.) to perform spiking neural network signal processing. The hardware devices include many-core systems and single-processor systems, etc., which are not limited in the embodiments of the present disclosure.

[0118] In some optional implementations, the pulse neural network is deployed in a preset many-core system, which includes multiple processing cores; when the execution mode of the signal emission of the neuron in the current time window is a parallel mode, the signal emission processing of the neuron in multiple time steps of the current time window is mapped to one or more processing cores; wherein, when the signal emission processing of the neuron in multiple time steps of the current time window is mapped to multiple processing cores, the multiple processing cores execute the signal emission of the neuron in each time step of the current time window in parallel.

[0119] It can be seen that in the disclosed embodiment, the processing core carrying the neuron may not need to execute the signal emission of the neuron at each time step in series. If a certain time window corresponds to a parallel mode, the signal emission of the neuron at each time step within the time window can be executed in parallel. Due to the use of a more efficient parallel processing method, the signal processing efficiency can be improved, and the resource rate of the multi-core system can be effectively improved.

[0120] That is to say, in the embodiments of the present disclosure, in addition to enabling parallel processing of multiple neurons, processing of a single neuron at different time steps (e.g., multiple time steps within a time window corresponding to a parallel method) can also be performed in parallel, which is suitable for scenarios such as training where information on multiple time steps is known.

[0121] For example, if a neuron executes in parallel in the current time window, and the current time window includes N time steps, the N time steps can be mapped to N processing cores, and the N processing cores perform signal processing of N time steps in parallel, and the required processing time is T (or close to T, T is the time step length), which can effectively reduce the signal processing time and improve the processing efficiency. Moreover, since the processing time is reduced, it is equivalent to improving the resource utilization of the hardware device.

[0122] It should be noted that in the related art, even if the calculations of a neuron at different time steps are mapped to different processing cores, since the signal emission of neurons has a dependency in the time dimension, the mapped multiple processing cores still cannot be executed in parallel, and the signal emission still needs to be executed serially step by step. For example, when executing the signal processing of a neuron at N time steps, it is necessary to execute the emission of pulse signals step by step, and the time required is N×T. It can be seen that the signal processing method of the embodiment of the present disclosure can reduce the signal processing time, improve the signal processing efficiency, and at the same time improve the resource utilization of hardware devices.

[0123] Figure 4 A flow chart of a signal processing method based on a pulse neural network provided in an embodiment of the present disclosure. Figure 4 , the signal processing method based on pulse neural network may include the following steps.

[0124] Step S401, determining the membrane potential difference of the neuron in the current time window and / or the input pulse signals of the neuron at multiple time steps in the current time window.

[0125] Step S402, determining the parallel execution probability of the neuron performing signal emission in the current time window according to the membrane potential difference of the neuron in the current time window and / or the input pulse signals of the neuron at multiple time steps in the current time window.

[0126] After the parallel execution probability is obtained, it can be determined whether step S403 or step S404 needs to be executed subsequently according to the value relationship between the parallel execution probability and the preset probability threshold.

[0127] Step S403, when the parallel execution probability is greater than or equal to the preset probability threshold, determine that the execution mode of the neuron for signal emission in the current time window is the first parallel mode, and execute the signal emission of the neuron in multiple time steps of the current time window in parallel based on the first parallel mode to obtain the first parallel processing result of the current time window.

[0128] After executing step S403, jump to step S405.

[0129] Step S404, when the parallel execution probability is less than the preset probability threshold, determine that the execution mode of the neuron for signal emission in the current time window is the second parallel mode or the serial mode, and execute the signal emission of the neuron in multiple time steps of the current time window based on the second parallel mode or the serial mode to obtain the second parallel processing result or the serial processing result of the current time window.

[0130] The second parallel processing result is the result of executing the neuron signal release in the second parallel mode, and the serial processing result is the result of executing the neuron signal release in the serial mode. After executing step S404, the process jumps to step S408 to execute the signal processing of the next time window.

[0131] Step S405, determining the membrane potential of the neuron at the end of the current time window.

[0132] Step S406, determining whether the final membrane potential is greater than or equal to the firing threshold.

[0133] If the final membrane potential is greater than or equal to the firing threshold, the process jumps to step S407 , and if the final membrane potential is less than the firing threshold, the process jumps to step S408 .

[0134] Step S407, rolling back the parallel processing result of the current time window, and executing the signal emission of the neuron at multiple time steps in the current time window in a serial manner.

[0135] After executing step S407, the process jumps to step S408 to perform signal processing of the next time window.

[0136] Step S408, executing signal processing of the neuron in the next time window.

[0137] After completing the processing of all input pulse signals, the process ends.

[0138] A second aspect of the disclosed embodiments provides a task processing method based on a pulse neural network.

[0139] Figure 5 A flowchart of a task processing method based on a spiking neural network provided in an embodiment of the present disclosure, wherein the spiking neural network includes a plurality of neurons. Figure 5 , the task number processing method based on pulse neural network can include the following steps.

[0140] Step S501, pulse encoding is performed on the data to be processed corresponding to the preset task to obtain input pulse signals corresponding to multiple time steps.

[0141] Step S502: Input the input pulse signal into the spiking neural network for signal processing to obtain output pulse signals of multiple neurons in the spiking neural network.

[0142] Step S503: determining a processing result of a preset task based on the output pulse signals of the plurality of neurons.

[0143] Among them, the neurons in the pulse neural network are used to execute the signal processing method based on the pulse neural network described in any one of the embodiments of the present disclosure.

[0144] In some optional implementations, the preset tasks include text processing tasks, image processing tasks, etc., which are not limited in the embodiments of the present disclosure.

[0145] The embodiments provided by the present disclosure perform pulse encoding on the data to be processed corresponding to the preset task to obtain input pulse signals corresponding to multiple time steps, input the input pulse signals into the pulse neural network for signal processing, obtain output pulse signals of multiple neurons in the pulse neural network, and determine the processing result of the preset task based on the output pulse signals of the multiple neurons.

[0146] It can be seen that when using a pulse neural network to perform a preset task, a time window is set in advance. For each time window, the execution mode of the time window can be determined. When the execution mode is a parallel mode, signal processing of multiple time steps can be performed in parallel in the time dimension. Compared with the related technology that can only use serial processing methods, the embodiments of the present disclosure can effectively improve the task processing efficiency and improve the resource utilization of hardware devices.

[0147] It can be understood that the above-mentioned embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not repeat them. Those skilled in the art can understand that in the above-mentioned method of the specific implementation method, the specific execution order of each step and the setting of the functional module should be determined by its function and possible internal logic.

[0148] A third aspect of the disclosed embodiments provides a signal processing device based on a pulse neural network.

[0149] Figure 6 A block diagram of a signal processing device based on a pulse neural network provided by an embodiment of the present disclosure, wherein the pulse neural network includes a plurality of neurons. Figure 6 The signal processing device 600 based on pulse neural network may include the following modules.

[0150] The first determination module 601 is used to determine the execution mode of the neuron to emit signals in the current time window according to the emission prediction information of the neuron in the current time window, and the execution mode includes parallel mode or serial mode.

[0151] The execution module 602 is used to execute the signal emission of the neuron in multiple time steps in the current time window in parallel when the execution mode of the signal emission of the neuron in the current time window is a parallel mode, so as to obtain the parallel processing result of the current time window.

[0152] The embodiments provided by the present disclosure, for a pulse neural network including multiple neurons, through a first determination module, for the current time window, according to the emission prediction information of the neuron in the current time window, determine the execution mode of the neuron to emit signals in the current time window, each time window includes multiple time steps, and the execution mode includes parallel mode or serial mode; through an execution module, when the execution mode of the neuron to emit signals in the current time window is a parallel mode, the signal emission of the neuron in multiple time steps in the current time window is executed in parallel to obtain a parallel processing result of the current time window.

[0153] It can be seen that in the embodiments of the present disclosure, a time window is set in the signal processing process of the pulse neural network, and in each time window, the possibility of the neuron issuing an output pulse signal in the time window is reflected according to the neuron's emission prediction information. If the possibility of the neuron issuing an output pulse signal in the time window is low, then the probability that the determination of the membrane potential of the neuron at each time step depends on the output pulse signal of the previous time step is relatively small, which provides a basis for parallel processing of the signal emission of neurons. Based on this, it can be judged whether the neuron can adopt a parallel method in the time window according to the emission prediction information; further, if it is determined that a parallel method can be adopted, the signal emission of multiple time steps in the time window is executed in parallel, so as to realize parallel computing in the time dimension. Compared with the related technology that the membrane potential of the current time step depends on the output pulse signal of the previous time step, and a serial processing method needs to be adopted, the embodiments of the present disclosure can effectively improve the efficiency of signal processing, thereby improving the resource utilization of hardware devices.

[0154] A fourth aspect of the embodiments of the present disclosure provides a task processing device based on a pulse neural network.

[0155] Figure 7 A block diagram of a task processing device based on a spiking neural network provided by an embodiment of the present disclosure, wherein the spiking neural network includes a plurality of neurons. Figure 7 The task processing device 700 based on pulse neural network may include the following modules.

[0156] The encoding module 701 is used to perform pulse encoding on the to-be-processed data corresponding to the preset task to obtain input pulse signals corresponding to multiple time steps.

[0157] The processing module 702 is used to input the input pulse signal into the spiking neural network for signal processing to obtain output pulse signals of multiple neurons in the spiking neural network.

[0158] The second determination module 703 is used to determine the processing result of the preset task based on the output pulse signals of multiple neurons.

[0159] Among them, the neurons in the pulse neural network are used to execute the signal processing method based on the pulse neural network described in any one of the embodiments of the present disclosure.

[0160] In some optional implementations, the preset tasks include text processing tasks, image processing tasks, etc., which are not limited in the embodiments of the present disclosure.

[0161] In the embodiment provided by the present disclosure, pulse encoding is performed on the data to be processed corresponding to the preset task through an encoding module to obtain input pulse signals corresponding to multiple time steps, and the input pulse signals are input into the pulse neural network for signal processing through a processing module to obtain output pulse signals of multiple neurons in the pulse neural network, and the processing result of the preset task is determined based on the output pulse signals of multiple neurons through a second determination module.

[0162] It can be seen that when using a pulse neural network to perform a preset task, a time window is set in advance. For each time window, the execution mode of the time window can be determined. When the execution mode is a parallel mode, signal processing of multiple time steps can be performed in parallel in the time dimension. Compared with the related technology that can only use serial processing methods, the embodiments of the present disclosure can effectively improve the task processing efficiency and improve the resource utilization of hardware devices.

[0163] In addition, the present disclosure also provides an electronic device and a computer-readable storage medium.

[0164] Figure 8 A block diagram of an electronic device provided in accordance with a first embodiment of the present disclosure.

[0165] Reference Figure 8, an embodiment of the present disclosure provides an electronic device, which includes: at least one processor 801; at least one memory 802, and one or more I / O interfaces 803, connected between the processor 801 and the memory 802; wherein the memory 802 stores one or more computer programs that can be executed by at least one processor 801, and the one or more computer programs are executed by at least one processor 801, so that at least one processor 801 can execute the signal processing method based on the pulse neural network or the task processing method based on the pulse neural network as described in any one of the embodiments of the present disclosure.

[0166] Fig. 9 A block diagram of an electronic device provided in Embodiment 2 of the present disclosure.

[0167] Reference Fig. 9 An embodiment of the present disclosure provides an electronic device, which includes multiple processing cores 901 and an on-chip network 902, wherein the multiple processing cores 901 are connected to the on-chip network 902, and the on-chip network 902 is used to exchange data between the multiple processing cores and external data.

[0168] Among them, one or more instructions are stored in one or more processing cores 901, and one or more instructions are executed by one or more processing cores 901, so that one or more processing cores 1601 can execute the signal processing method based on the pulse neural network or the task processing method based on the pulse neural network described in any one of the embodiments of the present disclosure.

[0169] In some embodiments, the electronic device may be a brain-like chip, which can use vectorized computing and needs to load the weight information and other parameters of the neural network model through an external memory such as a double data rate (DDR) synchronous dynamic random access memory. Therefore, the batch processing used in the embodiments of the present disclosure has a higher computing efficiency.

[0170] The present disclosure also provides a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor / processing core, implements the signal processing method based on a spiking neural network or the task processing method based on a spiking neural network described in any one of the embodiments of the present disclosure. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.

[0171] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the signal processing method based on a pulse neural network or the task processing method based on a pulse neural network as described in any one of the embodiments of the present disclosure.

[0172] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).

[0173] As is known to those of ordinary skill in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, it is known to those of ordinary skill in the art that communication media typically contain computer-readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.

[0174] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0175] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0176] The computer program product described herein may be implemented in hardware, software, or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), etc.

[0177] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0178] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0179] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0180] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0181] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims

1. A signal processing method based on a pulse neural network, characterized in that: The spiking neural network includes a plurality of neurons, and the method includes: For the current time window, according to the emission prediction information of the neuron in the current time window, determine the execution mode of the neuron to emit signals in the current time window, each time window includes multiple time steps, and the execution mode includes a parallel mode or a serial mode; When the execution mode of the signal emission of the neuron in the current time window is a parallel mode, the signal emission of the neuron in multiple time steps in the current time window is executed in parallel to obtain a parallel processing result of the current time window.

2. The method according to claim 1, characterized in that: After obtaining the parallel processing result of the current time window, the method further includes: determining a membrane potential of the neuron at the end of the current time window; When the terminal membrane potential is less than a preset firing threshold, executing signal processing of the neuron in the next time window; When the terminal membrane potential is greater than or equal to the emission threshold, the parallel processing result of the current time window is rolled back, and the signal emission of the neuron in multiple time steps within the current time window is executed in a serial manner.

3. The method according to claim 1, characterized in that The firing prediction information is related to the membrane potential difference of the neuron in the current time window and / or the input pulse signal in the current time window, and the membrane potential difference is the difference between the firing threshold of the neuron and the initial membrane potential of the neuron in the current time window; The step of determining the execution mode of the neuron to perform signal emission in the current time window according to the emission prediction information of the neuron in the current time window includes: The execution mode of signal emission of the neuron in the current time window is determined according to the membrane potential difference value of the neuron in the current time window and / or the input pulse signals of the neuron in multiple time steps in the current time window.

4. The method according to claim 3, characterized in that The parallel mode includes a first parallel mode and a second parallel mode; The method of determining the execution mode of the neuron to emit a signal in the current time window according to the membrane potential difference value of the neuron in the current time window and / or the input pulse signals of the neuron at multiple time steps in the current time window includes: Determine the parallel execution probability of the neuron performing signal emission in the current time window according to the membrane potential difference value of the neuron in the current time window and / or the input pulse signals of the neuron at multiple time steps in the current time window; When the parallel execution rate is greater than or equal to a preset probability threshold, determining that the execution mode of the neuron for signal emission in the current time window is the first parallel mode; When the parallel execution probability is less than the preset probability threshold, it is determined that the execution mode of the neuron for signal emission in the current time window is the second parallel mode or the serial mode.

5. The method according to claim 4, characterized in that The method of determining the parallel execution probability of the neuron performing signal emission in the current time window according to the membrane potential difference value of the neuron in the current time window and / or the input pulse signals of the neuron at multiple time steps in the current time window comprises: The parallel execution probability of the neuron performing signal emission in the current time window is determined according to the preset probability difference correspondence relationship and the membrane potential difference in the current time window.

6. The method according to claim 4, characterized in that The method of determining the parallel execution probability of the neuron performing signal emission in the current time window according to the membrane potential difference value of the neuron in the current time window and / or the input pulse signals of the neuron at multiple time steps in the current time window comprises: Determine the input current of the neuron in the current time window based on the synaptic weight of the neuron and the input pulse signals of the neuron at multiple time steps in the current time window; According to the preset probability current correspondence relationship and the input current of the current time window, the parallel execution probability of the neuron performing signal emission in the current time window is determined.

7. The method according to claim 3, characterized in that The method of determining the execution mode of the neuron to emit a signal in the current time window according to the membrane potential difference value of the neuron in the current time window and / or the input pulse signals of the neuron at multiple time steps in the current time window includes: Determine the input current of the neuron in the current time window based on the synaptic weight of the neuron and the input pulse signals of the neuron at multiple time steps in the current time window; Determining a membrane potential difference of the neuron in the current time window according to the firing threshold and the initial membrane potential of the neuron in the current time window; Determine the comparison result between the input current of the current time window and the membrane potential difference value of the current time window; According to the value comparison result, the execution mode of the neuron for signal emission in the current time window is determined.

8. The method according to claim 7, characterized in that The parallel mode includes a first parallel mode and a second parallel mode; The step of determining, based on the value comparison result, the execution mode of the neuron to perform signal emission in the current time window includes: When the value comparison result indicates that the input current of the current time window is less than the membrane potential difference value of the current time window, determining that the execution mode of the neuron for signal emission in the current time window is the first parallel mode; When the value comparison result indicates that the input current of the current time window is greater than or equal to the membrane potential difference of the current time window, it is determined that the execution mode of the neuron for signal emission in the current time window is the second parallel mode or the serial mode.

9. The method according to claim 4 or 8, characterized in that: In the first parallel mode, the membrane potential of the neuron at each time step is determined according to the input pulse signal within a preset time step, and there is no output pulse signal at each time step, and the preset time step includes the current time step and multiple time steps adjacent to the current time step and before the current time step; In the second parallel mode, the membrane potential of the neuron at the end of the current time window is the resting potential, and the output pulse signal of the neuron in the current time window is determined according to the input pulse signal of the neuron in the current time window and multiple preset first threshold levels.

10. The method according to any one of claims 3 to 8, characterized in that: The time window is a fixed-length time window or a variable-length time window; The method further comprises: In the case where the time window is a time window of variable length, the window length of the next time window is determined according to the membrane potential difference of the current time window; or, the window length of the next time window is determined according to the end membrane potential and the release threshold of the current time window; or, the window length of the next time window is determined according to the input current of the current time window; or, the window length of the next time window is determined according to the historical time window information.

11. The method according to claim 1, characterized in that: After determining the execution mode of the neuron to perform signal emission in the current time window, the method further includes: When the execution mode of the signal emission of the neuron in the current time window is a serial mode, the signal emission of the neuron in multiple time steps in the current time window is executed serially to obtain a serial processing result of the current time window.

12. The method according to any one of claims 1 to 8, characterized in that: The spiking neural network is deployed in a preset many-core system, wherein the many-core system includes a plurality of processing cores; In the case where the execution mode of the neuron performing signal emission in the current time window is a parallel mode, the signal emission processing of the neuron in multiple time steps of the current time window is mapped to one or more processing cores; Wherein, when the signal emission processing of the neuron in multiple time steps of the current time window is mapped to multiple processing cores, the multiple processing cores execute the signal emission of the neuron in each time step of the current time window in parallel.

13. A task processing method based on a pulse neural network, characterized in that: The spiking neural network includes a plurality of neurons, and the method includes: Pulse encoding is performed on the data to be processed corresponding to the preset task to obtain input pulse signals corresponding to multiple time steps; Inputting the input pulse signal into the spiking neural network for signal processing to obtain output pulse signals of multiple neurons in the spiking neural network; Determining a processing result of the preset task based on the output pulse signals of the plurality of neurons; Wherein, the neurons in the pulse neural network are used to execute the signal processing method based on the pulse neural network as described in any one of claims 1-12.

14. A signal processing device based on a pulse neural network, characterized in that: The spiking neural network includes a plurality of neurons, and the device includes: A first determination module is used to determine, for a current time window, an execution mode of the neuron for signal emission in the current time window according to the emission prediction information of the neuron in the current time window, wherein the execution mode includes a parallel mode or a serial mode; The execution module is used to execute the signal emission of the neuron in the current time window in parallel for multiple time steps, so as to obtain the parallel processing result of the current time window, when the execution mode of the signal emission of the neuron in the current time window is a parallel mode.

15. A task processing device based on a pulse neural network, characterized in that: The spiking neural network includes a plurality of neurons, and the device includes: An encoding module, used for pulse encoding the to-be-processed data corresponding to the preset task, to obtain input pulse signals corresponding to a plurality of time steps; A processing module, used for inputting the input pulse signal into the spiking neural network for signal processing to obtain output pulse signals of multiple neurons in the spiking neural network; A second determination module, used to determine the processing result of the preset task based on the output pulse signals of the plurality of neurons; Wherein, the neurons in the pulse neural network are used to execute the signal processing method based on the pulse neural network as described in any one of claims 1-12.

16. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, and one or more of the computer programs are executed by the at least one processor so that the at least one processor can execute the signal processing method based on the pulse neural network as described in any one of claims 1 to 12, or the task processing method based on the pulse neural network as described in claim 13.

17. A computer-readable storage medium having a computer program stored thereon, characterized in that: When executed by a processor, the computer program implements the signal processing method based on a pulse neural network as described in any one of claims 1 to 12, or the task processing method based on a pulse neural network as described in claim 13.

Citation Information

Patent Citations

  • Signal processing method and system, spiking neural network and neuron model

    CN115146768A

  • Method for updating membrane potential of neuron, and cerebral neuron-like device and processing core

    WO2022247792A1

Cited By

  • Parallel processing scheme of spiking neural network on FPGA

    CN119578478A