Monday, January 5, 2009

Hierarchical Temporal Memory - HTM

REPOST - MAY 2007

I read Jeff Hawkins book "onIntelligence" last summer during a sabbatical and it has fundamentally changed how I look at all sensory experiences, people, mental phenomena and human intelligence. HTMs are an interesting topic in Artificial Intelligence and computational neuroscience circles.


Jeff Hawkins (of Palm Computing and Treo fame) outlined an algorithmic framework referred to as Hierarchial Temporal Memory which tries to simulate neocortical behavior. The framework is based on the idea that most of the human neocortex is driven by a huge number of computational units (small neural networks) that perform a common cortical algorithm using memory as its central feature (jeff gave credit to the neuroscientist Vernon Mountcastle for the common algorithm observation). I like to think of HTMs as powerful bayesian neural networks with massive memories of prior values (and results).

Since my background is in software, I started writing software code using .NET (C#) to construct my own HTM prototypes (during my sabbatical - i know - i'm a loser) based on the concepts in Hawkins book and I had varying degrees of success. During the summer months of 2006 on a hillside private hotel in Northern Cal i did nothing but read, think about or prototype HTM related stuff. It's not often when you read, hear or generally experience something that fundamentally changes your perception of EVERYTHING but I have not been the same since.

I had such an ignorant view of intelligence my entire life. I used to forcibly argue that intelligence was not a function of memory but primarily a function of the "processing engine" that you were blessed (or cursed) with by nature. I would always suggest that "learning something doesn't mean memorizing it" and I always minimized the role of memory in human intelligence..... DAMN ... WAS I IGNORANT. After reading Hawkins eloquent descriptions of how archived memories of sensory information (visual, auditory, tactile, etc.) and their associations with each other can provide nearly everything necessary for a powerful pattern matching and prediction machine called the brain.

Hawkins notes that invariant representations of real world objects (sense-driven) eventually get represented in the neocortex by hierarchies of memory which hold sensory spatial and temporal pattern memories. Once the neocortex is "trained" and populated with these memories, it consequentially gains a powerful prediction engine for future (sensory) events. A recent study corroborates the central role that memory seems to play in prediction. HTMs utilize Bayesian statistical methods (in an indirect way) as the basis of their strength.

As you experience life and process sensory information from your eyes, ears, nose, and touch -- you inevetibly build up sensory maps of your reality and this is stored in memory. Frequently experienced sensory input is "rewarded" by your brain by becoming more cemented in your memories -- its like the brain saying " ... the more I experience you , the more I believe that you exist ... ". When you and I experience sensory input, we experience it in space (its position, height, width, shape, etc.) and we also experience it in time (a sequence of sensory events). By memorizing the time (temporal) aspects of sensory input you can build mental maps of experience - for example - say you're an inquisitive 5 year old boy running into a dog in an alley who then starts barking loudly and then leaps and bites you. The input breaks down like this ...

Sensory Input - SPATIAL
Auditory - Bark
Visual - Dog (husky dog in aggressive posture)
Visual - Alley

Sensory Input - TEMPORAL
1) Entered Alley
2) Sensed Dog
3) Got bit

Now - this traumatic event will probably be burned into your memories for the rest of your life. Lets say sometime in the future you find yourself entering an alley and you either hear a bark or see a dog -- then your brain is going to recall (from its memories) prior experiences you had that match these similar sensory inputs - and your brain is going to recall what happened before and use that as a template of whats going to happen in the future (this is prediction) -- you'll wisely choose an alternative path this time. This is all possible by simply remembering prior experiences (spatial and temporal aspects of sensory input).

"Lower" animals do this too - so this is not representative of human intelligence but it IS representative of a simple model of neural-based prediction and behaviour -- simply by using memory. Here's another sample HTM narrative from the Emerging Properties Blog -a small team I recently formed with some friends whose charter is to design and develop HTM based AIs and robotic behavior networks.

No comments: