• Aucun résultat trouvé

Abstract Neural Models

N/A
N/A
Protected

Academic year: 2022

Partager "Abstract Neural Models"

Copied!
16
0
0

Texte intégral

(1)

Spike Neural Models Part II:

Abstract Neural Models

Melissa G. Johnsona,

B

and Sylvain Chartiera

aUniversity of Ottawa

Abstract Neurons are complex cells that require a lot of time and resources to model completely.

In spiking neural networks (SNN) though, not all that complexity is required. Therefore simple, abstract models are often used. These models save time, use less computer resources, and are easier to understand. This tutorial presents two such models: Izhikevich’s model, which is biologically realistic in the resulting spike trains but not in the parameters, and the Leaky Integrate and Fire (LIF) model which is not biologically realistic but does quickly and easily integrate input to produce spikes. Izhikevich’s model is based on Hodgkin-Huxley’s model but simplified such that it uses only two differentiation equations and four parameters to produce various realistic spike patterns. LIF is based on a standard electrical circuit and contains one equation. Either of these two models, or any of the many other models in literature can be used in a SNN. Choosing a neural model is an important task that depends on the goal of the research and the resources available. Once a model is chosen, network decisions such as connectivity, delay, and sparseness, need to be made.

Understanding neural models and how they are incorporated into the network is the first step in creating a SNN.

Keywords Neural models, spiking neural networks, leaky integrate and fire, Izhikevich’s model.

B

mjohn140@uottawa.ca

MGJ:0000-0000-0000-0000;SC:0000-0000-000-0000 10.20982/tqmp.14.1.p001

Acting Editor De- nis Cousineau (Uni- versit´e d’Ottawa)

Introduction

This paper extends the first tutorial on neural models (Johnson & Chartier,2017) by describing models from the remaining two categories of spiking neural network nodes:

