Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

1.1.2 Point Neuron Models

Authors
Affiliations
Virginia Tech, USA
Technical University of Denmark
Innatera

Point Neurons Models are minimalistic spiking neuron models that use simplified electro-mathematical equations to mimic the spike generation, voltage reset, and refractory state behaviours of biological neurons; they conveniently ignore to model the ionic channels, axial conductance, axonal propagation of spike/action-potential, etc., basically anything that relates to the spatial form of a biological neuron. Common examples of point spiking neurons are Integrate & Fire, Leaky Integrate & Fire, and Resonate & Fire spiking neuron models. We explain each of these three point neuron models below, along with their code examples. We highly encourage you to play with their different hyper-parameter settings, and observe/analyse their spiking behaviour.

Notations:

Before we explain the various spiking models of point neurons, we first introduce the mathematical notations (of their variables) that we henceforth use; these notations are consistent in their meaning throughout the book, unless stated otherwise.

1.1.2.1Integrate & Fire Neuron Model

Integrate & Fire (IF\texttt{IF}) neuron model is the simplest of all the spiking neuron models -- by virtue of which, it’s dynamic behaviour is also quite limited. An IF\texttt{IF} neuron, as the name goes, integrates the incoming/input spikes into its non-decaying membrane potential/voltage, followed by generating an output spike when its voltage reaches/crosses the set voltage threshold; whether or not it undergoes through a refractory state, is dependent on its subjective implementation. Following is the continuous-time equation of an IF\texttt{IF} neuron Heeger, 2000 :

CmdV(t)dt=I(t)C_\text{m}\frac{dV(t)}{dt} = I(t)

where, CmC_\text{m} is the neuron’s Capacitance value (generally assumed to be 1), V(t)V(t) is neuron’s membrane potential/voltage, and I(t)I(t) is the input stimulus/current due to the incoming spikes.

In Eq (1), note the inherent temporality in V(t)V(t) and I(t)I(t) by the virtue of them being a function of time tt. Here, we subtly note the activation function of an example artificial neuron, say ReLU\texttt{ReLU}: max(x,0)max(x, 0), where xRx\in\mathbb{R}; and as it can be seen in the ReLU\texttt{ReLU} neuron, there is no temporal component in it! This is one of the stark differences between between spiking neurons and artificial neurons, i.e.,

Other few differences are:

1.1.2.1.1Implementing IF\texttt{IF} neuron

Coming back to the IF\texttt{IF} neurons, to implement it on a digital system, i.e., a computer, it is necessary to discretize its continuous-time equation such that one can program it. We can discretize the Eq (1) using the forward Euler method -- we show how to do it in the Discretizing IF\texttt{IF} neuron. For quick reference, following are the discrete-time equations that describe an IF\texttt{IF} neuron:

I[t]=(1idecay)×I[t1]+w×Sinp[t](a)V[t]=V[t1]+I[t](b)Sout[t]=Θ(V[t]Vthr)(c)V[t]{Vrest if V[t]>Vthr and hard resetV[t]Vthr if V[t]>Vthr and soft reset(d)\begin{aligned} I[t] &= (1 - i_\text{decay})\times I[t-1] + w\times S_\text{inp}[t] && \text{(a)}\\ V[t] &= V[t-1] + I[t] && \text{(b)}\\ S_\text{out}[t] &= \Theta(V[t] - V_\text{thr}) && \text{(c)}\\ V[t] &\leftarrow \begin{cases} V_\text{rest} \text{\quad\qquad\qquad\qquad$\cdots$ if $V[t]>V_\text{thr}$ and \textit{hard reset}} \\ V[t] - V_\text{thr} \text{\qquad\qquad$\cdots$ if $V[t]>V_\text{thr}$ and \textit{soft reset}} \\ \end{cases} && \text{(d)} \end{aligned}

Before we begin explaining the Eqs (2), let us introduce the concept of Spike Train.

A spike train holding a random collection of binary spikes and feeding them to an IF\texttt{IF} neuron (see Figure 1) is shown below.

Figure 1:[Spike Train] --w--> [IF Neuron]

A Spike Train stimulating an IF Neuron. ww is the weight of connection.

In Eq (2)a\textsf{a}, I[t]I[t] and I[t1]I[t-1] are the IF\texttt{IF} neuron’s current at time-step tt and t1t-1, idecayi_\text{decay} is the current decay value (such that, 0idecay10\leq i_\text{decay}\leq1). As can be seen in the current update Eq (2)a\textsf{a}, the current at time-step tt i.e., I[t]I[t] is a sum of the decayed value of current at the previous time-step t1t-1 i.e., I[t1]I[t-1] (decayed by the factor (1idecay)(1 - i_\text{decay})) and the ww weighted spike input Sinp[t]S_\text{inp}[t]. Note that the Sinp[t]S_\text{inp}[t] can be from a pre-synaptic neuron too (instead of just being a part of the above randomly generated spike train).

In Eq (2)b\textsf{b}, V[t]V[t] and V[t1]V[t−1] are the IF\texttt{IF} neuron’s voltage at the time-steps tt and t1t-1. Note that unlike Eq (2)a\textsf{a}, no decayed value of V[t1]V[t-1] is added to I[t]I[t] to obtain the updated V[t]V[t].

In Eq (2)c\textsf{c} VthrV_\text{thr} is the threshold voltage and Θ\Theta is the Heaviside step-function that outputs 1 for positive arguments and 0 for non-positive arguments. As can be seen in the spike output Eq (2)c\textsf{c}, a binary spike Sout[t]S_\text{out}[t] (which can either be a 0 or a 1) is generated by the IF\texttt{IF} neuron at the time-step tt if it’s voltage V[t]V[t] crosses the VthrV_\text{thr}. Note that VthrV_\text{thr} here is fixed, however, a few implementations also keep it variable/adaptable over time.

In the Eq (2)d\textsf{d}, VrestV_\text{rest} is the resting membrane potential/voltage value, which is generally set as 0. As explained before, the two ways to hard reset and soft reset are shown in the voltage reset Eq (2)d\textsf{d}, either of which can be chosen for the implementation. The operational difference between these two implementations of voltage reset will be clear when we will implement them in code later. For now, a hard reset sets V[t]V[t] to VrestV_\text{rest} after the neuron produces a spike and a soft reset instead subtracts VthrV_\text{thr} from V[t]V[t]. In other words, the soft reset enables the neuron to retain some contribution of the I[t]I[t] or Sinp[t]S_\text{inp}[t] received, while hard reset results the neuron to discard any such contribution and start updating its V[t]V[t] right from VrestV_\text{rest}.

1.1.2.2Leaky Integrate & Fire Neuron Model

Leaky Integrate & Fire (LIF\texttt{LIF}) neuron model is another simple and a common spiking neuron model that displays slightly more complex behavior than the IF\texttt{IF} neuron model. A LIF\texttt{LIF} neuron, as the name goes, integrates the incoming/input spikes into its decaying membrane potential/voltage, followed by generating an output spike when its voltage reaches/crosses the set voltage threshold. Note that the refractory period (after spiking) is a standard component of the LIF\texttt{LIF} neuron model and is often included in its implementation, although, one can choose to ignore this. Since the refractory period in a spiking neuron prevents it from spiking immediately after it has spiked, it influences the LIF\texttt{LIF} neuron’s firing (rate) behavior i.e., its response to the input stimuli. Following is the continuous-time equation (Eq (3)) of the LIF\texttt{LIF} neuron Gerstner et al., 2014:

τmdV(t)dt=(V(t)Vrest)+RmI(t)\tau_\text{m}\frac{dV(t)}{dt} = -(V(t) - V_\text{rest}) + R_\text{m}I(t)

where, τm\tau_\text{m} and RmR_\text{m} are the neuron’s time-constant and membrane resistance respectively. Note τm=RmCm\tau_\text{m}=R_\text{m}C_\text{m} and RmR_\text{m} contributes to the “leak” of accumulating charge in the membrane capacitance CmC_\text{m}, hence the name: “leaky integrator” Gerstner et al., 2014.

1.1.2.2.1Implementing LIF\texttt{LIF} neuron

Similar to implementing the IF\texttt{IF} neuron on a digital computer, one can discretize the Eq (3) of the LIF\texttt{LIF} neuron via the forward Euler method; we do that in the Discretizing LIF\texttt{LIF} neuron. Following are the discrete-time equations that describe a LIF\texttt{LIF} neuron:

I[t]=(1idecay)×I[t1]+w×Sinp[t](a)V[t]=(1vdecay)×V[t1]+I[t](b)Sout[t]=Θ(V[t]Vthr)(c)V[t]{Vrest if V[t]>Vthr and hard resetV[t]Vthr if V[t]>Vthr and soft reset(d)\begin{aligned} I[t] &= (1 - i_\text{decay})\times I[t-1] + w\times S_\text{inp}[t] && \text{(a)} \\ V[t] &= (1 - v_\text{decay})\times V[t-1] + I[t] && \text{(b)} \\ S_\text{out}[t] &= \Theta(V[t] - V_\text{thr}) && \text{(c)} \\ V[t] &\leftarrow \begin{cases} V_\text{rest} \text{\quad\qquad\qquad\qquad$\cdots$ if $V[t]>V_\text{thr}$ and \textit{hard reset}} \\ V[t] - V_\text{thr} \text{\qquad\qquad$\cdots$ if $V[t]>V_\text{thr}$ and \textit{soft reset}} \\ \end{cases} && \text{(d)} \end{aligned}

In Eq (4)a\textsf{a}, idecayi_\text{decay} is the current decay value – same as defined for the IF\texttt{IF} neuron; and in Eq (4)b\textsf{b}, vdecayv_\text{decay} is the voltage decay value (such that, 0<vdecay<10 < v_\text{decay} < 1).

Note that Eq (4)b\textsf{b} implements a decayed voltage accumulation - this is unlike the Eq (2)b\textsf{b}, where voltage was accumulated without decay. However, if vdecay=0v_\text{decay}=0, i.e., no voltage decay, then the LIF\texttt{LIF} neuron becomes equivalent to the IF\texttt{IF} neuron; and if vdecay=1v_\text{decay}=1, then the LIF\texttt{LIF} neuron does not account for its previous time-step’s (i.e., of t1t-1) voltage value. Thus, in a LIF\texttt{LIF} neuron, vdecayv_\text{decay} cannot be a 0 or a 1. Rest of the Eqs (4)c\textsf{c} and (4)d\textsf{d} remain the same as described for the IF\texttt{IF} neuron.

Henceforth, in all the chapters, IF\texttt{IF} will imply Integrate & Fire spiking neuron (implemented with Eqs (2)) and LIF\texttt{LIF} will imply Leaky Integrate & Fire spiking neuron (implemented with Eqs (4)); where hard reset is chosen (for both IF\texttt{IF} and LIF\texttt{LIF} neuron models) unless stated otherwise.

1.1.2.3Resonate & Fire neuron model

References
  1. Heeger, D. (2000). Integrate and Fire Model of Spike Generation. https://www.cns.nyu.edu/~david/handouts/integrate-and-fire.pdf
  2. Gerstner, W., Kistler, W. M., Naud, R., & Paninski, L. (2014). Neuronal dynamics: From single neurons to networks and models of cognition. Cambridge University Press.