Time Series Predictions and More

Hello!

I have been working on improving the algorithms part of HTFE in a new iteration, which so far is not yet open source, but will be eventually. It is called HTSL, the hierarchical temporal sparse learner. It is a further simplification of the concepts of HTFE which in itself was a simplification of HTM. Despite being the simplest iteration yet, HTSL gets the best results out of all my attempts so far.

So here are some tests I made for HTSL!

Music Generation

I started with the piano rolls dataset from here: http://www-etud.iro.umontreal.ca/~boulanni/icml2012

First I just tested the memorization capabilities of HTSL. So, I started by feeding a 16×16 and 12×12 (2 layer) HTSL hierarchy a series of 200 notes. After iterating on it for only 30 iterations, it achieved 100% remembrance. So at the very least, it is capable of extremely fast learning (recurrent neural networks like LSTM require iterations in the thousands).

I then tested a weird feature: Generalization of music to produce unique new music. Basically I ran HTSL on a bunch of songs, randomly choosing which ones, and then activated HTSL into a random state. From there, I fed its own predictions to itself as input, so it would start generating its own music based on experience.

Here is an example of some music it generated:

https://drive.google.com/file/d/0B2btNvgW7MHUMXFhaTFPOHRxYXc/view?usp=sharing

Animation Prediction

Another test was to feed HTSL video data, and have it predict the next frame of an animation.

For this, I just used some sprite sheets. I started with a simple test that was just a sprite sheet of incrementing numbers. So, here is an image of HTSL doing image-based counting!

htslcounting

Left is the input, right is the prediction.

If I feed it its own predictions, it starts counting on its own!

Mouse Movement Prediction

I prepared a super-simple demo, to show off the online learning capabilities of HTSL. In this demo, HTSL tries to predict where your mouse will be in the next 1/12 of a second. I do this by giving HTSL an input to predict every 5 frames (60 fps), and interpolating the results.

So, you should be able to move your mouse in patterns (say, a circle, or an 8 shape), and it will indicating the future position of your cursor in blue.

You do not have to be perfect with your movements for this to work, it seems to generalize very will to different but similar patterns of movement.

Here is a download link:

https://drive.google.com/file/d/0B2btNvgW7MHUWlRxWW5lOU0zY2c/view?usp=sharing

How does it work?

Unfortunately I cannot reveal too much yet, sorry 😦 Soon though!

But, know that it is still similar to HTFE, and still is based on SDRs (sparse distributed representations).

One thing I will give away: HTSL uses a new sparse coding mechanism, that to my knowledge learns faster than anything else out there right now. It does not need iterative solving for sparse codes, can handle non-contrasting inputs, and produces great reconstructions. Here is an example:

sparseCodingWithReconstruction

I am also working on using HTSL for reinforcement learning again. Right now HTSL runs on the CPU, so I will be moving to the GPU eventually, so I can have a go at the Atari arcade learning environment!

Until next time!

2 thoughts on “Time Series Predictions and More

Leave a comment