nest / nestml

A domain specific language for neuron and synapse models in spiking neural network simulation
GNU General Public License v2.0
46 stars 45 forks source link

Plasticity rule not implemented correctly in certain cases #1057

Closed heplesser closed 3 weeks ago

heplesser commented 4 months ago

Vieth and colleagues [1] have defined a plasticity rule that increases the synaptic weight by a fixed amount if the post-synaptic neuron fires within a fixed time interval after the pre-synaptic neuron, see their table S2.

NESTML generates incorrect code for this model with two types of errors:

  1. If, following a pre-post spike pair that should trigger a weight increase, the postsynaptic neuron fires at least twice before the next pre-synaptic spike, plasticity will not occur.
  2. If there are multiple pre-post spike pairs separated by min_delay intervals, plasticity does not occur.

The first issue seems to be cause by unsigned int num_transferred_variables = 0; in the generated set_spiketime() method. This variable should be 1.

The cause of the second issue not clear at present; it is of limited practical concern since the actual refractory time in the model by Vieth et al is more than 10 min delays, but it still seems to be a corner case that should be understood.

Attached below is an archive containing

[1] Vieth, M., Rahimi, A., Gorgan Mohammadi, A., Triesch, J., & Ganjtabesh, M. (2024). Accelerating spiking neural network simulations with PymoNNto and PymoNNtorch. Frontiers in Neuroinformatics, 18, 1331220. https://doi.org/10.3389/fninf.2024.1331220

heplesser commented 4 months ago

reproducer.tgz