Can HTM learn the probabilistic sequence?

Hello,

I have a question about the HTM theory. I don’t have a clear understanding after watching HTM video, reading papers and BAMI book.

Let’s say the agent sees ABCD pattern. The agent will see ABC 70% of time and ABD 30% of time. Then when the agent see AB, can it generate C and D where about 70% of time it will generate C and D for remainder of time. Or will it predict only C, because it is what the most of time it sees.

Thank you.

1 Like

In the scenario you propose, after seeing AB, the cells representing ABC and ABD will all become predictive. The distal synaptic permanences between the AB and ABC cells will be higher than those between the AB and ABD cells. That is how we can say that ABC is more likely to occur than ABD. There is a talk I give where I explicitly show this by training on one sequence, then changing it to another and watching as the new minicolumns burst and new cells are assigned to represent the new sequence, then there are 2x the predictive cells.

Over time (and depending on the model params), it will forget patterns it sees less often, so that those cells stop becoming predictive. If ABD is not seen for a long time, the cells representing that sequence will stop becoming predictive because they are no longer getting synaptic activity from the AB cells.

2 Likes

To provide OP with numbers on the case of ABC and ABD:
The capacity of alternative outcomes is dependent on the ratio between synaptic increment and predicted inactive decrement (weakening on false positives) parameters of Temporal Memory in addition to the frequency of those outcomes.

Superficially, given AB as the first two inputs, if the occurring probability of C is greater than inactive decrement / increment, HTM will keep remembering it. Same holds for D but it also competes with C in this case for occurrence. It may be reasonable to assume that HTM can remember at most increment / inactive decrement patterns if they appear uniformly. So this is a theoretical limit even if there is more representational capacity.

You can play with this ratio to reduce or increase the tolerance for alternative outcomes. If there is no forgetting on false positives (predicted inactive decrement = 0), it can remember alternative outcomes as many as the capacity allows. But if there is no forgetting then you predict everything that ever happened independent of occurrence frequency.

1 Like