fmi-basel / latent-predictive-learning

Code to accompany our paper "The combination of Hebbian and predictive plasticity learns invariant object representations in deep sensory networks” bioRxiv 2022
MIT License
21 stars 5 forks source link

Implementation of transmitter-triggered plasticity #2

Closed yilun-wu closed 7 months ago

yilun-wu commented 11 months ago

Dear authors, The spiking LPL rule (eq. 18) in the paper shows that the delta term is added for a synapse at presynaptic spike times. However, it seems that in the implementation https://github.com/fmi-basel/latent-predictive-learning/blob/dd486d092b8cea9bfa1f27f42209f9174b82e61c/spiking_simulations/LPLConnection.cpp#L253 the delta term is added to all regardless of presynaptic spiking condition, acting like a bias. Is this an error in the implementation or am I missing something here?

fzenke commented 11 months ago

Dear Yilun,

Thanks for your question and the careful reading of our code.

Upon cursory inspection, our spiking implementation appears to deviate slightly from Equation (18) in the preprint, i.e., the delta term being within the large parenthesis as you write. That said, any constant bias in the local "error" term is transmitter-triggered as it gets multiplied by the filtered presynaptic spike train and a non-negative function of the postsynaptic voltage. See [1] Eq. (2.5), albeit not in the event-based sense that Eq. (18) currently suggests. Irrespective of where the term appears, both approaches should work, but delta's numerical value may differ.

Again, thank you for raising this potential issue. Please give me some time to investigate this matter closely. If this turns out to be a mistake, we should rectify it and ensure the code and manuscript correspond.

[1] Zenke, F. & Ganguli, S. SuperSpike: Supervised Learning in Multilayer Spiking Neural Networks. Neural Comput 30, 1514–1541 (2 18).

fzenke commented 10 months ago

I can confirm that there is indeed a discrepancy between the equation in the methods and what we simulated. We also simulated the equation as published, and as expected, it does not have a qualitative effect on the results (see below). In any case, we will upload an erratum. Thanks again for flagging this issue!

differences

yilun-wu commented 10 months ago

Awesome! Will the code also be updated?

fzenke commented 10 months ago

Here is a tentative patch to reproduce the figure above. Not sure yet, whether it will be merged into main. Probably, we will just leave it in a branch and refer to it in the erratum.

alternative_transmitter_triggered.patch.zip