-
Notifications
You must be signed in to change notification settings - Fork 370
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
Fix STDP k-value error for edge case #2443
Conversation
… in set_spiketime to fix regression test for issue 2437
…ondition in set_spiketime to fix regression test for issue 2437" This reverts commit f97e2bf.
Apart from the added regression test, there is only a single line changes in this PR, which adds the (global) Unfortunetaly, introducing this change makes one test fail: Pipeline step:9:4671 |
Thanks for finding this! I Why is a new test necessary? Could you add the offending pre/post spike sequence from the linked issue to one of the existing STDP synapse tests? |
Alright, I merged the existing stdp_synapse test and the regression test I created for the issue to now cover everything in a single test. I also fixed some bugs in the existing test that I stumbled across when writing the regression test, so the test will now be much safer (e.g. when comparing floating point numbers). |
Fails due to numerical instability, without any obvious reason (at least not obvious to me). |
The nest-simulator/testsuite/regressiontests/issue-77.sli Lines 107 to 110 in e899520
E_rev to something lower, e.g., /E_rev [ -20.0 ] .
See also #2420. |
It is not clear why this should pop up in this PR, as the aeif models are not touched by it. @JanVogelsang: could you merge upstream/master to check this not just a fluke? |
|
Unfortunately, setting V_peak alone does not fix the instability yet. Setting E_rev to -20.0 does fix it though. Should I therefore just set E_rev (and if so, in which models, as only the aeif_cond_alpha_multisynapse seems to fail)? |
Yes, then change |
This is just a small request: could you undo the changes that reformat to an 80 character line length? Lines of code in NEST Simulator are now wrapped at 120 characters. |
@clinssen Could you check again if this is ready to be merged now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thank you!
This pull requests aims to fix issue #2437 .
Regression test "issue-2437.py" provides a minimal example of the error in NEST which fails for the current master.
The issue is fixed by changing the condition to remove spikes from the post-synaptic neuron's spike history in the set_spiketime function.
The problem to be fixed in this PR happens due to communication on a fixed grid (i.e. in fixed intervals) instead of instantly. As STDP weight updates are only performed right upon sending/communicating a spike, the weight update will not use the state of the history of the post-synaptic neuron when the spike occurs, but when the spike is communicated instead. This can lead to scenarios where the history is updated between two communication episodes and spikes that are still relevant for the weight update might get removed. To prevent early removal of spikes, the time window in the condition of the
set_spiketime
function for which spikes are kept in the history is extended by themin_delay
(time between two communication cycles).