Implementing Neuron model with conductance based synapse with adjustable synaptic time constants

Description of problem

Hi everyone !

I am trying to model the functionality of olfactory bulb using Brian2. My network comprises of Olfactory Receptor Neurons, Mitral Cells, Tufted cells and External Tufted cells. To get the desired spikes for different neuron types, I am using neuron model with synaptic conductances as described in this link :
https://brian2.readthedocs.io/en/2.5.1/examples/frompapers.Stimberg_et_al_2018.example_1_COBA.html

I expected that by altering synaptic time constants of Mitral cells and Tufted cells, I can change the spiking activity of mitral cells and tufted cells. However, alteration of synaptic time constants (Excitatory and Inhibitory) has not changed the spiking activity of these cell types.

Am I implementing the synaptic conductance model correctly ?

Please guide me for the same as I am not much familiar with usage of synaptic conductances in Brian2.

Minimal code to reproduce problem

This is my code to reproduce the problem I am facing :

import pandas as pd
import numpy as np
from scipy import signal

start_scope()
seed(11922)

# Parameters
n_osn=25000
n_m_cells=25
n_et_cells=25
n_t_cells=50

# Neuron parameters
# OSNs
g_L_osn=9.99*nS                     # Leak conductance
E_l_osn=-70*mV                      # Leak reversal potential
E_e_osn=0*mV                        # Excitatory synaptic reversal potential
E_i_osn=-80*mV                      # Inhibitory synaptic reversal potential
C_m_osn=198*pF                      # Membrane Capacitance
tau_e_osn=5*ms                      # Excitatory synaptic time constant
tau_i_osn=10*ms                     # Inhibitory synaptic time constant
tau_r_osn=5*ms                      # Refractory period
V_th_osn=-55*mV                     # Firing threshold
V_r_osn=E_l_osn                     # Reset potential
g_e_osn=0.05*nS                     # Excitatory synaptic conductance
g_i_osn=1.0*nS                      # Inhibitory synaptic conductance
tau_osn=20*ms

# Mitral cells
g_L_m=9.99*nS                       # Leak conductance
E_l_m=-70*mV                        # Leak reversal potential
E_e_m=0*mV                          # Excitatory synaptic reversal potential
E_i_m=-80*mV                        # Inhibitory synaptic reversal potential
C_m_m=198*pF                        # Membrane Capacitance
tau_e_m=25*ms                       # Excitatory synaptic time constsnt
tau_i_m=30*ms                       # Inhibitory synaptic time constant
tau_r_m=5*ms                        # Refractory period
V_th_m=-53*mV                       # Firing threshold
V_r_m=E_l_m                         # Reset potential
g_e_m=0.05*nS                       # Excitatory synaptic conductance
g_i_m=1.0*nS                        # Inhibitory synaptic conductance
tau_m=20*ms                     

# External Tufted Cells
g_L_et=9.99*nS                       # Leak conductance
E_l_et=-70*mV                        # Leak reversal potential
E_e_et=0*mV                          # Excitatory synaptic reversal potential
E_i_et=-80*mV                        # Inhibitory synaptic reversal potential
C_m_et=198*pF                        # Membrane Capacitance
tau_e_et=5*ms                       # Excitatory synaptic time constsnt
tau_i_et=10*ms                       # Inhibitory synaptic time constant
tau_r_et=5*ms                        # Refractory period
V_th_et=-50*mV                       # Firing threshold
V_r_et=E_l_et                         # Reset potential
g_e_et=0.05*nS                       # Excitatory synaptic conductance
g_i_et=1.0*nS                        # Inhibitory synaptic conductance
tau_et=20*ms  

# Tufted cells
g_L_t=9.99*nS                       # Leak conductance
E_l_t=-70*mV                        # Leak reversal potential
E_e_t=0*mV                          # Excitatory synaptic reversal potential
E_i_t=-80*mV                        # Inhibitory synaptic reversal potential
C_m_t=198*pF                        # Membrane Capacitance
tau_e_t=1*ms                       # Excitatory synaptic time constsnt
tau_i_t=4*ms                       # Inhibitory synaptic time constant
tau_r_t=5*ms                        # Refractory period
V_th_t=-50*mV                       # Firing threshold
V_r_t=E_l_t                         # Reset potential
g_e_t=0.05*nS                       # Excitatory synaptic conductance
g_i_t=1.0*nS                        # Inhibitory synaptic conductance
tau_t=20*ms
sigma=0.015*second
weight_osn_m=0.0000008*volt
weight_osn_et=0.000008*volt
weight_et_m=0.002*volt
weight_osn_t=0.000005*volt

t_recorded=np.arange(int(20000*ms/defaultclock.dt))*defaultclock.dt
I_rec_1_sin=TimedArray(I1_1_sin*amp,dt=defaultclock.dt)

