Description of problem
I am trying to implement a lIF network with conductance-based synapses, supposed to resemble a similar lIF network with current-based synapses as e.g. done in Meffin, et al. (2004), and Cavallari et al. (2014).
To be able to reproduce the Meffin network, I tried adapting the Brunel network (as implemented in the Brian2 examples) to conductance-based synapses. However, I can’t quite seem te grasp how to do this properly because of the connection between V and the conductance parameter.
I realise that there have been a lot of questions surrounding this topic already, but none of them seem to help me solve my issue in this specific model (in fact, the conversion from current-based to conductance-based seems easier in the models with more complex synapses as then there is a conductance/current parameter explicitly defined and updated.)
So I am hoping that someone in this community can help me.
Minimal code to reproduce problem
I added the following lines to the code from the example (with only parameters set B):
## Meffin to COBA method
Vbar = (theta+V_r)/2.
Ve_ = (0+60) * mV
Vi_ = (-80+60) * mV
be = J
bi = -g*J
ae = be / (Vbar-Ve_)
ai = bi / (Vbar-Vi_)
What you have aready tried
I tried several things (not being convinced either is the correct way to do this and none seem to produce correct activity ).
- Changing the effect of the synapses
on_pre="v += ae*(Ve_-v_post)"
andon_pre="v += ai*(Vi_-v_post)"
and the Poisson input toP = PoissonGroup(C_ext, rates=nu_ext); SynP = Synapses(P, neurons, on_pre="v += ae*(Ve_ - v_post)"); SynP.connect()
→ No activity at all - Changing the neuron and synapse equations to the following (but then there is something wrong with the units and as expected I get the
DimensionMismatchError: Inconsistent units in differential equation defining variable 'v'
:
neurons = NeuronGroup(N,
"""dv/dt = -v/tau - ainh*(v-Vi_) - aex*(v-Ve_): volt (unless refractory)
ainh : 1
aex : 1
""", threshold="v > theta", reset="v = V_r", refractory=tau_rp, method="rk2")
exc_synapses = Synapses(excitatory_neurons, target=neurons, on_pre="aex += ae", delay=D)
inhib_synapses = Synapses(inhibitory_neurons, target=neurons, on_pre="ainh += ai", delay=D)
external_poisson_input = PoissonInput(target=neurons, target_var="aex", N=C_ext, rate=nu_ext, weight=ae)
- Although I cannot seem to find a reference in the paper by Meffin to a good time constant to use to solve the units problem I randomly tried dividing the whole expression for
dv/dt
bytau
, but that just leads to plumetting voltage values and accompanying warnings
`WARNING (string):19: RuntimeWarning: overflow encountered in multiply
[py.warnings]
WARNING (string):20: RuntimeWarning: invalid value encountered in subtract
[py.warnings]
WARNING (string):20: RuntimeWarning: invalid value encountered in multiply
[py.warnings]
WARNING (string):20: RuntimeWarning: overflow encountered in multiply
[py.warnings]
WARNING (string):19: RuntimeWarning: invalid value encountered in multiply
[py.warnings]
WARNING neurongroup's variable 'v' has NaN, very large values, or encountered an error in numerical integration. This is usually a sign that an unstable or invalid integration method was chosen. [brian2.groups.group.invalid_values]