Skip to main content
Jakov Ivan

Ready, Integrate, Fire! Part 1: Solving a simple neuronal model

My love for numbers has sparked my interest on how I can use mathematics to model the complex processes happening inside the human brain. So when I created this blog, I wanted to start with modelling just a single neuron—the building block of our brains. The model I chose to focus on comes in an intriguing (and somehow provocative!) name: leaky integrate-and-fire (LIF) model.

Why did I choose LIF model? It’s a simple model. That’s it. In my journey to becoming a computational neuroscientist, I have to start with understanding the basic models in the field of neuroscience. Despite its ‘simplicity’, I delved a lot into this model, and I even think that it deserves more spotlight that I decided to dedicate my first two blog posts on this single model! For my first blog post, I will be finding the analytical solution of a leaky integrate-and-fire (LIF) model of a neuron under a static input current. Ready to know more? Let’s start!

A first look at integrate-and-fire models #

The integrate-and-fire model was first proposed by the French neuroscientist Louis Lapicque in 1907. It is probably one of the simplest and most commonly used mathematical models describing the basic electrical properties of a single neuron. (We’ll deal with the ‘leaky’ term later.) These properties are as follows:

  1. A neuron will typically fire an action potential when its membrane potential reaches a critical threshold, which is about -55 to -50 millivolts (mV).

  2. During the action potential, the membrane potential follows a quick, high trajectory and then immediately returns to a value that is hyperpolarized relative to the threshold potential.

The integrate-and-fire model captures all these properties by carrying out the following golden rule:

Whenever the membrane potential of the model neuron reaches a threshold value Vth, the neuron fires an action potential. After the action potential, the membrane potential is reset to a value Vreset below the threshold potential, Vreset<Vth.

The above rule spells out how the model got its name: as the membrane potential accumulates (or integrates in continuous terms, much like what an integral does) up to the point-of-no-return (the threshold value), the neuron releases (aka fires) an action potential. Ready, integrate, fire!

The model’s strengths and weaknesses #

Of course, having a simple model means that one must forego incorporating complex properties that would make the neuronal model more realistic. The integrate-and-fire model comes with the limitation of not including the biophysical mechanisms responsible for action potentials, such as ion channel kinetics. Despite this, the model is still an extremely useful one as it focuses on modelling the subthreshold potential dynamics. As stated in this paper created by the Goldman Lab at UC Davis, another reason why we can let go of the biophysical properties in modelling a neuron is that we are not too much interested with the exact shape of an action potential, and the only informative feature we can probably get from a neuron’s spiking is the exact times at which action potentials occur.

So what’s up with a ‘leaky’ neuron? #

As previously mentioned, integrate-and-fire models are concerned with subthreshold membrane potential dynamics, and this can be done with various levels of modelling rigor. The simplest version of these models is called the leaky (or passive) integrate-and-fire model. Under this LIF model, all active membrane conductances are ignored, including, for the moment, synaptic inputs. Moreover, the entire membrane conductance is modelled as a single passive leakage term, making the model neuron ‘leaky’. For small fluctuations about the resting membrane potential, neuronal conductances are approximately constant, and the LIF model assumes that this constancy holds over the entire subthreshold range. However, this assumption is reasonable only for some neurons.

The Leaky Integrate-and-Fire Model #

We are now ready to formally state the LIF model. Consider a neuron modelled as a leaky capacitor with membrane resistance Rm, time constant τm=RmCm (where Cm is the membrane’s capacitance), and resting potential EL. Below the threshold value Vth, the equation for the voltage V(t) of this neuron when it receives a current injection Ie is given by:

(Eq. 1)τmdVdt=ELV+RmIe

To generate action potentials, the above equation is augmented by the golden rule stated above: whenever V reaches the threshold value Vth, an action potential is fired and the potential is reset to Vreset.

A thorough derivation of the equation and explanation of its terms will be provided in Part 3 of this LIF series. For now, our concern is on finding the analytical solution of the leaky integrate-and-fire model in response to a constant injected current.

Solving the LIF Model #

Suppose we know the value of a neuron’s membrane potential at some reference point t0. We denote this value as V(t0). We can then compute the analytical solution of the LIF model, which is just a first-order nonhomogeneous differential equation.

We can use the method of undetermined coefficients to solve this ODE. We first find a solution Vh(t) for the homogeneous counterpart of the model. Rearranging terms in Eq. 1, we have

(Eq. 2)τmdVdt+V=EL+RmIe

Since the input current Ie is assumed to be constant, the right-hand side of the equation also turns out to be a constant, i.e. τmdVdt+V=f(t), where f(t)=EL+RmIe. By setting f(t)=0, the homogeneous counterpart is given by

