Page 1 of 1

NMDA channel learning rule

Posted: Wed Jan 10, 2007 8:44 am
by epokh
Hi, I'm a genesis users and I never used neuron.
I would to ask if it's possible to implement in neuron a custom learning rule for a NMDA synpase.
I'm blocked with this problem in genesis for a long time, the problem is that in genesis I have to compile a library to do so, but t I'm the first user to do that, so there are a some problems.

Is it more easy with neuron?
The rule is really simply:
deltaW=[NMDA activity]*Iout
W is the weight of the synapse
NMDA activity is the activity of the synapse
Iout is the current flowing out from the synapse

The weight change is activated with the dopamine signal that in genesis is a an input message.
The weight must be updated for every step of the simulation.
thanks in advance

Re: NMDA channel learning rule

Posted: Fri Jan 12, 2007 3:35 pm
by ted
"All things are possible with programming." But before plunging into implementational details,
some questions about your conceptual model to make sure that what you end up with is a
close match to what you have in mind. The rule described in your posting is already a mix
of concept and implementation.

What do you mean by this term: "activity of the synapse"?

This expression "deltaW=[NMDA activity]*Iout" suggests that Iout is a surrogate for
something else. What?

"The weight must be updated for every step of the simulation."
But this calculation will only affect the conductance change that results from future
synaptic activations, right?

Re: NMDA channel learning rule

Posted: Sat Jan 13, 2007 4:04 am
by epokh
ted wrote:"All things are possible with programming." But before plunging into implementational details,
some questions about your conceptual model to make sure that what you end up with is a
close match to what you have in mind. The rule described in your posting is already a mix
of concept and implementation.

What do you mean by this term: "activity of the synapse"?

This expression "deltaW=[NMDA activity]*Iout" suggests that Iout is a surrogate for
something else. What?

"The weight must be updated for every step of the simulation."
But this calculation will only affect the conductance change that results from future
synaptic activations, right?
Oky more explanation:
the Iout is the current flowing out from the synapse (in genesis is a field associated to the synapse object).
The NMDA acitivity refer to the double exponential curve associated to the NMDA synapse.

And yes the calculation will affect the conductance that result for future synaptic activations.
More in detail: when the synapse is activated with some incoming spike and the dopamine signal is on.

I was talking about for every step of simulation because in my genesis implementation I control the simulation process so I check for the activity and the dopamine signal in every step.

So there are also some examples about this case?
Thanks a lot for the answer.

Re: NMDA channel learning rule

Posted: Sat Jan 13, 2007 5:27 pm
by ted
epokh wrote:the Iout is the current flowing out from the synapse
That was already evident. The purpose of my question was to get you to say something
about mechanism. In other words, what is it about this current that enables it to affect
synaptic weight?
The NMDA acitivity refer to the double exponential curve associated to the NMDA synapse.
Double exponential curve that describes what? Time course of transmitter
concentration? Time course of the synaptic conductance change elicited by a single
activation of the synapse?
the calculation will affect the conductance that result for future synaptic activations.
So activation of a synapse at time t0 will affect only the conductance changes produced
by activation at later times, i.e. time t1 > t0 ?
I was talking about for every step of simulation because in my genesis implementation I control the simulation process so I check for the activity and the dopamine signal in every step.
Incrementing weight at every time step according to synaptic current requires scaling the
weight change by 1/dt. Or do you really increment weight according to synaptic charge?

Is the degree of potentiation independent of the interval t1-t0 between the conditioning
activation and the test activation? Or should potentiation decay to 0 as t1-t0 becomes
large?

Re: NMDA channel learning rule

Posted: Sun Jan 14, 2007 5:57 pm
by epokh
About the Iout:
The Iout could be seen as the derivate of the calcium concentration.
This is of course an appoximation but for beginning is more easy.

About the channel activity:
I mean the following equation
/*
* calculate the activation level of the channel
* dx/dt = (activation*tau1 - x)/tau1
* x = activation*tau1*(1-exp(-dt/tau1)) + x*exp(-dt/tau1))
* or
* x = activation*xconst1 + x*xconst2
*/
where activation is the dopamine signal value.

About the time activation:
yes this is right

About the LTP and LTD
This rule is supposed to lead to long term potentiation and deponentiation.
The pot decay to 0 as t1-t0 becomes large.

Feel fre to ask me other question. You are my GOD now!

Re: NMDA channel learning rule

Posted: Mon Jan 15, 2007 1:10 pm
by ted
Not infallible, so not quite a god. Right more often than wrong would be nice, though.
epokh wrote:About the Iout:
The Iout could be seen as the derivate of the calcium concentration.
This is of course an appoximation but for beginning is more easy.
Actually, with NEURON it's easier to just go ahead and calculate the accumulation of
calcium, or whatever substance it is that ultimately affects the weight of future events--the
only limitation with this approach is that all synaptic mechanisms that attach to the same
compartment will see the same concentration of the potentiating substance.
This rule is supposed to lead to long term potentiation and deponentiation.
The pot decay to 0 as t1-t0 becomes large.
So a simple accumulation mechanism that governs the potentiation substance ps might
be described by an equation something like this
ps' = -(k*i + ps)/tau
where i is the synaptic current, tau is the time constant for decay of ps, and k is a scale
factor that describes how strongly synaptic current affects ps.
Notice the minus sign (inward currents are < 0).

Here's a first draft of the NMODL code that would implement such a mechanism.
It is not guaranteed to work or to be free of typographical errors or bugs,
and units inconsistencies are likely, so you will need to test it and correct
any errors you find. Also, I just guessed at the values of the parameters.

Code: Select all

NEURON {
  POINT_PROCESS Psyn
  USEION ps READ psi WRITE psi VALENCE 1
  NONSPECIFIC_CURRENT i
  RANGE taug, taups, e, i
}

PARAMETER {
  : change these to whatever you need
  e = 0 (mV)
  g0 = 1e-4 (uS) : or whatever it should start at
  taug = 3 (ms) : decay of synaptic conductance
  taups = 25 : decay of potentiating substance
  k = 0.5 : how strongly ica affects the potentiating substance
  kpsi = 1 (/mM) : effect of psi on synaptic strength
  psi0 = 0 (mM) : initial concentration of psi
}

ASSIGNED {
  v (mV)
  i (nA)
}

STATE {
  g (uS)
  psi (mM) : intracellular concentration of the potentiating substance
}

INITIAL {
  g = 0
  psi = psi0
}

BREAKPOINT {
  SOLVE state METHOD cnexp
  i = g*(v - e)
}

DERIVATIVE state {
  g' = -g/taug
  psi' = -(k*i + psi)/taups
}

NET_RECEIVE (weight (uS)) {
  g = g+weight*(1 + kpsi*psi)
}
This mechanism is designed to be driven by events delivered by a NetCon.
Each event that arrives will bounce g up by an amount equal to
weight*(1 + kpsi*psi)
after which g will resume its decay back toward 0.
The concentration of the potentiating substance psi is calculated by
leaky integration of the synaptic current i, that is, by this equation
psi' = -(k*i + psi)/taups
so that psi will grow when the synaptic current is large, and decay when
the current is small.

Re: NMDA channel learning rule

Posted: Mon Jan 15, 2007 2:31 pm
by ted
Something that I forgot to mention in my previous note: this mechanism does not have
stream-specific plasticity, so it should only be driven by a single NetCon.

Another important point that I realized on further reflection--it's best not to treat ps as
an ion. It should just be an ordinary STATE. This allows multiple synaptic mechanisms
of the same type to be located in the same compartment.

Also I omitted the units for taups and k.

With the necessary changes, the code becomes (citing just the parts that change):

Code: Select all

NEURON {
  POINT_PROCESS Psyn
  NONSPECIFIC_CURRENT i
  RANGE taug, taups, e, i
}
 . . .
PARAMETER {
 . . .
  taups = 25  (ms) : decay of potentiating substance
  : this value for k may be much too big
  k = 0.5 (mM/nA) : how strongly i affects the potentiating substance
  kps = 1 (/mM) : effect of ps on synaptic strength
  ps0 = 0 (mM) : initial concentration of psi
}
 . . .
STATE {
  g (uS)
  ps (mM) : intracellular concentration of the potentiating substance
}

INITIAL {
  g = 0
  ps = ps0
}
 . . .
DERIVATIVE state {
  g' = -g/taug
  ps' = -(k*i + ps)/taups
}

NET_RECEIVE (weight (uS)) {
  g = g+weight*(1 + kps*ps)
}

o thanks a lot