1) general representation neural model, and 2) generic threshold-fire neural model. Because both these categories are abstractions of a biologically-based model, one might ask why we would want abstract models: shouldn’t mod- els be as biologically accurate as possible? This is a le- gitimate question, especially considering projects like the Human Brain Project (http://www.humanbrainproject.eu/) which is trying to simulate the entire human brain in a su- per computer.

Pragmatic reasons for abstraction include: limited time, money, and computational resources, and lack of knowledge (Levy & Bechtel,2013, 2; Kaplan,2011). Time, money, and computational resources are all interrelated and need to be taken into consideration during the de-

sign phase. System type affects speed of simulations, but money affects the system type one can afford. Biologi- cal detail adds complexity which makes simulations take longer to run, regardless of the computer system. There- fore considerations of the budget, current equipment, and the time allotted for the simulation may make it necessary to sacrifice biological realism for abstraction. As for lack of knowledge, there are functions performed by neurons for which the mechanisms are not know; yet these func- tions are still modelled. For example, Hodgkin and Huxley did not know about ion channels when developing their model. The workings of these channels were abstracted into the differential equations used in the model. While ion channels are known now; other information, such as how glial cells influence learning and cognition is not (Fields et al., 2014); but their influence is still part of the function of the neuron model. While these pragmatic reasons are widely recognized reasons for abstractions, there are other reasons that make abstraction beneficial, and necessary, in

TheQuantitativeMethods forPsychology

2

1

(2)

modelling.

SNNs can look at specific biological and cognitive ques- tions such as how signals are transmitted or how learn- ing is possible, without incorporating every biological de- tail of neurons into the network. In fact, trying to cre- ate a completely biologically realistic SNN may be impos- sible because the complexity of the model would be too overwhelming to be understood and impossible to analysis (Chirimuuta,2014). When biological details are abstracted, the resulting models can also be generalized beyond just the one specific situation. The Hodgkin-Huxley model is fitted precisely to the giant squid neuron, but while that neuron has one specific firing pattern, different neurons have different patterns. Abstracting some of the precise fit- ting allows the Hodgkin-Huxley model to display these dif- ferent neuron firing patterns (Guckenheimer & Labouriau, 1993) such as the distinct class of pyramidal neurons that have a “chattering” pattern (Gray & McCormick,1996).

Neural models have been generalized into type I and type II models. Type I models are integrators; their out- put frequency is directly related to the input frequency.

For these models, the higher the frequency of input, the higher the frequency of output. Type II models are res- onators; they only fire once a certain frequency of input is reached. Both these categories can be generalized into spe- cific properties and mathematical equations, and are one of the best means of understanding the brain (Chirimuuta, 2014). This tutorial focuses specifically on type I models but for more information on type I and type II models see St-Hilaire and Longtin (2004) or Gerstner, Kistler, Naud, and Paninski (2014).

No matter the model used for simulating neurons, a good understanding of the model, its uses and short- comings, is necessary. In the first tutorial, the biolog- ically based Hodgkin-Huxley (HH) model was discussed.

In this tutorial, two other models are presented: Izhike- vich’s model and the Leaky Integrate and Fire (LIF) model.

Izhikevich’s model is part of the general representation cat- egory so while it does model biological behaviours, the pa- rameters have no biological basis. The LIF model is part of the generic threshold-fire category so it is not biologically realistic in any way except that it can integrate input and fire at some threshold. These two neural model sections are followed with a brief introduction to SNN and how the neural models fit into the network. All Matlab code used in this tutorial and the integration of the LIF model are pre- sented in the appendices.

Izhikevich’s Model

There is a lot of information in explicit models which may not be necessary for a given simulation. If accurate ac- tion potentials are necessary but how they are derived is not, a general representation model is more efficient and less complicated. General representation models preserve the functionality but lose the biological realism. One such model is Izhikevich’s model (Izhikevich,2003).

Izhikevich’s model is based on the bifurcation and nor- mal form reduction of the Hodgkin-Huxley model.1 The computation used to derive Izhikevich’s model is beyond the scope of this paper, but for more information on bifur- cation of the Hodgkins-Huxley model, see Guckenheimer and Labouriau (1993). A defining characteristic of Izhike- vich’s model is its ability to show the different firing dy- namics, such as chattering (described shortly), while still being a simple two-dimensional model. Izhikevich’s model contains two ordinary differential equations (Eq. 1 and 2) and an auxiliary equation (Eq. 3).

dv

dt = 0.04v2+ 5v+ 140−u+I (1) du

dt = a(bv−u) (2)

ifv ≥30mV, then

v←c

u←u+d (3) In these equations,vrepresents the membrane poten- tial andurepresents membrane recovery. These two vari- ables are intertwined so thatvis dependent onuto pro- duce a spike train but the value ofuis dependent on the value ofvto determine how fast the membrane recovers.

The values ofv anduare influenced by the parameters a,b, c, and dwhich describe respectively: the time scale of the recovery variable, the sensitivity of the recovery to subthreshold fluctuations of the membrane potential, the after-spike reset value of the membrane potential, and the after-spike reset of the recovery variable. The constants in equations 1, 2, and 3 (e.g. 0.04, 5, and 140 in Eq. 1) were obtained by fitting the equations to the spike initiation dy- namics of the cortical neuron (Izhikevich,2003).

The different firing patterns (see Figure1) are produce by the interplay between the parametersa,b,c, andd. Reg- ular spiking is the most common firing pattern and is de- fined as spiking at regular but increasingly distant inter- vals with constant input; this is the firing pattern displayed by the Hodgkin-Huxley model. Intrinsically bursting and chattering neurons are other types of excitatory neuron firing patterns while fast spiking and low-threshold spik- ing are patterns that cortical inhibitory interneurons pro-

1Bifurcation is the study of how the flow, or behaviour, changes in dynamic systems as parameters change. For example, howuin Equation 1 affects how the voltage produces spikes. There are whole books on this topic such as Kuznetsov (2013).

TheQuantitativeMethods forPsychology

2

2

(3)

Figure 1 Different types of spiking patterns based on varying the parametersa,b,c, andd. Input is set to 10 mV in all cases.

duce. The model can also duplicate the firing patterns of the thalamo-cortical neuron.

To understand how the model is able to produce the different firing patterns, one needs to understand the role of thev anduand how the parametersa, b, c, anddaf- fectvandu. The membrane potential and the parameterc are the easiest to understand. The membrane potential is simply the voltage across the membrane; when this value reaches a pre-determined threshold, a spike is said to oc- cur. The membrane potential is graphed in spike trains, as seen in Figure1. The parametercis the reset value, or the value the membrane potential returns to after a spike oc- curs. In the Hodgkin-Huxley model an explicit reset value was not needed because resetting the membrane potential after an action potential happens via ionic currents. In Izhikevich’s model there is no implicit reset mechanism.

The auxiliary equation (Eq. 3) explicitly resets the voltage after a spike occurs so that the membrane potential does not continue to increase. For example, in Figure1, imme- diately after a spike, Chattering resets to -50 mV while Fast Spiking resets to -65 mV, which are the values ofcfor those two spike patterns.

When the membrane potential increases, the recovery

parameter decreases (see Figure2). The recovery param- eter is important to make sure that there is a refractory period after a spike and to affect timing between action potentials. Parameterdplays a role in changing the possi- ble timing between spikes. After a spike, when the neuron needs that recovery period,uis increased again via Equa- tion 3. This increase inuis done by adding parameterd tou. The smaller the parameterd, the shorter the recov- ery time. Note thatdshould never be negative or it means that recovery reduces constantly, eventually making it au- tomatically increasev and the neuron will always spike.

This will be discussed more in the “Parameters” subsection of “Working with a Model”.

Parameters aandbboth affect how the recovery pa- rameter changes. The parameterais a multiplicative value for whatever the change is, allowing the recovery parame- ter to change faster or slower depending on its value. How the recovery changes is determined by the interaction be- tweenu,v, andb. Ifbv > u, then the change ofuwill be positive and whenbv < u, the change is negative. Assum- ingvanduare negative,uactually provides help in spiking – the larger the negative, the more it will increasevto po- tential spiking criteria. Therefore, a largebmeans a large

TheQuantitativeMethods forPsychology

2

3

(4)

Figure 2 Changes of membrane potential (v) and membrane recovery (u). Parameters are:a= 0.02,b= 0.2,c=−65, andd= 2with a constant input of 5 mV over 100 ms.

negative change to the recovery, recovery is quicker and spikes occur closer together (see Figure3). Note though, that this dynamic can change if voltage is not negative (see the subsection “Parameters” in the section “Working with a Model”). Overall, the larger the parametersaandbare, the quicker the model will be able to produce spikes again after firing.

Izhikevich’s model is a simple model capable of com- plex spike patterns. This makes it an excellent choice when the spike dynamics are important. It is also fairly easy to understand and fast to run in a simulation, but there is still complexity in parameter selection and understanding how the parameters work together.

Leaky Integrate and Fire

The simplest models are those from the third category of neural models: generic threshold models. Generic models don’t mimic biological neurons but display basic voltage change of the membrane potential as it builds to action po- tentials or reduces back to resting value. The LIF model be- longs to this category and is one of the most used models in the literature (Mihalas & Niebur,2009). The popularity of the LIF rests on the fact that the model is very simple and quick to use yet still shows membrane potential changes dependent on input and time. Because of its simplicity, LIF is also very easy to modify to get the exact functionality needed for the task (Gerstner & Naud,2009).

Despite its use, the LIF has many issues. For one, it is not actually a spiking model because it never spikes. In the model, a spike is assumed to occur once voltage reaches a certain value, the spike threshold. Some simulations explicitly display the spike via modifications to the code;

these spikes are manually built in for visual display pur- poses only and are not the product of the equation. The LIF Matlab code in Appendix B provides the option for dis- playing the spike or not depending on one’s preference (see Figure4for the different display options).

Another important neuron function that is missing in LIF is adaptation – the increasing interval between spikes seen in the regular spiking pattern. In the LIF model, if the input current is constant then spiking will occur at a constant interval (see Figure4).

The LIF model is based on the basic electric circuit which has a linear resistor (IR) and a capacitor (IC). This means that the input current is split into two components:

I(t) = IR(t) +IC(t) (4) wheretis time. Based on Ohm’s law,

IR(t) = v(t)

R (5)

wherev(t)is the voltage as a function of time as the volt- age travels across the resistor andRis the resistance from the resistor.

TheQuantitativeMethods forPsychology

2

4

(5)

Figure 3 Changes to recovery and membrane potential for different values ofb. The other parameters area=−0.02, c=−65,d= 8; the input current is 5 mV.

Iccan be rewritten based on the definition of a capacity IC(t) =Cdv(t)

dt (6)

where dv(t)

dt is the change in voltage with regard to time.

In terms of LIF,v(t)is the membrane potential, therefore

dv(t)

dt is the change in membrane potential over time. Cis a multiplicative value of the change to represent the capac- itance, or the effect of the capacitor.

Using Equations 5 and 6, Equation 4 can be written as:

RCdv(t)

dt =RI(t)−v(t) (7) BothRandCare constants and together,RC, is the mem- brane time constant,τ up.

τdv(t)

dt =RI(t)−v(t) (8) In the previous neural models, the differential equa- tions were too difficult to integrate so the Matlab code in the appendices uses Euler’s method (see Johnson &

Chartier, 2017, for information on Euler’s method), but the LIF is a single ordinary derivative equation (ODE) and therefore can be integrated to yield a precise result (see Appendix C). The integration of Equation 8 yields

v(t) =vreste

t−tf

τ +R

τ

t−tf

0

esτI(t−s)ds (9) wheretis the current time andtf is the time the model last reached threshold (or “fired”). There is an auxiliary equation to force the reset of the membrane potential after firing:

ifv ≥ϑ, thenv=vreset (10) wherevresetis a reset value. The reset value does not have to be the same as the resting value,vrest. For exam- ple, to show hyperpolarization after spike this reset value is lower than the resting potential.

In many cases, including the code used in this tutorial, the input,I(t), is not a continuous function but discrete time constants representing either “spiking” or “not spik- ing”. This difference allows for further integration of the equation via piecewise integration (see Appendix C). Using piecewise integration, the final equation actually requires the previous membrane potential and the time difference since then to calculate the new membrane difference. The final integration for a discrete time constant input is:

v(t) = vrest+ RI(t) + (vt−1−(vrest+RI(t)))e dtτ (11) Notice the inclusion of dt(the time step); this repre- sents the time difference between the last time the voltage was checked and the current time, and replaces the differ- ence between current time and last firing (t−tf). The final parameters in the LIF equation are the resting value, resis- tance and membrane time constant; which are normally set to 1, input; which is a function of time, and the time step used in the calculations. The auxiliary equation may also use the resting value instead of a reset value.

To overcome some of the missing features of neurons, there have been many modifications to the simple LIF. For example, there is the adaptive LIF which adjusts the fre- quency of firing so that spikes don’t occur at equal inter- vals but slowly increasing intervals (Liu & Wang,2001).

TheQuantitativeMethods forPsychology

2

5

(6)

Figure 4 LIF with and without spikes; there is no adaptation to the voltage, therefore spikes are equal distance apart.

Time set to 200 ms, input current 1.6 mV,R= 10,τ= 10, resting potential=reset=-65, threshold=-50

There are also many different integrate and fire models, such as the exponential model and the quadratic model;

these models use the same premise of integrating input un- til a threshold to fire (see Chapter 5 in Vogels, Rajan, &

Abbott,2005). These models can both spike and produce more realistic timing. There is a lot of room for modifica- tions, adaptations, and fitting in this category because of its simplicity.

Working with a Model

Three distinct models have been presented in two tutori- als: Hodgkin-Huxley in tutorial I, and now Izhikevich’s and LIF. When designing a simulation, the researcher needs to choose a model that is appropriate for the research but without unnecessary complexity that would limit under- standability, replicability, and resource availability. Mod- els must be carefully chosen at the onset of the network development. Models also have parameters that need to be optimized for the simulation; selecting parameters that are too big, too small, or incorrect, can lead to issues with your simulation. Finally, all the models discussed use differen- tial equations, therefore methods to solve these equations need to be considered before coding the simulation.

Choosing the Correct Model

The three models discussed in these two tutorials are just meant to give a general understanding of how models work; there are many different neuron models in the lit- erature. Choosing a model that is a good fit for the re- search requires understanding what the research is trying to show, understanding computational and time limits, and understanding the neural model.

The first thing to consider is what the research is trying

to determine. For example, if the point of the model is to see how neurochemicals affect size of the spike, a more bio- logical model is necessary. Modelling spike time dependent plasticity (STDP) just needs action potentials so a generic threshold and fire model will suffice. For more informa- tion on choosing a models see (Izhikevich,2004).

Computational resources and run time are also consid- erations that need to be addressed. The more complex the neuron, the more equations used, the more computational resources are needed and therefore the longer it will take to run the simulation. For example, as mentioned in Tuto- rial I, on my basic laptop, running the code for Hodgkin- Huxley, simulating 200 ms takes approximately 0.27 sec- onds (longer than the time being simulated), Izhikevich’s model takes approximately 0.004 seconds, and LIF takes approximately 0.0007 seconds. While that might appear to be quite fast, that is a single neuron for 200 ms; simulations can have hundreds of neurons and run for much longer pe- riods of time. The time needed to run the whole simulation can be a factor. Keeping the simulation simple is not only easier to program, but also means getting results quicker.

Parameters

Quick results are important, but accurate and useful re- sults are more important. The parameters selected for use in the equations can have a huge effect on the final results.

For example, in Izhikevich’s model, the values of the pa- rametersa,b,c, anddproduce drastically different spike patterns, and while Figure1shows some accurate results, not all possible results are useful. For example, what hap- pens if the parameterdis set as negative or the reset is set to 0? As seen in Figure5, both these cases produce the un- wanted result of perpetual spiking. This result is not useful

TheQuantitativeMethods forPsychology

2

6

(7)

Figure 5 Incorrectly selecting parameters in Izhikevich’s model. Parameters are:a = 0.02,b = 0.2,c =−65(left) or c= 0(right), andd=−1(left) ord= 2(right). Left has constant input of 5mV of input while right has no input.

and would make the simulation meaningless. Understand- ing what the model’s parameters mean and do will reduce the risk of producing inaccurate results.

Another important parameter that is often used in modelling but has not been explicitly discussed here is the time step,dt. Because of the difficulty in integrating Hodgkin-Huxley and Izhikevich’s models, some form of in- tegration estimation is required, which comes with its own parameter decisions. Frequently, Euler’s method is used (see Johnson & Chartier,2017), which, while having its lim- its is often sufficient compared to more precise, and com- plex, methods. In Euler’s method, the time step,dt, deter- mines how accurate the solution is. If the value fordtis too large, information is lost, but if the value ofdtis too small the simulation takes a long time to run. In Figure??, thedt parameter is modified to show how it affects Izhikevich’s model. Thedtparameter affects the∆vand∆uvariables such that the larger the change in time, the more informa- tion is lost in the parameter changes. This in turn affects the voltage and the recovery variables, how they change, and how the neuron model functions.

Even in simple models parameter selection is impor- tant to avoid unintended consequences culminating into bad results. For example, in LIF, if the spike threshold,ϑ, is too large, the model will never spike (see Figure7). These are just some of the problems that incorrect parameters can produce. All parameters need to be tested carefully before running the full simulation.

Spiking Neural Networks

Most research considers how neurons work together. To get results from groups of neurons, they need to be able to interact, which is where the network part of the neural network is important. While the network part of SNNs is beyond the scope of this paper, there are a few things to consider.

Neurons are connected to each other, but not necessar- ily every neuron to every neuron. In some cases, neurons may have low connectivity, or sparse connectivity, where the neuron is only connected to a few other neurons. In other cases, neurons may have high connectivity, or be densely connected, such that they are connected to many other neurons. A network can include both the dense and sparse conditions at the same time. When a network has both conditions, the neurons with high connectivity are of- ten considered “hubs” and are important for traversing the network in an efficient manner.

As with the neuron models, these connections are not physical but values and equations. For example, in Table 1, when the 6thpresynaptic neuron in the network (N61) spikes, it affects the postsynaptic neuronN32but no other neurons. Conversely, presynaptic neuronN31affects post- synaptic neuronsN22,N42, andN62.

Table 1 shows all excitatory connections, but in the brain there are both inhibitory and excitatory neurons:

is this going to be reflected in the network? Inhibitory and excitatory differences could be shown by using posi- tive and negative numbers in the connection matrix. Ta- ble1 also contains only zeros and ones, but not all con- nections are the same strength. N11might have a larger

TheQuantitativeMethods forPsychology

2

7

(8)

Figure 6 Regular spiking pattern for Izhikevich’s model with different time step selections: 0.1 (top left), 1.1 (top right), and 2.1 (bottom). Graphs show how voltage and recovery (top) and the change of their respective differential equation used in calculating voltage and recovery (bottom) depending on the time step used.

Table 1 Example table of possible connections between neurons. Presynpatic neurons fire, and their action potential affects postsynpatic neurons.

Postsynaptic Neurons Presynaptic

Neuron

N12 N22 N32 N42 N52 N62

N11 0 1 0 0 1 0

N21 1 0 1 0 1 0

N31 0 1 0 1 0 1

N41 0 0 1 0 1 1

N51 1 1 0 1 0 0

N61 0 0 1 0 0 0

effect onN22 than onN52. How are these strengths go- ing to be taken into consideration and represented? Are the strengths between neurons changing over time, and if so, how? Changes in network connections are often done following Hebb’s rule which is paraphrased as “what fires together wires together” (Markram, Gerstner, & Sj¨ostr¨om, 2011). This means that if N11 fires than N22 fires their connection strength should increase. How neural connec- tion strength increases (or decreases) is often a logarithmic function with its own rules and equations. As mentioned in tutorial 1, these tutorials are only looking at point neu- rons; but there are other more complex features that could be modelled to produce interesting behaviours. One such feature is axon length which can produce time differences, or delays, between when the presynaptic neuron fires and when the postsynaptic neuron receives the action poten- tial (Maass,1996). Because neurons have different axon length, it is possible that a presynaptic neuron that fires slightly after another neuron reaches the postsynaptic be- forehand; or that a presynaptic neuron that fires before the postsynaptic fires reaches the postsynaptic neuron af-

terwards.

All the models covered here are spiking models, but what does the spike mean? Height and frequency may be important for coding information in the brain, along with spike pattern, but how that coding is achieved is still under debate in the neuroscience community (Ainsworth et al., 2012). There are two overall coding methods: rate coding which includes spike-count rate and time-dependent rate, and temporal coding which includes not only the rate as- pect but the time aspect of coding (see Brette,2015; Borst &

Theunissen,1999, for more information).

Considering all the above issues, SNNs models can become overwhelming and complex very quickly. With all the computations needed because of the nodes, the connections between nodes, and changing of connection strengths, simulations can take a long time to run. Picking an appropriate model of a neuron is an important step in developing the network.

TheQuantitativeMethods forPsychology

2

8

(9)

Figure 7 LIF with spike threshold of -45 mV, resting & reset at -65 mV, and a constant input of 1.6 mV will never spike.

Conclusion

The first tutorial covered how neural models are classified, how biological neurons work, and the Hodgkin-Huxley model. This tutorial reviews why neural models are often abstraction of biological models, Izhikevich’s model, LIF model, parameter selection, and the basics of how neural networks are assembled. There is still a lot of work to do in spiking neuron models and related networks, but having a basic understanding of the neuron and how to model them is the first step in creating networks.

Authors’ note

Correspondence concerning this article should be ad- dressed to Melissa G. Johnson, School of Psychology, Uni- versity of Ottawa, 75 Laurier Ave E, Ottawa ON, Canada, K1N 6N5. This research was supported in part by Natu- ral Sciences and Engineering Research Council (NSERC) of Canada grants to S. Chartier.

References

Ainsworth, M., Lee, S., Cunningham, M. O., Traub, R. D., Kopell, N. J., & Whittington, M. A. (2012). Rates and rhythms: a synergistic view of frequency and tempo- ral coding in neuronal networks.Neuron,75, 572–583.

doi:10.1016/j.neuron.2012.08.004

Borst, A. & Theunissen, F. E. (1999). Information theory and neural coding.Nature Neuroscience,2(11), 947–

957. doi:10.1038/14731

Brette, R. (2015). Philosophy of the spike: rate-based vs.

spike-based theories of the brain.Frontiers in Systems Neuroscience,9, 151. doi:10.3389/fnsys.2015.00151 Chirimuuta, M. (2014). Minimal models and canonical neu-

ral computations: the distinctness of computational explanation in neuroscience. Synthese, 191(2), 127–

153. doi:10.1007/s11229-013-0369-y

Fields, R. D., Araque, A., Johansen-Berg, H., Lim, S.-s., Lynch, G., Nave, K.-A., & Wake, H. (2014). Glial biology in learning and cognition.The Neuroscientist, 20(5), 426–431. doi:10.1177/1073858413504465

Gerstner, W., Kistler, W. M., Naud, R., & Paninski, L. (2014).

Neuronal dynamics: from single neurons to networks and models of cognition. Cambridge: Cambridge Uni- versity Press.

Gerstner, W. & Naud, R. (2009). How good are neuron mod- els?Science,326(5951), 379–380. doi:10.1126/science.

1181936

Gray, C. M. & McCormick, D. A. (1996). Chattering cells: su- perficial pyramidal neurons contributing to the gen- eration of synchronous oscillations in the visual cor- tex.Science,274(5284), 109–113. doi:10.1126/science.

274.5284.109

Guckenheimer, J. & Labouriau, J. S. (1993). Bifurcation of the hodgkin and huxley equations: a new twist.Bul- letin of Mathematical Biology,55(5), 937–952. doi:10 . 1007/BF02460693

St-Hilaire, M. & Longtin, A. (2004). Comparison of coding capabilities of type i and type ii neurons.Journal of

TheQuantitativeMethods forPsychology

2

9

(10)

Computational Neuroscience, 16(3), 299–313. doi:10 . 1023/B:JCNS.0000025690.02886.93

Izhikevich, E. M. (2003). Simple model of spiking neurons.

Neural Networks, IEEE Transactions on,14(6), 1569–

1572. doi:10.1109/TNN.2003.820440

Izhikevich, E. M. (2004). Which model to use for cortical spiking neurons? IEEE Transactions on Neural Net- works,15(5), 1063–1070. doi:10.1109/tnn.2004.832719 Johnson, M. G. & Chartier, S. (2017). Spike neural mod- els part i: the hodgkin-huxley model.The Quantitative Methods for Psychology,13(2), 105–119. doi:10.20982/

tqmp.13.2.p105

Kaplan, D. M. (2011). Explanation and description in com- putational neuroscience. Synthese, 183(3), 339–373.

doi:10.1007/s11229-011-9970-0

Kuznetsov, Y. A. (2013). Elements of applied bifurcation theory Science & Business Media: Springer.

Levy, A. & Bechtel, W. (2013). Abstraction and the organi- zation of mechanisms.Philosophy of Science,80, 241–

261. doi:10.1086/670300

Liu, Y.-h. & Wang, X.-j. (2001). Spike-frequency adaptation of a generalized leaky integrate-and-fire model neu- ron.Journal of Computational Neuroscience,10(1), 25–

45. doi:10.1023/A:1008916026143

Maass, W. (1996). Lower bounds for the computational power of networks of spiking neurons.Neural Com- putation,8(1), 1–40.

Markram, H., Gerstner, W., & Sj¨ostr¨om, P. J. (2011). A his- tory of spike-timing-dependent plasticity.Frontiers in Synaptic Neuroscience,3, 4–4. doi:10.3389/fnsyn.2011.

00004

Mihalas, S. & Niebur, E. (2009). A generalized linear integrate-and-fire neural model produces diverse spiking behaviors. Neural Computation, 21(3), 704–

718. doi:10.1162/neco.2008.12-07-680

Vogels, T. P., Rajan, K., & Abbott, L. F. (2005). Neural net- work dynamics.Annual Review of Neuroscience,28(1), 357–376. doi:10 . 1146 / annurev . neuro . 28 . 061604 . 135637

Appendix A: Matlab code for Izhikevich Model

While it is generally recommended that one codes with functions and procedures, because of the simplicity of Izhikevich’s model, and to save space, time, and make it easier to follow, that was not done in the below code. Instead, the code can be written as follows in one Matlab script.

First, parameters and initial variables are declared, including Izhikevich’s models parameters, length of time, time step, and input:

% Parameters a, b , c , and d are based on Izhikevich ’ s work

% Change these to display different spike patterns .

spikeType = ’Regular spiking’; % Just used for a heading of a graph and a reminder of what is being graphed .

a = 0.02; % change these 4 lines to produce the different spike patterns ; see Figure 1 for different values . b = 0.2;

c = -65;

d = 8;

maxTime = 200; % ms; how long to run the program dt = 0.1; % time step

t = [0:dt:maxTime]; % vector of all time steps to run

Input = ones(1,length(t))*10; % mV; input, to change the constant input, change the multiplication number (10); or change all values to produce nonconstant input

% setting the initial to values of membrane potential and recovery v(1) = c % using auxiliary, after spike voltage is c

u(1) = v(1)*b % recovery is equal to the sensitivity ( b) of the voltage ( v)

With all the variables initialized, the next step is to calculate the membrane potential and recovery using Euler’s method. This is done in a loop for all the time set in maxTime.

% Euler ’ s method; for each time step , use differential equations for i = 1:length(t)

v(i+1) = v(i) + (0.04*v(i)^2 + 5*v(i) + 140 - u(i) + Input(i))*dt ; % equation 1 u(i+1) = u(i) + (a*(b*v(i+1)-u(i)))*dt; % equation 2

% equation 3 ( auxiliary )

TheQuantitativeMethods forPsychology

2

10

(11)

if v(i+1) $>$= 30 v(i+1) = c;

u(i+1) = u(i)+d;

end;

end

At this point, the vectorvcontains all the voltage values over time, and the vectorucontains recovery values over time. These are used for the different graphs produced in this tutorial.

Figure1shows how the membrane changes over time and can be graphed with the following code:

figure(’Color’, ’white’) plot(t,v(1:end-1))

xlabel(’Time (ms)’, ‘fontsize’, 12);

ylabel(’Membrane Potential (mV)’, ‘fontsize’, 12);

title(spikeType, ‘fontsize’, 14);

Most of the graphs show both membrane potential and recovery.

figure(’Color’, ’white’)

plot(t,v(1:end-1), ’b’, t,u(1:end-1), ’r’) % the voltage is set to blue−−‘b’, while the recovery is red

−−‘r’

legend(’Membrane Potential’, ’Recovery’);

xlabel(’Time (ms)’, ’fontsize’, 12);

ylabel(’mV’, ’fontsize’, 12);

title(’Membrane potential vs Recovery’, ’fontsize’, 14);

Finally, Figure??is a plot that shows multiple parameters side by side for the same time period.

figure(’Color’, ’white’) subplot(2,2,1)

plot(t,v(1:end-1))

xlabel(’Time (ms)’, ’fontsize’, 12);

ylabel(’mV’, ’fontsize’, 12);

title(‘Potential, v, (dt=0.1)’, ’fontsize’, 14);

subplot(2,2,2) plot(t,u(1:end-1))

xlabel(’Time (ms)’, ’fontsize’, 12);

ylabel(’mV’, ’fontsize’, 12);

title(‘Recovery, u, (dt=0.1)’, ’fontsize’, 14);

subplot(2,2,3) plot(t,deltav*dt)

xlabel(’Time (ms)’, ’fontsize’, 12);

ylabel(’mV’, ’fontsize’, 12);

title(’\Delta v’, ’fontsize’, 14);

subplot(2,2,4) plot(t, deltau)

xlabel(’Time (ms)’, ’fontsize’, 12);

ylabel(’mV’, ’fontsize’, 12);

title(’\Delta u’, ’fontsize’, 14);

Appendix B: Matlab code for Leaky Integrate & Fire

Like Izhikevich’s model, LIF is a simple model that can be easily written in one script file. The first step is to initialize all the parameters being used.

dt = 0.1; % ms; time step

TheQuantitativeMethods forPsychology

2

11

(12)

endTime = 100; % ms; amount of time that is shown in the graphs t = [0:dt:endTime]; % ms vector; time points

Input = ones(1,length(t))*1.6; % mv; input from presynaptic spikes and/or electrode

% membrane info

R = 10; % MOhm; membrane resistance tau = 10; % ms; membrane time constant; RC

% spike info

uresting = -65; % mV; resting membrane potential

ureset = -65; % mV; reset after spike; normally lower than resting threshold = -55; % mV; spike threshold

spike = NaN; % mV; LIF doesn’t actually fire; this forces it . Set to NaN to not force spike , otherwise set it to a value higher than threshold

v(1) = uresting; % Initial voltage value

Once the values are initialized, loop though the time to get the new voltage value based on Equation 11.

i = 2; % i is each change in time ; the first time is initial values set above while i $<$= length(t)

v(i) = uresting + Input(i).*R + (v(i-1)-(uresting + Input(i).*R))*exp(-dt/tau); % Equation 11

% if potential is higher than threshold , spike and reset voltage ( Equation 10) if (v(i) $>$ threshold)

if ~(isnan(spike)) % this if statement just displays the spike when requested v(i) = spike;

i = i + 1;

end

v(i) = ureset; % auxiliary from Equation 10 end

i = i + 1;

end % while i

The only plot of LIF was the basic voltage over time plot.

set(gcf,’color’,’w’);

plot(t,v)

title(’LIF’, ’fontsize’, 14)

xlabel(’Time (ms)’, ’fontsize’, 12);

ylabel(’Membrane Potential (mV)’, ’fontsize’, 12)

Appendix C: Integrating LIF

When reading about the LIF model, there seem to be many different equations which can be confusing. The reason for the different equations is because the final integration is affected by the input. This appendix will cover how to derive the final equation based on three different types of input: constant input, continuous input, and spiking input.

Please note that in the LIF model, the function resets after firing. This means that while time, t, is a continuous increasing function, within the model it is not; it gets reset to 0 at firing, or is shown ast−tf– time since last fire as seen in equation 9. For the sake of comprehension, the work below assumes last fire occurred attf = 0. This assumption makes no difference to the final solution. For readability, the functionsv(t)andI(t)are written with their parameters beside as subscript,vtandIt. This helps to avoid confusion between brackets used in the equation and brackets for functions.

Before looking at the three different input types, there are a few steps that are always done. From Equation 8:

τdv

dt =RIt−vt

TheQuantitativeMethods forPsychology

2

12

(13)

This is a first-order linear differential equation (ODE), and can be put into the form dy

dx+P(x)y=Q(x) dv

dt +1 τvt= 1

τRvt

At this point, an integrating factor,N(t) =eP(x)dx, is needed.2 N(t) =e 1τdt

N(t) =eτt Multiple both sides of the ODE by the integrating factor

eτt dv dt +eτt 1

τvt=eτt1 τRIt Let

f(t) =eτt and g0(t) =dv dt Therefore

f0(t) = 1

τeτt and g(t) =vt Using integration by parts(f(t)g(t))

0

=f(x)g0(x) +f0(x)g(x) d

dt

eτtvt

=eτt 1 τRIt The above equation is the starting point for the following LIF solutions.

Constant Input

Constant input is the easiest solution and the least useful – it is very rare that there is a constant input going into neurons.

But, constant input does provide a nice base for understanding the math.

d dt

eτtvt

=eτt 1 τRIt

Assuming constant input means thatIt=Ifor all time.

d dt

eτtvt

=eτt 1 τRI

Note: For the integration, we want to go from when the neuron last fired (tf = 0) to current timet. Because of the use of the symboltinside and outside the integration, there is a potential for confusion over what is bounded and what is not. Therefore, for integration, the variablesreplaces the boundedt. This is particularly important when looking at continuous input.

eτtvt=

t

0

eτsRI τ ds+C

Properties of integrals states:∫kf(x)dx=k∫f(x)dxwherekis a constant eτtvt= RI

τ

t

0

eτsds+C

eτtvt= RI τ

τ eτst

0+C

2Integrating factor is normally designated by I(x) but the function I is already used for input and our formula is based on time,t. Therefore we are usingN(t)to designate the integrating factor.

TheQuantitativeMethods forPsychology

2

13

(14)

eτtvt=RI eτst

0+C eτtvt=RI

eτt −e0τ +C eτtvt=RI

eτt −1 +C vt=eτtRI

eτt −1

+Cetτ vt=RI

1−eτt

+Ceτt To solve for C, we know that the starting value,v(0), without input, isvrest.

vrest=RI

1−e0τ

+Ce0τ vrest=C

Therefore, the final solution when input is constant is

vt=vresteτt +RI

1−eτt To account for different firing times, this can be written as:

vt=vreste

t−tf

τ +RI

1−e

t−tf τ

Continuous Input

In simulations and experimentations, input might be a function of time such asI(t) = cos(t). Equation 8 can still be integrated, to a point, even if the input function is not known. This solution is what is most commonly seen in books and articles on LIF (Gerstner et al.,2014, for example ). Starting with Equation 8:

τdv

dt =RIt−vt

After the integrating factor is applied

d dt

eτtvt

=eτt 1 τRIt

eτtvt=

t

0

esτRIs

τ ds+C

In the above, to make sure the bounded integrating variable is not confused with the variablet, the bounded variable is changed tos.

eτtvt=R τ

t

0

eτsIsds+C vt= R

τeτt

t

0

eτsIsds+Ceτt

This is where it was really important to change the bounded (integrating) variable fromttos. Note here thateτt is a constant becausetis a constant value. Therefore, by properties of integrals:∫kf(x)dx =k∫f(x)dxwherekis a constant

vt= R τ

t

0

esτeτtIsds+Ceτt

vt= R τ

t

0

es−tτ Isds+Ceτt

TheQuantitativeMethods forPsychology

2

14

(15)

Now consider thatsis bound between 0 andt, yettis always a constant value regardless ofs. Therefores−t=−s. vt= R

τ

t

0

e−sτ It−sds+Ceτt We cannot simplify any further because the input functionI(t)is unknown.

To solve for C, we assume that atv(0) =vrest. vrest=R

τ

0

0

e−sτ I0ds+Ce0τ By properties of integrals

a

a

f(x) = 0

vrest=R

τ (0) +C vrest=C Therefore,

vt=vresteτt +R τ

t

0

e−sτ It−sds

To get solution shown in equation 9, which accounts for time being continuous and spike firing happens during time t, replacetwitht−tffor everything except input (which does not reset).

vt=vreste

t−tf

τ +R

τ

t−tf

0

esτIt−sds Spiking Input

The above continuous input is not often programmed for simulations. Instead, input is usually discrete values to repre- sent spikes (or not spiking). In this case, input is constant for small periods of time, represented in the code asdt. So, from0todt, input is a constant valueI(dt), from timedtto2dt, input is a constant valueI(2dt). This allows the ODE to be solved using piecewise integration. From original equation 8:

τdv

dt =RIt−vt Applying integration factor to get:

d dt

eτtvt

=eτt 1 τRIt

Piecewise integration looks specifically at the bound range; area under the curve fromatob(0 tot). This means that the integration is always the difference from 0. In reality though, the difference is adjusted by the resting value. This means that using piecewise integration, to get the final solution,vtwill be wrong byvrest. To account for a starting value, vrest, we need to replacevtwithvt−vrest.

eτt (vt−vrest) =

t

0

esτRIs

τ ds eτt (vt−vrest) =R

τ

t

0

eτsIsds Note: this is the solution for timet.

Based on our discrete input, we actually have:

eτt (vt−vrest) =

















R τ t

0

eτsIdtds 0< t≤dt

R τ t

0

eτsI2dtds dt < t≤2dt ..

.

R τ t

0

esτI(k+1)dtds

.. .

k dt < t≤(k+ 1)dt

TheQuantitativeMethods forPsychology

2

15

(16)

where each input,It, is a constant value for the time period lasting length dt. Because there are an infinite amount of time periods, to solve this integration, we use the same trick that proofs by induction use: assume we have solved the integration for up to time t (equation above); then solve for the next time step,t+dt, where fromttodtwe know that the input is constant.

et+dtτ (vt+dt−vrest) = R τ

t+dt

0

eτsIsds

By properties of integrals:

c

a

f(x) =

b

a

f(x) +

c

b

f(x)wherea < b < c

et+dtτ (vt+dt−vrest) = R τ

t

0

esτIsds+

t+dt

t

esτIsds

From above we know thateτt (vt−vrest) =Rτ

t

0

esτIsds

et+dtτ (vt+dt−vrest) =etτ (vt−vo) +R τ

t+dt

t

eτsIsds We knowI(s)is constant fromttot+dt, therefore let that value equalI(s) =I(t+dt)

et+dtτ (vt+dt−vrest) =eτt (vt−vo) +R τ

t+dt

t

esτIt+dtds

et+dtτ (vt+dt−vrest) =eτt (vt−vo) +RIt+dt

τ

t+dt

t

esτds et+dtτ (vt+dt−vrest) =eτt (vt−vo) +RIt+dt

τ

τ eτst+dt

t

et+dtτ (vt+dt−vrest) =eτt (vt−vo) +RIt+dt

eτst+dt

t

et+dtτ (vt+dt−vrest) =eτt (vt−vo) +RIt+dt

et+dtτ −eτt (vt+dt−vrest) =eτtet+dtτ (vt−vo) +RIt+dt

et+dtτ −eτt et+dtτ (vt+dt−vrest) =edtτvt−edtτvo+RIt+dt−RIt+dtedtτ

vt+dt=edtτvt−edtτvo+RIt+dt−RIt+dtedtτ +vo

vt+dt=vrest+RIt+dt+ (vt−(vo+RIt+dt))edtτ

which is equivalent to Equation 11 by replacingtbyt−1andt+dtwitht(instead of assuming current step, solve next;

assume previous, solve current).

vt= vrest+ RIt+ (vt−1−(v0+RIt))e dtτ Citation

Johnson, M. G. & Chartier, S. (2018). Spike neural models part II: Abstract neural models.The Quantitative Methods for Psychology,14(1), 1–16. doi:10.20982/tqmp.14.1.p001

Copyright © 2018,Johnson and Chartier.This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

Received: 04/09/2017∼Accepted: 03/10/2017

TheQuantitativeMethods forPsychology

2

16

Références

Documents relatifs

SkyVision’s calculation engine is composed of four sets of modules: glazing optics modules that compute the optical characteristics of a composite glazing pane (substrate

L’abandon volontaire de ces demi-produits dans le contexte chrono-culturel du premier âge du Fer participerait ainsi d’un phénomène plus vaste, concernant des objets en alliages

Pour ce faire, Neurath avait su s'assurer le concours d'une équipe tout à fait exceptionnelle, qui a laissé, dans ce domaine, une contribution aujourd'hui reconnue

Ces princes s’impliquent très étroitement dans la vie politique du royaume de Himyar, comme le reflètent les inscriptions du site d’al-Mi‘sâl, relevées par la Mission

Based upon our empirical findings, we conclude that while port-related APS activities predominantly follow the world city hierarchy, a number of port cities stand

The barotropic zonal-mean zonal wind instead displays anomalously low local dimension and persistence, with the former being much lower than even those of the linear subtropical

باّتُكلا دجن امك ىلإ ةجاحلا نود يناعملا نم ريثكلا ىلع ةللادلل زومرلا مادختسا اوفلأ دق بتكلا اوقّقحمو ةثيدحلا سيماوقلاو مجاعملا تضاعتسا امك ،زيمرتلاو ميقرتلا

majeure partie inconnus jusqu’alors, sont ainsi mises à la disposition de tous, d’autant plus faci- lement que l’ouvrage s’accompagne d’un DVD où se trouvent plus de