Hi @mallard1707 . Indeed, your implementation of the STDP rule looks correct to me, and your approach to verifying it looks good as well

This will not quite work like this : the on_pre/on_post statements would set the post-synaptic current at a single time point, but the equation is meant to describe the current over time.

Since the shape of the synaptic current is the same for all synapses (only the height changes with w_{i,j}), you can include the synaptic current in the post-synaptic cell. The shape is a bi-exponential function of time, which you’d implement with two exponential functions as explained here: Converting from integrated form to ODEs — Brian 2 2.5.4 documentation In the documentation, this is a model of a bi-exponential postsynaptic potential, but in your case it would be a current, so the neuron equations would have something like:

and the synapse would have on_pre = 'x_post += I0*w'. The somewhat complicated tau_S/tau_M stuff in the equation is only there as a normalization factor – it might be that this is not necessary in your equations.

Thank you for the detailed response. I had a question regarding the conversion of the biexponential synapse to ODE form:
I am trying to derive the expression mentioned in the wiki before proceeding to my own case. After differentiating the example, I get:

Now, the example has taken x to be:

Why haven’t they taken x to be a simpler term that is just the exponential? I didn’t quite understand what you meant by the normalization term.