Posted: Mon Jan 15, 2007 3:29 pm
by epokh
O ted that's great! It was exaclty what I wanted!
I have some question about the code:
when you declare the v and i in the ASSIGNED block, it means that v is the voltage corresponding to the section where the Psyn will be placed?
And what about the declaration:
NONSPECIFIC_CURRENT i
what does it mean?

Another interesting rule to be implemented (but I don't need now so don't worry for the code) it's using the derivative of the membrane potential.
It was something like:
deltaW=dv/dt * g
where g is the channel conductance
You can put it also in the integral form.
Is there a way to calculate derivatives using the NMODL ?

P.S.
You gained a new NEURON user! Even if the first love genesis is never forgotten!

Re: o thanks a lot

Posted: Mon Jan 15, 2007 8:17 pm
by ted
epokh wrote:when you declare the v and i in the ASSIGNED block, it means that v is the voltage corresponding to the section where the Psyn will be placed?
Yes.
NONSPECIFIC_CURRENT i
what does it mean?
i will not contribute to the mass balance equations for any identified ion species.
Another interesting rule to be implemented
I would think that an interesting rule is one for which there is experimental evidence,
or at least one that could be attributed to some biologically plausible mechanism.
Does this rule satisfy either of these criteria?
Is there a way to calculate derivatives using the NMODL ?
Not that I am aware of.

Re: o thanks a lot

Posted: Tue Jan 16, 2007 1:40 pm
by epokh
ted wrote:
epokh wrote: I would think that an interesting rule is one for which there is experimental evidence,
or at least one that could be attributed to some biologically plausible mechanism.
Does this rule satisfy either of these criteria?
Is there a way to calculate derivatives using the NMODL ?
Not that I am aware of.
You got it! In our group of research we start from the biophysics level to create the model! In this case my Prof. wrote a paper about the STDP and backpropagating spikes where he found the analytial model for the synapse plasticity that was confirmed by the experimental data.

Anyway I will studying more about the NEURON simulator!
Thanks again, cheers.

Posted: Wed Nov 21, 2007 2:07 pm
by ted
I was browsing through various threads on synaptic plasticity and noticed that the Psyn
mechanism raised a couple of issues that needed to be discussed. Also, it seemed like a
good idea to post the complete source code, with all changes necessary for units
consistency. So here's the code. The caveats in the COMMENT block address the issues.

Code: Select all

COMMENT
A synaptic mechanism with use-dependent plasticity that is 
governed by the current that flows through the synapse.

Caveats:
1.  Does not have stream-specific plasticity, so each instance 
should be driven by only 1 NetCon.  However, the "potentiating stuff" 
variable ps is treated as an ordinary STATE, not an ion, so that 
multiple synaptic mechanisms of the same type can be attached to 
the same compartment.

2.  Potential bug:  nothing in this code prevents ps from becoming 
negative.  If ps < 0, g itself could become negative.  This model 
should really be reformulated to prevent ps from falling below 0, 
or at least to prevent g from becoming negative, and it should be 
done in a mechanistically plausible way.
ENDCOMMENT

NEURON {
  POINT_PROCESS Psyn
  NONSPECIFIC_CURRENT i
  RANGE taug, taups, e, i
}

UNITS {
  (mV) = (millivolt)
  (nA) = (nanoamp)
  (uS) = (microsiemens)
  (mM) = (milli/liter)
}

PARAMETER {
  : change these to whatever you need
  e = 0 (mV)
  g0 = 1e-4 (uS) : or whatever it should start at
  taug = 3 (ms) : decay of synaptic conductance
  taups = 25 (ms) : decay of potentiating substance
  ps0 = 0 (mM) : initial concentration of ps
  : this value for k may be much too big
  k = 0.5 (mM/nA) : how strongly ica affects the potentiating substance
  kps = 1 (/mM) : effect of ps on synaptic strength
}

ASSIGNED {
  v (mV)
  i (nA)
}

STATE {
  g (uS)
  ps (mM) : "concentration" of the "potentiating substance"
}

INITIAL {
  g = 0
  ps = ps0
}

BREAKPOINT {
  SOLVE state METHOD cnexp
  i = g*(v - e)
}

DERIVATIVE state {
  g' = -g/taug
  ps' = -(k*i + ps)/taups
}

NET_RECEIVE (weight (uS)) {
  g = g + weight*(1 + kps*ps)
}