Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove irregular spike arrival #20

Merged

Conversation

akorgor
Copy link
Collaborator

@akorgor akorgor commented Apr 26, 2024

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

@akorgor akorgor requested a review from JesusEV April 26, 2024 12:25
@JesusEV
Copy link
Owner

JesusEV commented Apr 26, 2024

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

@JesusEV
Copy link
Owner

JesusEV commented Apr 29, 2024

@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
Copy link
Collaborator Author

akorgor commented Apr 29, 2024

@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 0dfaad7?

@JesusEV
Copy link
Owner

JesusEV commented May 16, 2024

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

Copy link

Pull request automatically marked stale!

@github-actions github-actions bot added the stale label Aug 31, 2024
@github-actions github-actions bot removed the stale label Sep 28, 2024
    * remove `regular_spike_arrival` flag and `P_z_in` since = 1
    * do spike-threshold crossing reset at the beginning of the time step
@akorgor akorgor force-pushed the remove-irregular-spike-arrival branch from c5bae2b to 28570a8 Compare October 1, 2024 08:39
akorgor and others added 3 commits October 2, 2024 15:04
… neuron

Co-authored-by: JesusEV <43375826+JesusEV@users.noreply.github.com>
Co-authored-by: JesusEV <43375826+JesusEV@users.noreply.github.com>
@akorgor akorgor requested a review from JesusEV October 2, 2024 17:51
@akorgor akorgor merged commit 3b2ee51 into JesusEV:eprop_bio_feature Oct 4, 2024
17 of 19 checks passed
@akorgor akorgor deleted the remove-irregular-spike-arrival branch October 4, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants