Thursday, May 3, 2007

Hierarchical Temporal Memory

We've completed a functional (and much better) version of our .NET-based Hierarchical Temporal Memory (HTM) engines (great job Rob). We're also still working on an HTM based robotic behavioral framework (and our 1st quarter goal -- yikes - we're late). Also, we are NOT using Numenta's recently released run-time and/or code... since we're professional .NET consultants/developers, we decided to author our own implementation from initial prototypes authored over the summer of 2006 during an infamous sabbatical -- please don't ask about the "Hammer" stories.

I've been feeling that the team has not been in synch in terms of HTM concepts, theory and implementation. We decided to spend the last couple of meetings purely focused on discussions concerning HTMs. This has resulted in a new HTM based initiative (in line with our charter) that utilizes HTMs as the basis of chess playing game engine and in the team rededicating itself to gain deeper insights into HTM-based networks and AIs. I decided to author a simple HTM narrative (below) with an example. I wanted the example to illuminate the potential power in a simple HTM network when attached to a set of sensors. We have used this example as a powerful springboard into deeper analysis and discussions especially regarding multi-level hierarchies (2 - 4 levels).

We have divided our HTM node implementation into 2 high level types. 1) Sensor Node and 2) Cortical Node. Only sensor nodes are tied directly to sensory input. Cortical nodes can have either sensor nodes or other cortical nodes as children. Sensor Nodes retrieve inputs directly from the sensor sources while cortical nodes receive the temporally processed inputs of their children. You can learn the basics from this whitepaper (PDF) from Numenta.

SIMPLE HTM NARRATIVE
An HTM sensor node provides a mechanism to memorize sensor inputs and sequences of those inputs. More generically, an HTM sensor node provides a memory of input and a memory of the temporal contexts for those inputs.

An HTM cortical node provides a mechanism to memorize and associate the temporal contexts of its children (as a spatial memory) AND also stores the temporal-based trends of these associations as a temporal memory.

EXAMPLE
temp = temperature sensor
pressure = barometric sensor
light = luminousity sensor
moisture = humidity sensor

TEMP Sensor
The temperature HTM sensor node is memorizing temperatures and also the temporal trends of those temperatures
Spatial Analysis: High temperature
Temporal Analysis: Temperatures have been getting hotter

PRESSURE Sensor
The pressure HTM sensor node is memorizing pressures and also the temporal trends of those pressure values
Spatial Analysis: Low Pressure
Temporal Analysis: Pressure has been dropping slowly

LIGHT Sensor
The light HTM sensor node is memorizing light intensities and also the temporal trends of those light intensities
Spatial Analysis: Low Light
Temporal Analysis: It has been getting darker

MOISTURE Sensor
The moisture HTM sensor node is memorizing moisture values and also the temporal trends of those moisture values
Spatial Analysis: Some moisture
Temporal Analysis: Some moisture (but more than last time)

HTM Cortical Node
The cortical HTM node is memorizing the simulateneous trends of the temperature, pressure and light intensity sensors AND

The cortical HTM node is ALSO memorizing the sequences of these simulateneous trends of temperature, pressure and light intensity -- over time

Spatial Analysis: (Temps are increasing WHILE pressure is low WHILE it’s getting darker WHILE some moisture) = STORM IS FAR BUT APPROACHING
Temporal Analysis: (Temp Hotter Trend AND Pressure Lowering Trend and Darker Trend AND wetter) = STORM IS NEAR AND APPROACHING

CONCLUSION
From just a simple set of sensors tied to HTM sensor nodes which are themselves children of a single parent cortical HTM node, you can inspect the temporal memory (Temporal Analysis) of the cortical node and get a strong correlated "abstraction" of what's going on (STORM IS NEAR AND APPROACHING ).

The strength of this conclusion stems from the fact that the 4 sensors (and their values) are correlated (associated) by their common temporal contexts and by their inherent association via the single parent cortical node. Said another way, the abstraction of "STORM IS NEAR AND APPROACHING" is a strong belief because the 4 sensor inputs were gathered and associated during the same time, which provides the causal strength of the basis of the conclusion.... whereas, if the sensor values were NOT gathered at the same time (i.e. temperature and humidity were taken hours apart) then the correlated basis of the conclusion would be much weaker.

We've decided to use narratives like this one to help us understand what the HTM nodes are actually comparing and correlating - without getting into any hairy technical or mathematical analysis .... I feel strongly that these dicussions have helped the team grasp deeper understandings of its HTMs implementations.

We have also reminded each other the fact that until we have anything working -- we're just pontificating like a bunch of old philosophers. Since we're all software professionals, we understand that we don't have shit until "its in production"....

but is fun to dream once in a while ... I just wish we had more time to work on this stuff :( ....

4 comments:

JustWilliam said...

Hi ,

Sounds very interesting, I was looking for a .NET implementation of the Numenta Offering.

Are you going to open it up like Numenta? I would very much like to find out more. I have a few projects that I would like to try HTM solutions for. but Like you I am a >NET person.

BDeezy said...

Hi William,

Chances are we will seek to commercialize any .NET HTM toolset we build (we already have a prototype) - so we probably won't be opening it up initially.

Our end game is to have the HTM core engines serve as the basis of generalized AI architectures applied to gaming and robotics.

The HTMs have been difficult to get significant results so far .. but we're still working hard at it.

JustWilliam said...

Hi Bert,

Thanks for the update, I appreciate the difficulties that must be involved. I wish you all the best for you commercialization plans. I lookforward to seeing and using the fruits of your labour

From a business model ,While I agree there is notable value in the toolset but I would suggest you will find there will be significantly more value in the Consultancy and training that is a natural requirement for a large segment of your likely users. The concepts needed to design a meaningful network are generally "less than intuitive" :-)

Again all the best
If you need any beta testers let me know.

William

Patrick McHargue said...

So, did you ever publish your .Net version? I'd be interested in trying it.