τmV+V=0V=Vτm.

By separation of variables (or just intuition), the solution to the above equation is simply

Vh(t)=Aet/τm,

where A is some constant.

Next, we need to find a particular solution for Eq. 1. Since the right-hand side of Eq. 2 is just a constant, we can stipulate that the particular solution is of the form Vp(t)=c, where c is a constant. We can find the value of this constant by plugging the particular solution to Eq. 2. That is,

τm(c)+c=EL+RmIe0+c=EL+RmIe,

and hence the particular solution is

Vp(t)=EL+RmIe.

The general solution for the nonhomogeneous differential equation Eq. 1 is expressed as the sum of the homogeneous solution Vh(t) and the particular solution Vp(t). That is,

V(t)=Vh(t)+Vp(t)(Eq. 3)V(t)=Aet/τm+EL+RmIe

In order to find the exact value of the constant A in the above equation, we simply use the initial condition that we know the value V(t0) of the neuron’s membrane potential at the reference point t=t0:

V(t0)=Aet0/τm+EL+RmIeA=[V(t0)ELRmIe]et0/τm.

Substituting this value in Eq. 3 and rearranging the terms, we have

(Eq. 4)V(t)=EL+RmIe+[V(t0)ELRmIe]e(tt0)/τm,

which gives us the analytical solution to a leaky integrate-and-fire model when a constant current is injected to the neuron. We note that this solution is valid for the LIF model only as long as the membrane potential V stays below the threshold Vth.

For the math geeks out there, we could also use the Laplace transform to calculate the exact solution of the LIF model. In fact, I first used Laplace to solve it, but I decided to present the neater and simpler solution here.

Calculating the theoretical firing rate #

We can also compute the theoretical firing rate of a leaky integrate-and-fire model neuron in response to a static input current. The firing rate of a neuron is defined as the number of spikes it fires per second [measured in Hz]. We can calculate it by determining the interspike interval tisi, which is the amount of time between two consecutive spikes. The interspike-interval firing rate is then simply 1 over tisi, indicating that the LIF model fires once over the interspike interval.

Suppose that at reference point t=t0, the neuron has just fired an action potential and is thus reset to the value Vreset, i.e. V(t0)=Vreset. The next spike will then occur after tisi unit of time, that is, at time t=t0+tisi. At this time, the membrane potential reaches the threshold Vth, and thus we have

V(t0+tisi)=Vth=EL+RmIe+[VresetELRmIe]etisi/τm.

Solving for tisi from the above equation gives us

tisi=τmln(RmIe+ELVresetRmIe+ELVth).

Therefore, the theoretical interspike-interval firing rate risi is given by the inverse of tisi:

(Eq. 5)risi=1tisi=[τmln(RmIe+ELVresetRmIe+ELVth)]1.

We note that the above firing rate only exists for some range of values of the injected current Ie. We can get the domain of risi by solving the following inequality:

RmIe+ELVresetRmIe+ELVth>0

This branches into two cases:

Case 1: both numerator and denominator are positive

RmIe+ELVreset>0 and RmIe+ELVth>0RmIe+EL>Vreset and RmIe+EL>Vth.

But since Vth>Vreset, the above inequality reduces to

RmIe+EL>Vth, orIe>VthELRm.

Case 2: both numerator and denominator are negative

RmIe+ELVreset<0 and RmIe+ELVth<0RmIe+EL<Vreset and RmIe+EL<Vth.

But since Vreset<Vth, the above condition reduces to

RmIe+EL<Vreset, orIe<VresetELRm.

We have to note that there is no negative membrane resistance and that Vreset is always less than or equal to the resting potential EL, making the right-hand side of the above inequality to be nonpositive. However, the injected current Ie is always nonnegative, making the above inequality to be invalid.

This therefore leads us to only consider the result of the first case. If we set the threshold current as Ith=VthELRm, then risi is defined by Eq. 5 if the injected current Ie is greater than Ith. Otherwise, the neuron will not fire and thus risi=0.Thus, the theoretical interspike-interval firing rate risi is formally given by

risi={[τmln(RmIe+ELVresetRmIe+ELVth)]1 if Ie>Ith=VthELRm0 if IeIth.

So that concludes my first blog post. On the second one in this two-part series, I will simulate the leaky integrate-and-fire model using Python and verify the theoretical interspike-interval firing rate we just computed. ’Til next time, brain folks!

References #

[1] Theoretical Neuroscience by Peter Dayan and L.F. Abbott

[2] Integrate-and-Fire Model Tutorial by the Goldman Lab at UC Davis (link)

[3] Computational Neuroscience course offered by University of Washington on Coursera which I just completed! YAY! I’ll write more about my experience on another blog post :)