Questions regarding STDP in SpiNNaker

120 views
Skip to first unread message

Juan P. Dominguez

unread,
Nov 26, 2021, 7:24:57 AM11/26/21
to SpiNNaker Users Group
Hi!

I, together with a student of mine called Daniel Casanueva (who just asked for being a member of this group) are trying to build a very simple network that uses STDP (SpikePairRule, specifically). This network has two standard LIF neurons with billateral projections (neuron 0 to neuron 1, and neuron 1 to neuron 0, both having STDP).

We've simulated some different experiments using a SpiNN-3 board in order to fully understand how STDP works in those cases. We are having some doubts regarding what we expect to happen vs what is really happening.

In the following picture you can see a spike from neuron 0 in timestamps 4, 13 and 23. On the other hand, neuron 1 spikes at 14 and 15. There are no other spikes nor neurons in the network.
simple_network_stdp_custom_param_2021_11_24__12_27_32_spike_pre_postLIF Layer_1.png
With this experiment, we expect the projection from neuron 0 to 1 to increase the weight at 14, and then to increase again at 24. On the other hand, we expect the projection between 1 and 0 to decrease its weight at the same timestamps (the weights of the projections would behave the opposite).

The rules that we use for STDP are:
SpikePairRule with Aminus = Aplus = 1. Tau_minus = Tau_minus = 5.
AdditiveWeightDependence with w_max = 10, w_min = 1.
The initial weight for the projections is 4.

What we get as output of the simulation is what can be seen in the next pictures:
simple_network_stdp_custom_param_2021_11_24__12_27_32_w_1PC1_PC0.pngsimple_network_stdp_custom_param_2021_11_24__12_27_32_w_2PC0_PC1.png

These pictures show the evolution of the weights of the projection between neurons 0 and 1 (the last picture) and between 1 and 0 (the first picture). Therefore, the Y-axis shows the weight value, and the X-axis shows the simulation time in milliseconds.

We are trying to understand what it's really happening but we don't fully get it. First of all, the weight change is too strong, which we think it shouldn't be. Apart from that, the weight changes don't match the timestamps that we expect.

