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

MSTDP(ET) implementation #219

Merged
merged 12 commits into from
Apr 2, 2019
Merged

MSTDP(ET) implementation #219

merged 12 commits into from
Apr 2, 2019

Conversation

Huizerd
Copy link
Collaborator

@Huizerd Huizerd commented Mar 28, 2019

Implementation of MSTDP/MSTDPET and LIF nodes from the paper by R. Florian (2007). Should I include one of the experiments as example as well? Resolves #217.

@djsaunde
Copy link
Collaborator

You can include the experiment if you'd like, but it may need maintenance as BindsNET changes. Alternatively, you can add it to the experiments repo.

Copy link
Collaborator

@djsaunde djsaunde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, excellent work! Just a few minor changes.

Copy link
Collaborator

@dee0512 dee0512 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the florian node same as the LIF nodes that we have?

bindsnet/learning/__init__.py Outdated Show resolved Hide resolved
@Hananel-Hazan
Copy link
Collaborator

Hananel-Hazan commented Mar 28, 2019 via email

@djsaunde
Copy link
Collaborator

We currently don't have support for different dt . It will create a problematic situation where one part of the network excute one iteration as 1ms and other part will execute the same iteration on different dt. It will create unsync steps between parts of the network

We are not proposing multiple dts.

@djsaunde djsaunde self-requested a review March 29, 2019 12:47
@Huizerd
Copy link
Collaborator Author

Huizerd commented Mar 29, 2019

Two more questions I have:

@djsaunde
Copy link
Collaborator

djsaunde commented Mar 29, 2019

I tried to convert the _conv2d_connection_update variants as well, but didn't really understand the way the kernels etc. are implemented. Do you want me to change these too, and if so, could you help out?

Yeah, I can take a look at the _conv2d_connection_update variants once this is merged in. Unless you want to give it a try.

I was wondering what the units of the time constants used everywhere are. I took them to be milliseconds, cause that's the way the papers do it...

Really, the dt is dimensionless, but we usually refer to them as milliseconds and have designed the rest of the package around it. E.g., decay rates of voltages, spike traces, etc. are all at "biologically plausible" scales in milliseconds. So, we usually communicate about dt in terms of milliseconds, but we take the real-time implications with a grain of salt. That is, the simulations probably need lots of tuning before they well-approximate real neurons / synapses / learning rules.

Regarding that doc-string, that should probably be changed.

@Huizerd
Copy link
Collaborator Author

Huizerd commented Mar 29, 2019

Ok, thanks. Would be great if you could look at the convolutions. I'll change the doc string right away.

@Huizerd
Copy link
Collaborator Author

Huizerd commented Apr 1, 2019

@dee0512 You're right, with a different decay the FlorianNodes are pretty much similar to the LIFNodes. Should I remove them?

Another question: in the LIFNodes, the argument decay is not used as a time constant (as is written in the arguments description).
https://github.com/Hananel-Hazan/bindsnet/blob/646dd7de73a1658bb622755e8bb3ebc406a265cd/bindsnet/network/nodes.py#L328
Should this be changed?

@djsaunde
Copy link
Collaborator

djsaunde commented Apr 1, 2019

Another question: in the LIFNodes, the argument decay is not used as a time constant (as is written in the arguments description).

@Huizerd Yeah,I've been meaning to fix this for a while. We've been using a kind of approximation (dt * self.decay is approx. torch.exp(-dt * self.decay)). We should also invert the units of time for the decay param (e.g., 20 instead of 0.05, 100 instead of 0.01, etc.), which would change torch.exp(-dt * self.decay) to torch.exp(-dt / self.decay). Let's fix this in another PR, this one's getting quite large.

...with a different decay the FlorianNodes are pretty much similar to the LIFNodes. Should I remove them?

If you can use the LIFNodes and remove the FlorianNodes with the MSTDP(ET) demo still working, that would be great.

@djsaunde
Copy link
Collaborator

djsaunde commented Apr 1, 2019

@Huizerd I added MSTDP(ET) implementations for Conv2dConnections / did code cleanup / added some tests. Let me know if you have any thoughts.

@djsaunde
Copy link
Collaborator

djsaunde commented Apr 1, 2019

Once the FlorianNodes are removed, let's get this merged.

@Huizerd
Copy link
Collaborator Author

Huizerd commented Apr 2, 2019

Ok, all set! I will open a new PR for the time constants issue, and I also worked on passing on rewards.

@djsaunde djsaunde merged commit 727ed38 into BindsNET:master Apr 2, 2019
@djsaunde
Copy link
Collaborator

djsaunde commented Apr 2, 2019

Merged! Thanks for the great work.

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.

None yet

4 participants