This started with some questions I posed over in htm school: grid cells about how grid cells initially learn a hexagonal grid of place fields. In that thread, my questioning can be summarized by this:
This is apparently an area with little information. I figured it was time to start a new thread about how to possibly implement this.
So, I came up with a super simple starter algorithm for generating place fields to learn about the allocentric space over time. This algorithm is substituting an external environment, such as a room, with objects. So the grid cells represent allocentric locations of features on objects.
Go easy on me if this has major/obvious flaws . I would appreciate any feedback on its sanity. Maybe other people have given this a try. Maybe Numenta has this already implemented in a better way. If so, I could just throw this out and see how they did it.
NOTE: In this algorithm, I use some concepts called a “displacement radius” and “inhibition radius”.
The displacement radius is basically the size of the place field. It’s a radius that exists around the center the vertex of each equilateral triangle in the hexagonal lattice.
The inhibition radius is an area outside the displacement radius that “contains” each place field and basically adds space between the place fields, where other grid cells in the same module can set a place field.
Hopefully those makes sense.
SETUP STEPS
- start with a set of grid cell modules containing some
grid cells that so far have zero place fields total - now the first sensory input comes in from a location
on a novel object as the starting point (no
temporal context at this point) - pick a random cell from each gcm to represent this
location
LOOP - use the sensory input itself to identify the current location
in the context of previous sensory pattern plus motor
command (no context for first pattern though) - map these patterns to a place field VERTEX of currently
active cells - execute a motor command
- measure the spatial displacement from the previous
location (see below)
8a. if displacement is less than the “displacement radius”,
then map these additional patterns to the current place
field
8b. if displacement is more than the “displacement radius”
but less than the “inhibition radius”, then choose a
different cell in each gcm
8c. if displacement is more than both the “displacement radius”
and the “inhibition radius”, then add a new place field to the
current cell - goto #5
How to compute the spatial displacement after a motor command?
Well, this will just depend on how motor commands are executed in
the environment. The motor command needs to yield some value that
can be encoded and use as an additional temporal context pattern.
Like I said, this is a starter algorithm, so I know there are steps missing. For example, once the entire object/environment has been learned, then it can start doing inference using the learned place fields I think. I’m also the most unsure about how step #4 works, but I have an idea.
I haven’t implemented any of this in code yet, so it’s completely theoretical at this point.