A neural computing method

By introducing the ability to process positive and negative pulses and integrate/suppress operations in the neuronal model, the problem that the prior art cannot process numerical neural networks and dynamic sensor data is solved, and a more general neural network computing system is realized.

CN114819115BActive Publication Date: 2024-11-05XIAMEN YIPU SMART TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210498960.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-09
Publication Date
2024-11-05
Estimated Expiration
2042-05-09

AI Technical Summary

Technical Problem

Existing neuronal models cannot process positive and negative pulse signals and dynamic sensor data in numerical neural networks, cannot implement the suppression of input signals, and only support pulse neural networks, and cannot be directly used in numerical neural networks and dynamic sensors.

Method used

A neuron calculation method is proposed that can process positive and negative pulse signals, realize the integration and suppression of input signals, and generate membrane potential and pulse output. By performing integration or suppression operations, membrane potential accumulation and activation operations within time intervals, Update neuron state.

Benefits of technology

A more general neural network computing system is implemented, which can directly process dynamic sensor data and numerical neural networks, and is suitable for pulsed neural networks and pulsed neural networks transformed from numerical neural networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114819115B_ABST
    Figure CN114819115B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of neuron computing, and in particular to a neuron computing method. The method refers to that a neuron calculates a plurality of input neuron membrane potentials Vin(t1) and input neuron pulses Pin(t1) within a time interval t, updates the neuron state, and sends an output neuron membrane potential Vout(t2) and an output neuron pulse Pout(t2); the unit time of the time interval t is Δt; the start time of the time interval is recorded as t1=n1*Δt, and the end time is recorded as t2=n2*Δt; the time interval t=n*Δt, n=n2-n1; and includes the following steps: at time t1, input data is acquired; within the time interval t, integration or inhibition operations are performed on the input data; within the time interval t, membrane potential accumulation operations are performed; within the time interval t, membrane potential activation operations are performed; at time t2, the neuron state is updated and data is output. The neuron computing method of the present invention has better versatility, thereby realizing a more general neural network computing system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of neuron computing, in particular to a neuron computing method that can be used for numerical neural networks and pulse neural networks. Background Art

[0002] Neurons are the basic functional units that build the human brain's biological nervous system. Many neurons are interconnected in a complex way to build an efficient intelligent perception and cognitive system. A typical biological neuron consists of three parts: synapses / dendrites, cell bodies, and axons.

[0003] The working process of biological neuron cells is roughly as follows: synapses / dendrites are the input devices of neuron cells, which are connected to many other neuron cells and are responsible for collecting and transmitting signals from other neuron cells; the cell body is the computing device of neuron cells, which calculates all input signals; the axon is the output device of neuron cells, which transmits the calculation results from the cell body to the synapses / dendrites of other neuron systems. Biological neuron cells transmit information through pulse signals. The pulse signal is emitted by the axon, received by the synapse / dendrite, and accumulated in the cell body. The pulse signal can cause the membrane potential in the cell body to increase, and when the membrane potential reaches a certain threshold, it will trigger the pulse output.

[0004] In order to build a computer system by simulating the biological nervous system, it is necessary to construct a mathematical model of the working process of the above biological neuron cells.

[0005] Among the existing neuron models, there are the Integrate-and-fire model, which has poor bionic performance but is easy to calculate, and the Hodgkin-Huxley model, which has good bionic performance but is difficult to calculate. However, the existing neuron models have some common problems, including:

[0006] First, in existing methods, the pulse signal of the neuron can only be positive. In modern neural network computing systems, the data of the numerical neural network algorithm has positive and negative values, and the pulse signal of the dynamic sensor (DVS camera) also has positive and negative values. Therefore, the existing neuron model cannot directly process the pulse neural network converted from the numerical neural network, nor can it directly process the pulse data from the dynamic sensor.

[0007] Second, in the existing methods, neurons can only implement the integration operation of input signals. The integration of input signals refers to the cumulative calculation of all input signals, and in the numerical neural network algorithm, there is also an input signal suppression operation (taking the maximum value of the input signal). Therefore, the existing neuron model cannot directly process the spiking neural network converted from the numerical neural network.

[0008] Third, in existing methods, neurons can only output pulse signals. Pulse signals only exist in pulse neural networks, and the data of numerical neural networks are usually 8-bit integers or 16 / 32-bit floating-point numbers, so existing neuron models cannot directly process numerical neural network algorithms.

[0009] The existing neuron model only supports pulse neural networks and cannot be directly used for numerical neural network calculations, dynamic sensors, or pulse neural networks converted from numerical neural networks. Summary of the invention

[0010] In order to solve the above problems in the prior art, the purpose of the present invention is to propose a unified neuron calculation method that can be used for numerical neural networks and spiking neural networks. The neuron calculation method can process positive pulses and negative pulses, can process pulse signal inputs and membrane potential signal inputs, can realize two operations of input signal integration and inhibition, and can generate two outputs of pulse signal and membrane potential.

[0011] To achieve the above-mentioned purpose, the present invention provides a neuron calculation method, which refers to a neuron calculating a plurality of input neuron membrane potentials Vin(t1) and input neuron pulses Pin(t1) within a time interval t, updating the neuron state, and sending an output neuron membrane potential Vout(t2) and an output neuron pulse Pout(t2); the unit time of the time interval t is Δt; the starting time of the time interval is recorded as t1=n1*Δt, and the ending time is recorded as t2=n2*Δt; the time interval t=n*Δt, wherein n1, n2, n are positive integers and n=n2-n1; the method comprises the following steps:

[0012] Step S1, at time t1, obtaining input data; the input data includes: the neuron state Nstatus(t1), the input neuron membrane potential Vin(t1) and the input neuron pulse Pin(t1) at time t1, and corresponding parameters;

[0013] Step S2, performing integration calculation or suppression operation on the input data within the time interval t, and outputting the integration or suppression operation result;

[0014] Step S3, within the time interval t, performing a membrane potential accumulation operation on the integration or inhibition operation result, and outputting the membrane potential accumulation operation result;

[0015] Step S4, within the time interval t, performing a membrane potential activation operation on the membrane potential accumulation operation result, and outputting the membrane potential activation calculation result;

[0016] Step S5, at time t2, the neuron state is updated and data is output according to the membrane potential activation calculation result.

[0017] Furthermore, the data type of the neuron membrane potential is an integer or a floating point number; the data type of the neuron pulse is an integer; the data type of the parameter is an integer or a floating point number, and the parameter has a unique corresponding relationship with the input neuron.

[0018] Further, the step S2 specifically includes: first, according to the selection of the specific calculation mode, the input neuron membrane potential Vin(t1) or the input neuron pulse Pin(t1) is selected as the input data Si, and the parameter is recorded as Wi; wherein, for the numerical neural network calculation, the input neuron membrane potential Vin(t1) is used as the input data Si; for the pulse neural network calculation, the input neuron pulse Pin(t1) is used as the input data Si; for the pulse neural network calculation obtained by the numerical neural network conversion, the input neuron membrane potential Vin(t1) or the input neuron pulse Pin(t1) is used as the input data Si;

[0019] The calculation mode includes: an integrated calculation mode and a suppressed calculation mode; for the integrated calculation mode, i input data and i input parameters are multiplied in pairs, and all multiplication results are accumulated, and the accumulated result is finally obtained as the calculation result, which is expressed as ACC(MUL(Si,Wi)); for the suppressed calculation mode, i input data and i input parameters are multiplied in pairs, and all multiplication results are compared for the maximum value, and the maximum value is finally obtained as the calculation result, which is expressed as MAX(MUL(Si,Wi)); wherein MUL() represents multiplication in pairs, ACC() represents accumulation, and MAX() represents taking the maximum value;

[0020] The integration or suppression calculation result FR is obtained according to the calculation result of the integration calculation mode or the suppression calculation mode.

[0021] Furthermore, the step S3 includes: the initial state of the neuron is Nstatus(t1) = {V(t1), P(t1)}; the membrane potential accumulation operation refers to multiplying the integration or inhibition operation result FR of step 2 by the proportional coefficient Scale and adding V(t1) to obtain the membrane potential accumulation operation result T1.

