Connections between Spatial Poolers and TM alhorithm. Also, a question about segments

In my head, while studying with HTM School and reading some papers, i understood that the SP’s outputs are the columns that will be active in the TM in a certain input. But, now i’m confused.


In HTM School videos, each cell in the SP matrix was referred as a mini-column. So, I’ve constructed a image of a SP output been a the front view of a TM in a certain input, and if not bursting each mini-column would represent a cell that’s active on the current state. Is this idea right or am I missing something?
About distal connections, each cell has 1 distal dendrite segments with multiple cells or each cell could have multiple segments and one of these segments would represent multiples connections within the layer?

2 Likes

Hey @Tchesco, welcome!

The job of the SP is to select 40 “mini-columns” to activate out of 2048 (~2%).
So its output is always a list of 40 index values 0-2047.

At each time step, each SP mini-column (represented as one of these index values) gets an overlap score with the encoding vector. The encoding vector is also a binary vector (the green grid in your pic there), which activates a fixed number of bits based on the raw input value. The more active encoding bits a mini-column is connected to, the higher its overlap score and the better chance it has of activating. The mini-columns with the top 40 overlap scores are chosen to activate.

An SP column bursts when it activates unexpectedly (meaning it has no predictive cells).

As for distal segments, any cell can potentially have many distal segments (set in TM params), though often end up with just 1.

When a mini-column bursts – as they all do when first activated – one cell in the column is chosen as winner cell, to represent the column’s activation in this new context.

This winner cell forms a new distal segment, which is list of winner cells from the prior time step. Through this segment, the winner cell monitors that set of prior winner cells. If enough of these monitored winner cells activate at once, the distal segment becomes active and its cell becomes predictive. So each cell’s job is to monitor certain other sets of cells, and predict its own activity.

So when a mini-column is activate by the SP, it is considered predicted if there are any active distal segments on any of its cells. This is how mini-columns go from bursting to predicted.

1 Like

Thanks a lot! You really helped me understanding it.

1 Like