Inhibitory vs excitatory neuron

Description of problem

I have defined I as shown in the code below, and I’m wondering whether I need to add a negative sign to I_syn. Below is the fsn code. In which cases should the negative sign be added? The synapse connections are defined separately

Minimal code to reproduce problem

eqs = '''
dv/dt = (k * 1 * pF/ms/mV * (v - vr) * (v - vt) - u * pF + I) / C : volt (unless refractory)
du/dt = int(v <= vb) * (a * (b * (vb - v)**3 - u)) + int(v > vb) * (-a * u) : volt/second
I = Ispon + Istim + Isyn : amp
Istim   : amp
Ispon   : amp
Isyn = I_AMPA_FSN + I_NMDA + I_GABA_FSN: amp
I_GABA_FSN  : amp
I_AMPA_FSN : amp
I_NMDA : amp
a : 1/second
b : volt**-2/second
k : 1
E_L    : volt
vt     : volt
vr     : volt 
vb     : volt  
tau_w  : second
th     : volt
C      : farad
c      : volt
d      : volt/second
''''

What you have aready tried

Expected output (if relevant)

Actual output (if relevant)

Full traceback of error (if relevant)

Hi @keun. I’m not 100% sure whether I understood your question correctly, but the sign of Isyn usually does not change between excitatory and inhibitory synapses. I don’t know the details of your models, but your Isyn current seems to be a sum of inhibitory GABA and excitatory AMPA and NMDA synapses. An inhibitory neuron connecting to your target neuron would only increase the GABA current, and an excitatory neuron would connect with either AMPA or NMDA, or both. Does that help?

1 Like

Hi, Thank you for the response. This was the part I was confused about, but now I completely understand. I have one more question: Below is the code for connecting synapses, but the ampa, nmda, and gaba all have a negative sign in the constant term. I’m wondering if this works correctly. Thanks to your answer, I was able to resolve the issue I was curious about.

type 1 synapse function:

Synapses(self.Cortex_MSND1, self.MSND1, model=‘’’
g0_a : siemens
g0_n : siemens
E_AMPA : volt
E_NMDA : volt
w : 1
tau_AMPA : second
tau_NMDA : second
dg_a/dt = -g_a / tau_AMPA : siemens (clock-driven)
dg_n/dt = -g_n / tau_NMDA : siemens (clock-driven)
I_AMPA_syn = w * g_a * (E_AMPA - v) : amp
I_NMDA_syn = 0.168 * w * g_n * (E_NMDA - v) / (1 + Mg2 * exp(-0.062 * v / mV) / 3.57) : amp
I_syn = I_AMPA_syn + I_NMDA_syn : amp
Mg2 : 1
‘’',

type 2 synapse function:

Synapses(self.Cortex_FSN, self.FSN, model=‘’’
g0_a : siemens
E_AMPA : volt
w : 1
tau_AMPA : second
dg_a/dt = -g_a / tau_AMPA : siemens (clock-driven)
I_syn = w * g_a * (E_AMPA - v) : amp # Output current variable
‘’’

Hi again @keun. Could you explain what you mean by “but the ampa, nmda, and gaba all have a negative sign in the constant term” – what is the “constant term” here? In your AMPA equations, w and g_a should be positive, and the (E_\text{AMPA} - v) term will be positive as well, since E_\text{AMPA} > v. In contrast, for an inhibitory synapse, E_\text{GABA} < v (almost always), so I_\text{GABA} will be negative.

@mstimberg Thank you for your answer.

I was wondering if the negative sign in the update of ( g_a ) would cause the synaptic current ( I_\text{syn} ) to become negative as well, since it is reflected in the equation. However, I understand that for inhibitory synapses like GABA, where ( E_\text{GABA} < v ), the current is expected to be negative. So, I was concerned whether the negative sign of ( g_a ) would inadvertently cause the current to be incorrectly negative.

Thank you for your detailed explanation – it really helped clarify things for me!

Hi again. For a model with actual conductances (i.e. terms in the equations that look like g*(E - v)), the conductances should always be positive – physically, there is no such thing as a negative conductance. The confusion might stem from the fact that examples like Example: CUBA — Brian 2 2.7.1 documentation increase the ge for excitatory synapses, but decrease gi for inhibitory synapses. This is because in such models, the ge and gi variables do not represent conductances, despite their names.