A simple neuron model - The integrate and fire neuron
1.Motivation
I`ve seen somewhere on DIC that someone suggested a tutorial on Artificial Neural Networks(ANN). Whilst that seems to be a bit far-fetched due to its complexity(there are books that barely scratch the surface) I believe that a presentation of a simple neuron model would be a great starting point to anyone who is interested in neural networks. Once the dynamics of such a neuron are understood it will be rather easy for someone to build a network consisting of such neurons.
2.Introduction
The brain, consisting of large number of interconnected cells, is the most important part of the neural system. We try to model it thus creating an arti?cial system that can be characterized as intelligent. In order to be able to create such a model one must first understand the basic elements of biological nervous systems. A nervous cell will consist of three distinct parts: the dendrites, the soma, and the axon. The soma is the central processing part of the cell, whilst the dendrites and the axon just deliver information. Roughly speaking the dendrites will play the role of input devices which gather signals from other neurons and send them to the soma, and the axon takes the signal generated by the soma to the connected neurons. We will refer to the junction between two neurons as the synapse.
Neurons communicate by sending to one another short signals spikes, or action potentials. A chain of such action potential is called a spike train. We de?ne the membrane potential as the difference between the potential of the interior of the cell and the potential of the exterior. This potential is affected by the input from the presynaptic neurons. The membrane potential rises if input is received at an excitatory synapse, and decreases
when input is received at an inhibitory synapse. If the membrane potential reaches a threshold the neuron ?res a pulse along its axon.
The biological neuron is a complex dynamical system and that is very to hard imitate accurately. Even though the neuron is not yet fully understood its basic mode of operation has been translated into a mathematical model for computer use. Thus more than one type of models exist; some models will try to imitate the biological neuron in great detail taking into consideration all the physical and chemical aspects. This models usually show what computational power can be achieved with a single neuron. Others will model at higher level of abstraction an thus allowing networks to be build on top of such neurons and these networks can be later made to learn something.
3.The model
I will present one of the most simple neuron models, the integrate and ?re(IAF) neuron. Let us consider an input current I=I(t) (where t is the time) which depolarizes the neuron membrane thus causing a growth in its potential. When the potential v reaches a certain preset threshold ?th the neuron discharges -i.e. ?res a pulse along its axon, and the membrane potential is set to its reset value vr.
The membrane potential is given by the following equation

where v = v(t), I = I(t), R is the resistance, C the capacitance in the model, v0 the resting value of the potential, and tm = RC is membrane time constant.
By solving this differential equation we will get the form of the membrane potential

where t with hat is the last fire of the neuron. I have not shown here the calculations. Anyone interested please contact me.
4.Implementation
Here we will do a simple simulation with such a neuron. We will take an integrate and fire neuron which has one presynaptic neuron, simulate its behavior in a discretized time and plot its membrane potential. The presynaptic neuron will send spikes along the synapse between the two neurons at given times. In this simulation we will use exponential current with a given decay. Thus I=I(t) will have the following form

where q is the total charge delivered by the spike, ts is the time constant of the current’s decay and tj contains the fire times of the presynaptic neuron j( i.e.that is connected to the our simulated neuron).
With this known and with the solved differential equation we can implement the neuron. Basically we will have a neuron that receives inputs periodically and we observe the fluctuation of its potential. If the potential reaches a threshold the neuron will fire a spike represented in the simulation as an vertical line. For the sake of simplicity we will assume the the synapse on which the spike arrive is excitatory.
The output

The implementation is provided in MATLAB.
t = (0:100); %duration of simulation 100 time steps
%Neuron Parameters
%----------
C = 2; %capa
R = 10; %resistance
ur = -0.5; %reset potential
u0 = 0; % resting potential
q = 1.3; %total charge
tc = -100000;
th = 1; %the neuron threshold
taus = 5;
tauc = 10;
u = zeros(length(t), 1); %membrane potential
f = [10 20 30 50 60]; %the spike times of the presynaptic neuron
seps = 0;
for i=1:length(t);
seps = 0;
for j=1:length(f);
eps = 0;
if (tc <= f(j) && f(j) <= i)
eps = exp(-(i -f(j))/(R*C)) - exp(-(i-f(j))/taus);
end
if (f(j) < tc && tc <= i)
eps = exp(-(tc-f(j))/taus)*(exp(-(i-tc)/(R*C)) - exp(-(i-tc)/taus));
end
seps = seps + eps;
end;
u(i) = u0 + (ur - u0) * exp(-( i - tc) / (R*C)) +q/C * 1/(1-taus/(R*C))*seps;
if(u(i) >= th) %generate spike
tc = i;
u(i) = ur;
end
end
%plot membrane potential vs time
plot(t,u);
hold on; plot([0 100],[1 1],'--');
axis([0 100 -2 1.5])
xlabel('time [\tau]');
ylabel('u(t)')
5.End
The aim of this short "tutorial" was to explain and implement a simple neuron. Of course there are other models out there. I just presented maybe the most basic one with which one can easily build a neural network that can be trained using some algorithm to complete a task.
References:
Gerstner W., Kistler ., Spiking Neuron Models. Single Neurons, Populations, Plasticity. Cambridge University Press, 2002
--
Muballit Mitte





MultiQuote





|