Dear Charl,

That is great. I have run some tests here, and am also convinced by this result. Thank you so much for putting effort into this!
All the best for the new year too!


Em dom., 10 de jan. de 2021 às 08:32, Charl Linssen <> escreveu:
Dear Júlia,

Best wishes for the new year! I have tinkered around a bit with the script, and rewrote it along these lines:
- time is evolved strictly chronologically from spike to spike
- there is a helper function (with parameter t) to obtain the pre or post trace value at any time t
- dendritic delay is accounted for by simply adding the delay value to all the postsynaptic somatic spike times, to obtain the postsynaptic synaptic-perspective spike times

With these changes, the NEST weight evolution seems to be replaced precisely—please see the bottom panel in the figure generated by the script. Caveat: I only did a visual comparison for very long simulation time, it would be great if you could confirm that you are indeed also convinced by this result!


On Wed, Dec 16, 2020, at 11:32, Julia Gallinaro wrote:
> Hi Charl,
> Thanks a lot for looking into this and for the suggestions. I will do
> some more tests considering what you wrote and let you know if I have
> any updates.
> I wish you nice Holidays!
> Best,
> Júlia
> On Wed, 16 Dec 2020 10:22:22 +0100
>  "Charl Linssen" <> wrote:
> >Hi Júlia,
> >
> >Thanks for writing in. Of course, we try to ensure the correctness of
> >NEST Simulator by validation and unit testing, but it is a complex
> >piece of software with a long history, and it is not impossible that a
> >bug may exist in the triplet STDP synapse. I am not the original
> >author of that model, but I've been working with other synaptic
> >plasticity models and would be happy to investigate.
> >
> >You probably know already that the (dendritic) communication delay
> >introduces a few quirks in the code. In particular, the postsynaptic
> >spike arrives at the synapse delayed by this amount, whereas the
> >postsynaptic trace values are obtained without the delay (that is, at
> >the actual time that the somatic action potential is fired).
> >
> >I had a look at your script, and couldn't immediately find anything
> >out of the ordinary. You reproduced the NEST buffering methodology
> >quite accurately (postsynaptic spikes are buffered, and only handled
> >after a presynaptic spike arrives), but during this stage of finding
> >the reason for the discrepancy, it might help to just treat all the
> >spikes (pre and post) chronologically.
> >
> >Perhaps you already found this, but there are some unit tests in place
> >in pynest/nest/tests/, that do some
> >behavioural validation of the synapse. I don't think these cover the
> >general case (as in your script), but might help honing in on a bug.
> >
> >I'll try to get back to you over the next few weeks (modulo the
> >holidays...) with more details. If there are any updates from your
> >side in the mean time, please do share!
> >
> >Best regards,
> >Charl Linssen
> >
> >
> >
> >On Thu, Dec 10, 2020, at 19:16, Julia Gallinaro wrote:
> >> Dear NEST community,
> >>
> >> I am working with the triplets STDP connection on NEST simulations,
> >and I am interested in how the weight dynamics change when the spike
> >trains are altered in some specific ways.
> >>
> >> In order to do that, I run a network simulation using NEST and the
> >triplets STDP rule and save the full spike trains of two neurons which
> >are synaptically connected (one pre and one post). I then recreate the
> >weight changes on a code outside the NEST loop, so that I can
> >manipulate the spike trains and observe what happens to the synaptic
> >weights.
> >>
> >> Trying to validate this approach, though, I find that my code
> >(outside NEST loop) generates different weight values than the NEST
> >simulation when using the same spike trains generated during the
> >simulation. I guess I have some error in my implementation of the
> >triplets rule. I thought it could be something with the implementation
> >of the delays, or the moment when the weights are measured in the
> >simulation, but I have had no success trying to fix it yet.
> >>
> >> I know this is not exactly a NEST issue, but I thought I would give
> >it a try and ask here at the list. In case someone has already worked
> >with the triplets rule and could point me out to what is/could be
> >wrong in my implementation, I would very much appreciate it :)
> >>
> >> Thanks!
> >>
> >> best,
> >> Júlia
> >> _______________________________________________
> >> NEST Users mailing list --
> >> To unsubscribe send an email to
> >>
> >>
> >> *Attachments:*
> >>  *
> _______________________________________________
> NEST Users mailing list --
> To unsubscribe send an email to
NEST Users mailing list --
To unsubscribe send an email to