Implement activation events to reduce memory usage in the e-prop mechanism#3721
Implement activation events to reduce memory usage in the e-prop mechanism#3721
Conversation
c0724bc to
91a146c
Compare
1d14bda to
4704493
Compare
heplesser
left a comment
There was a problem hiding this comment.
@akorgor Thanks for the PR! I have reviewed and commented on some points. I wonder mainly now if all changes in the neuron models are essentially the same (would make reviewing easier). I also wonder if the activation mechanism is placed in the right place in the neuron class structure. For review and long-term maintainability, it would also be advantageous to have more technical documentation on how the activation mechanism works. The emission of spikes from the neurons after intervals of inactivity looks straightforward, but the consequences for the gradient computation less so. Finally, I am a bit unsure about the term "activation spike". After all, it does not really activate anything, it is only there to flush the history, isn't it?
I agree with your concern. Alternative names could be |
Naming(I just noticed that something along these lines has already been discussed, but I'm keeping it because I think my post is somewhat more general.) Regarding naming, I think that, for people coming from ML/Deep learning, "activation" is very very strongly associated with activation functions or neuron outputs. But in this PR, "activation" is about periodic and synthetic triggers of synaptic bookkeeping and history cleanup during silence, which feels almost as the opposite of what ML people could expect from term "activation". Therefore I feel terms as:
could be confusing for those unfamiliar with this PR idea. Since this mechanism focuses on maintenance during silence, using terms as "inactivity", "cleanup", "maintenance", and "flush", might better convey the intent for the casual user/reader and avoid confusion for users/readers coming from ML/DL backgrounds. |
Spike recorder testI suggest adding an explicit test to verify that the |
Thank you for catching this.
|
d18af25 to
c221d9e
Compare
Added in c221d9e. |
Co-authored-by: jessica-mitchell <mitchell20j@gmail.com>
Co-authored-by: Jessica Mitchell <j.mitchell@fz-juelich.de>
7c0dc1b to
6b2585a
Compare
…classes Co-authored-by: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
0860d2c to
bae5da7
Compare
heplesser
left a comment
There was a problem hiding this comment.
Looks good, just two small suggestions.
Co-authored-by: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
|
Benchmark results obtained by @JanVogelsang on JURECA with the hpc_benchmark indicate no loss of performance (one simulation for each of three different seeds for different numbers of compute nodes, 2 MPI processes @ 64 threads per node, weak scaling: problem size scales 32x, runtime only approx 3.5x). Results indicate that there is no performance loss due to introduction of the flush-event mechanism.
|
heplesser
left a comment
There was a problem hiding this comment.
Benchmark results seems satisfactory, thus approving.



In the NEST implementation of the e-prop plasticity rule, all variables required to calculate weight updates are archived at every time step. When a spike activates an e-prop synapse, the archived history is retrieved from the postsynaptic neuron, and the used section is marked as no longer needed by that synapse in
update_history. Once no synapse requires a specific part of the postsynaptic history, that part is deleted and the memory is freed. In biologically plausible scenarios, neurons often fire infrequently or stop firing during the learning process, causing their histories to accumulate indefinitely because they are never released. This PR resolves the issue by introducing activation events that, similar to spike events, trigger synapse activation so that obsolete history segments can be deleted, while not being sent to the postsynaptic neuron unlike spike events. Users can configure the interval for sending these activation events since the last spike.Memory and runtime comparison for 100 training and 10 test iterations of the N-MNIST task with the
eprop_iafneuron model:eprop_input_neuron/eprop_parrot_neuronobsolete.eprop_isi_trace_cutoffof the postsynaptic neuron.set_sender_node_id_infoduring spike delivery.erase_used_history.