hardware optimization and serial implementation of a novel spiking neuron model for the poetic...

8
BioSystems 76 (2004) 201–208 Hardware optimization and serial implementation of a novel spiking neuron model for the POEtic tissue Oriol Torres a,, Jan Eriksson b , Juan Manuel Moreno a , Alessandro Villa b,c a Technical University of Catalunya, Campus Nord, Edifici C4, c/Jordi Girona 1-3, 08034 Barcelona, Spain b Laboratory of Neuroheuristics, University of Lausanne, 7 Rue du Bugnon, CH-1005 Lausanne, Switzerland c Lab. Neurobiophysique, Université Joseph Fourier, Inserm U318, CHUG Michallon, BP217, F-38043 Grenoble Cedex 9, France Received 28 February 2003; received in revised form 11 July 2003; accepted 1 August 2003 Abstract In this paper we describe the hardware implementation of a spiking neuron model, which uses a spike time dependent plasticity (STDP) rule that allows synaptic changes by discrete time steps. For this purpose an integrate-and-fire neuron is used with recurrent local connections. The connectivity of this model has been set to 24 neighbours, so there is a high degree of parallelism. After obtaining good results with the hardware implementation of the model, we proceed to simplify this hardware description, trying to keep the same behaviour. Some experiments using dynamic grading patterns have been used in order to test the learning capabilities of the model. Finally, the serial implementation has been realized. © 2004 Elsevier Ireland Ltd. All rights reserved. Keywords: Spiking neuron; STDP; Hardware; Serial implementation 1. Introduction Artificial neurons have been modelled in the last years trying to characterise the most important fea- tures of real neurons and to achieve further aspects of computation like parallelism and learning. In this way, biologically inspired neuron models, so-called neuromimes, have become an important path to fol- low up, due to their big potential in developing timing features of neural computation (Abeles, 1991). A commonly used model for neuromimetic studies is the Integrate-and-Fire model, which incorporates the integration of the input signals, until it overcomes a certain threshold and then the neuron fires (Gerstner, Corresponding author. E-mail addresses: [email protected] (O. Torres), [email protected] (J. Eriksson), [email protected] (J.M. Moreno), [email protected], [email protected] (A. Villa). 2001; Hill and Villa, 1997). In this model, we use a spike time dependent plasticity (STDP) rule, which allows to change the weight of the synapses depending on the time between spikes (Fusi, 2001; Bi and Poo, 1998). In Section 2, we shall present in detail the Integrate-and-Fire model we use in our work consid- ering both timing features and its novel learning rule. In Section 3, its basic hardware implementation is de- veloped, but due to its high complexity, in Section 4 its optimisation is analysed. In Section 5, the se- rial implementation is explained. Finally, Section 6 summarizes the conclusion and our future work. 2. Neuron model This model consists basically in an Integrate-and- Fire scheme, in which synapses can change their weights depending on the time difference between 0303-2647/$ – see front matter © 2004 Elsevier Ireland Ltd. All rights reserved. doi:10.1016/j.biosystems.2004.05.012

Upload: oriol-torres

Post on 26-Jun-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Hardware optimization and serial implementation of a novel spiking neuron model for the POEtic tissue

BioSystems 76 (2004) 201–208

Hardware optimization and serial implementation of a novelspiking neuron model for the POEtic tissue

Oriol Torresa,∗, Jan Erikssonb, Juan Manuel Morenoa, Alessandro Villab,c

a Technical University of Catalunya, Campus Nord, Edifici C4, c/Jordi Girona 1-3, 08034 Barcelona, Spainb Laboratory of Neuroheuristics, University of Lausanne, 7 Rue du Bugnon, CH-1005 Lausanne, Switzerland

c Lab. Neurobiophysique, Université Joseph Fourier, Inserm U318, CHUG Michallon, BP217, F-38043 Grenoble Cedex 9, France

Received 28 February 2003; received in revised form 11 July 2003; accepted 1 August 2003

Abstract