eqs_osn='''
dv/dt=((sigma*xi*sqrt(2/tau_osn))*(volt/second)+(g_L_osn*(E_l_osn-v)+g_e_osn*(E_e_osn-v)+g_i_osn*(E_i_osn-v)+I)/C_m_osn):volt (unless refractory)
I=I_rec_1_sin(t):amp
dg_e/dt=-g_e_osn/tau_e_osn:siemens
dg_i/dt=-g_i_osn/tau_i_osn:siemens
'''

eqs_m_cells='''
dv/dt=(g_L_m*(E_l_m-v)+g_e_m*(E_e_m-v)+g_i_m*(E_i_m-v))/C_m_m:volt (unless refractory)
dg_e/dt=-g_e_m/tau_e_m:siemens
dg_i/dt=-g_i_m/tau_i_m:siemens
'''

eqs_et_cells='''
dv/dt=(g_L_et*(E_l_et-v)+g_e_et*(E_e_et-v)+g_i_et*(E_i_et-v))/C_m_et:volt (unless refractory)
dg_e/dt=-g_e_et/tau_e_et:siemens
dg_i/dt=-g_i_et/tau_i_et:siemens
'''
eqs_t_cells='''
dv/dt=(g_L_t*(E_l_t-v)+g_e_t*(E_e_t-v)+g_i_t*(E_i_t-v))/C_m_t:volt (unless refractory)
dg_e/dt=-g_e_t/tau_e_t:siemens
dg_i/dt=-g_i_t/tau_i_t:siemens
'''

G_osn=NeuronGroup(n_osn,eqs_osn,threshold='v>V_th_osn',reset='v=V_r_osn',refractory='tau_r_osn',method='euler')
G_m=NeuronGroup(n_m_cells,eqs_m_cells,threshold='v>V_th_m',reset='v=V_r_m',refractory='tau_r_m',method='euler')
G_et=NeuronGroup(n_et_cells,eqs_et_cells,threshold='v>V_th_et',reset='v=V_r_et',refractory='tau_r_et',method='euler')
G_t=NeuronGroup(n_t_cells,eqs_t_cells,threshold='v>V_th_t',reset='v=V_r_t',refractory='tau_r_t',method='euler')


G_osn.v='V_r_osn+rand()*(V_th_osn-V_r_osn)'
G_m.v='V_r_m+rand()*(V_th_m-V_r_m)'
G_et.v='V_r_et+rand()*(V_th_et-V_r_et)'
G_t.v='V_r_t+rand()*(V_th_t-V_r_t)'

S_osn_m=Synapses(G_osn,G_m,on_pre='v+=weight_osn_m')
S_osn_et=Synapses(G_osn,G_et,on_pre='v+=weight_osn_et')
S_osn_t=Synapses(G_osn,G_t,on_pre='v+=weight_osn_t')
S_et_m=Synapses(G_et,G_m,on_pre='v+=weight_et_m')

S_osn_m.connect(p=0.1)
S_osn_et.connect(p=0.1)
S_osn_t.connect(p=0.1)
S_et_m.connect(condition='abs(i-j)<=3')

# Record the spikes
M_osn_sin_ms_1_t=SpikeMonitor(G_osn[0:100])
M_m_sin_ms_1_t=SpikeMonitor(G_m)
M_t_sin_ms_1_t=SpikeMonitor(G_t)
M_et_sin_ms_1_t=SpikeMonitor(G_et)

# Record the membrane voltage
V_osn_sin_ms_1_t=StateMonitor(G_osn[0:100],'v',record=True)
V_m_sin_ms_1_t=StateMonitor(G_m,'v',record=True)
V_t_sin_ms_1_t=StateMonitor(G_t,'v',record=True)
V_et_sin_ms_1_t=StateMonitor(G_et,'v',record=True)

run(20*second)

What you have aready tried

I tried to plot spike trains and membrane potentials of Mitral cells and Tufted cells. Altering synaptic time constants (both excitatory and inhibitory) do not bring any significant change in the spiking activity of these cell types.

Hi @Shavika . Your model describes synaptic conductances, but the synaptic on_pre statements do not use them. In these lines:

S_osn_m=Synapses(G_osn,G_m,on_pre='v+=weight_osn_m')
S_osn_et=Synapses(G_osn,G_et,on_pre='v+=weight_osn_et')
S_osn_t=Synapses(G_osn,G_t,on_pre='v+=weight_osn_t')
S_et_m=Synapses(G_et,G_m,on_pre='v+=weight_et_m')

you say that an arriving spike should directly increase the post-synaptic membrane potential v, instead of the synaptic conductances g_e or g_i. Do actually use the synaptic conductances, you’d need to declare weights in siemens, and target them with something like on_pre='g_e += weight'. Your current implementation does not use the time constants (all g_e and g_i variables are zero at all times), so changing them does not have any effect.

PS: To post code in a nicely readable way, please enclose it in triple backticks like this:

```
# My code
group = NeuronGroup(...)
```