[0022] Furthermore, the membrane potential activation operation in step S4 is: referring to calculating the membrane potential activation operation result T2 through an activation function ACT determined by the membrane potential accumulation operation result T1 and n*Δt in step S3; the activation function is a linear function or nonlinear function with T1 and n*Δt as variables.

[0023] Furthermore, the step S5 is as follows: at time t2, the membrane potential activation calculation result T2 in step S4 is compared with the output upper threshold value Vth1 and the output lower threshold value Vth2, and an update method is selected according to the comparison result to update the neuron state Nstatus(t2), including:

[0024] (1) If the output upper threshold Vth1 is equal to 0 and the output lower threshold Vth2 is equal to 0, then the neuron state Nstatus(t2) is updated to: V(t2) = T2, P(t2) = 0;

[0025] (2) If the output upper threshold Vth1 is greater than 0 and the output lower threshold Vth2 is less than 0, then according to the comparison result between T2 and the output upper and lower thresholds:

[0026] a. If T2 is greater than the output upper threshold Vth1, the result of dividing T2 by Vth1 and rounding down is assigned to P(t2), and the result of taking the remainder of T2 over Vth1 is assigned to V(t2);

[0027] b. If T2 is less than the output lower threshold Vth2, then divide T2 by Vth2 and round down to the negative value and assign it to P(t2), and assign the remainder of T2 to Vth2 to V(t2);

[0028] Output updated neuron state Nstatus(t2): send V(t2) to output neuron membrane potential Vout(t2), and send P(t2) to output neuron pulse Pout(t2).

[0029] The present invention achieves the following technical effects:

[0030] The neural computing method of the present invention has better versatility, can directly process dynamic sensor data, can be applied to numerical neural networks, can also be applied to pulse neural networks and pulse neural networks converted from numerical neural networks, thereby realizing a more universal neural network computing system. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 is an example of a neural network composed of neurons;

[0032] Figure 2 is a flow chart of the neuron computing method of the present invention;

[0033] Figure 3 is an example of a neuron getting input data at time t1;

[0034] Figure 4 is an example of a neuron updating its state and outputting data at time t2. DETAILED DESCRIPTION

[0035] To further illustrate various embodiments, the present invention provides drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in this field should be able to understand other possible implementations and advantages of the present invention.

[0036] The present invention will now be further described with reference to the accompanying drawings and specific implementation methods.

[0037] The present invention proposes a neuron calculation method. The neuron refers to the mathematical abstract expression of the human brain neuron, wherein the neuron state Nstatus(tn) at time tn is composed of the neuron membrane potential V(tn) and the neuron pulse P(tn) at time tn:

[0038] Nstatus(tn)={V(tn),P(tn)}.