In this paper we describe the hardware implementation of a spiking neuron model, which uses a spike time dependentplasticity (STDP) rule that allows synaptic changes by discrete time steps. For this purpose an integrate-and-fire neuron is usedwith recurrent local connections. The connectivity of this model has been set to 24 neighbours, so there is a high degree ofparallelism. After obtaining good results with the hardware implementation of the model, we proceed to simplify this hardwaredescription, trying to keep the same behaviour. Some experiments using dynamic grading patterns have been used in order totest the learning capabilities of the model. Finally, the serial implementation has been realized.© 2004 Elsevier Ireland Ltd. All rights reserved.

Keywords: Spiking neuron; STDP; Hardware; Serial implementation

1. Introduction

Artificial neurons have been modelled in the lastyears trying to characterise the most important fea-tures of real neurons and to achieve further aspectsof computation like parallelism and learning. In thisway, biologically inspired neuron models, so-calledneuromimes, have become an important path to fol-low up, due to their big potential in developing timingfeatures of neural computation (Abeles, 1991).

A commonly used model for neuromimetic studiesis the Integrate-and-Fire model, which incorporatesthe integration of the input signals, until it overcomesa certain threshold and then the neuron fires (Gerstner,

∗ Corresponding author.E-mail addresses: [email protected] (O. Torres),

[email protected] (J. Eriksson), [email protected](J.M. Moreno), [email protected],[email protected] (A. Villa).

2001; Hill and Villa, 1997). In this model, we use aspike time dependent plasticity (STDP) rule, whichallows to change the weight of the synapses dependingon the time between spikes (Fusi, 2001; Bi and Poo,1998).

In Section 2, we shall present in detail theIntegrate-and-Fire model we use in our work consid-ering both timing features and its novel learning rule.In Section 3, its basic hardware implementation is de-veloped, but due to its high complexity, inSection 4its optimisation is analysed. InSection 5, the se-rial implementation is explained. Finally,Section 6summarizes the conclusion and our future work.

2. Neuron model

This model consists basically in an Integrate-and-Fire scheme, in which synapses can change theirweights depending on the time difference between

0303-2647/$ – see front matter © 2004 Elsevier Ireland Ltd. All rights reserved.doi:10.1016/j.biosystems.2004.05.012

Page 2: Hardware optimization and serial implementation of a novel spiking neuron model for the POEtic tissue

202 O. Torres et al. / BioSystems 76 (2004) 201–208

spikes. This model has been developed within theframework of the POEtic project (Eriksson et al.,2003). The outputs of the synapses are added untiltheir resultVi(t) overcomes a certain thresholdθ. Thena spike is produced, and the membrane value is reset.

The simplified equation of the membrane value is:

