The present invention relates to a computing device, a neural network system, a neuron model device, a computing method, and a program.
One type of neural network is an SNN (Spiking Neural Network). For example, Patent Document 1 discloses a neuromorphic computing system in which a spiking neural network is implemented on a neuromorphic computing device.
In a spiking neural network, a neuron model has an internal state called a membrane potential, and outputs signals called spikes based on the temporal evolution of the membrane potential.
It is preferable that a spiking neural network be able to process data efficiently.
An example object of the present invention is to provide a computing device, a neural network system, a neuron model device, a computing method, and a program, capable of solving the above problem.
According to a first example aspect of the present invention, a computing device includes: a neuron model in which an input time interval for receiving a spike and an output time interval for firing and a transmitting spike are divided, wherein the neuron model fires within the output time interval, with firing within the input time interval being restricted.
According to a second example aspect of the present invention, a neural network system includes a neural network main body, and a learning means, wherein an input time interval for receiving a signal and an output time interval in which signal transmission is permitted are divided in association with firing, an input and output time in which reception and transmission of a signals are permitted is set in association with firing of some of layers among a plurality of layers constituting the neural network main body, and the neural network main body includes a neuron model including an index value calculation means that changes an index value of signal output based on an input status of a signal within an input time interval, and a signal output means that outputs a signal within an output time interval after end of the input time interval, based on the index value, and the learning means performs learning of a weight coefficient for the signal.
According to a third example aspect of the present invention, an input time interval for receiving a spike and an output time interval in which spike transmission is permitted are divided in association with forcible firing, the neuron model device includes: an index value calculation unit that changes an index value of signal output based on an input status of a signal within the input time interval; and a signal output unit that transmits a spike within the output time interval by firing based on the index value of the signal output.
According to a fourth example aspect of the present invention, a computing method includes: identifying an input time interval for receiving a spike and an output time interval in which spike transmission is permitted that are divided in association with forcible firing; changing an index value of signal output based on an input status of a signal within the input time interval; and transmitting a spike within the output time interval by firing based on the index value of the signal output.
According to a fourth example aspect of the present invention, a program causes a program-executing device to execute: identifying an input time interval for receiving a spike and an output time interval in which spike transmission is permitted that are divided in association with forcible firing; changing an index value of signal output based on an input status of a signal within the input time interval; and transmitting a spike within the output time interval by firing based on the index value of the signal output.
According to the present invention, a spiking neural network is able to process data efficiently.
Hereinafter, example embodiments of the present invention will be described, however, the present invention within the scope of the claims is not limited by the following example embodiments. Furthermore, not all the combinations of features described in the example embodiments are essential for the solving means of the invention.
The neural network device 10 performs data processing, using a spiking neural network. The neural network device 10 corresponds to an example of the computing device.
The neural network device referred to here is a device in which a neural network is implemented. A spiking neural network may be implemented in the neural network device 10 using dedicated hardware. For example, a spiking neural network may be implemented in the neural network device 10, using an ASIC (Application Specific Integrated Circuit) or an FPGA (Field Programmable Gate Array). Alternatively, a spiking neural network may be implemented in the neural network device 10 in software, using a computer or the like.
A device including an ASIC, a device including an FPGA, and a computer are all examples of a programmable device. In ASIC and FPGA, an example of programming is to describe hardware using a hardware description language and implement the described hardware on an ASIC or an FPGA. In the case where the neural network device 10 is configured using a computer, the functions of the spiking neural network may be described by programming, and the resulting program may be executed by the computer.
The spiking neural network referred to here is a neural network in which a neuron model outputs a signal at a timing based on a state amount called membrane potential, which undergoes temporal changes depending on the input status of the signal to the neuron model itself. The membrane potential is also referred to as an index value of signal output, or simply as an index value.
The temporal changes here means that the changes occur depending on time.
A neuron model in a spiking neural network is also referred to as a spiking neuron model. A signal output by a spiking neuron model is also referred to as a spike signal or a spike. In a spiking neural network, a binary signal can be used as a spike signal, and information can be transmitted between spiking neuron models by the transmission timing of spike signals or the number of spike signals.
In the case of the neuron model 100, the index value calculation unit 110 calculates the membrane potential based on the status of spike signal input to the neuron model 100. The signal output unit 130 outputs a spike signal at a timing that corresponds to a temporal change in membrane potential.
The spike signal in the neural network device 10 may be a pulse signal or a step signal, however, the invention is not limited to these examples.
In the following, a case will be described using as an example a temporal method in which information is transmitted at the transmission timing of a spike signal, as a method of transmitting information between neuron models 100 in the spiking neural network by the neural network device 10. However, the method of transmitting information between the neuron models 100 in the spiking neural network by the neural network device 10 is not limited to a specific method.
The processing performed by the neural network device 10 can be various processes that can be executed using a spiking neural network. For example, the neural network device 10 may perform image recognition, biometric authentication, or numerical value prediction, however the invention is not limited to these examples.
The neural network device 10 may be configured as one device, or may be configured as a combination of a plurality of devices. For example, each neuron model 100 may be configured as a device, and the devices constituting each neuron model 100 may be connected via a signal transmission path to form a spiking neural network.
In the example of
The input layer 21 includes input nodes 31. The intermediate layer 22 includes intermediate nodes 32. The output layer 23 includes output nodes 33. The input nodes 31, the intermediate nodes 32, and the output nodes 33 are also collectively referred to as nodes 30.
the input node 31 converts input data to the neural network 11 into a spike signal, for example. Alternatively, in the case where the input data to the neural network 11 is represented by a spike signal, the neuron model 100 may be used as the input node 31.
The neuron model 100 may be used as both the intermediate node 32 and the output node 33. Moreover, the operation of the neuron model 100 may be different between the intermediate node 32 and the output node 33, such as at the output node 33, where constraint conditions on spike signal output timing, which will be described later, are more relaxed than at the intermediate node.
The four layers 20 of the neural network 11 are arranged in the order of the input layer 21, the intermediate layer 22-1, the intermediate layer 22-2, and the output layer 23 from the upstream side in signal transmission. The nodes 30 are connected between two adjacent layers 20 via transmission paths 40. The transmission paths 40 transmit spike signals from the node 30 of the layer 20 on the upstream side to the node 30 of the layer 20 on the downstream side.
However, when the neural network 11 is configured as a forward propagation type spiking neural network, the number of layers is not limited to four, but may be two or more. Moreover, the number of neuron models 100 included in each layer is not limited to a specific number, and it is sufficient that each layer includes one or more neuron models 100. Each layer may include the same number of neuron models 100, or each layer may include a different number of neuron models 100.
Also, the neural network 11 may be configured in a fully-connected manner, but the invention is not limited to this example. In the example of
In the following description, it is assumed that the delay time in the transmission of spike signals can be ignored, and the spike signal output time of the neuron model 100 on the spike signal output side is the same as the spike signal input time to the neuron model 100 on the spike signal input side. In the case where the delay time in the transmission of spike signals cannot be ignored, a time obtained by adding the delay time to the spike signal output time may be used as the spike signal input time.
The spiking neuron model outputs a spike signal at a timing when the membrane potential undergoing temporal changes reaches a threshold value. In a general spiking neural network where the output timing of spike signals is not restricted, then when there are multiple sets of processing target data, it is necessary to wait for an input of the next input data to the spiking neural network until the spiking neural network has received an input of input data and has output the computation result.
In the example of
Time t2*(l−1) indicates the input time of the spike signal from the second spiking neuron model of the l−1th layer. Time t1*(l−1) indicates the input time of the spike signal from the first spiking neuron model of the l−1th layer. Time t3*(l−1) indicates the input time of the spike signal from the third spiking neuron model of the l−1th layer.
Furthermore, the target model outputs a spike signal at time ti*(l). The output of a spike signal performed by the spiking neuron model is referred to as firing. The time when the spiking neuron model fires is referred to as firing time.
In the example of
Before the firing of the target model, after the input of the spike signal, the membrane potential vi(l)(t) of the target model continues to change at a rate of change (change speed) according to the weight set for each transmission path of the spike signal. Moreover, the rate of change in membrane potential for each spike signal input is added in a linear manner. The differential equation of the membrane potential vi(l) (t) in the example of
In Expression (1), wij(l) represents the weight set in the transmission path of the spike signal from the jth spiking neuron model of the l−1th layer to the target model. The weight wij(l) is a target of learning. The weight wij(l) can take both positive and negative values.
θ is a step function and is expressed as in Expression (2). Therefore, the rate of change of the membrane potential vi(l) (t) changes while showing various values depending on the input status of the spike signal and the value of the weight wij(l), and in the process, it can take both positive and negative values.
For example, at time ti*(l) the membrane potential vi(l)(t) of the target model reaches the threshold Vth and the target model fires. The finring causes the membrane potential vi(l)(t) of the target model to become 0, and thereafter the membrane potential does not change even if the target model receives a spike signal input.
The horizontal axis in
In the example in
In general, when processing is being executed in the spiking neural network, it is difficult to identify in real time which one of the firing timing of the spiking neural network, and the firings of the spiking neuron models in the first and second layers is influencing the firing of the spiking neuron model in the output layer.
Therefore, depending on the spiking neural network method, it is necessary to wait at least for time T11 until the spiking neuron model first fires in the output layer, without inputting the next input data to the spiking neural network. In order to strictly ensure that there is no interference in the spiking neural network between the input data that the spiking neural network processes sequentially, it is necessary to wait for the next input data without inputting it to the spiking neural network, until the last spiking neuron model fires in the output layer.
On the other hand, in the case where there are multiple sets of input data to be processed in sequence, if the next input data can be input to the spiking neural network before the solution for one input data is obtained, it is possible to comparatively reduce the amount of time required from inputting the first input data to the spiking neural network to obtaining the answer for the last input data. In this respect, it is possible to increase the throughput of the spiking neural network.
Accordingly, in the neural network device 10, a data processing time of the neuron model 100 is set so that the neuron model 100 completes data processing within the data processing time. As a result, the next data can be input to the neuron model 100 after the data processing time has elapsed.
In the example of
The neural network device 10 synchronizes the neuron models 100 for each layer and sets the same input time intervals and the same output time intervals, so that the same data processing time is set for all the neuron models 100 included in the same layer. T is the time width of each time interval.
Moreover, the neural network device 10 also synchronizes the layers so that the output time interval of the neuron model 100 of a certain layer and the input time interval of the neuron model 100 of the next layer overlap.
In particular, the time length of the input time interval and the time length of the output time interval are set to the same length, and the input time interval and output time interval are set so that the output time interval of the neuron model 100 of a certain layer and the input time interval of the neuron model 100 of the next layer completely overlap.
In such a case, the “neuron model 100 of a certain layer” corresponds to an example of the first neuron model. The “neuron model 100 of the next layer” corresponds to an example of the second neuron model. The output time interval and the input time interval are set so that the output time interval of the first neuron model and the input time interval of the second neuron model that receives input of spike signals from the first neuron model overlap.
Since the time during which spike signals are input to the neuron model 100 is limited to the input time interval, the index value calculation unit 110 calculates the membrane potential so as to change the membrane potential over time based on the input status of the spike signal within the input time interval. The index value calculation unit 110 corresponds to an example of the index value calculation means.
In the following, as with the description of the spiking neural network with reference to Expression (1) and Expression (2), the neuron model 100 of the ith node of the lth layer is referred to as the target model, and the membrane potential of the target model is represented as vi(l)(t).
The index value calculation unit 110 of the example embodiment uses Expression (1A) below instead of the Expression (1) described above. By using Expression (1A), the rate of change of the membrane potential vi(l) (t) can be changed between the input time interval and the output time interval.
wij(l) represents the weight set in the transmission path of the spike signal from the jth spiking neuron model of the l−1th layer to the target model. wi(l) is the unique weight of the ith neuron in the lth layer. The rate of change in the membrane potential vi(l)(t) until time t reaches lT is a function using the weight coefficient wij(l). Accordingly, the rate of change in the membrane potential vi(l) (t) in the input time interval is calculated, using a function using the weight coefficient wij(l). Moreover, the rate of change in the membrane potential vi(l)(t) in the output time interval until time t reaches lT and thereafter is a function using the weight coefficient w(i)(l). For example, the function may be a linear function whose slope is the weighting coefficient w(i). The weight wi(l) can take positive values. Accordingly, the rate of change in the membrane potential vi(l) (t) in the output time interval is calculated, using a function using the weight coefficient w(l). It is preferable that the weights wij(l) and wi(l) be used as targets of learning. Moreover, the weight set in the transmission path of spike signals from the jth spiking neuron model of the l−1th layer to the target model is expressed as wij(l).
The description regarding the neuron model 100 of the target model applies to all neuron models 100 included in the neural network device 10, except that the output timing of spike signals of the neuron model 100 in the output layer, which will be described later, may be relaxed. That is to say, the lth layer may be any layer that includes the neuron model 100 as a node. Any neuron model 100 in the lth layer may be the ith neuron model 100.
By using Expression (1A) in this manner, the membrane potential vi(l) (t) of the neuron model 100 changes within the output time interval with the slope wi(l) unique to the output time interval. Alternatively, a similar function can be realized by fixing the membrane potential within the output time interval and changing the firing threshold value instead of the threshold value Vth. Specifically, in each neuron model, the firing threshold value may be set to a unique value determined for each neuron model, and the firing threshold value may be changed with a slope −wi(l) in the output time interval. Note that a case will be exemplified below wherein the firing threshold value is fixed at the threshold value Vth in the output time interval and the membrane potential vi(l) (t) changes, however, a similar discussion can apply to a case where the membrane potential is fixed in the output time interval and the firing threshold value changes.
Hereinafter, the membrane potential v(i)(t) will be described for the input time interval and the output time interval separately.
The index value calculation unit 110 calculates the membrane potential vi(l) (t), using the input time interval expression where the differential equation is Expression (1A), until the membrane potential vi(l)(t) reaches the threshold value Vth or until the data processing time corresponding to the end of the input time interval has elapsed, whichever comes first. The membrane potential vi(l) (t) in the input time interval is expressed as in Expression (3A). The membrane potential vi(i)(t) in the output time interval is expressed as in Expression (3B).
The index value calculation unit 110 may calculate the membrane potential vi(l) (t) in each interval, based on Expression (3A) and Expression (3B) mentioned above.
In the input time interval, the index value calculation unit 110 changes the membrane potential vi(l)(t) at a rate of change depending on the input status of spike signals to the target model as shown in Expression (1A) and Expression (3A).
On the other hand, in the output time interval, as shown in Expression (1A), spike signals to the target model are not accepted. Therefore, if the membrane potential vi(l) (t) does not reach the threshold value Vth within the input time interval, in the output time interval, based on the membrane potential vi( )(lT) at the end of the input time interval and the elapsed time, the index value calculation unit 110 changes the membrane potential vi(l) (t) so that this potential increases monotonically. The expression shown as Expression (3B) is an example of this. It is preferable that the rate of change of the membrane potential vi(l)(t) during the output time interval be maintained at a predetermined value.
First, the membrane potential vi(l)(t) in the input time interval will be described in more detail.
If the time when the membrane potential v(i)(t) reaches the threshold value Vth within the input time interval is expressed as ti(l, vth) and substituted for time t in Expression (3A), Expression (4) is obtained. This Expression (4) is applied to the input time interval.
“i(l)” represents a set of indices j where tj*(l−1)<ti(l, vth).
In the neural network device 10, since the firing time is limited within the output time interval, the firing time ti*(l) may be later than the time at which the membrane potential vi(l)(t) reaches the threshold value Vth in some cases. Therefore, the time at which the membrane potential vi(l) (t) reaches the threshold value Vth is expressed as ti(l, vth). The time at which the membrane potential reaches the threshold value is also referred to as threshold value reaching time.
From Expression (4), the threshold value reaching time ti(l, vth) is expressed as Expression (5A).
Next, the membrane potential vi(l) (t) in the output time interval will be described in more detail.
The index value calculation unit 110 calculates the membrane potential vi(l) (t) where the differential equation is expressed as Expression (1A), until the membrane potential vi(l)(t) reaches the threshold value Vth or until the data processing time corresponding to the end of the output time interval has elapsed, whichever comes first. The membrane potential vi(l)(t) is expressed as in Expression (3B) described above. By rearranging the linear expression of Expression (3B), the threshold value reaching time ti(l, vth) is expressed as Expression (5B).
The comparison unit 120 compares the membrane potential vi(l) (t) and the threshold value Vth and determines whether or not the membrane potential vi(l)(t) has reached the threshold value Vth.
The signal output unit 130 outputs a spike signal within the output time interval based on the membrane potential vi(l) (t). Specifically, if the membrane potential vi(l) (t) reaches the threshold value Vth within the input time interval, the signal output unit 130 outputs a spike signal at the start of the output time interval. If the membrane potential vi(l)(t) reaches the threshold value Vth within the output time interval, then when the membrane potential v(i)(t) reaches the threshold value Vth, the signal output unit 130 outputs a spike signal. If the membrane potential vi(l)(t) does not reach the threshold value Vth within the output time interval, the signal output unit 130 outputs a spike signal at the end of the output time interval.
Note that in the example of
Hereinafter, with reference to
As shown with CASE0 in
Also, in such a case, instead of the above as shown in
Note that if the membrane potential vi(l)(t) has not reached the threshold value Vth within the input time interval, then as will be described below, control can be performed in several cases for the membrane potential vi until the spike signal is output. The index value calculation unit 110 performs control to output a spike signal within the output time interval.
For example, as shown with CASE1 in
Also, in such a case, after the comparison unit 120 determines that the membrane potential vi(l)(t) has reached the threshold value Vth, the index value calculation unit 110 may calculate the membrane potential vi(l)(t) as 0 until the start of the next input time interval. Accordingly, the index value calculation unit 110 may start processing the next data in the next input time interval from the state where the membrane potential vi(l)(t) is reset to zero.
As shown with CASE2 in
For example, if the membrane potential vi(l) (t) does not reach the threshold value Vth before the end of the output time interval, the comparison unit 110 may output a dummy determination result that indicates the membrane potential having reached the threshold value. The signal output unit 130 may then output a spike signal at the end of the output time interval, based on the determination result of the comparison unit 120.
If the membrane potential vi(l)(t) does not reach the threshold value Vth before the end of the output time interval, the index value calculation unit 110 may calculate the membrane potential vi(l)(t) as 0 at the start of the next input time interval. Accordingly, the index value calculation unit 110 may start processing the next data in the next input time interval from the state where the membrane potential vi(l) (t) is reset to zero.
In the example of
Moreover,
In the example of
This enables the neuron model 100 to process the next data in the next data processing time. The neural network 11 as a whole can start processing the next data without waiting for the completion of processing the input data, as in so-called pipeline processing.
Also, in the example of
The neural network device 10 may include a synchronization processing unit, and the synchronization processing unit may notify each neuron model 100 of the timing of switching between time intervals. Alternatively, each neuron model 100 may detect the timing of switching between time intervals based on a clock signal common to all neuron models 100.
In the example of
Expression clip is expressed as Expression (7).
The function clip shown in Expression (7) is referred to as a clip function.
The horizontal axis of the graph in
As shown in
If the threshold value reaching time ti(l, vth) is within the interval from time T to time 2T, the neuron model 100 outputs a spike signal at the threshold value reaching time ti(l, vth). Time 2T is the end time of the output time interval. Note that it is assumed that the delay time from the moment at which the membrane potential vi(l) (t) reaches the threshold value Vth to the moment at which the neuron model 100 outputs a spike signal can be ignored.
If the threshold value reaching time ti(l, vth) is later than time 2T, that is to say, if the membrane potential vi(l) (t) has not reached the threshold value Vth by time 2T, the neuron model 100 outputs a spike signal at time 2T.
In the example of
The horizontal axis of the graph in
As shown in
If the threshold value reaching time ti(l, vth) is within the interval from time (2d+1-2)T to time (2d+l−1)T, the neuron model 100 outputs a spike signal at the threshold value reaching time ti(l, vth). Time (2d+l−1)T is the end time of the output time interval. Note that it is assumed that the delay time from the moment at which the membrane potential vi(l)(t) reaches the threshold value Vth to the moment at which the neuron model 100 outputs a spike signal can be ignored.
If the threshold value reaching time t(l, vth) is later than time (2d+l−1)T, that is to say, if the membrane potential vi(l)(t) has not reached the threshold value Vth by time (2d+l−1)T, the neuron model 100 outputs a spike signal at time (2d+l−1)T.
The clip function in the neuron model 100 can be regarded as equivalent to the activation function in an artificial neural network (ANN). Therefore, in the neural network 11, it can be understood that the concept of activation function is introduced into the spiking neural network. In this respect, it is expected that the neural network device 10 will exhibit high recognition performance.
Moreover, the clip function in the neuron model 100 may be the learning target.
As described above, the neural network 11 configured by the neural network device 10 is also referred to as neural network main body.
In the example of
Also, the neural network device 10 acquires a clock signal. The neural network device 10 may include a clock circuit. Alternatively, the neural network device 10 may receive an input of a clock signal from outside the neural network device 10.
The neural network device 10 receives an input of input data and outputs an estimated value based on the input data. When calculating the estimated value, the neural network device 10 uses a clock signal to synchronize time intervals between layers and between neuron models 100 in the same layer.
The learning device 50 performs learning of the neural network models 10. Learning here means adjusting parameter values of a learning model by machine learning. The learning device 50 performs learning of a weight coefficient for spike signals input to the neuron model 100. The weight Wij(l) in Expression (4) corresponds to an example of the weight coefficient the value of which is adjusted by the learning device 50 through learning.
The learning device 50 may use an evaluation function that indicates the evaluation of an error between the estimated value output by the neural network device 10 and the true value indicated by the teaching label, to perform weight coefficient learning so that the size of the error between the estimated value and the true value becomes small.
The learning device 50 corresponds to an example of the learning means. The learning device 50 is configured, using a computer, for example.
As a learning method performed by the learning device 50, for example, an existing learning method such as backpropagation arranged according to the set input time interval and output time interval may be used.
For example, in the case where the learning device 50 performs learning using an arranged backpropagation method, the weight Wij(l) may be updated so as to change the weight Wij(l) by the amount of change ΔWij(j) shown in Expression (9A). Similarly, the weight Wi(l) may be updated so as to change the weight Wi(l) by the amount of change ΔWi(l) shown by Expression (9B).
η is a constant indicating the learning rate. The learning rates in Expression (9A) and Expression (9B) may be the same value or may be different values.
C is expressed as in Expression (10).
C corresponds to an example of the evaluation function that indicates the evaluation of an error between the estimated value output by the neural network device 10 and the true value indicated by the teaching label. C is set as a loss function that outputs a smaller value the smaller the error.
M represents an index value indicating the output layer (final layer). N(M) represents the number of neuron models 100 included in the output layer.
κi represents a teaching label. Here, it is assumed that the neural network device 10 performs class classification in which the number of classes is N(M), and that the teaching label is indicated by a one-hot vector. It is assumed that κi=1 when the value of index i indicates the true class, and κi=0 otherwise.
t(ref represents a reference spike.
“γ/2(ti(M)−t(ref)2” is a term provided to avoid learning difficulties. This term is also referred to as temporal penalty term. γ is a constant for adjusting the degree of influence of the temporal penalty term, and γ>0. γ is also referred to as a temporal penalty coefficient.
Si is a softmax function and is expressed as Expression (11).
σsoft is a constant provided as a scale factor for adjusting the magnitude of the value of the softmax function Si, and σsoft>0.
Here, it is assumed that the ith spike firing time ti(M) of the output layer is expressed as 0≤ti(M)≤1. For example, the spike firing time of the output layer may indicate, for each class, the probability of the classification target indicated by the input data being classified into that class. For i where κi=1, the closer the value of ti(M) is to 1, the smaller the value of the term “−Σi=1N(M)(κiln(Si(t(M))))” becomes, and the learning device 50 calculates a smaller loss (value of evaluation function C).
However, the processing performed by the neural network device 10 is not limited to class classification.
In addition to or instead of the weights Wij(l) and Wi(l), the clip function in the neuron model 100 may be the learning target, as described above. For example, “a” and “b” in Expression (7) may be treated as learning parameters, and the values of “a” and “b” may be adjusted during learning. Moreover, for example, the learning device 50 may determine the time widths of the input time interval and the output time interval through learning, and set the values of “a” and “b” according to the obtained time widths. In
Similar to the operation shown in
The neural network device 10 receives an input of input data and outputs an estimated value based on the input data. When calculating the estimated value, the neural network device 10 uses a clock signal to synchronize time intervals between layers and between neuron models 100 in the same layer.
Next, the results of an experiment using the neural network device 10 will be described.
Learning and testing of handwritten digit image recognition were performed, using MNIST, a dataset of handwritten digit images.
The configuration of the neural network 11 was a fully connected forward propagation type having four layers, namely, an input layer, a first layer, a second layer, and an output layer. The number of neuron models 100 in the input layer was 784, the number of neuron models 100 in the first and second layers was 200 each, and the number of neuron models 100 in the output layer was 10.
The time widths of the input time interval and the output time interval were both 0.05 milliseconds.
As a method for presenting the estimation result yielded by the neural network 11, a time method was adopted in which the estimation result is presented depending on which neuron model 100 among the neuron models 100 in the output layer outputs a spike signal first.
As a result of the experiment, a recognition rate of 97.4% was obtained during the test.
The horizontal axis in
In the example of
If the membrane potential of this neuron model 100 is to be waited to reach the threshold value, spike signals for processing the next input data cannot be input to the neuron model 100 in the first layer until around 0.025 milliseconds.
Also, regarding the second layer, among the neuron models 100 in the second layer, there is a neuron model 100 the membrane potential of which reaches the threshold value after 0.015 milliseconds, which is the end of the output time interval of the first layer. For example, there is a neuron model 100 the membrane potential of which reaches the threshold value at around 0.019 milliseconds.
If the membrane potential of this neuron model 100 is to be waited to reach the threshold value, spike signals for processing the next input data cannot be input to the neuron model 100 in the first layer until around 0.019 milliseconds.
Or, if calculation of the membrane potential in each of the first layer neuron models 100 and each of the second layer neuron models 100 is to continue until the neural network 11 outputs the estimation result, spike signals for processing the next input data cannot be input to any of the neuron model 100 in the first layer, the second layer, and the output layer until around 0.013 milliseconds, at which time the membrane potential of the neuron model 100 of the output layer first reaches the threshold value.
The horizontal axis in
In the example of
Moreover, since the firing time of the first layer neuron model 100 is limited to 0.005 seconds or later, the start time of the input time interval of the second layer can also be set to 0.005 seconds. If there is preceding data before the processing target data of the example of
Moreover, all the neuron models 100 in the second layer output spike signals during the output time interval of the second layer from 0.010 seconds to 0.015 seconds. Accordingly, spike signals for processing the next input data can be input to the neuron model 100 in the second layer at and after 0.015 seconds.
Moreover, since the firing time of the first layer neuron model 100 is limited to 0.010 seconds or later, the start time of the input/output time interval of the output layer can also be set to 0.010 seconds. If there is preceding data before the processing target data of the example of
Note that, in the experiment, the timing at which the neuron model 100 in the output layer outputs spike signals is not limited. Accordingly, among the neuron models 100 in the output layer, there is a neuron model 100 the membrane potential of which reaches the threshold value after 0.020 milliseconds, which is the end of the output time interval of the output layer. By making the neuron model 100 of the output layer also fire within the output time interval, spike signals for processing the next input data can be input to the neuron model 100 in the output layer at and after 0.020 milliseconds, which is the end of the output time interval.
The horizontal axis in
In the example of
If the membrane potential of this neuron model 100 is to be waited to reach the threshold value, spike signals for processing the next input data cannot be input to the neuron model 100 in the first layer until around 0.025 milliseconds.
Also, regarding the second layer, among the neuron models 100 in the second layer, there is a neuron model 100 the membrane potential of which reaches the threshold value after 0.015 milliseconds, which is the end of the output time interval of the first layer. For example, there is a neuron model 100 the membrane potential of which reaches the threshold value at around 0.022 milliseconds.
If the membrane potential of this neuron model 100 is to be waited to reach the threshold value, spike signals for processing the next input data cannot be input to the neuron model 100 in the first layer until around 0.022 milliseconds.
Or, if calculation of the membrane potential in each of the first layer neuron models 100 and each of the second layer neuron models 100 is to continue until the neural network 11 outputs the estimation result, spike signals for processing the next input data cannot be input to any of the neuron models 100 in the first layer, the second layer, and the output layer until around 0.013 milliseconds, at which time the membrane potential of the neuron model 100 of the output layer first reaches the threshold value.
The horizontal axis in
In the example of
Moreover, since the firing time of the first layer neuron model 100 is limited to 0.005 seconds or later, the start time of the input time interval of the second layer can also be set to 0.005 seconds. If there is preceding data before the processing target data of the example of
Moreover, all the neuron models 100 in the second layer output spike signals during the output time interval of the second layer from 0.010 seconds to 0.015 seconds. Accordingly, spike signals for processing the next input data can be input to the neuron model 100 in the second layer at and after 0.015 seconds.
Moreover, since the firing time of the second layer neuron model 100 is limited to 0.010 seconds or later, the start time of the input/output time interval of the output layer can also be set to 0.010 seconds. If there is preceding data before the processing target data of the example of
By making the neuron model 100 of the output layer also fire within the output time interval, spike signals for processing the next input data can be input to the neuron model 100 in the output layer at and after 0.020 milliseconds, which is the end of the output time interval.
According to the example embodiment, in the neural network device 10, input time intervals for receiving spikes and output time intervals for firing and transmitting spikes are divided. The neural network device 10 includes neuron models 100 that fire within the output time intervals and are restricted from firing within the input time intervals. This makes it possible to use the input time intervals and the output time intervals in respective usage modes, and the spiking neural network becomes able to perform data processing efficiently.
For example, by transmitting a spike by firing the neuron model 100 within a certain time interval, the posterior edge of the output time interval becomes clear, and this makes it easier to make division between input time intervals in which spikes are received and output time intervals in which spikes are allowed to be transmitted. As a result, it becomes easier to make adjustments to use information from the neuron model 100 that outputs relatively significant information without information leakage. By making the neuron model 100 that outputs relatively significant information fire within the output time interval, the spiking neural network becomes able to perform data processing efficiently.
Moreover, the configuration may be such that firing of the neuron model 100 that outputs relatively insignificant information is omitted. For example, the neuron model 100 may be formed to forcibly fire in the case where the membrane potential of the neuron model 100 satisfies a predetermined condition at the posterior edge of the output time interval, or not to fire in the same case. This prevents the neuron model 100 from firing after the output time interval has elapsed. As a result, the spiking neural network becomes able to perform data processing even more efficiently.
Note that the firing time at which the neuron model 100 fires within the output time interval may be defined as a function of the membrane potential of the neuron model 100 at the last time of the input time interval. The neuron model 100 may be formed to limit firing when the membrane potential of the neuron model 100 at the last time of the input time interval is outside a predetermined range. The neuron model 100 may be formed so that the membrane potential of the neuron model 100 within the output time interval increases with a slope unique to each neuron model 100. The neuron model 100 generates a spike with a predetermined pulse waveform when the membrane potential of the neuron model 100 satisfies a predetermined condition within the output time interval. For example, the neuron model 100 can start transmitting a spike in the form of a rectangular waveform when the membrane potential of the neuron model 100 satisfies the predetermined condition within the output time interval, and stop transmitting the spike at the time when the output time interval ends.
Note that the type of neural network 11 is not limited to a particular type. For example, the neural network 11 may be configured as a convolutional neural network (CNN) using a spiking neural network.
An example of application to a CNN type neural network device 10A will be described as a second example embodiment, with reference to
The feature extraction layer 24 is arranged between the input layer 21 and the intermediate layer 22. The feature extraction layer 24 is configured so as to extract desired features from input image data through computing processing using the output of the input layer 21. The feature extraction layer 24 supplies the calculation results to the subsequent intermediate layer 22.
For example, the feature extraction layer 24 is configured to combine convolutional layers (Conv) and pooling layers (Pooling) so that an arbitrary number of sets of convolutional layers and pooling layers suitable for processing are stacked. The feature extraction layer 24 shown in
The intermediate layer 22 includes, for example, a first fully-connected layer 221 (Dense) and a second fully-connected layer 222 (Dense). Note that the output layer 23 may be omitted.
Hereinafter, an example of the results of an experiment using the neural network device 10A configured as described above will be shown. Part of MNIST data is used as input data for this experiment. The data shown here is a model of a character 8 that is handwritten.
In order from the upper side of
For example, the size of the two-dimensional image to be identified is 28 pixels by 28 pixels.
The first convolutional layer 241 forms a convolution filter of size 5×5 and has this in six channels. The first pooling layer 251 performs maximum value pooling on the processing results of the first convolutional layer 241 in units of size 2×2. The second convolutional layer 242 forms a convolution filter of size 5×5 and has this in sixteen channels. The second pooling layer 252 performs maximum value pooling on the processing results of the second convolutional layer 242 in units of size 2×2. The number of neuron models 100 in the first fully-connected layer 221 is 200, and the number of neuron models 100 in the second fully-connected layer 222 is ten.
The results are shown with (a) to (f) in
As described above, the second example embodiment also provides the same effects as those of the first example embodiment.
As described above, when the neural network 11 is configured as a forward propagation spiking neural network, the number of layers may be two or more and is not limited to a specific number. Moreover, the number of neuron models 100 included in each layer is not limited to a specific number, and it is sufficient that each layer includes one or more neuron models 100. Each layer may include the same number of neuron models 100, or each layer may include a different number of neuron models 100. Also, the neural network 11 may be configured in a fully-connected manner, but may not be configured in a fully-connected manner.
Furthermore, the membrane potential of the neuron model 100 after firing is not limited to one that does not change from the potential 0 described above. For example, after a predetermined period of time has elapsed since the firing, the membrane potential may be changed in response to the input of a spike signal. The number of times each neuron model 100 fires is also not limited to once for each input data.
The configuration of the neuron model 100 as a spiking neuron model is also not limited to a specific configuration. For example, the rate of change in the neuron model 100 from receiving an input of a spike signal to receiving an input of the next spike signal may not be constant.
The learning method of the neural network 11 is not limited to supervised learning. The learning device 50 may perform the learning of the neural network 11 by unsupervised learning.
As described above, the index value calculation unit 110 changes the membrane potential over time based on the signal input status in the input time interval. The signal output unit 130 outputs a signal within the output time interval after the end of the input time interval, based on the membrane potential.
In this way, by setting the input time interval in which the neuron model 100 receives input of spike signals and the output time interval in which the neuron model 100 outputs spike signals, it is possible to restrict the time during which the index value calculation unit 110 calculates the membrane potential to the time from the start of the input time interval to the end of the output time interval. At other times, the neuron model 100 may perform processing on other data.
According to the neural network device 10, the spiking neural network is able to process data efficiently in this respect.
Moreover, the index value calculation unit 110 changes the membrane potential at a rate of change depending on the signal input status within the input time interval. If the membrane potential does not reach the threshold value within the input time interval, the index value calculation unit 110 changes the membrane potential in the output time interval at the rate of change at the end of the input time interval.
If the membrane potential reaches the threshold value within the input time interval, the signal output unit 130 outputs a spike signal at the start of the output time interval. If the membrane potential reaches the threshold value within the output time interval, the signal output unit 130 outputs a spike signal when the membrane potential reaches the threshold value. If the membrane potential does not reach the threshold value within the output time interval, the signal output unit 130 outputs a spike signal at the end of the output time interval.
As a result, it is possible to restrict the time during which the neuron model 100 outputs spike signals, to the output time interval. The neuron model 100 can process other data after the end of the output time interval.
According to the neural network device 10, the spiking neural network is able to process data efficiently in this respect.
Moreover, the output time interval and the input time interval are set so that the output time interval of the first neuron model 100 and the input time interval of the second neuron model that receives input of spike signals from the first neuron model overlap.
As a result, data can be efficiently transmitted from the first neuron model 100 to the second neuron model 100 by spike signals, and the first neuron model 100 and the second neuron model 100 can perform processing in a pipeline processing-like manner.
According to the neural network device 10, the spiking neural network is able to process data efficiently in this respect.
Also, the index value calculation unit 110 changes the membrane potential over time based on the signal input status in the input time interval. The signal output unit 130 outputs a spike signal within the output time interval after the end of the input time interval, based on the membrane potential. The learning device 50 performs learning of a weight coefficient for spike signals.
As a result, it is possible to adjust the weight coefficient through learning, and improve the accuracy of estimation performed by the neural network device 10.
With this configuration, the neuron model 611 is formed to be able to transmit spikes by firing within a certain time interval. In the neural network device 610, input time intervals for receiving spikes and output time intervals in which spike transmission is permitted are divided, in association with firing of the neuron model 611.
For example, the index value calculation unit 612 changes the index value of a signal output, based on the signal input status within the input time interval. The signal output unit 613 outputs a signal within the output time interval after the end of the input time interval by firing based on the index value.
The index value calculation unit 612 corresponds to an example of the index value calculation means. The signal output unit 613 corresponds to an example of the signal output means.
In this way, by setting the input time interval in which the neuron model 611 receives input of signals and the output time interval in which the neuron model 611 outputs spike signals and by firing within the output time interval, it is possible to restrict the time during which the index value calculation unit 612 calculates the index value to the time from the start of the input time interval to the end of the output time interval. At other times, the neuron model 611 may perform processing on other data.
According to the neural network device 610, the spiking neural network is able to process data efficiently in this respect.
Note that as long as signal input and signal output do not interfere with each other in the layer, the input time interval and the output time interval may be defined to overlap therein. For example, the output layer 23 described above is an example of a layer in which signal input and signal output do not interfere with each other. The neuron model 611 applied to such an output layer 23 may have an input/output time interval set in which receiving and transmitting signals are permitted in association with firing. An input/output time interval in which receiving and transmitting signals are permitted may be set instead of the input time interval in which signal output is restricted.
With such a configuration, input time intervals for receiving signals and output time intervals in which signal transmission is permitted are divided, in association with firing of the neuron model 620. The index value calculation unit 621 changes the index value of a signal output, based on the signal input status within the input time interval. The signal output unit 622 outputs a signal within the output time interval after the end of the input time interval by firing based on the index value.
The index value calculation unit 621 corresponds to an example of the index value calculation means. The signal output unit 622 corresponds to an example of the signal output means.
In this way, by setting the input time interval in which the neuron model device 620 receives input of signals and the output time interval in which the neuron model device 620 outputs spike signals, it is possible to restrict the time during which the index value calculation unit 621 calculates the index value to the time from the start of the input time interval to the end of the output time interval. At other times, the neuron model device 620 may perform processing on other data.
According to the neuron model device 620, the spiking neural network is able to process data efficiently in this respect.
With the configuration shown in
With such a configuration, in the neural network system 630, input time intervals for receiving signals and output time intervals in which signal transmission is permitted are divided, in association with firing of the neuron model device 632. The index value calculation unit 633 changes the index value of a signal output, based on the signal input status within the input time interval. The signal output unit 634 outputs a signal within the output time interval after the end of the input time interval, based on the index value. The learning unit 635 performs learning of a weight coefficient for signals input to the neuron model 632.
The index value calculation unit 633 corresponds to an example of the index value calculation means. The signal output unit 634 corresponds to an example of the signal output means. The learning unit 635 corresponds to an example of the learning means. Performs number learning.
In the neural network system 630, it is thereby possible to adjust the weight coefficient through learning, and improve the accuracy of estimation performed by the neural network main body 631.
In the step of identifying time interval division (Step S610), input time intervals in which spikes are received and output time intervals in which spikes are allowed to be transmitted are identified. For example, identifying time interval division may include setting a flag according to the identification result. In the step of calculating an index value (Step S611), if the identification result indicates an input time interval, signal input is permitted, and the index value of signal output is changed based on the signal input status in the input time interval. For example, a transition from an input time interval to an output time interval is detected based on the identification result, and the step of outputting a signal (Step S612) is performed in response to this detection. In the step of outputting a signal (Step S612), depending on the identification result (value of the flag), a signal is output within the output time interval after the end of the input time interval by firing based on the index value.
In the computing method shown in
According to the computing method shown in
In the configuration shown in
Any one or more of the neural network device 10, the learning device 50, the neural network device 610, the neuron model device 620, and the neural network system 630 described above, or a portion thereof, may be implemented in the computer 700. In such a case, operations of the respective processing units described above are stored in the auxiliary storage device 730 in the form of a program. The CPU 710 reads out the program from the auxiliary storage device 730, loads it on the primary storage device 720, and executes the processing described above according to the program. Moreover, the CPU 710 reserves, according to the program, storage regions corresponding to the respective storage units mentioned above, in the primary storage device 720. Communication between each device and other devices is executed by the interface 740 having a communication function and communicating under the control of the CPU 710.
In the case where the neural network device 10 is implemented in the computer 700, operations of the neural network device 10 and each component thereof are stored in the form of a program in the auxiliary storage device 730. The CPU 710 reads out the program from the auxiliary storage device 730, loads it on the primary storage device 720, and executes the processes described above, according to the program.
Also, the CPU 710 reserves a storage region in the primary storage device 720 for the processing to be performed by the neural network device 10 according to the program. Communication with another device performed by the neural network device 10 is executed by the interface 740 having a communication function and operating under the control of the CPU 710. Interaction between the neural network device 10 and a user is executed by the interface 740 having a display device and an input device, displaying various images under control of the CPU 710, and receiving user operations.
In the case where the learning device 50 is implemented in the computer 700, operations of the learning device 50 are stored in the auxiliary storage device 730 in the form of a program. The CPU 710 reads out the program from the auxiliary storage device 730, loads it on the primary storage device 720, and executes the processes described above, according to the program.
Also, the CPU 710 reserves a storage region in the primary storage device 720 for the processing to be performed by the learning device 50, according to the program. Communication with another device performed by the learning device 50 is executed by the interface 740 having a communication function and operating under the control of the CPU 710. Interaction between the learning device 50 and a user is executed by the interface 740 having a display device and an input device, displaying various images under control of the CPU 710, and receiving user operations.
In the case where the neural network device 610 is implemented in the computer 700, operations of the neural network device 610 and each component thereof are stored in the form of a program in the auxiliary storage device 730. The CPU 710 reads out the program from the auxiliary storage device 730, loads it on the primary storage device 720, and executes the processes described above, according to the program.
Also, the CPU 710 reserves a storage region in the primary storage device 720 for the processing to be performed by the neural network device 610 according to the program. Communication with another device performed by the neural network device 610 is executed by the interface 740 having a communication function and operating under the control of the CPU 710. Interaction between the neural network device 610 and a user is executed by the interface 740 having a display device and an input device, displaying various images under control of the CPU 710, and receiving user operations.
In the case where the neuron model device 620 is implemented in the computer 700, operations of the neuron model device 620 and each unit thereof are stored in the auxiliary storage device 730 in a form of program. The CPU 710 reads out the program from the auxiliary storage device 730, loads it on the primary storage device 720, and executes the processes described above, according to the program.
Also, the CPU 710 reserves a storage region in the primary storage device 720 for the processing to be performed by the neuron model device 620, according to the program. Communication with another device performed by the neuron model device 620 is executed by the interface 740 having a communication function and operating under the control of the CPU 710. Interaction between the neuron model device 620 and a user is executed by the interface 740 having a display device and an input device, displaying various images under control of the CPU 710, and receiving user operations.
In the case where the neural network system 630 is implemented in the computer 700, operations of the neural network system 630 and each component thereof are stored in the form of a program in the auxiliary storage device 730. The CPU 710 reads out the program from the auxiliary storage device 730, loads it on the primary storage device 720, and executes the processes described above, according to the program.
Also, the CPU 710 reserves a storage region in the primary storage device 720 for the processing to be performed by the neural network system 630 according to the program. Communication with another device performed by the neural network system 630 is executed by the interface 740 having a communication function and operating under the control of the CPU 710. Interaction between the neural network system 630 and a user is executed by the interface 740 having a display device and an input device, displaying various images under control of the CPU 710, and receiving user operations.
It should be noted that a program for executing some or all of the processes performed by the neural network device 10, the learning device 50, the neural network device 610, the neuron model device 620, and the neural network system 630 may be recorded on a computer-readable recording medium, and the program recorded on the recording medium may be read into and executed on a computer system, to thereby perform the processing of each unit. The “computer system” referred to here includes an operating system and hardware such as peripheral devices.
Moreover, the “computer-readable recording medium” referred to here refers to a portable medium such as a flexible disk, a magnetic optical disk, a ROM (Read Only Memory), and a CD-ROM (Compact Disc Read Only Memory), or a storage device such as a hard disk built in a computer system. The above program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.
The example embodiments of the present invention have been described in detail with reference to the drawings. However, the specific configuration of the invention is not limited to the example embodiments, and may include designs and so forth that do not depart from the scope of the present invention.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2021/029277 | 8/6/2021 | WO |