This experiment shows how "location" might work. It shows how a network of cells can infer objects at any location if:
We introduce a "location layer". Here are some neurons from the location layer:
The actual thresholds might be higher. The "3" and "6" are for illustrative purposes.
Location SDRs and motor commands are related by motor commands (a.k.a. "deltas").
These locations form a reusable "space".
In this experiment, we train the location layer with proprioceptive input. Then we disable this proprioceptive input when we want to infer an object.
This is pretty elaborate. There are other ways to implement this location layer, and there are ways to train it that don't involve a sometimes-enabled proprioceptive input. The point of this experiment is to show that this layer can in principle be implemented, and that it solves a lot of "egocentric vs. allocentric" problems.
We take this "location layer" and we add it to the existing two-layer network which learns objects as sets of feature-location pairs.
This new three-layer network can infer objects no matter where the objects are placed in egocentric space.
First, let's look at what happens when the objects are placed in the same egocentric position where they were learned.
import htmresearchviz0.IPython_support as viz
viz.init_notebook_mode()
with open("logs/infer-no-location.csv", "r") as fileIn:
viz.printSingleLayer2DExperiment(fileIn.read())
Some explanation:
Here's a step-by-step explanation:
Now let's scramble the objects and show that it can still infer them.
with open("logs/infer-shuffled-location.csv", "r") as fileIn:
viz.printSingleLayer2DExperiment(fileIn.read())
The same exact thing happens. The location layer always infers the location where it originally learned the object.
This algorithm doesn't always infer objects as fast as is theoretically possible. This experiment shows an example. We intentionally choose objects that will confuse the network.
Here we train a network on 3 objects, but we learn them each at the same point in the reusable "space". The lower-left point of each object is learned at the same location.
Then we try to infer an object. The network observes "A, right, B, right, C". In theory it should be able to infer the object after "A, right, B". But the union of objects has an additional "A" and a "B" at adjacent locations, so one of these objects is able to avoid getting removed, even though it doesn't contain "A, right, B". More sensations are needed before the object is inferred.
with open("logs/infer-not-perfect.csv", "r") as fileIn:
viz.printSingleLayer2DExperiment(fileIn.read())
This resolves itself if you step back and do it again: "A, right, B, left, A, right, B".
with open("logs/infer-recovery.csv", "r") as fileIn:
viz.printSingleLayer2DExperiment(fileIn.read())
Performing path integration on unions of location SDRs is a powerful technique.
If you reuse location SDRs for multiple objects, this can cause problems. A sensor can get confused when trying to infer an object with a sequence of movements and sensations. It's unclear how big a problem this is -- this issue would start to go away as you add more sensors.
If it is a big problem, then it would be better to use unique SDRs for each object, but somehow you'd need to be able to perform path integration on novel SDRs. In biology, grid cells seem to do exactly this. Maybe grid cells will solve everything.