Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trace calculation bug in STDP triplet synapse #1990

Open
clinssen opened this issue Mar 22, 2021 · 3 comments
Open

Trace calculation bug in STDP triplet synapse #1990

clinssen opened this issue Mar 22, 2021 · 3 comments
Assignees
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: Normal Handle this with default priority stale Automatic marker for inactivity, please have another look here T: Bug Wrong statements in the code or documentation
Projects

Comments

@clinssen
Copy link
Contributor

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 clinssen added T: Discussion Still searching for the right way to proceed / suggestions welcome S: Normal Handle this with default priority labels Mar 22, 2021
@clinssen clinssen self-assigned this Mar 22, 2021
@clinssen clinssen added this to To do in Models via automation Mar 22, 2021
@heplesser
Copy link
Contributor

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

@stinebuu stinebuu added the I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) label Mar 24, 2021
@heplesser heplesser added this to the NEST 3.2 milestone Jun 30, 2021
@heplesser heplesser added S: High Should be handled next T: Bug Wrong statements in the code or documentation and removed S: Normal Handle this with default priority T: Discussion Still searching for the right way to proceed / suggestions welcome labels Jun 30, 2021
@github-actions
Copy link

github-actions bot commented Sep 3, 2021

Issue automatically marked stale!

@github-actions github-actions bot added the stale Automatic marker for inactivity, please have another look here label Sep 3, 2021
@stinebuu stinebuu modified the milestones: NEST 3.2, NEST 3.3 Dec 6, 2021
@clinssen clinssen removed this from the NEST 3.3 milestone Mar 7, 2022
@clinssen clinssen assigned pnbabu and unassigned clinssen Nov 30, 2022
@terhorstd
Copy link
Contributor

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

@clinssen clinssen added S: Normal Handle this with default priority and removed S: High Should be handled next labels Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: Normal Handle this with default priority stale Automatic marker for inactivity, please have another look here T: Bug Wrong statements in the code or documentation
Projects
Models
  
To do
Development

No branches or pull requests

5 participants