A Theory of How Columns in the Neocortex Enable Learning the Structure of the World

Hi all,

I’m reading this paper and trying to understand how exactly regions, layers and connections are created and organized?

Here is the short explanation of region setup in experiment:

… In the first set of simulations the input layer of each column consists of 150 mini-columns, with 16 cells per mini-column, for a total of 2,400 cells. The output layer of each column consists of 4,096 cells, which are not arranged in mini-columns.The output layer contains inter-column and intra-column connections via the distal basal dendrite …

Looking for some more detailed illustration or code, which is creating regions. I tried t find it in the code in repo, but not sure if it is correct one.

Thanks in advance
Damir

These should get you closer there:

this should help with the region/area/map part of your question.
(These are all the same thing)

Thank you all for your answers. I’m looking for more concrete example or a “point” in the code, which:

  1. Creates cells without mini-column arrangement.
  2. What is exactly input/output between all of layers and regions?

You can see this in some of the experiment examples, like this:

VS

In this example, L2 has no minicolumn structure, so follow that code.

1 Like

I think this block of code gets at what you’re looking for with inter-region links. There are several scripts in numenta/htmresearch/frameworks/layers which construct multi-region networks along these lines.

This is from: (https://github.com/numenta/htmresearch/blob/master/htmresearch/frameworks/layers/l2_l4_network_creation.py)

# Link L4 to L2
  network.link(L4ColumnName, L2ColumnName, "UniformLink", "",
               srcOutput="activeCells", destInput="feedforwardInput")
  network.link(L4ColumnName, L2ColumnName, "UniformLink", "",
               srcOutput="predictedActiveCells",
               destInput="feedforwardGrowthCandidates")

  # Link L2 feedback to L4
  if networkConfig.get("enableFeedback", True):
    network.link(L2ColumnName, L4ColumnName, "UniformLink", "",
                 srcOutput="feedForwardOutput", destInput="apicalInput",
                 propagationDelay=1)

In this case an L4 region (running basically the usual SP+TM process) activates an L2 region. The L2 region does Spatial Pooler activating and learning on the activeCells & predictedActiveCells from L4 respectively, the same way L4 does Spatial Pooling on an encoding vector from raw sensory data.

The L4 is also partially depolarized by the activeCells from L2. This means that bursting-column winner cells in L4 form Apical segments to cells in L2, as they form the usual Basal segments to previousWinnerCells from L4.

The Apical segments are different in that they cannot put their respective cells into the predictive state alone (without an active Basal segment). However if multiple cells in a column are predictive at once (have active Basal segments), any cells which also have active Apical segments will inhibit the Basal-only others.

So L2 cells are learning which cells from L4 to be activated by (like in SP), and L4 cells are learning which cells from L2 to be Apically depolarized by – as they are Basally depolarized by the previoiusWinnerCells. Here’s an attempt to capture this in a simple diagram:

1 Like

Here’s another attempt to capture the signals passed between regions, this one on the L2456 network from:

1 Like

I am very interested in how sensor and motor data come into macro cortical columns L2456 after encoding?
Other words: do all macro CC share the same SDR from sensor/motor? Or every CC owns one encoder of sensor data?

My understanding is that each CC is responsible for modeling a certain piece of sensory space – like the tip of the thumb or patch on the retina – which is input through layer 4.

Each CC is also linked to a set of other CC’s though L2/3 (and L5 I think - not an expert on this level), but the idea is that each CC is building its own model of the world. To do this they take as input some combination of raw sensory input and the output of other CC’s – it seems basically like “what am I seeing?” + “what do my neighboring brains think?”

3 Likes

@sheiser1 i totally agree with you that CC is responsible for pieces of sensor data. But by current experiments of Numenta at htmresearch we have only one data from one sensor. Their CC have own encoder, which connect to the same data of sensor!
I have both versions: CC embedded encoder and CC exclusive Encoder. But I really do not know which model is more biological?

1 Like

Again not the expert here, tho my sense is that there is overlap in the receptive fields of adjacent columns. So if you imagine your retina as a grid of columns (each modeling a certain slice of the visual space) it seems that groups of nearby columns would have disproportionate overlap between their receptive fields, and share disproportionate amounts of information among each other (as compared to among all columns in the population).

I agree that the CC’s as implemented in the Network API appear to only have several different sensorRegions. I remember ‘Sensor’, ‘coarseSensor’, & ‘locationInput’ from the L2456 network. Expansion on that seems like a critical piece to testing the fully sensory capacity of multi-column networks.

I think you are referring to how in our experiments we hard-code a movement encoding into the system, right? This certainly is a short-cut and a simplification of what is really probably happening.

1 Like

Hello Sheiser1,

  1. Can you please inform me how you are obtaining the output?
  2. Do we have to pass the L2 winner cell to -> Classifier -> to get Output?
  3. If such, how winner cell in L2 work in both case output and L4 feedback?
  4. IN Diagram it’s showing that the winner cel in L2 feedback to L4, who is the receiver there SP or TM in L4?
  5. Do L4 & L2 both have = Spatial Poller + Temporal Memory ?

How Apical data input feedback input for L2 will work in L4. What’s its role.

Actually, I thought in the case of Multilayer single dimensional sensory input it’s working like that

Sensory Input -> encoder -> bitArray -->L4 SP → SDR of Active coloums -->L4 TM → SDR of Active Cells → :L2 SP–> SDR of Active coloums --:> L2 TM -->SDR of Active Cells → Classifier–> Output

But I haven’t realized how the Apical Feedback data in the network is working with Apical Input in L4. How it performs output. And the role of Apical Feedback from L2 to L4. And How Apical Input works with SP and TM in layer 4. How they are interconnected and their working & algorithmic mechanism with each other

I will be grateful if you can explain it to me.

1 Like

Hey @MukitCSTE,

So apical feedback has a depolarizing effect on cells, just like normal distal dendrite segments from TM. The difference with apical is that the distal dendrite segments are connecting to cells in another region like L2.

With the common SP+TM setup there’s only 1 L4-type region (besides the encoders). The winnerCells form distal segments to winnerCells from the prior time step (t-1). With this multi-region network this also happens (winnerCells in L4 form distal segments to prior winnerCells in L4) but those L4 winnerCells ALSO form distal segments to activeCells in L6.

This means that the cells in L4 are being depolarized both by their own prior activity AND the current activity of a pooling region (L2). This L2 pooling region is being activated and depolarized by L4’s activeCells & predictedActiveCells respectively.

These network.link functions enact the connectivity structure as outlined atop the script:

Also relevant are the Phase settings, which determine the order in which the regions are computed when Network.run() is eventually called:

Here’s where the different regions are created too:

1 Like

Hi, Sheiser1
Thank you so much, Anyway Can you give an example of a depolarizing effect on cells in case of sequence learning. I haven’t the realized by the word depolarized in HTM case, though i know the biological definition of this word.But what does Numenta wanted to explain with this word in HTM computing field. I will be grateful to if you can explain it with an example . Suppose , in case of sequence learning (i.e 1,2,3,2,3,3,1,2…) how depolarized effect work & when? And how apical feedback helps us with that.

1 Like

Depolarization is just a term for cells becoming predictive. HTM cells have 3 possible states: active, predictive and neither. So when a cell is predictive (anticipating it will activate soon), the cell is depolarized.

For an example here’s a sequence of categorical values:
ABCABDABEABCABDABEABCABDABE

or shown more conveniently:
ABC ABD ABE
ABC ABD ABE
ABC ABD ABE

If a common 1-region HTM network (SP+TM) has learned from this sequence and a “B” arrives, it will predict “C”, “D” and “E” at once. This means that sets of cells representing “C”, “D” and “E” will be depolarized.

But it is possible to narrow down and only predict one value “C”, “D” or “E”. That’s because the sequence has both smaller and larger patterns.

The smaller patterns are:
ABC, ABD and ABE

The larger pattern is:
ABCABDABE

So if we know where we are in the larger pattern, we can know which kind of “B” we’re seeing and thus whether “C”, “D” or “E” will come next.

Apical feedback comes in with multi-region HTM networks like the L2456 one in my prior post. In that network L4 is being depolarized both by L6 (“basalInput”) and L2 (“apicalInput”). Since L2 and L6 contain different information (pooling and location), L4 has two separate sources of context.

This gives more perspective for the cells to depolarize themselves, and creates the possibility for some cells to be depolarized by both “basalInput” and “apicalInput”, while others are depolarized by just one of those. In these cases the cells depolarized by both take precedent and inhibit the others.

This additional context provided by the apical feedback may help the network to learn the larger pattern, and thus narrow down the predictions more quickly.

3 Likes

Hi, Sheiser1
Thank you so much. Its really a nice explanation.

2 Likes

Agreed. Very nice.

There is a problem with terminology. You have used words with neuroanatomical meanings (basal/apical, L2/3/4/5/6, depolarise), but it’s not clear what these are intended to mean in an HTM context.

It’s not clear to me how a ‘column’ or a L2/4/5/6 column relate to a mini-column, hyper column or cortical column mentioned elsewhere.

It’s not clear to me what form the 3 kinds of input take, or where SDRs fit into the whole thing, or what form the output takes (when something is recognised).

In the HTM context, a cell is depolarized when it is put into the predictive state. This happens when any of the cell’s distal dendrite segments activate – meaning enough synapses on any segment are active. This is the TM’s job, to connect any activated cell to a set of prior active cells (from t-1), by storing these prior active cells on a distal dendrite segment.

These cells all belong to mini-columns. Each layer/region is composed of a set of mini-columns (2048 by default in NuPIC). At every time step a fixed percent of those mini-columns activate (2% by default, so about 40 of the 2048). Which 40 these are is decided by the SP. Each mini-column is connected to some subset of the input space (its receptive field). This input space is often an encoding vector but not necessarily, tho always a list of indices which are active within a vector. The SP assigns an overlap score to each mini-column based on how many of the bits in its receptive field are currently active. The 40 mini-columns with the highest overlap scores activate and inhibit all other mini-columns at that time step.

So each HTM region is composed of a set of mini-columns, which are composed of a set of cells. The cells predict their own imminent activation (depolarization) through their distal dendrite segments, which monitor sets of cells that activated soon before. So if a TM has learned from the sequence: ABCABCABC, then cells representing “C” will depolarize when “B” arrives, because the “C” cells’ distal dendrite segments have learned to monitor sets of “B” cells.

This is where SDRs come in. Each input like A, B or C is represented by a certain set of mini-columns (some 40 of the 2048). These representations are “distributed” across 40 bits, which is “sparse” relative to the total 2048. This sparsity leaves room for many different inputs, which may be totally distinct or may overlap somewhat.

In the ABC example there’s no overlap since A, B and C are distinct categories with no similarity - so they are each represented by distinct sets of 40 mini-columns. However if the data type allows for semantic/qualitative overlap, the different inputs could share some bits. For instance, lets say instead you have numerical inputs which may be in the range of 0-10. In the sequence: 123123123 there would be overlap in the representations of 1 and 2, since they are qualitatively similar. There would be no overlap though between 1 and 10, since they are not similar given the 0-10 range.

Basal and Apical inputs are just ways of saying depolarizing inputs. They are inputs to a TM, informing the decision of which cells in the active mini-columns to make predictive. The difference (afaik) is that a cell’s basal segments monitor other cells from the same layer/region, while apical segments monitor other cells from another layer/region (Like the effect of L2 on L4 in the prior post).

So each layer/region (like L2/4/5/6) is comprised of a set of mini-columns which are comprised of cells and compete for activation through their proximal dendrite segments. Each of these cells creates and updates a set of distal dendrite segments, to monitor other cells which activated soon before.

The macro-column (synonymous with cortical column) is the largest structure, which is comprised of a set of layers/regions that connect to each other in some way. One example of this is shown in the L2456 network in the prior post. Each layer/region has some activating input (SP choosing mini-columns to activate) and some depolarizing input (TM choosing which cells to make predictive). Some of the regions like L4 and L6 are activated by Sensor inputs (raw data sources), and some of the regions are activated by the outputs of other regions (like how L2 is activated by output from L4). Connecting layers/regions together into these macro-columns allows multiple regions containing different information to inform each other.

I haven’t actually heard the term hyper column, but I bet its also synonymous with macro/cortical column.

3 Likes

Hi, sheiser 1

Have found two algorithm in Nument’s git repo
1.apical_dependent_TM.py
2. apical_TiebrekTM.py

But, what if in case of sequence learning.

Can you just tell me one thing in case of sequence learning in L4-L2 feed forward network which algorithm will you suggest me

For example if i want to train this sequence
12345,12345,6783,6783,12345,6783
in L4-L2 network for apical feedback which one you will suggest me
apical_depedentTM or
apicalTiebrekTM?

if you can suggest me the proper algorithm from your experience i will be really grateful.
Thank You