Biological constraint of grid cells

Reply to @CollinsEM’s RDSE implementation is wasting buckets?

I may misunderstand what you wrote. I have to admit I often struggle with the technical execution of some of the concepts of HTM. But it seems to me that since grid cells are the result of biological evolution, they must respond to physiological constraints.

For some reason the angles of the triangles in the grid are constant (60°) but the edges are not. Also the orientation varies, but we don’t know by how much. And I have seen papers where grid cells fysically located nearby, code for grids with close orientation. There must be a physiological reason for this. (I suspect that axion lengths and therefor signal transmission speeds must play a role).

So I would speculate that the population of edge lengths follows a gausian distribution, centered around a medium that has biological significance. With this I mean there might be some physiological ideal effect that produces an edge of a certain length, and a number of lesser ideal instances that produce slightly longer and shorter edges but in less quantity the further removed from this physiological / neuronal ideal.

As for the orientation, it is conceivable that each grid cell in a module has an orientation that follows a linear distribution. So, for example, if a module has 1000 cells, then each cell has a statistical orientation delta of 0,36°. (360° divided by 1000).

You said:
For some reason the angles of the triangles in the grid are constant (60°) but the edges are not. Also, the orientation varies, but we don’t know by how much. And I have seen papers where grid cells physically located nearby, code for grids with close orientation. There must be a physiological reason for this. (I suspect that axion lengths and therefore signal transmission speeds must play a role).

In the post referenced below (scattered throughout the text) I describe how the lateral axonal connections of layer 2/3 reinforce each other. The shortest distance for three cells to interact forms a triangle. This is the key feature for forming Calvin Tile hex-grid coding. As you can see, these horizontal axonal projections can be in any direction so the resulting triangles do not have to be aligned on any particular axis. The vary in length over a limited range, allowing some variation in the spacing between the mini-column nodes. I see this as the underlying mechanism of the three signalling modes of scaling, orientation, and phase.
This drawing sums up this relationship, the light lines and shaded zones are the rising axonal connections and zones that they can influence, skipping about 15 “in-between” mini columns, the heavy lines are the lateral axonal connections for this trio of cells:

This construction forms the low-level hex-grid units. When hex-grids signaling from two or more maps interact (through projections to a distant map) this underlying hex grid pattern interacts to form the macro Moser grid pattern as described in this post:

This is one of the key differences between what I am doing and what Numenta has been working on in the research meeting I have seen - I put the Moser grids as a larger scale emergent property of Calvin tile coding on the mini-column level and Numenta is asserting the grid modules are somehow a direct property of the macro-column module.


What I have maybe more applies to the entorhinal cortex and hippocampal formation, but I now need to know if each cell in some way has output/axon directional control laterally, or connects axons in preferred directions. Also there is the question of whether input dendrites/antennae system can sense direction laterally. For my purposes the neocortical circuit you show does not necessarily have to be directional. Either way it would be very useful to know right now.

If you half the width of the outer shaded circles you showed then we have one “place” as I draw using either lines showing where action potentials are flowing like this:

or with sectors in a circle like this:

Tan circle is the critter’s body, with red circle shown for location of mouth. Cyan place indicates location of food, starts waves outward in all directions. White areas indicate where an invisible wall boundary was found by bumping into it, these places stop propagating waves. Yellow areas indicates location of the invisible shock zone, these also stop propagating waves. Both stationary wall and moving zone places do the same thing, nothing, but memory they come from is land-marked to either ground surface or (like sun angle) cue card seen revolving around its arena. Rest of the places are in default mode and keep waves going as in sport arena waves, but instead of standing in-turn like we do the places in-turn signal the next using action potentials. Yellow pointers indicate average (direction action potentials arrive) wave magnitude and direction used by the motor system to navigate towards. Note that the (from not signaling at all) repulsive force from the yellow shock zone has begun to point away from the attracting force of the food, it then retreated in time to avoid shock.

I assume that the level of control you are looking for is at the sub-cortical level.
The model you show looks a lot like the early H&W ice cube version, where there is a very regular pattern to the directional vectors that maps cleanly to some sort of directional control structure.
If you check out
Blasdel GG. Orientation selectivity, preference, and continuity in monkey striate cortex. J Neurosci 1992b; 12: 3139–61:

Page 3150, Diagrams A & B, you can see that these patterns are much more complicated.

Obermayer K, Blasdel GG. Geometry of orientation and ocular dominance columns in monkey striate cortex. J Neurosci 1993; 13:4114–29

See figure 5.

Interesting papers. Unfortunately neither seems to explain the wave interactions.

I was wondering whether single pyramidal neurons can sense input and direct output in sideways/lateral directions, instead of only omnidirectionally.

To the best of my knowledge - no.

Have you considered that cortical waves originate in the thalamus?
I think that a big part of the function of cortical waves is to coordinate/bind processing in both local maps and in inter-map communications.

The following is not a rebuttal. I’m only trying to understand.

But doesn’t that imply that no other connections (other than in a triangular formation) exist? Surely in a random distribution many neurons form shapes that are either non-equilateral triangles, or cause noise in a neuron that forms a vertice of an equilateral triangle.

Also, this assumes that the neurons within a layer are all on a plane. But even a layer within the neocortex “sheet” has a thickness many times greater than a typical neuron size (if neurons have typical sizes to begin with). Doesn’t that invalidate the idea of horizontal axonal projections?

What bothers me the most is that in your proposed model these neurons reïnforce each other, while I think that grid cells are triggered from sensory inputs. And probably many inputs from many sources, and so from varying distances in the brain. How does that square (sorry for the pun) with the ideal triangle?

1 Like

Here also: very interesting. I’m not trying to disprove this. Just trying to understand.

How do you calculate these yellow pointers (or vectors)?

And do you know of a system in biological neurons that do this?

1 Like

This sparsity is related to the actions of the inhibitory interneurons. The strongest contender in each of the “hubs” neighborhood activate the interneurons. The winners will only survived the dominance battle with the inter-neurons if this mini-column has help from neighboring mini-columns through mutual axonal connections. Losing competitors are strongly suppressed.

From what I can determine, it takes both a strong local signal AND reciprocal axonal connections to maintain activation against the inhibitory pressures. Many mini-columns may try to form a hex-grid but only ones that are part of a larger learned pattern will win.

As a byproduct, hex-grids enforce a natural sparsity mechanism, with somewhere around 2% to 3% activation.

I suggest that this mechanism should replace the current spatial pooling used in HTM.

As far as your comment “Surely in a random distribution many neurons form shapes that are either non-equilateral triangles or cause noise in a neuron that forms a vertice of an equilateral triangle.” Given the stereotyped roughly circular target bands of lateral axonal projections, the natural connections will be triangles. I agree with your randomness comment, and with lateral thinking, this the basis for the fact that hex-grids can be formed on any orientation, any relative phase, and over a range of spatial scalings.

The low-level processing of sensory inputs drives the variation low-level hex-grid coding and is the basis for the larger Moser grids to have the demonstrated variations in angles, phases, and spacing.

You also mentioned layers - I see this enforcement of sparsity being mostly mediated with the layer 2/3 in the feedforward direction, although it is possible that layer 5 is doing this in the feedback direction. Layers 5 and 6 are certainly triggering inhibitory interneurons.

I see this local competition to form a hex-grid running at gamma rate, with the winners asserting intermap connections at the alpha rate.

Coming back to your question:
“Also, this assumes that the neurons within a layer are all on a plane. But even a layer within the neocortex “sheet” has a thickness many times greater than a typical neuron size (if neurons have typical sizes to begin with). Doesn’t that invalidate the idea of horizontal axonal projections?”
Look at the picture below. See how the axons projecting from layer 2/3 (blue) fan up in an inverted cone or funnel shape. The area where these axonal projections make connections with surrounding dendrite arbors (red) is a roughly circular shape, with the angles of rising and diffusion setting the width of the interaction area. Not shown in this diagram is the sea of inhibitory interneurons that these projections are passing through. As the mini-column signals recognition activity the projecting axons will trigger these inhibitory interneurons tending to silence nearby mini-columns. Of course, some of the nearby mini-columns may be doing the same thing, engaged in a battle for who can win this competition to be the one to recognize this input sensation.

1 Like

So, let me unpack that statement. The strong signal is what comes from the sensor? And the inhibitory pressures are caused by lateral communication from neigboring mini-columns with different sensory input? This lateral inhibitory communication is not the same as the lateral axions you drew in post 2?

I’m probably wrong on some points, but I really want to follow what you’re saying.

What do you mean with larger learned pattern? The mouse in the grid cell experiment immediately started generating blips in its grid cells. Did anything suggest there was time for learning a pattern?

Where HTM does not include input from axonal connections, right? Only input from the sensors and inhibition from neighbors. Is that what you mean?

But that is only the case if each neuron is at an exact distance to each of its six neighbors. Range of spacial scaling implies that some of these neurons have neighbors that are farther away. But they still need to be all equally far away for the triangle to be equilateral. If there is variation in neighbor distance within one set, the triangle is no longer equilateral, and the grid structure is lost.

Also, I think the orientation of a grid depends on the anchoring event. (I remember @mrcslws explained something like that about an experiment with a displaced mouse feeder in a test environment). If it depends on the randomness of neuron positions, it would always be constant. That is not what I meant with randomness.

To be fair to what bitking outlined in his Hex Grid posts, I don’t necessarily think it always has to be a perfect formation, the variance in length I would imagine lead to some noise / shift, but the scales and size would roughly be similar.

But my interpretation could be wrong. It is possible to create hex grid like formations using an HTM like approach, see (MNIST Hex Grid) if you are bored. But i’ll admit this is probably more to do with the way inhibition is setup in this approach.



The navigational network matches the overall cell ensamble signal behavior described in the Dynamic Grouping of Hippocampal Neural Activity During Cognitive Control of Two Spatial Frames but it’s such a whole brain interaction much of the exact wiring is still a scientific mystery.

I described more detail in this topic you might not have seen:

I have tried a number of ways to calculate vectors. Fastest is to use serialized 6 (or 12 or 24) bits of input from each neighbor to address an array for corresponding angle. Where there is no angle (such as equal input from two opposite sides canceling out) Magnitude=0, else 1. A 1 bit at 60 and -60 degrees has Angle=0 and Magnitude=1.

For cells an Angle would already be pointed out by their circular signal pattern, don’t need to calculate it out like a computer simulation may require.

If you need exact math then I earlier went over the code and comments. It’s in Visual Basic 6 but I may challenge myself to make a Python example to fill angle and magnitude arrays. Normally there are only 64 possibilities that can also be one by one calculated and entered by hand.

1 Like

I’ve briefly seen it before, but I am not technical enough to really understand it. It’s fascinating though!

Interesting. So you propagate inputs from neighbors, but what do the original inputs mean?

Did you get some insight into grid cells doing this work? Would you be able to come up with a set of simple rules that would lead to producing triangular or hexagonal patterns?

1 Like

I don’t know, but to me it seems that the accumulation of noise due to invariance in (axon) length would disrupt patterns, or even prevent them from forming in the first place. If there is tolerance for invariance and noise, then there must be some system that reinforces and/or restores the pattern; some sort of mechanics that synthetise a pattern out of chaotic signals.

Again, I’m not try to disprove anything. I’m really really fascinated by this discussion. And I try to keep it at my limited level of understanding.

Could you explain this a little bit?

The TLDR is that its a view of the inhibition for each minicolumn in a layer for a particular HTM spatial pooler implementation (green = 0 going towards -> red = 100).

This implementation was a hybrid of what BitKing outlined and numentas SP, or at least my attempts at it. Though there are a number of differances, for a start the input (number 3 MNIST) layer is activated temporally every 6 cycles. Each column essentially is split into regions / layers / cells. Each cell (sitting above input layer ie fed forward from it) has its own connections similar to nupic SP. Each cell also runs an extra step, i.e synapses that are connected and active, aggregate and if past threshold go through to depolorizing and then next cycle if still above threshold depolorized etc. Its kind of why it looks like the colours are pulsing as over the 6 cycles / ticks the input layer cells go from resting -> depolarizing -> depolarized, which then kick off above layer connected cells to do the same.

Anyway thats a crappy explanation, but I’ve been messing about with it for a couple of months having some fun trying to figure it out, turns out it is harder then it looks :).



Random/chaotic input from all directions means that network cells are not properly following simple rules required for propagating a wave outward in all directions.

Steady input from one direction means the cells have their signals right and (at that place in the map) navigate towards wave.

Alternating between a 3 and 4 bits means cells achieved ideal wave propagation. It’s then possible to resolve 12 directions, by having a average 3.5 bit signal pattern alternating between two of 6 angles.

Other than having been known for representing self-location: exactly how the grid cell system worked was still unclear. In program code self-location became simply the x,y location and angle the critter is at in environment, being placed at a corresponding x,y and angle in map memory. It at first seemed that grid cells were maybe causing the actual mapping and reason why it’s a hexagonal workspace. Now it seems like grid cell pattern is the result of the geometry of the underlying map being traveled though. The fundamental reason for hexagonality would be caused by what Bitking showed for how a layer of cells (much like equal sized bubbles) close pack and interconnect.

I’m using Pygame to program a simple Python example. In this earlier VB6 code example a pulsed wave is being started outward from upper left. The drawn in red wall adsorbs the wave, while what passes through the open areas stay going towards the lower right tip. It’s now about to go from the yellow place, to the next place, to get through opening.

1 Like

Ok, but that’s the calculated result. What initiates these vectors? What is the basic input you feed the individual cells before you start calculating the vectors? Is it some kind of sensory information?

The bubble experiment is intriguing indeed. But I wouldn’t jump too quickly to conclusions. It is possible that a completely unrelated mechanism is occuring here.

Consider the soap molecules on edges of bubbles. The molecules on the edge of a single bubble get pushed equally away from the center and so they form a perfect sphere (or circle in a plane). When two bubbles meet, the combined pressures of both bubbles push the molecules to positions the farthest away from both centers. Soap molecules accumulate on these relatively low pressure positions. (Also, when the pressures are not equal, other shapes are formed, like pentagons and heptagons. (The 120° angle is not automatically emerging).

If we want to compare this effect with neural activity, then we have to find an equivalent force that pushes ion-waves into concentrated areas. My intuition however is that action potentials accumulate everywhere but accumulate more in those locations that generate a grid cell firing. Otherwise it would not produce the heat map effect. And we would also observe occasional cell firings on edges.

There is also the problem with the center spot in the hexagon for grid cells. That is clearly different with the bubbles experiment. To me that shows how grid cells are much more triangular in nature instead of hexagonal.

This is great. But your cells only have the option of going hexagonally. It is a constraint of the program. Not an observed effect. So I’m not sure it is that helpful to come up with the mechanics of grid cells.

The individual cells are each acting out the physical (adsorbing, reflecting, navigable, danger avoid) properties of what they represent in the map. A solid object passes no waves. A semi-solid would occasionally pass waves. A place on a new sidewalk will always pass waves. An old sidewalk would have small areas that do not pass waves so that we stay on the sidewalk but avoid stepping into the deep holes.

Calculating (angle and magnitude) vectors is not necessary for cells to do. It’s like passing a stadium wave. After the wave reaches you you stand to signal the person next to you to stand, requires no math at all.

All tissues in our body with equal sized cells (even cell wall and membrane molecules) also close pack to a hexagonal geometry. For biological accuracy it’s something that must be accounted for in a model. I have also used this to form a sheet of close packed molecules or cells:

Irregularities are insignificant. In fact the normal variation may help round out traveling waves to a nice circle, instead of the computer generated perfection that favors a growing hexagon. In a stadium the wave does not stop just because people walking in aisles upset the neatly spaced seating arrangement.

There should be at least 12 angles of resolution in the signal pattern. I’m currently using 24, even though 6 is already enough to get around just fine.

The question needs to be: what are grid cells actually doing in the overall circuit? If they are simply a self-location signal then they add nothing to the geometry of a preexisting map they must adapt their signals to.

This is how I see the grid signals converging at one place:

I may not follow the topic flow but since my doubt is related to grid cells i wanted to know whether the active columns are randomly selected in neocortex and can Grid cells give more precision in the selection process?

1 Like

I think you are asking about GRID cells.

At this point nobody knows enough to answer your question with certainty.

I think the formation of grid cell activity emerge from the activity of the columns; but that is just my opinion.

1 Like