-
Notifications
You must be signed in to change notification settings - Fork 371
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
Problems with stdp_synapse weight update #1604
Comments
Some confusion might arise because the word "delay" is used ambiguously in NEST Simulator. Intuitively we expect this to be an axonal delay (time from presynaptic neuron firing until time of spike arrival at the synapse), but actually it typically refers to the dendritic delay (time from spike arrival at the synapse to time at which the spike has an effect on the membrane potential). With this interpretation, from the perspective of the STDP synapse in your example, the spike arrival actually occurs as pre-before-post, so the synapse is potentiated, as observed. No spikes should be "lost" regardless of the timing. Please let us know if you continue to observe any behaviour that is not explained by the interpretation of delays as purely dendritic. |
Thank you for your email and for your interest in this issue. However
unfortunately I'm afraid that the interpretation of delays as dendritic
does not solve the issue. I really hope I made some mistake or I
misinterpreted the results.
In my example, the presynaptic neuron spike has a negligible effect on the
postsynaptic potential, since the weight is intentionally very small. For
sure it does not induce or contribute to a subsequent spike. The spikes are
due to the constant input currents. Indeed, It can be verified that the
presynaptic and postsynaptic neurons fire EXACTLY at the same times, with
intervals of 250 ms, much greater than the synaptic delay. This is an
expected behavior, since the two neurons have the same parameters and the
same input current, and the time discretization compensates for the very
small change of postsynaptic potential due to the input spike.
Most importantly, the script that I uploaded is not simply a qualitative
check on whether the presynaptic spike arrival occurs before or after the
post synaptic spike. It is a quantitative comparison with the theoretical
computation of STDP weight update. This comparison shows that the updated
weight is compatible, within 7 digits, with the theoretical calculation
made using a difference time_post-time_pre equal to the synaptic delay,
with POSITIVE sign. To be more specific, say that I choose a delay of 10
ms. The updated weight is consistent with the STDP update formula for a
presynaptic spike time smaller than the postsynaptic spike time by 10 ms,
leading to a synaptic weight increase.
The dendritic delay interpretation does not explain this result: the two
neurons fire at the same time, so for sure the presynaptic spike cannot
reach the synapse BEFORE the postsynaptic spike by 10 ms.
|
I get consistent results if I change the sign of dendritic_delay in models/stdp_connection.h ,
or alternatively if I assume that the "delay "parameter in stdp_synapse refers to the time the postsynaptic action potential takes to travel "backward" through the dendrites until it reaches the input synapse. Please let me know if the latter is the intended behavior. If this is the case, I must say yes, it is really confusing, also because I would expect in most cases the axonal delay to be larger. |
This interpretation of the delays is indeed correct. I agree that we should make this more clear in the documentation. As for the first pair being "lost": might this be due to another implementation quirk? In NEST, for performance reasons, the weight is only updated when a presynaptic spike is received by the synapse. Postsynaptic spikes are buffered (from the perspective of the synapse), and only result in a weight update at the time that the next presynaptic spike arrives. This is entirely consistent on a network dynamics level, but if you start inspecting weight values at arbitrary times during the simulation, you might hit a not-yet-updated value, making it seem wrong. |
Thank you Charl. I made a drawing that in my opinion clarifies the intended behavior.
|
I must add that when the target neuron of the stdp synapse is a conductance-based model, the |
Issue automatically marked stale! |
@JanVogelsang Could you take a look at this? |
What Charl said is correct and as Bruno said, we will need an implementation with both dendritic and axonal delays. And I can promise, we will soon have one, in combination with a nice thesis explaining all the details of delays in neural simulators, with a special focus on synaptic plasticity. |
Action points:
|
The synaptic weight should decrease when presynaptic spike time > postsynaptic spike time
However, in simple pynest scripts it seems that things go in the opposite way with stdp_synapse.
Furthermore, it seems that the first pre-post couple is always lost, i.e. the update always starts from the second pre-post couple.
Comparison with theoretical calculation shows that the weight increases as if post-pre is inverted, and the update starts from the second pre-post couple, missing the first one.
stdp.py.zip
The text was updated successfully, but these errors were encountered: