htm-community / htm.core

Actively developed Hierarchical Temporal Memory (HTM) community fork (continuation) of NuPIC. Implementation for C++ and Python
http://numenta.org
GNU Affero General Public License v3.0
151 stars 75 forks source link

Implement SP with apical connections to other active columns #156

Open breznak opened 5 years ago

breznak commented 5 years ago

Why:

Question:

Implementation:

EDIT: forum discussion at https://discourse.numenta.org/t/replace-inhibition-with-proximal-horizontal-inhibitory-connections/5538

ctrl-z-9000-times commented 5 years ago

@breznak, Could you please post a link to @fergalbyrne 's work?

Here is my goto reference on apical dendrites: (Larkum 2013)

I have my own hypotheses about apical dendrites. I think that apical dendrites are a part of attention.

breznak commented 5 years ago

I think it'll be somewhere here https://leanpub.com/realsmartmachines/read First ideas were pblished and discussed at HTM discourse boards.

I can have a deeper look later for the Fergal's work.

Basically, what I want to do:

Thanh-Binh commented 5 years ago

Do you know if the current SP includes or can be extended to the idea „union temporal pooler“ in htmresearch?

ctrl-z-9000-times commented 5 years ago

the idea „union temporal pooler“ in htmresearch?

Im'm not certain what exactly the "Union TP" is, but I don't think that the current SP does this. It can likely be extended to do this, but that isn't part of the plan at the moment.

Thanh-Binh commented 5 years ago

David: i do not know in details but Union TP is subclass of SP and from Numenta points of view it is very interesting for sequence recognition. I will look at it if I have time to know how good it is

ctrl-z-9000-times commented 5 years ago

Ok, i think i am building something similar. Its called a ColumnPooler and it is in issue #94. It does not have apical dendrites though

Thanh-Binh commented 5 years ago

@ctrl-z-9000-times: if I understood you well your „ColumnPooler.cpp“ corresponds to Numenta htmresearch union_temporal_pooler.py, BUT motto ColumnPooler.py. Am I right here?

breznak commented 5 years ago

ColumnPooler.py.

I think it is the implementation of CP from py, right? And also, CP should be an addition to SP,TM. The logic is quite well separated on high-level

So you can solve MNIST with SP, but I think it should be (image->SP->CP->Classifier)

PS: please move discussions about CP to its relevant thread (alr exists), we'll leave this topic for SP ~ SOM and apical connections

breznak commented 5 years ago

topic for SP ~ SOM and apical connections

I'd like to revive my work on the SP with horizontal connectivity. @ctrl-z-9000-times I'm now thinking how/if this idea is different to the ColumnPooler? both add (CP heavily) the horizontal connections among columns. Is this similar/same to your work on CP/SP that uses CP?

ctrl-z-9000-times commented 5 years ago

I don't entirely understand the SOM, but I believe it's the same idea as a CP.

The CP uses horizontal connections to do two competitions: first all of cells with both feed-forward-proximal input AND active distal dendrites (which get input from the horizontal connections) compete to activate. Then if the CP has not reached maximum sparsity, there is a second competition in which all cells (including unpredicted cells) compete to activate. In this way the predictive inputs can influence the results without overriding the feed forward input.

  • forms invariant representation of the object

The ColumnPooler, as written by Numenta, will not form invariant representations. They do it by freezing certain cellular activities while an object is presented during training. I have a theory about how it happens in the brain with an online algorithm: based on the paper (Kropff & Treves 2008) and it relates to only the SP.

I have a reproduction of the Kropff & Treves 2008 paper at: https://github.com/ctrl-z-9000-times/KropffTreves2008_reproduction/blob/master/README.md I direct your attention figures 3 & 4, which show the untrained & trained behavior of the model, respectively. Notice that before training the cells respond to small & disjointed areas, and after training they respond to large contiguous areas of the input. This is the concept of invariance applied to a spatial location.

breznak commented 5 years ago

The ColumnPooler, as written by Numenta, will not form invariant representations. They do it by freezing certain cellular activities while an object is presented during training.

this is a bummer, I had not known that. Will need to have a look.

The CP uses horizontal connections to do two competitions: first all of cells with both feed-forward-proximal input AND active distal dendrites (which get input from the horizontal connections) compete to activate. Then if the CP has not reached maximum sparsity, there is a second competition in which all cells (including unpredicted cells) compete to activate. In this way the predictive inputs can influence the results without overriding the feed forward input.

What I describe in #287 .4/ might be something else.