Vi(t + 1) ={

0, whenSi(t) = 1

kmem × Vi(t) + ∑Jij(t), whenSi(t) = 0

(1)

wherekmem = exp(−�t/τmem), Vi(t) is the value ofthe membrane,Jij is the output of each synapse andSi(t) is the variable which represents when there is aspike.

2.1. Synapse model

The goal of the synapse is to convert the spikesreceived from another neurons in proper inputs forthe soma. When there is a spike in the pre-synapticneuron, the actual value of the outputJij is added tothe weight of the synapse multiplied by its activationvariable. But if there is no pre-synaptic spike then theoutputJij is decremented by the factorksyn. The outputJ of the synapsei–j is ruled by:

Jij(t + 1) ={

Jij(t) + (WRiRj× ARiRj

(t)), whenSj(t) = 1

ksyn × Jij(t), whenSi(t) = 0

(2)

where j is the projecting neuron andi is the actualneuron. R is the type of the neuron: excitatory or in-hibitory, A is the activation variable which controlsthe strength of the synapse, andksyn is the kinetic re-duction factor of the synapse. If the actual neuron isinhibitory, this synaptic kinetic factor will reset theoutput of the synapse after a time step, but if the ac-tual neuron is excitatory, it will depend on the pro-jecting neuron. If the projecting neuron is excitatorythe synaptic time constant will be higher than if it isinhibitory. The weight of each synapse also dependson the type of neuron it connects. If the synapse con-nects two inhibitory neurons, the weight will alwaysbe null, so an inhibitory cell can not influence anotherinhibitory cell. If a synapse is connecting two excita-tory neurons, it is assigned a small weight value. Thisvalue is higher for synapses connecting an excitatory

neuron to an inhibitory one, and it takes its maximumvalue when an inhibitory synapse is connected to anexcitatory cell.

2.2. Learning model

In order to strengthen or weaken the excitatory–excitatory synapses, the variableA will change de-pending on an internal variable calledLij which isruled by:

Lij(t + 1) = kact × Lij(t) + (YDj(t) × Si(t))

− (YDi(t) × Sj(t)) (3)

wherekact is the kinetic activity factor, which is thesame for all the synapses.

YD is the learning variable that measures, with itsdecayment, the time separation between a pre-synapticspike and a post-synaptic spike. When there is a spike,YD will have its maximum value in the next time step,but when there is not, its value will be decrementedby the kinetic factorklearn, which is the same for allsynapses When a pre-synaptic spike occurs just beforea post-synaptic spike, then the variableLij increasesand the synapse strengthens. This means it reinforcesthe effect of a pre-synaptic spike in the soma. But whena pre-synaptic spike occurs just after a post-synapticspike, the variableLij decreases, the synapse weakensand the effect of a pre-synaptic spike in the soma willdescend.

3. Hardware implementation

This section describes the digital hardware imple-mentation of these models.

3.1. Neuron block

First of all, when the input spikes,s, are receivedfrom another neurons, they are processed through ablock that comprises two sub-blocks (synapse andlearning), which are explained in Sections 3.2–3.3.

These inputs are added or subtracted, dependingon the nature, calledr, of the previous neuron (i.e.excitatory or inhibitory), to the decayed value of themembrane. When the registered membrane value,Vi, overcomes a certain threshold,Vth, a spike,Si, is

Page 3: Hardware optimization and serial implementation of a novel spiking neuron model for the POEtic tissue

O. Torres et al. / BioSystems 76 (2004) 201–208 203

Fig. 1. Neuron block diagram.

produced. This spike will be delayed in the final partwith a chain of registers which model the refractorytime, trefr. When finally the spike goes out from theneuron, it produces a reset, rst, in the register whichstores the value of the membrane. The block diagramof the neuron block is represented inFig. 1. The mem-brane path has a resolution of 12 bits, with a range[−2048, 2047], and the threshold,Vth, is kept fixedto +640. The membrane decay function has a timeconstant value ofτ = 20. The refractory time is setto 1. The decayment block is modelled following theimplementation presented in (Eriksson et al., 2003).This block depends on two output parameters and theMSB of the input, which establish the exponentialdecay required at the output.

3.2. Learning block

The learning block provides the actual value of theactivation variable by measuring the time differencebetween spikes in the synapses between excitatoryneurons.

When a spike is produced in the neuronj, the vari-able YDj loads its maximum value and starts to decay.Then, if the actual neuron spikes, the value of YDj isadded to the decayed value of theL variable. On theother hand, if a spike is produced first in neuroni andthen in neuronj, the value of YDi is subtracted to thedecayed value of theL variable. When theL variableovercomes a certain threshold,Lth, positive or nega-tive, the activation variable,A, increases or decreasesrespectively, unless it is already at its maximum orminimum value. IfA is increased,L is reset to thevalueL − 2 × Lth, but if it is decreased, thenL is re-set toL + 2 × Lth. The diagram block of the learningblock is represented inFig. 2. The YD variable has aresolution of 6 bits and the learning variable of 8 bits.The activation variable can have four values (0, 1, 2,3). The time constant for the variable YD isτ = 20.

The thresholds for the variableL are Lth = [−128,127] The time constant forL is 4000.

3.3. Synapse block

The goal of the synapse block is to set the valueof J (the input value added to the membrane). Foreach synapse a certain weight is set. This weight ismultiplied by the activation variable. For this purpose,a shift register is used, so whenA = 0, the weightbecomes 0, whenA = 1 the weight does not change,whenA = 2 the weight is multiplied by 2 and whenA = 3 it is multiplied by 4.

This output weight is added to the decayed value ofthe outputJ. Its decay curve depends on the type ofthe actual and the projecting neurons,ri and rj. Thediagram block for the synapse block is represented inFig. 3.

The internal resolution of the block is 10 bits, butthe output resolution is 8 bits, since the internal valueof J is divided by 4 to keep the correct scaling.

The weights for an excitatory–excitatory synapseare in the range [0, 32], for an excitatory–inhibitory[256, 512], for inhibitory–excitatory [512, 1024] andfor inhibitory–inhibitory are null. The time constantτ

Fig. 2. Learning block.

Fig. 3. Synapse block.

Page 4: Hardware optimization and serial implementation of a novel spiking neuron model for the POEtic tissue

204 O. Torres et al. / BioSystems 76 (2004) 201–208

Fig. 4. Input signal applied to the neural network. The arrow tothe right means forward sense and the arrow to the left meansreverse sense.

is 20 for an excitatory–excitatory synapse, and 3 for aninhibitory–excitatory synapse. For the other two typesof synapse,τ = 0.

3.4. Neural network implementation

To test this learning strategy and the neuron struc-ture, a neural network of size 15× 15 has been usedwith a connectivity pattern of 24 neurons, so everycell receives spikes from a neighborhood of 5× 5.

The 20% of cells are inhibitory, and they have arandom distribution in the network. The weight,w, andthe initial activation variables,A, are chosen randomly.

3.4.1. StimuliA dynamic gradient stimuli has been applied to the

neural network. As it is represented inFig. 4, a se-quence of vertical bars of gradient value move throughthe columns of the neuron array, incrementing their

Fig. 5. Local activity in column 1: (a) when test stimuli is applied in forward sense; (b) when test stimuli is applied in reverse sense.

frequency, in forward sense during the training, andin forward and reverse sense during the test.

The input applied to each neuron has the followingparameters:

TCLK 20 ns; maximum amplitude:127Training period 20�s; forward senseTest period 10�s; forward and reverse sense

Gaussian noise is applied to all neurons during allthe time (mean 0, S.D.= 48).

3.4.2. Simulation resultsThe activity calculated over a “strip” of neurons

perpendicular to the direction of the movement rep-resents a measure of “local” activity. In this case, thestrip is one-column wide. InFig. 5 the “local” activ-ity is measured by the count of spikes produced as afunction of the time steps. We can observe how in theforward sense there exists an activation pattern with atemporal correlation, but in reverse sense the networkoutput has not this temporal correlation.

This result demonstrates that the selected structureof our neural network is able to perform an implicitrecognition of dynamic features based on simpleSTDP rules.

4. Hardware simplification

Once a correct behaviour has been observed forthe network, the next step consists in trying to

Page 5: Hardware optimization and serial implementation of a novel spiking neuron model for the POEtic tissue

O. Torres et al. / BioSystems 76 (2004) 201–208 205

Fig. 6. Simplification of the decayment block.

optimize the resolution used to represent its internalparameters. This analysis will try to facilitate thehardware implementation of the model. In a first trial,the resolution of the parameters has been reducedin 2 bits Therefore, the new membrane resolution is10 bits and the threshold is set to+160. The resolu-tion of the output of the synapse,J, is 6 bits and theweights for an excitatory–excitatory synapse are inthe range [0, 32], for an excitatory–inhibitory [256,512], for inhibitory–excitatory [512, 1024] and forinhibitory–inhibitory are null. And the resolution forthe YD variable is 4 bits and for theL variable is 6bits in the learning block implementation. The timeconstants keep being the same.

The decayment block has been modified to behavejust as the algorithm explained in (Eriksson et al.,2003) but removing the operations with external pa-rameters. This is because these parameters will be dif-ferent for each variable, but constant during all thestimuli period. The diagram block for its implemen-tation is presented inFig. 6.

The input signalx will be the input of a shift reg-ister, when theload signal becomes active. This shiftregister will divide the input by a fixed value (i.e. 8for theJ decayment), which depends on the input sig-nal. The output of the shift register will be the valueto be subtracted. The output of a counter will be com-pared to a maximum value. When they are equal, thecounter is reset and a register loads the output of thesubtraction. The output of this register will be the newvalue for the signalx. From a set of possible max-imum times (t1, . . . , tn), the value ofx will chooseone to establish when the subtraction has to be per-formed. The synapse block will only be used whenthe actual neuron is excitatory (i.e.r = 0). The outputof an inhibitory–inhibitory synapse is always null. Aswell as in an excitatory–inhibitory synapse, the val-ues of w and A are constant. Therefore since thereis no memory in the synapse, the output will be wwhen there is a spike and 0 when there is not. For

the inhibitory–excitatory synapse, the decay constantis very low so it decreases very quickly. As conse-quence, the synapse block can be substituted by a shiftregister, which divides its value at each time step by2. In the YD decayment block, the value to subtractwill be equal to 1since the YD resolution has been re-duced to 4 bits. The decayment block of the spikingneuron can be simplified, since it is possible to avoidthe time control in the decayment of the membranevalue. It will always decrease, because it will receivealmost continuously a loaded input (i.e. noise).

4.1. Simulation results

The stimuli parameters have also been changed, butonly their values, not the signal neither the training andtest times. Now the maximum amplitude of the inputsignal will be 32 and the noise will keep its mean to 0,but its S.D. will be 12. The neighbourhood is still of 5× 5, and the 20% of neurons are also inhibitory. Theoutput of the same column is represented inFig. 7.The count of spikes produced in the same time step isrepresented as a function of the time steps.

Comparing these results with those of thenon-simplified implementation ofSection 3.4.2, wecan observe how the simulation in forward sensekeeps the activity pattern with a temporal correla-tion, but in reverse sense the activity has increased,although it has not the temporal correlation observedin forward sense, so there is still learning.

5. Serial implementation

One of the main problems for the hardware imple-mentation is the space occupied by the synapse andlearning blocks, because their space should be multi-plied by 24 for each neuron. But if the synapse andlearning block can be re-used, it will reduce consider-ably the whole space used for a neural network.

In this section we re-describe the blocks of the neu-ron, synapse and learning part, for this serial use.

5.1. Serial neuron block

First of all, the period to update the membrane valuehas to be defined depending on two factors. The firstone is the maximum value of the minimum times re-

Page 6: Hardware optimization and serial implementation of a novel spiking neuron model for the POEtic tissue

206 O. Torres et al. / BioSystems 76 (2004) 201–208

Fig. 7. Local activity in column 1 in a simplified implementation: (a) when test stimuli is applied in forward sense; (b) when test stimuliis applied in reverse sense.

quired to process information in each block. This timewill be considered as a cycle. The second term, con-cerns how many cycles will be needed to add all theoutputs of the synapses and transmit the signal to thenext neurons.

The slowest component is the learning block, sinceit needs 6 time steps to end its operations. To processall the neuron information 25 cycles will be necessary,24 to add all the synapses outputs and one for trans-mission. The block diagram for the neuron block isrepresented inFig. 8.

Fig. 8. Block diagram for the serial implementation of the neuron model.

The signal which controls the time in each cyclewill be tm and the signal that controls the cycles willbens. Therefore, whenns = 0 andtm = 0, the neuronstarts the process. At this time, if a spike from anotherneuron is received, it will be registered. In the samefirst cycle and in the next time steps, the YD variablewill be registered.

When a spike is produced in the actual neuron,si,YDj is loaded in a register, and when there is a presy-naptic spike,sj, the YDi variable is registered. Theoutputs of these two registers will be subtracted, and

Page 7: Hardware optimization and serial implementation of a novel spiking neuron model for the POEtic tissue

O. Torres et al. / BioSystems 76 (2004) 201–208 207

the result will be one of the inputs of the learningblock. The registered values of the learning variable,L,the time control forL, tL, and the activation variable,A, registered in reg-L, reg-tL and reg-A respectively,will also be inputs of the learning block. At the endof the cycle, the registers reg-L, reg-tL and reg-A areupdated with their new values.

In the same cycle, reg-A and reg-w, where theweights for each synapse are kept, will be the in-puts of the synapse block. The value of reg-A willnot be updated yet with a new value coming fromthe learning block, because theA value is read atthe beginning of the cycle. The learning block willwrite the new value ofA at the end of the cycle. Theoutput of the synapseJ and its time control signaltJ , will also be inputs of the synapse block, takingtheir values from the registers reg-J and reg-tJ. Thesetwo registers will be updated at the end of the cy-cle with the new values coming from the synapseblock.

In the first cycle, only the old value of the mem-brane,Vi, is registered and added. Since the secondcycle onwards, the outputs of the synapses,J, are be-ing added to the value of the previous addition whichis registered. At the end of the last cycle, the value ofthe of the addition is registered, so there will be a newvalue of the membrane,Vi, and it will be comparedwith the thresholdVth. If Vi overcomesVth, a spike hasto be produced, therefore during the next 25 cycles theoutput of the comparator will be active and at the lastcycle, the register will give an active output, and thedecayment block will give its maximum value. Thisdelay giving the output is because of the refractarytime, which is set to 1. If there are not more spikes,the decayment block will keep giving values throughthe output line, whenns = 0, reducing its value every25 cycles.

5.2. Serial learning block

The learning block has not major changes fromthe parallel implementation as it can be observed inFig. 9. At the beginning of each cycle the values ofthe L, tL and A variables have to be loaded, and atthe end they have to be registered outside. Thereforethe paths should be bidirectional. There are not decay-ment blocks for the YD variables, because they arealready in the neuron model. The subtraction between

Fig. 9. Block diagram for the serial implementation of the learningmodel.

Fig. 10. Block diagram for the serial implementation of the synapsemodel.

YDi and YDj, if any, YDj × si − YDi × sj, will bean input to this block.

5.3. Serial synapse block

The synapse block has neither major changesin its structure. In this way, the block diagram forthe excitatory–excitatory synapse is represented inFig. 10.

At the beginning of the cycle, the value if J ischarged, and if a pre-synaptic spike is produced, itwill be added to the value of the weight shifted by theactivation variable, and if there is not, its decaymentwill continue.

6. Conclusions

We have described the digital hardware implemen-tation of a novel STDP rule applied to spiking neuronmodels and we have demonstrated that it can be usedto implement learning tasks in a neural network ofsize 15× 15. It is still possible to obtain good resultswith a simplified hardware description of the model,although we are on the edge of having a learning be-haviour in a network of this size The good results ofthe serial implementation are also important to allowa physical implementation of a hardware prototype, inorder to test the model using real world applications.

Page 8: Hardware optimization and serial implementation of a novel spiking neuron model for the POEtic tissue

208 O. Torres et al. / BioSystems 76 (2004) 201–208

Acknowledgements

This project is funded by the grant IST-2000-28027(POEtic) of the European Community and by grantOFES 00.0529-2 of the Swiss government. The infor-mation provided is the sole responsibility of the au-thors and does not reflect the Community’s opinion.The Community is not responsible for any use thatmight be made of data appearing in this publication.

References

Abeles, M., 1991. Corticonics: Neural Circuits of the CerebralCortex. Cambridge University Press.

Bi, G.Q., Poo, M.M., 1998. Synaptic modifications in culturedhippocampal neurons: dependence on spike timing. J. Neurosci.18, 10464–10472.

Eriksson, J., Torres, O., Mitchell, A., Tucker, G., Lindsay, K.,Halliday, D., Rosenberg, J., Moreno, J.M., Villa, A.E.P.,2003. Spiking neural networks for reconfigurable POEtictissue. In: Tyrrell, A.M., Haddow, P.C., Torresen, J. (Eds.),Evolvable Systems: From Biology to Hardware. Proceedingsof the Fifth International Conference on Evolvable Systems.Springer-Verlag, Berlin, pp. 165–173.

Fusi, S., 2001. Long term memory: encoding and storing strategiesof the brain. Neurocomputing 38–40, 1223–1228.

Gerstner, W., 2001. Spiking neurons. In: Maass, W., Bishop, C.M.(Eds.), Pulsed Neural Networks. The MIT Press, pp. 3–53.

Hill, S.L., Villa, A.E.P., 1997. Dynamic transitions in globalnetwork activity influenced by the balance of excitation andinhibition. Network: Comput. Neural Syst. 8, 165–184.