Problem with prediction of cyclic sequences

Hi there,
I’m currently trying to implement my own version of HTM and stumbled across an interesting problem:
Imaging a cyclic sequence to be learned, let’s say the big handle of a clock. I’d assume that HTM should be able to easily predict the next position of the handle given the current position. There is no ambiguity to the prediction so this task should be rather simple and should be solvable using a single distal dendrite segment.
However there appears to be a problem.
Let’s say we only read the clock every 15 minutes so we get 4 patterns running in a cyclic sequence. For the sake of illustration let’s say there are only 4 minicolumns with 1 being active at a time, so the sequence of minicolumn activations the SP has generated might be:
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
and repeat…
Let’s further assume there are at least 2 cells per minicolumn.
At first every presentation of the pattern will make the active column burst as there is no prediction, activating all its cells, making the cell with the best matching distal dendrite segment (or a random cell if there is none) the winner and connecting it distally to the winner cells of the previous presentation in order to facilitate its own prediction.
The problem is that when the sequence is repeated a new cell will be selected as the winner (not the winner cell from the first iteration) because it will choose a cell with the least distal segments.
This effect will propagate in such a way that there will always be one (shifting) position in the cyclic sequence in which nothing is predicted and all the minicolumns will burst.

However I see that there are situations in which this behaviour is required, e.g. having a sequence like ‘XABCABCABCY’ the system should not assume a cyclic ‘ABC’ and forget in which part of the sequence it is by reusing the same code for it.

Is there any idea out there on how to properly predict truly cyclic sequences without bursting at some point while also properly predict sequences in which only parts are cyclic (and therefore should not exactly share the same code) ?

Cheers !

3 Likes

You might find this thread interesting.

3 Likes

I am tackling this problem in the “Dad’s Song” project, so I’ll explain the approach I am planning to take.

The first requirement is a Temporal Pooling layer (similar to the output layer in SMI), which provides apical feedback to the Temporal Memory layer. This signal will bias all the elements of the sequence once it is recognized, so when the last element of the sequence is followed by the first element, the minicolumns will not burst (allowing the sequence can repeat indefinitely)

The second requirement is to be able to handle sequences where the same element appears more than once. To solve this problem, there will be a competition between candidates. Those which are receiving both distal and apical input will win the competition and inhibit the others.

The third requirement is to more intelligently handle tiebreakers between same element in a sequence that appear more than once. I don’t have a biologically plausible solution for this one, but for now planning to track which timestep a cell was last active, and in the case of a tie, the cell which activated least recently will win (to avoid skipping ahead in the sequence when the system is uncertain or if there is noise/errors)

The final requirement is timing. I need to be able to encode sequences where a sub-sequence repeats twice, for example, before moving to a different sub-sequence. I am planning to encode timing information with each element of the sequence. If action “L” is defined and takes, for example, 1 second to complete, then L encoded with timing 2 seconds would unfold as “LL”, 3 seconds as “LLL”, etc. Instead of encoding that there are 3 “L”'s, instead I encode how long I want to perform the “L” action. LLL -> RRR can then be pooled, and itself repeated. LLLRRR LLLRRR LLLRRR could be encoded as “perform the LLLRRR action for 18 seconds”.

2 Likes

Thanks for your feedback. I’ll have to think about this a little more.

Temporal Pooling layer (similar to the output layer in SMI)

Where can I find a description of how this works ?

There isn’t currently a working Temporal Pooling implementation with the desired properties. I’m working on one based on hex grid formation. Once I get it working, I’ll push the code onto Github and start a thread to talk about the theory and evolve it with the community.

4 Likes

Synaptic depression is a way for that to happen. When a synapse activates, it gets a bit weaker for a bit. That can last at least a second for NMDA receptors, and it might or might not be much less depression if it is subthreshold for an NMDA spike (dendritic segment above threshold). NMDA receptors probably have a big role in the predictive signals in temporal memory, too.

Source:

3 Likes

Cell fatigue has been brought up a number of times on other threads as well. Taking advantage of it in the tie breaker logic makes a lot of sense.

2 Likes