nest-simulator icon indicating copy to clipboard operation
nest-simulator copied to clipboard

Trace calculation bug in STDP triplet synapse

Open clinssen opened this issue 4 years ago • 2 comments

The triplet synapse model [1] begins by formulating a few trace values in the form:

dx(t)/dt = -x(t) / tau  ;   if t = t_spike then x → x + 1

We deem this formulation to be equivalent to a sum of delta functions, as formulated in [2]:

dx(t)/dt = -x(t) / tau + \sum_i delta(t - t_i)

where the delta function (a definition was omitted from [2]) is presumably the usual Dirac delta, defined as:

delta(x) = 0 for x ≠ 0 and ∫ delta(t) dt = 1

The weight update rules for depression and facilitation are then formulated, respectively, in the form:

w(t) → w(t) − tr1_post(t) · (a + b · tr2_pre(t⁻))       if t = t_pre
w(t) → w(t) + tr2_pre(t) · (c + d · tr1_post(t⁻))       if t = t_post

a, b, c and d are constants. The superscript minus symbol on the time parameter t indicates that the value just prior to an update due to an arriving spike is intended. Sometimes this is written as x(t - epsilon), but an adequate definition of epsilon may then be lacking ("epsilon is a small positive constant" [1]).

The edge case occurs when a pre- and postsynaptic (backpropagating) action potential arrive simultaneously at the synapse. In this case, it is also significant whether the first terms in each weight update equation (tr1_post(t) and tr2_pre(t)) refer to the value just prior, or just after arrival of the spike, in other words, do we mean the values at t⁻ or at t⁺?

Note that the delta functions appear as an integrand in the calculation of x(t). The antiderivative of the Dirac delta is the Heaviside step function, often defined as:

step(t) = { 0  if t < 0
          { 1  if t >= 0

The value of step(0) is, however, more a matter of convention than of rigorous mathematics, so other choices are conceivable.

The current status is that NEST interprets the above formulation as meaning t⁻, so it conflicts with the given definitions, which correspond to an interpretation as t⁺.

So the question is, do we take the definitions above as what we actually want, and conclude that there is a bug in the model? Or do we say that the current implementation of the triplet rule simply defines the step function for its traces as

step(t) = { 0  if t <= 0
          { 1  if t > 0

This is a rare edge case and will probably not qualitatively change any existing simulations. Of course, we should add this as a unit test. It can be based on the attached code, which reproduces the issue. Set before_increment to True on lines 213 and 225 to switch the interpretation from t⁺ to t⁻.

As first reported on the NEST-users mailing list by Júlia Gallinaro, Dec 2020.

[1] Jean-Pascal Pfister and Wulfram Gerstner, "Triplets of Spikes in a Model of Spike Timing-Dependent Plasticity". The Journal of Neuroscience 26(38), September 20, 2006 https://www.jneurosci.org/content/jneuro/26/38/9673.full.pdf

[2] Abigail Morrison, Markus Diesmann and Wulfram Gerstner, Phenomenological models of synaptic plasticity based on spike timing. Biol. Cybern. 98 (2008)

clinssen avatar Mar 22 '21 18:03 clinssen

@clinssen Thank you for this nice exposition! Would you consider to turn it in to a notebook under doc/userdoc/model_details?

heplesser avatar Mar 22 '21 20:03 heplesser

Issue automatically marked stale!

github-actions[bot] avatar Sep 03 '21 08:09 github-actions[bot]

Could someone involved please send an update on the status of this issue?

terhorstd avatar Jan 18 '23 13:01 terhorstd