Skip to content

Fix and add test for synapse post neuron transformer#1340

Draft
clinssen wants to merge 28 commits intonest:mainfrom
clinssen:test_synapse_post_neuron_transformer
Draft

Fix and add test for synapse post neuron transformer#1340
clinssen wants to merge 28 commits intonest:mainfrom
clinssen:test_synapse_post_neuron_transformer

Conversation

@clinssen
Copy link
Copy Markdown
Contributor

@clinssen clinssen commented Mar 5, 2026

If a postsynaptic trace value gets requested by a synapse inside the postsynaptic event handling code, it could be possible that the trace is requested at a time precisely at that of the first spike in the history. If, additionally, the value "just before" the increment due to the spike was requested (i.e. before_increment is true), then the "just before increment" value needs to be computed based on a history entry correponding to the previous spike, which may have been already pruned. Fixing this requires an additional deep dive into the archiving logic and is postponed to a future PR.

This PR does not completely fix this issue, but addresses it by means of:

  • for the sake of prioritising correctness over performance, making not moving variables the default (i.e. disabling the SynapsePostNeuronTransformer by default);
  • adding a section in the documentation on how to reap the full performance benefits by using the transformer;
  • adding a warning in the documentation about double-checking the numerics in case the transformer is used.

Thanks to @IiroAhokainen for reporting this issue!

@clinssen clinssen requested a review from pnbabu March 5, 2026 14:19
@clinssen clinssen added the bug label Mar 5, 2026
@clinssen clinssen marked this pull request as draft March 5, 2026 14:19
@clinssen clinssen force-pushed the test_synapse_post_neuron_transformer branch from 21fa79f to 466f775 Compare March 5, 2026 14:34
@clinssen clinssen force-pushed the test_synapse_post_neuron_transformer branch from 93f1feb to 8bf5c83 Compare March 5, 2026 14:53
@clinssen clinssen added this to the NESTML 9.0.0 milestone Mar 5, 2026
C.A.P. Linssen and others added 21 commits March 19, 2026 09:19
…former' into test_synapse_post_neuron_transformer
@clinssen clinssen force-pushed the test_synapse_post_neuron_transformer branch from 19f7984 to 170783d Compare April 13, 2026 12:40
@clinssen clinssen force-pushed the test_synapse_post_neuron_transformer branch from 170783d to a816d44 Compare April 13, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants