Description of problem
I have created a spiking neural network model with an input layer of Poisson neurons and four layers of conductance-based LIF neurons. I am experiencing issues with refractory period: when I run a simulation, some neurons are firing more frequently than the refractory period should allow.
Minimal code to reproduce problem
V_th = -53*mV
V_r = -90*mV
tau_r = 5*ms
E_l = -74*mV # leak reversal potential
g_l = 100*nS # leak conductance
E_e = -20*mV # excitatory synaptic reversal potential
E_i = -100*mV # inhibitory synaptic reversal potential
C_m = 0.5*nF # membrane capacitance
LIF_neurons='''
dv/dt = (g_l*(E_l-v) + g_e*(E_e-v) + g_i*(E_i-v))/C_m : volt (unless refractory) # membrane potential
dg_e/dt = -g_e/tau_e : siemens # post-synaptic exc. conductance
dg_i/dt = -g_i/tau_i : siemens # post-synaptic inh. conductance
'''
self.L1 = NeuronGroup(N_LIF_exc + N_LIF_inh, LIF_neurons, threshold='v > V_th', reset='v = V_r', refractory='tau_r', method='euler')
g_e or g_i are incremented upon the arrival of a spike from an excitatory or inhibitory neuron, respectively.
What you have aready tried
- Defining refractory period in same way as above without passing as a string: refractory=5*ms
- Defining refractory period as state variable and then setting it like: L1.refractory = 5*ms
- Defining refractory period like this: refractory=’(t - lastspike) <= 5*ms’
- Defining refractory period like this: refractory='timestep(t - lastspike, dt) <= timestep(5*ms, dt)
- Defining refractory period using the voltage threshold this: refractory=‘v >= -53*mV’
- Specifying ‘(unless refractory)’ after equations for excitatory and inhibitory conductance
Expected output (if relevant)
The maximum frequency a neuron could fire would be limited by refractory period (max every 5ms in this case)
Actual output (if relevant)
Some neurons are firing every integration time-step (0.1ms)