Synapse problem with Brunel_Wang_2001 example

Hi there!
I’m trying to build a neural network model and use AMPA synapse model from Brunel_Wang_2001 example. I’m connecting two neural groups, one with external AMPA current as input (E1) and the other one with AMPA receptor current from the synapse (E2). I simplified the code given in the example, but E1 → E2 doesn’t seem to work. I couldn’t find where the problem is. Can anyone help me please, thanks :slight_smile:

Minimal code to reproduce problem

# populations
N = 25
N_E = int(N * 0.8)  # pyramidal neurons

# voltage
V_L = -70. * mV
V_thr = -50. * mV
V_reset = -55. * mV
V_E = 0. * mV

# membrane capacitance
C_m_E = 0.5 * nF

# membrane leak
g_m_E = 25. * nS

# refractory period
tau_rp_E = 2. * ms

# external stimuli
rate = 3 * Hz
C_ext = 800

# synapses
C_E = N_E

# AMPA (excitatory)
g_AMPA_ext_E = 2.08 * nS
g_AMPA_rec_E = 0.104 * nS * 800. / N_E
g_AMPA_ext_I = 1.62 * nS
g_AMPA_rec_I = 0.081 * nS * 800. / N_E
tau_AMPA = 2. * ms

start_scope()
eqs_E1 = '''
dv / dt = (- g_m_E * (v - V_L) - I_AMPA_ext) / C_m_E : volt (unless refractory)
I_AMPA_ext = g_AMPA_ext_I * (v - V_E) * s_AMPA_ext : amp
ds_AMPA_ext / dt = - s_AMPA_ext / tau_AMPA : 1
'''
eqs_E2 = '''
dv / dt = (- g_m_E * (v - V_L) - I_AMPA_rec) / C_m_E : volt (unless refractory)
I_AMPA_rec = g_AMPA_rec_I * (v - V_E) * 1 * s_AMPA : amp
ds_AMPA / dt = - s_AMPA / tau_AMPA : 1
'''
P_E1 = NeuronGroup(N_E, eqs_E1, threshold='v > V_thr', reset='v = V_reset', refractory=tau_rp_E, method='euler')
P_E1.v = V_L
P_E2 = NeuronGroup(N_E, eqs_E2, threshold='v > V_thr', reset='v = V_reset', refractory=tau_rp_E, method='euler')
P_E2.v = V_L

eqs_glut = '''
w : 1
'''

eqs_pre_glut = '''
s_AMPA += w
'''
eqs_pre_ext = '''
s_AMPA_ext += 1
'''
# E to E
C_P_E = PoissonInput(P_E1, 's_AMPA_ext', C_ext, rate, '1')
C_E_E = Synapses(P_E1, P_E2, model=eqs_glut, on_pre=eqs_pre_glut, method='euler')
C_E_E.connect('i != j')
C_E_E.w[:] = 1



# monitors
sp_E1 = SpikeMonitor(P_E1[:N_E])
r_E1 = PopulationRateMonitor(P_E1[:N_E])
sp_E2 = SpikeMonitor(P_E2[:N_E])
r_E2 = PopulationRateMonitor(P_E2[:N_E])

# simulate, can be long >120s
net = Network(collect())
net.add(sp_E1)
net.add(r_E1)
net.add(sp_E2)
net.add(r_E2)
net.run(4 * second, report='stdout')

Actual output

Hi @SirK. I think the simulation is working correctly, the input weights are simply too weak. If you look at the membrane potential of a neuron, you see that it is far from reaching the threshold at -50mV:
Figure_1

Please also note that C_E_E.connect('i != j') is a connection pattern that is commonly used for connecting a population to itself. It connects all neurons to each other, but doesn’t connect neurons to themselves. Using this pattern across two populations is not very meaningful; each neuron receives input from all neurons in the other population, except from the one that happens to have the same index as itself. Finally, this connection pattern means that the activity in your second population will be almost the same for all neurons, since they receive almost exactly the same input.

Thank you so much for your kind respond :slight_smile:

1 Like