nest / nest-simulator

The NEST simulator
http://www.nest-simulator.org
GNU General Public License v2.0
544 stars 370 forks source link

Comparison of STDP_dopamine_synapse with brian2 #1939

Open ferqui opened 3 years ago

ferqui commented 3 years ago

Hi, I was comparing the NEST stdp_dopamine_synapse with a version in Brian2 simulator, but I get very different results on the eligibility trace.

Captura de pantalla 2021-02-23 a las 13 36 32

The equation that I used in the Brian2 implementation is the following:

rstdp_eq = """
dn/dt = -n/tau_n : 1 (clock-driven)
dc/dt = -c/tau_c : 1 (clock-driven)
dweight/dt = c*(n-b) / (1*ms) : 1 (clock-driven)
dApre/dt = -Apre/tau_plus : 1 (clock-driven)
dApost/dt = -Apost/tau_minus : 1 (clock-driven)
b : 1
A_plus : 1
A_minus : 1
tau_n : second
tau_c : second
tau_plus : second
tau_minus : second
"""

rstdp_pre_eq = """
x_post += weight*pA
c += Apost
Apre += A_plus
"""

rstdp_post_eq = """
c += Apre
Apost += A_minus
"""

I am using NEST 2.20.1 and Brian2 2.4.2. Do you have any idea where I might have gone wrong? I attached also the test files that I made. Thank you. DA-STDP.zip

clinssen commented 3 years ago

Just an initial observation: in Brian, "delay" refers by default to axonal delay (time it takes the spike to arrive from the presynaptic partner to the synapse), whereas in NEST, delay refers to dendritic delay (time it takes for the postsynaptic spike to backpropagate into the dendrite and to the synapse).

Additionally, the synaptic trace value in NEST is only updated when a presynaptic spike is processed. Values obtained inbetween using GetStatus() or get() are cached values, and may not correspond to what the value actually ought to be at that point in time.

heplesser commented 3 years ago

@YounesBouhadjar, could you take a look at this in the context of #820.

YounesBouhadjar commented 3 years ago

I suspect the issue is related to what @clinssen mentioned. We are currently working on testing this synapse model and we will come back to you when we have more insights.

github-actions[bot] commented 3 years ago

Issue automatically marked stale!

heplesser commented 2 years ago

@YounesBouhadjar Have you made progress on this?

clinssen commented 1 year ago

@ferqui: could you tell us if there are any updates on this? Otherwise we will close the issue due to the differences in the meaning of "synaptic delay" between simulators (assumed axonal in Brian, and dendritic in NEST) probably being the cause behind the differences.

github-actions[bot] commented 1 year ago

Issue automatically marked stale!