[0039] A simple neural network composed of neurons such as Figure 1 As shown in Figure 1, the input end of a neuron is usually connected to multiple neurons, and the output end of a neuron is usually also connected to multiple neurons. From the perspective of a neuron (e.g. Figure 1 The neuron X in the diagram is called input neuron X. All other neurons connected to the input end are called input neurons. At time tn, the signal sent by the input neuron is called the input neuron membrane potential Vin(tn) and the input neuron pulse Pin(tn); the signal sent by the neuron is called the output neuron membrane potential Vout(tn) and the output neuron pulse Pout(tn).

[0040] The neuron calculation method specifies the behavior of the above-mentioned neurons, so that neuron X calculates multiple input neuron membrane potentials and input neuron pulses within the time interval t, updates the neuron state, and sends output neuron membrane potentials and output neuron pulses. The unit time of the time interval t is Δt. The starting time of the time interval is recorded as t1=n1*Δt, and the ending time is recorded as t2=n2*Δt. Therefore, the time interval t=t2-t1=(n2-n1)*Δt=n*Δt, where n1, n2, n are positive integers and n=n2-n1.

[0041] The data type of the neuron membrane potential is an integer or a floating point number. The data type of the neuron pulse is an integer.

[0042] In the time interval n*Δt, neuron X follows Figure 2 The calculation method is shown:

[0043] 1. At time t1, the input data is obtained. At time t1, the neuron status is Nstatus(t1). Neuron X obtains the input neuron membrane potential Vin(t1) and the input neuron pulse Pin(t1), as well as the corresponding parameters from the input neuron. The data type of the parameter is an integer or a floating point number, and the parameter has a unique corresponding relationship with the input neuron, such as Figure 3 shown.

[0044] 2. Within the time interval t, perform integration or inhibition operations on the input data. Only neuron membrane potential or neuron pulses are used in neuron calculations. Therefore, it is necessary to first select the input neuron membrane potential Vin(t1) or the input neuron pulse Pin(t1) as the input data Si according to the selection of the specific calculation mode. The parameter is recorded as Wi. Among them, for numerical neural network calculations, the input neuron membrane potential Vin(t1) is used as the input data Si. For pulse neural network calculations, the input neuron pulse Pin(t1) is used as the input data Si. For pulse neural network calculations obtained by converting numerical neural networks, the input neuron membrane potential Vin(t1) or the input neuron pulse Pin(t1) is used as the input data Si.

[0045] There are two calculation modes: integration or suppression. For the integration calculation mode, i input data and i input parameters are multiplied by two (MUL), and all multiplication results are accumulated (ACC), and finally the accumulation result ACC(MUL(Si,Wi)) is obtained as the calculation result. For the suppression calculation mode, i input data and i input parameters are multiplied by two (MUL), and all multiplication results are compared for the maximum value (MAX), and finally the maximum value MAX(MUL(Si,Wi)) is obtained as the calculation result. According to the calculation results of the integration calculation mode or the suppression calculation mode, the integration or suppression operation result is obtained, denoted as FR, and the pseudo code is:

[0046] Si=Vin(t1)orPin(t1)

[0047] FR=ACC(MUL(Si,Wi))orMAX(MUL(Si,Wi))

[0048] 3. Perform membrane potential accumulation operation within time interval t. In this step, the initial state of neuron X is Nstatus(t1) = {V(t1), P(t1)}. The membrane potential accumulation operation shown refers to multiplying the above FR by the proportional coefficient Scale and adding V(t1). The data type of the proportional coefficient Scale is an integer or a floating point number. The result of the membrane potential accumulation operation is recorded as T1, and the pseudo code is:

[0049] T1=V(t1)+Scale*FR

[0050] 4. Within the time interval t, perform the membrane potential activation operation. The membrane potential activation operation refers to calculating the new neuron membrane potential through an activation function ACT determined by T1 and n*Δt. The activation function is a linear function or a nonlinear function with T1 and n*Δt as variables. The result of the membrane potential activation operation is recorded as T2, and the pseudo code is:

[0051] T2=ACT(T1,n)

[0052] An example of a linear activation function, the pseudo code is as follows:

[0053] ACT(T1,n)=T1*(1–n*Δt / m), where m is a constant

[0054] An example of a nonlinear activation function, the pseudo code is as follows:

[0055] ACT(T1,n)=n*Δt / (1+e -T1 )

[0056] 5. At time t2, update the neuron status and output data. At time t2, compare the membrane potential activation calculation result T2 with the output upper and lower threshold parameters, select a specific method to update the neuron status Nstatus(t2) of neuron X according to the comparison result, and send the output neuron membrane potential Vout(t2) and output neuron pulse Pout(t2), as shown in Figure 4 shown.

[0057] Two cases:

[0058] (1) If the output upper threshold Vth1 is equal to 0 and the output lower threshold Vth2 is equal to 0, then the neuron state Nstatus(t2) is updated as:

[0059] V(t2)=T2

[0060] P(t2)=0

[0061] The output neuron membrane potential and output neuron pulse are:

[0062] Vout(t2)=V(t2)

[0063] Pout(t2)=P(t2)

[0064] (2) If the output upper threshold Vth1 is greater than 0 and the output lower threshold Vth2 is less than 0, then according to the comparison result between T2 and the output upper and lower threshold parameters:

[0065] a. If T2 is greater than the output upper threshold Vth1, the result of dividing T2 by Vth1 and rounding down is assigned to P(t2), and the result of taking the remainder of T2 to Vth1 is assigned to V(t2). The pseudo code is as follows:

[0066] ifT2>Vth1:

[0067] V(t2)=T2 modVth1

[0068] P(t2)=floor(T2 / Vth1)

[0069] The output neuron membrane potential and output neuron pulse are:

[0070] Vout(t2)=V(t2)

[0071] Pout(t2)=P(t2)

[0072] b. If T2 is less than the output lower threshold Vth2, then divide T2 by Vth2 and round down the result to the negative and assign it to P(t2), and assign the remainder of T2 to Vth2 to V(t2). The pseudo code is as follows:

[0073] ifT2 <Vth2:

[0074] V(t2)=T2 modVth2

[0075] P(t2)=-floor(T2 / Vth2)

[0076] The output neuron membrane potential and output neuron pulse are:

[0077] Vout(t2)=V(t2)

[0078] Pout(t2)=P(t2)

[0079] The neuron calculation method can directly process the pulse data of the dynamic sensor. The pulse data of the dynamic sensor refers to the data with a value of 0, 1 or -1 in the unit time Δt, where 0 represents no pulse signal, 1 represents a positive pulse signal, and -1 represents a negative pulse signal. When the time interval n of the neuron calculation method is 1, the input neuron pulse data can be 0, 1 or -1, so the pulse data of the dynamic sensor can be directly processed.

[0080] The neuron calculation method can be directly used in numerical neural networks. In the numerical neural network calculation mode, the neuron calculation method selects the input neuron membrane potential Vin(t1) as the input data Si, and sets the output upper threshold parameter Vth1 equal to 0 and the output lower threshold parameter Vth2 equal to 0. Through the integration or inhibition operation, membrane potential accumulation operation and membrane potential activation operation in the neuron calculation method, various calculation modes in the numerical neural network can be realized, including convolution, pooling, normalization, linear activation, nonlinear activation, etc.

[0081] The neuron calculation method can be directly used in a spiking neural network. In the spiking neural network calculation mode, the neuron calculation method selects the input neuron pulse Pin(t1) as the input data Si, and sets the output upper threshold parameter Vth1 to be greater than 0 and the output lower threshold parameter Vth2 to be less than 0. Through the integration or inhibition operation, membrane potential accumulation operation, and membrane potential activation operation in the neuron calculation method, a variety of neuron models in a spiking neural network can be realized, such as the classic Integrate-and-fire neuron model and the Leaky Integrate-and-fire neuron model.

[0082] The neuron calculation method can be directly used in the pulse neural network obtained by converting the numerical neural network. The data of the numerical neural network algorithm has positive and negative values, so when the numerical neural network is converted into a pulse neural network, a negative pulse signal will inevitably appear. The neuron calculation method can process negative pulse signals. On the other hand, the pooling calculation commonly used in traditional numerical neural networks is a way of calculating the maximum value of data. When the numerical neural network is converted into a pulse neural network, a neuron inhibition operation that takes the maximum value will appear. The inhibition operation of the neuron calculation method can be used for the above-mentioned maximum value inhibition operation.

[0083] Although the present invention has been specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes may be made to the present invention in form and details without departing from the spirit and scope of the present invention as defined by the appended claims, all of which are within the scope of protection of the present invention.

Claims

1. A neural computing method, characterized in that: The method is used to process the pulse data of the dynamic sensor and the data of the numerical neural network, which means that the neuron calculates multiple input neuron membrane potentials Vin(t1) and input neuron pulses Pin(t1) within the time interval t, updates the neuron state, and sends the output neuron membrane potential Vout(t2) and the output neuron pulse Pout(t2); the unit time of the time interval t is Δt; the starting time of the time interval is recorded as t1=n1*Δt, and the ending time is recorded as t2=n2*Δt; the time interval t=n*Δt, wherein n1, n2, n are positive integers and n=n2-n1; and the following steps are included: Step S1, at time t1, obtaining input data; the input data includes: the neuron state Nstatus(t1), the input neuron membrane potential Vin(t1) and the input neuron pulse Pin(t1) at time t1, and corresponding parameters; Step S2, performing integration calculation or suppression operation on the input data within the time interval t, and outputting the integration or suppression operation result; Step S3, performing membrane potential accumulation operation on the integration or inhibition operation result within the time interval t, and outputting the membrane potential accumulation operation result; Step S4, within the time interval t, performing a membrane potential activation operation on the membrane potential accumulation operation result, and outputting the membrane potential activation calculation result; Step S5, at time t2, the neuron state is updated and data is output according to the membrane potential activation calculation result; The step S2 specifically includes: First, according to the selection of the specific calculation mode, the input neuron membrane potential Vin(t1) or the input neuron pulse Pin(t1) is selected as the input data Si, and the parameter is recorded as Wi; wherein, for the numerical neural network calculation, the input neuron membrane potential Vin(t1) is used as the input data Si; for the pulse neural network calculation, the input neuron pulse Pin(t1) is used as the input data Si; for the pulse neural network calculation obtained by the numerical neural network conversion, the input neuron membrane potential Vin(t1) or the input neuron pulse Pin(t1) is used as the input data Si; The calculation mode includes: an integrated calculation mode and a suppressed calculation mode; for the integrated calculation mode, i input data and i input parameters are multiplied in pairs, and all multiplication results are accumulated, and the accumulated result is finally obtained as the calculation result, which is expressed as ACC(MUL(Si,Wi)); for the suppressed calculation mode, i input data and i input parameters are multiplied in pairs, and all multiplication results are compared for the maximum value, and the maximum value is finally obtained as the calculation result, which is expressed as MAX(MUL(Si,Wi)); wherein MUL() represents multiplication in pairs, ACC() represents accumulation, and MAX() represents taking the maximum value; Obtaining an integration or suppression operation result FR according to the calculation result of the integration calculation mode or the suppression calculation mode; The step S3 includes: the initial state of the neuron is Nstatus(t1)={V(t1), P(t1)}; the membrane potential accumulation operation refers to multiplying the integration or inhibition operation result FR of step 2 by the proportional coefficient Scale and adding V(t1) to obtain the membrane potential accumulation operation result T1; The membrane potential activation operation in step S4 is: to calculate the membrane potential activation operation result T2 by an activation function ACT determined by the membrane potential accumulation operation result T1 and n*Δt in step S3; the activation function is a linear function or a nonlinear function with T1 and n*Δt as variables; The steps of step S5 are: at time t2, the membrane potential activation calculation result T2 in step S4 is compared with the output upper threshold value Vth1 and the output lower threshold value Vth2, and an update method is selected according to the comparison result to update the neuron state Nstatus(t2), including: (1) If the output upper threshold Vth1 is equal to 0 and the output lower threshold Vth2 is equal to 0, then the neuron state Nstatus(t2) is updated to: V(t2) = T2, P(t2) = 0; (2) If the output upper threshold Vth1 is greater than 0 and the output lower threshold Vth2 is less than 0, then according to the comparison result between T2 and the output upper and lower thresholds: a. If T2 is greater than the output upper threshold Vth1, the result of dividing T2 by Vth1 and rounding down is assigned to P(t2), and the result of taking the remainder of T2 over Vth1 is assigned to V(t2); b. If T2 is less than the output lower threshold Vth2, then divide T2 by Vth2 and round down to the negative value and assign it to P(t2), and assign the remainder of T2 to Vth2 to V(t2); Output updated neuron state Nstatus(t2): send V(t2) to the output neuron membrane potential Vout(t2), and send P(t2) to the output neuron pulse Pout(t2).

2. The neural computing method according to claim 1, characterized in that: The data type of the neuron membrane potential is an integer or a floating point number; the data type of the neuron pulse is an integer; the data type of the parameter is an integer or a floating point number, and the parameter has a unique corresponding relationship with the input neuron.