Description of problem
I’m working on a synapse model to adjust synaptic delays in the same way that STDP would adjust synaptic weights. It appeared to be working, since synaptic delays were changing, but on further inspection they are only adjusted in one direction (one of the two coefficients does not affect the result at all). These are coded the same way, so I don’t know why one is working and the other isn’t.
Minimal code to reproduce problem
#Here is the synapse model:
class delaySTDP:
eqns = '''
w : 1
dapre/dt = -apre/tau_pre : second (event-driven)
dapost/dt = -apost/tau_post : second (event-driven)
xdist : 1
ydist : 1
zdist : 1
dist : 1
'''
on_post='''
apost += Apost
delay = clip(delay+apre, delaymin, delaymax)
'''
on_pre='''
I_post += w
apre += Apre
delay = clip(delay+apost, delaymin, delaymax)
'''
#which I initiate in the network with:
tau_pre = 16.8*ms
tau_post = 16.8*ms
Apre = -0.0001*ms
Apost = 0.0001*ms
G = NeuronGroup(N, eqns, threshold = thresh, reset = res, method = 'euler')
SE = Synapses(G, G, delaySTDP.eqns, on_pre = delaySTDP.on_pre, on_post = delaySTDP.on_post)
SI = Synapses(G, G, delaySTDP.eqns, on_pre = delaySTDP.on_pre, on_post = delaySTDP.on_post)
#I have stimulation into the network and connect both synapse groups based on distance. I also add a distance dependent initial delay to the synapses
What you have aready tried
I’ve tried setting Apost to zero, which results in no changes to synaptic delays. Setting Apre to zero (with nonzero Apost) results in synaptic delays increasing as expected. Changing the sign of Apost yielded synapses that decreased in delay, so I know that it is possible to modulate them in both directions.
I’ve changed the names of variables and rewrote the synapse model multiple times, using a working STDP model as reference, but I keep getting the same issue. The lines of the code that change the synaptic delays using Apre/apre (as written above) do not work, while Apost/apost work exactly as expected.
My concern is that, since they are coded in the same way, there is no reason one should work while the other doesn’t. Am I missing something?
Expected output (if relevant)
Synaptic delays changing in both directions (decreasing and increasing) based on the time correlation between pre and post-synaptic firing.
Actual output (if relevant)
Synapses only change in one direction, based only on the sign of Apost (as written above).
Full traceback of error (if relevant)
No actual error message occurs. The synapse simply isn’t working as expected.