JesusEV / nest-simulator

The NEST simulator
GNU General Public License v2.0
1 stars 0 forks source link

Remove irregular spike arrival #20

Open akorgor opened 4 months ago

akorgor commented 4 months ago

This PR removes the regular_spike_arrival flag and the corresponding mechanism, which was initially in place to reproduce the behavior of the original model. Since P_z_in=1 that variable is no longer needed and is removed. To match the regular spike arrival at the end of the time step (the commit message erroneously says at the beginning of the time step), the spike threshold crossing reset is moved to the current time step $t$, resulting in the following timing in the membrane potential update equation:

 v = v^{t-1} + 1\cdot z_\mathrm{in}^t - v_\mathrm{th}z^t\,,

instead of the previous

 v = v^{t-1} + 1\cdot z_\mathrm{in}^t - v_\mathrm{th}z^{t-1}\,.

To use the new propagator in the sine waves task requires scaling the spike threshold with the old default propagator $v\mathrm{th, new} = v\mathrm{th, old} / (1-\mathrm{exp}(\mathrm{d}t / \tau\mathrm{m}))$. To make the sine waves task with the new propagator consistent with the evidence accumulation task and since the convergence benefits from it, the membrane time constants in the system are decreased from 30 ms to 20 ms, leading to a new threshold potential equal to the one in the evidence accumulation task $v\mathrm{th, new} = 0.03 / (1-\mathrm{exp}(\mathrm{d}t / 20))=0.6$

The convergence on the sine waves task improves with this change: image

JesusEV commented 4 months ago

@akorgor That's a very impressive plot. Let me test this idea with the N-MNIST task. I will post here the results.

JesusEV commented 4 months ago

@akorgor Here the plot

remove-irregular-spike-arrival

Clearly the change, although using the same parameters, does not work very well for this case.

Perhaps a parameter resetting might help. I will keep looking into this.

akorgor commented 4 months ago

@akorgor Here the plot

remove-irregular-spike-arrival

Clearly the change, although using the same parameters, does not work very well for this case.

Perhaps a parameter resetting might help. I will keep looking into this.

Could you please try again with the parameter changes introduced in https://github.com/JesusEV/nest-simulator/pull/20/commits/0dfaad73bf1a6a0d6b0c06102c866cb0ba0b1136?

JesusEV commented 4 months ago

For a brief experiment of 30 iterations, the primary reason for the failure to converge in the n-mnist task appears to be the omission of the factor (1-kappa) in the filtering process of the eligibility trace.

accuracy_nmnist

github-actions[bot] commented 1 week ago

Pull request automatically marked stale!