We think that maybe this is caused by the SpikePairRule not accepting projections in both ways. We saw that in the documentation it says that there's a rule called TimingDependenceRecurrent, which we don't know if that solves that problem (if that's even a problem with the SpikePairRule), but still we could't use that rule in the code (we think there are some imports that are missing).

Could you please give us some ideas on why we are getting this unexpected behavior? Maybe we are missing something on how the STDP in SpiNNaker works.

Thank you very much in advance.
Best regards,
Daniel Casanueva and Juan P. Dominguez-Morales 

steve.furber

unread,
Nov 26, 2021, 9:58:22 AM11/26/21
to SpiNNaker Users Group
Dear Juan & Daniel,

This paper may help explain the timing you are seeing: https://apt.cs.manchester.ac.uk/ftp/pub/apt/papers/XJin2_IJCNN10.pdf
(Though the paper is over 10 year old, so many details may have changed in the implementation!)

SpiNNaker fetches synaptic data when a pre-synaptic spike arrives. If a post-synaptic spike follows shortly after the pre-synaptic
spike, the synapse weight change does not take place until the next pre-synaptic spike. This is the “deferred event” model, and
explains the timing you show in your graphs - the 0->1 spike pair at 13, 14 ms changes the weight at the next pre-synaptic spike,
which occurs at 23 ms. The anti-causal 1->0 pair at 14, 13 ms can be applied immediately at 14 ms.

The causal 0->1 pair at 23, 24 ms will not have an effect until the next pre-synaptic spike, which is not shown. The anti-causal
1->0 pair at 24, 23 ms does not have a visible effect because the 1->0 synapse is by then already at the minimum value, 1.

So the timing all looks right, consistent with the deferred-event model, but I agree that the magnitudes of the weight changes
look excessive. This may be because of some misunderstanding of the units of the various STDP parameters, which you don't
state in your message - in particular the units of Aminus and Plus?

Best wishes,

—Steve

Juan P. Dominguez

unread,
Nov 29, 2021, 12:44:45 PM11/29/21
to SpiNNaker Users Group
Dear Steve,

Thank you very much for the explanation. We now understand the weight changes in terms of the timing rule considering the deferred event model. Regarding the magnitude of the changes, we haven't come to a conclusion yet on why the weight of the synapse change in that way. We've done some other experiments to analyze this behavior. In the following pictures you can find an experiment where neuron 0 spikes (blue line), causing neuron 1 to spike one millisecond later (orange line). This pattern is repeated periodically during the simulation time.

simple_network_stdp_custom_param_2021_11_29__13_03_40_spike_pre_postLIF Layer_1.png
The network used for this experiment is the same that we used for the first experiment that we presented in this post. The STDP parameters used in the connections are the same (SpikePairRule with Aminus = Aplus = 0.1. Tau_minus = Tau_minus = 5, AdditiveWeightDependence with w_max = 10, w_min = 1) The initial weight for the projections is 5. Regarding the units that we use for the Aminus and Aplus, we haven't change anything from default, so we guess it's nA. Next, you can find the figures showing the weight change on the 1-->0 projection and the 0-->1 projection, respectively.

simple_network_stdp_custom_param_2021_11_29__13_03_40_w_1PC1_PC0.pngsimple_network_stdp_custom_param_2021_11_29__13_03_40_w_2PC0_PC1.png


The figure that shows the weight change from the projection 1-->0 (left figure) matches with the behavior that we expect (the weight is changed on presynaptic spikes, with a depression of magnitude 1 nA for each LTD, since all of the LTD have the same timing conditions).  On the other hand, the weight change from the 0-->1 synapse is not very clear to us. The timing of the potentiation of the weight matches what we expect, but not the magnitude change. Since the same value is set for Aminus and Aplus, we expect the plot on the right to have potentiations of the same magnitude of the depressions that occur in the 1-->0 projection.

Moreover, we still do not clearly understand why the depressions on the left plot are of 1 nA, since Aminus is set to 0.1. Based on the documentation, a value close to Aminus should be directly subtracted from the current weight of the synapse if a postsynaptic spike is received a millisecond (minimum timestep) before than the presynaptic. As we mentioned earlier, we were also expecting this behavior for the 0-->1 weight change but in the form of potentiations with Aplus.

We will deeply appreciate if you could help us with these doubts regarding how STDP works in SpiNNaker.

Thank you very much in advance.

Best regards,
Daniel and Juan P.

steve.furber

unread,
Nov 30, 2021, 8:51:13 AM11/30/21
to SpiNNaker Users Group
Dear Juan,

Yes, the basic timing behaviour in both cases looks right, and the small increments in the 0->1 weights look right if the units of Aplus = 0.1 and the Y-axis are the same - are they nA in both cases? The axis in the figure is labelled with uS.

You say that the parameters are the same as in the first posting, but there Aplus = Aminus = 1 and here Aplus = Aminus = 0.1? If the latter is correct then 0->1 looks right but the 1->0 decrements look around 10x too big. It may be worth posting the relevant PyNN code so that the software team can look at this in detail?

Best wishes,
---Steve

Andrew Gait

unread,
Nov 30, 2021, 9:09:09 AM11/30/21
to SpiNNaker Users Group
Hi Juan,

I was just about to say the same as Steve - and I can't reproduce what you're getting in your figures in terms of the weight changes from what you've said - so if you could send us the relevant PyNN script that would be helpful (also some indication as to whether you're using most recent master or a previous version of sPyNNaker would be helpful).  You'll have to zip it first before sending it as the Manchester servers don't like anything with a .py extension.

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

From: spinnak...@googlegroups.com <spinnak...@googlegroups.com> on behalf of steve.furber <steve....@manchester.ac.uk>
Sent: 30 November 2021 13:51
To: SpiNNaker Users Group <spinnak...@googlegroups.com>
Subject: [SpiNNaker Mailing List] Re: Questions regarding STDP in SpiNNaker
 
--
You received this message because you are subscribed to the Google Groups "SpiNNaker Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spinnakeruser...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/spinnakerusers/bc89c2a8-d12a-4b0e-9b98-2c868dad693an%40googlegroups.com.

Daniel Casanueva Morato

unread,
Nov 30, 2021, 10:27:35 AM11/30/21
to SpiNNaker Users Group
Hi Andy and Steve, first of all I introduce myself, I am Daniel, Juan P's student.

