Implement SpatialPooler with Connections backend

spatial-pooling
question
optimization
code-cleanup
refactoring

#1

The idea is to ditch separate code for SP, and use just the TM.

In reality, bioligically the two processes (SP, TM) are not separate.
In code, TM uses Connections class; SP has the logic in itself. SP works as TM that has only 1 cell per column (no high-order memory).

WAYs to do it:

  • A) instead of SP, call TM(with 1 cellPerCol)
    • will need to implement inhibition.
  • B) keep SP code, just also use Connections as the backend

PROs:

  • code cleanup
  • more biological
  • possible better optimizations
    CONs:
  • is Connections already too complicated?

What do you think?


Performance optimizations
#2

@breznak That might work. You can build such a module and see if it works. If it does you can add it to the library (in addition to what is there). That is what the framework is for.


#3

Yeah, I also think it might. But I’d love to hear more experiences if it’s a good/bad way to go…time’s short and there’s so much to do now.


#4

to a big surprise I found that ConnectionsPerformanceTest contains parts that do just as intended here: implement SP functionality with Connections backend.

https://github.com/htm-community/nupic.cpp/blame/master/src/test/integration/ConnectionsPerformanceTest.cpp

@rhyolight @mrcslws @chetan51 could you please shed some light on the history? Is there a reason why you didn’t pull the idea to the end? How was the performance? Seems the code is very nice and clean using the Connections! (y) How is the python version in this regard?


#5

I had similar idea as to the implementation of SP and TM. But I had arrived at the same conclusion by thinking backwards that every TM columnar layer is essentially an SP and only a single SP unit(minicolumn) will be selected from the TM column as active after selecting winning “cells”.

@abshej So why is this not used? Functionally it fits, so my question is why not? The performance?


#6

I can’t say about the performance since I haven’t started with the implementation to this detail.


#7

I don’t know anything about this, and Chetan has moved on to other projects. Maybe @mrcslws can help.