Thank you very much for your answers. Regarding the units, all are the same (nA) even if the plot mentions others. The first post use Aminus = Aplus = 1 and the second one Aminus = Aplus = 0.1.

Attached is the code we used to build and simulate the network in Spinnaker. The data (spikes generated by the input neurons to the STDP neurons, spikes generated by the neurons connected with STDP, voltage of the neurons connected with STDP and weight of the synapses with STDP) are extracted from the network and returned in the main function without any preprocessing. We use the latest version of PyNN (0.9.6) and the Spinnaker library (8).

We will deeply appreciate if you could help us with these doubts regarding why the amount of weight change does not match what we expected.

Thank you very much in advance.

Best regards,
Daniel and Juan P.
example_network.zip

Andrew Gait

unread,
Nov 30, 2021, 11:33:46 AM11/30/21
to SpiNNaker Users Group
Hi Daniel,

Thanks for your script - I can confirm that I get what look like similar answers to yours (weights going down from 5.0 in steps of 1.0 for projection 1-->0, weights going up from 5.0 in increasing steps of between 0.1 and 0.2 for projection 0-->1 which I think your graph would show were it scaled better).  This is when running version 6.0 (i.e. the most recent release version), and I agree that the answers don't seem correct.

However, if I run your script against the current master branch, I get something which looks much more like what I would expect; weights going down from 5.0 in steps closer to 0.1 (not exactly 0.1 because there's a multiplicative factor of exp(-time/tau) too) for projection 1-->0, and for projection 0-->1 the weights in the first instance go down too (which I think I would expect because 0-->1 is affected by the changes to 1-->0, and the order in which the neurons spike is important ?) but then start to rise above 5.0.

So I would suggest you try using the most recent master branch - installation instructions are here: http://spinnakermanchester.github.io/development/devenv6.0.html for a full development environment; or if you're just running scripts and not editing any underlying sPyNNaker code you could also try the simpler command line install detailed at http://spinnakermanchester.github.io/development/gitinstall.html (recommended that you do this in a virtual environment if possible to avoid confusion between "release" and "master / git" versions).

We would also point out that the use of callbacks for weight recording is not well-tested either (though it is documented in PyNN, we've never deliberately tried to make it work as far as I know or indeed tested it at all before now); it appears to work in your case as far as I can tell but we would suggest simply using a loop of multiple calls to run() and projection.get() instead, i.e.

runtime = 30
run_for = 5
for n in range(runtime//run_for):
    sim.run(run_for)
    projection.get(["weight"], "list")

where run_for is basically how long you want to run in between getting weights off the machine.

(It is part of the current plan to at some point try to work out how to make weight recording work on SpiNNaker, but this is a reasonably big job that we haven't got round to yet.)

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

From: spinnak...@googlegroups.com <spinnak...@googlegroups.com> on behalf of Daniel Casanueva Morato <danca...@gmail.com>
Sent: 30 November 2021 15:27

To: SpiNNaker Users Group <spinnak...@googlegroups.com>
Subject: Re: [SpiNNaker Mailing List] Re: Questions regarding STDP in SpiNNaker
 

Daniel Casanueva Morato

unread,
Dec 1, 2021, 7:16:55 AM12/1/21
to SpiNNaker Users Group
Hi Andy,

Thanks for the answer. Regarding weight recording, we will change from callbacks to looping run function. On the other hand, we have installed from source the "master branch" versión of spynnaker using the second link in a completely fresh virtual machine (no other spynnaker version was previusly installed), but we are having the same results than with the release version. Do you have any clue on why this may be happening? :(

Thank you very much in advance.

Best regards,
Daniel and Juan P.

Daniel Casanueva Morato

unread,
Dec 1, 2021, 7:41:57 AM12/1/21
to SpiNNaker Users Group
Sorry I forgot to mention that, with the "master branch", the LTD is doing the correct decrease in weight magnitude (using Aminus = 1, the decrease is around 1), but the LTP still does not follow the expected behavior (using Aplus = 1, the increase is around 0.1-0.2).

Andrew Gait

unread,
Dec 1, 2021, 8:19:46 AM12/1/21
to SpiNNaker Users Group
Hi Daniel,

That's curious - can you send us the results of running "pip list" inside your new fresh virtualenv?

Many thanks

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

From: spinnak...@googlegroups.com <spinnak...@googlegroups.com> on behalf of Daniel Casanueva Morato <danca...@gmail.com>
Sent: 01 December 2021 12:16

Daniel Casanueva Morato

unread,
Dec 1, 2021, 10:02:44 AM12/1/21
to SpiNNaker Users Group
Hi Andy, 

Of course, here I attach the txt with the result of pip list in the virtual machine.

Thank you very much in advance.

Best regards,
Daniel and Juan P.

pip_list_vm.txt

Andrew Gait

unread,
Dec 1, 2021, 11:25:48 AM12/1/21
to SpiNNaker Users Group
Just thought of another thing - you'll need to edit the C environment variables, see http://spinnakermanchester.github.io/development/devenv6.0.html#cenvironment (this should probably be on the other instructions too - I'll add it there too).

I'm a bit surprised that the C code has actually compiled if you haven't added these environment variables, but it may be that they are pointing at a different directory from that where you have just installed them in this virtualenv and that's what it's building...

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

From: spinnak...@googlegroups.com <spinnak...@googlegroups.com> on behalf of Daniel Casanueva Morato <danca...@gmail.com>
Sent: 01 December 2021 15:02

Daniel Casanueva Morato

unread,
Dec 1, 2021, 3:39:26 PM12/1/21
to SpiNNaker Users Group
Hi Andy, 

Following the instructions in the first link, we have set the C environment variables and rebuilt the C code with the bash script, but the results are the same as described in the last post (at LTD Aminus = 1 the decrease is around 1 and at LTP Aplus = 1 the increase is around 0.1-0.2). Is there any other possible option that could be producing this behaviour or that can help us to run the simulation with the expected behaviour?

Thank you very much in advance.

Best regards,
Daniel and Juan P.

Andrew Gait

unread,
Dec 2, 2021, 2:37:06 AM12/2/21
to SpiNNaker Users Group
Hi Daniel,

For Aplus = Aminus = 1.0 that is the answer I am currently getting.  What I was concerned with was that the answer you were seeing for Aminus = Aplus = 0.1 was different from what I was getting, can you do that and send the results of the weight recording?

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him)
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours
From: spinnak...@googlegroups.com <spinnak...@googlegroups.com> on behalf of Daniel Casanueva Morato <danca...@gmail.com>
Sent: Wednesday, December 1, 2021 8:39:25 PM

Daniel Casanueva Morato

unread,
Dec 2, 2021, 5:36:31 AM12/2/21
to SpiNNaker Users Group
Hi Andy, 

In the following picture you can find an experiment where neuron 0 spikes (blue line), causing neuron 1 to spike one millisecond later (orange/yellow line). This pattern is repeated periodically during the simulation time.
simple_network_stdp_custom_param_2021_12_02__10_42_09_spike_pre_postLIF Layer_1.png

With this pattern, the weight change for different Aplus and Aminus can be seen in the following pictures:

+ Aminus = Aplus = 0.1 (0->1 projection on top and 1->0 projection at bottom):
0_1_A01.png
The weight changes are: 
(w=5.0->5.01171875 , t=7.0->8.0)
(w=5.01171875->5.0283203125 , t=12.0->13.0)
(w=5.0283203125->5.0458984375 , t=17.0->18.0)
(w=5.0458984375->5.064453125 , t=22.0->23.0)
1_0_A01.png
The weight changes are: 
(w=5.0->4.8994140625 , t=3.0->4.0)
(w=4.8994140625->4.798828125 , t=8.0->9.0)
(w=4.798828125->4.6982421875 , t=13.0->14.0)
(w=4.6982421875->4.59765625 , t=18.0->19.0)
(w=4.59765625->4.4970703125 , t=23.0->24.0)

+ Aminus = Aplus = 1  (0->1 projection top and 1->0 projection bottom):
0_1_A1.png

The weight changes are: 
(w=5.0->5.12109375 , t=7.0->8.0)
(w=5.12109375->5.287109375 , t=12.0->13.0)
(w=5.287109375->5.4697265625 , t=17.0->18.0)
(w=5.4697265625->5.658203125 , t=22.0->23.0)

1_0_A1.png
The weight changes are: 
(w=5.0->4.0 , t=3.0->4.0)
(w=4.0->3.0 , t=8.0->9.0)
(w=3.0->2.0 , t=13.0->14.0)
(w=2.0->1.0 , t=18.0->19.0)
One is missing because it reaches the minimum weight.

In both case, the LTD behaviour is as expected although with Aminus = 0.1 it seems to decrease a little more than 0.1 which exceeds the limit. In the case of LTP, the weight change does not seem to follow the behaviour we expected, i.e. a similar amount of weight change as in LTP.

Thank you very much in advance.

Best regards,
Daniel and Juan P.
El jueves, 2 de diciembre de 2021 a las 8:37:06 UTC+1, Andrew Gait escribió:
Hi Daniel,

For Aplus = Aminus = 1.0 that is the answer I am currently getting.  What I was concerned with was that the answer you were seeing for Aminus = Aplus = 0.1 was different from what I was getting, can you do that and send the results of the weight recording?

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him)
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

Andrew Gait

unread,
Dec 2, 2021, 6:25:10 AM12/2/21
to SpiNNaker Users Group
Hi Daniel,

Have you changed any other parameters (particularly v_thresh, v_reset or v_rest) since you originally sent the script?  For Aplus=Aminus=0.1 I get more spikes than you do, since the initial weight has not been reduced enough to prevent both neurons from spiking a second time at times 4 (for neuron 0) and 5 (for neuron 1).  This means that there are extra pre- and post-spikes that both projections need to consider at this point, which in fact initially cause a depression on the 0->1 projection.

The other consideration that needs to be made here is the delay that is considered when applying the weight.  You've set the delay to 1 (and the minimum value of the delay is also 1).  As the delay fraction when modelling on SpiNNaker is entirely dendritic (we know this is not necessarily biologically plausible), this must be considered when considering the time location of pre- and post-spikes.

So your analysis of what happens on the 1->0 projection is correct; at time 8 (for example) the spike coming from neuron 0 at time 7 is applied at 7 + delay i.e. 7 + 1 = 8, so dt=0, and the decrease in weight should be the updated Aminus value.  On this projection also, this spike at time 7 is also considered as a post-event from time=3, and applied at time 7 + 1 = 8, i.e. dt = 5, so increase should be Aplus * exp(-dt/tau).  I think that for Aminus=Aplus=1.0 there is some cancellation going on here in the maths and so the decrease always ends up being 1.0, but at 0.1 the cancellations don't happen... ?

On the 0->1 projection at time 7 (for example) the spike coming from neuron 1 at time 3 is applied at 4 (3 + 1), as a pre-spike (i.e. anti-causal) for the event at 7 (i.e. dt=3) and a post-spike (i.e. causal) for the event at 2 (i.e. dt=2).  So the potentiation here will be slightly larger than the depression, but not as large as the difference between depression and potentiation on the other (1->0) projection.  Hence you should get a smaller-valued increase in weights on the 0->1 projection compared to the value of the decrease on the 1->0 projection.  As I said above, though, with Aminus=Aplus=0.1 I also get spikes at times 4 (for neuron 0) and 5 (for neuron 1) which has the added effect of initially depressing the weights on the 0->1 projection.

I hope that makes sense but if not do ask any more questions (and anyone else who disagrees with my reasoning feel free to jump in...).

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

From: spinnak...@googlegroups.com <spinnak...@googlegroups.com> on behalf of Daniel Casanueva Morato <danca...@gmail.com>
Sent: 02 December 2021 10:36

Daniel Casanueva Morato

unread,
Dec 2, 2021, 7:10:09 AM12/2/21
to SpiNNaker Users Group
Hi Andy, 

First of all, thank you very much for the explanation. It is true that I have changed one parameter from the original simulation, "tau_refrac" to 2, to get exactly the same spike behaviour in both cases (Aminus=Aplus= 0.1 and 1).

Regarding the explanation about 1->0 projection, why with Aminus=Aplus=0.1 the cancellations don't happen and decrease more than 0.1? On the other hand, in 0->1 projection, it's true that there is always an LTP and LTD due to the last 2 spikes are from neuron 0 and 1, but as you point out the increase (dt=0) should be more than the decrease (dt=3). Using the values of the simulation (tau_plus = tau_minus = 5), the difference between then should be around 0.5 and we are getting around 0.1-0.2 (with Aminus = Aplus = 1, and similar results with Aminus = Aplus = 0.1). What can be the reason behind this?

Thank you very much in advance.

Best regards,
Daniel and Juan P.

Andrew Gait

unread,
Dec 2, 2021, 7:45:12 AM12/2/21
to SpiNNaker Users Group
Hi Daniel,

I don't know for certain but I expect what you're seeing in the 0.1 case is related to the fact that 0.1 can't be represented directly on the machine using fixed-point arithmetic.  So there's going to be some approximation going on, particularly as weights are converted back and forth between 16-bit integers and 32-bit fixed-point numbers during the calculations and we use 16-bit lookup tables to do the exponential calculations.

In the 0->1 projection the increase is for dt=2 (not dt=0) and the decrease at dt=3.  So if we put these into the formulas the difference should be e.g. a_plus * exp( -2/5) - a_minus * exp(-3/5) = a * (exp(-2/5) - exp(3/5)) = a * 0.12, where a = a_minus = a_plus.  Which seems to match with what you get, approximately (given the constraints of using fixed-point / 16-bit weights) - e.g. (w=5.0->5.01171875 , t=7.0->8.0) in the a=0.1 case is approximately a change of 0.0.12, and (w=5.0->5.12109375 , t=7.0->8.0) in the a=1.0 is approximately a change of 0.12.

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

From: spinnak...@googlegroups.com <spinnak...@googlegroups.com> on behalf of Daniel Casanueva Morato <danca...@gmail.com>
Sent: 02 December 2021 12:10

Daniel Casanueva Morato

unread,
Dec 2, 2021, 10:45:10 AM12/2/21
to SpiNNaker Users Group
Hi Andy,

Thank you, we understand now what happens in 1->0 projection, but we are stuck with 0->1 projections as to why the increase is with dt = 2 instead of dt = 0. What we expected was that the presinaptic spike at t = 7 in neuron 0 have a weight decrease in 0->1 due to the spike of neuron 1 at t = 3 (apply at t = 4, so dt = 7 - 4 = 3) and a weight increase due to the spike of neuron 0 at t = 2  (apply at t = 3) that cause a spike in neuron 1 at t = 3 (dt = 3 - 3 = 0). We would very much appreciate it if you could tell us where we are going wrong.

Thank you very much in advance.

Best regards,
Daniel and Juan P.

Andrew Gait

unread,
Dec 2, 2021, 11:19:13 AM12/2/21
to Daniel Casanueva Morato, SpiNNaker Users Group
Hi Daniel,

The weight increase is due to the difference between the time of the spike of neuron 1 at t=3, applied at t=4, and the spike in neuron 0 at t=2, so dt should be 4 - 2 = 2 (from the point of view of neuron 0, the event occurs in both cases at t=4).  You can't have it one way round for one event and the opposite way around for a different event on the same neuron.

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

From: spinnak...@googlegroups.com <spinnak...@googlegroups.com> on behalf of Daniel Casanueva Morato <danca...@gmail.com>
Sent: 02 December 2021 15:45

Daniel Casanueva Morato

unread,
Dec 2, 2021, 11:56:17 AM12/2/21
to SpiNNaker Users Group
Hi Andy,

So, should the delay only be applied when it is a postsynaptic spike? For example, in 0->1 projection, to the spikes from neuron 1, and in 1->0 projection, to the spikes from neuron 0.

Thank you very much in advance.

Best regards,
Daniel and Juan P.

Andrew Gait

unread,
Dec 2, 2021, 12:03:09 PM12/2/21
to Daniel Casanueva Morato, SpiNNaker Users Group
Hi Daniel,

Yes, the delay should only be applied on the post-synaptic end of the projection.

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

From: spinnak...@googlegroups.com <spinnak...@googlegroups.com> on behalf of Daniel Casanueva Morato <danca...@gmail.com>
Sent: 02 December 2021 16:56

Daniel Casanueva Morato

unread,
Dec 2, 2021, 12:20:43 PM12/2/21
to SpiNNaker Users Group
Hi Andy,

Thank you very much. Now, we fully understand the behavior of the STDP on spinnaker!

Best regards,
Daniel and Juan P.
Reply all
Reply to author
Forward
0 new messages