Wednesday, January 31, 2007

HTMs - Memory, Machines & Motivation

This blog posting will focus on Rob's presentation on Hierarchical Temporal Memory (HTM) as defined by Jeff Hawkins of Numenta in his onIntelligence book (published in 2004). HTMs, sometimes called memory prediction frameworks, will play a central role in the team's goal of buidling a generalized AI framework and the basis of a robotic nervous system. This is just a high level overview of HTMs being used for our purposes, more details are available here and here.


Prediction Machine: Rob described how HTMs are modeled after a common cortical structure present in the human neocortex. In a nutshell, the human brain stores sensory input in a layered hierarchial memory structure. Each computational unit of this memory framework processes spatial patterns (patterns over space) and temporal patterns (patterns over time). Current sensory patterns are matched against patterns in memory and the closest matching pattern category is sent up the memory hierarchy. As categories of patterns continue traveling up the hierarchy an invariant view of the sensory data is formulated. Spatial and temporal patterns are stored in memory with more detailed/specific patterns existing in the lower levels of the hierarchy and generic/invariant models living in the higher levels.

This invariant model of the world is then used to form predictions based on prior and current sensory input patterns. Current sensory inputs are constantly checked against predictions forming the initial basis for a behavioral action (motor or otherwise). Predictions also allow the brain (HTM) to supplement current sensory input to form a complete picture from sensory data that may be missing information (i.e. "fill in the blanks").

Exception & Attention Machine: A prediction that fails miserably against current sensory input can be considered a violation of expectation or an exceptional event. In computer science, exceptional events are called exceptions and are usually handled immediately or allowed to "bubble up" to a high-level handler for processing. The brain also seems to have an "exception handling" mechanism of its own. When current sensory input "surprises" ... the brain commands the body to pay special attention to the source of the surprising sensory input. A good example is when you see an unrecognized motion from your peripheral field of vision. You immediately turn your head to focus your eyes (and senses) to the source. Attention was probably a very old adaptation of the reptillian brain to focus an organism's full resources to detection of a predator (or prey).

MOTIVATION & MOTOR BEHAVIOR
What do HTMs have to do with robots? Well... we're seeking to use HTMs as a primary tool for a generalized AI system that can drive robot behavior. We're writing code to simulate the common cortical algorithm defined by Jeff Hawkins of Numenta. Motor behavior will be implemented from processing the HTMs predictions and sending commands to robotic servos. We're still in discussions about how to model a robotic nervous system with HTMs as a central component. Team members have discussed potentially modeling innate behaviorial control mechanisms such as pain and hunger. The team's goal is to get robotic behavior to emerge as a response to its environment versus explicity coding specific goals and behaviors into the robot. This is one of our prime directives.

LIMITATIONS & REALITIES
The obvious limitations to the implementation of HTMs are the amount of memory and CPU resources required to effectively simulate the neocortex and the amount of training necessary to get the robot/HTM anywhere near operational (i.e. a baby). We're using Microsoft .NET to implement the HTM and the MS Robotics Studio to tie the HTM to the robot hardware. We will use Microsoft's provider model when implementing the memory structures... since we know initially, we wont have enough RAM to store the memory component .. we will probably persist to Flash memory or hard drive. Other specific goals of our HTM development is complete serialization/deserialization of memory structures and multithreading the processing of sensor nodes.

WRAP-UP

Some thoughts brought up by team members.

Hawkins talks about the massive amount of feedback that seems to take place going down the memory hierarchy. Trevor mentioned that this is probably due to a set of predictions being sent down (versus just the best prediction) to better correlate (in a bayesian fashion) with the current sensory input.

Another interesting point brought up by Rob was specific to an HTM implementation issue regarding categorization of the temporal patterns. Bert prototyped an HTM implementation that was string based but Rob was wondering if a pre-quantized numeric based category structure will be better for the HTM sensor nodes ... this will overcome a nuance of Hawkins design that forces you to evolve the categories over time. Rob's design will require knowing a priori the range of values for sensor input but may provide an interesting alternative.

Team talked about how inhibition should be modeled specifically in an HTM implementation. Maybe an HTM node can inhibit the temporal pattern categories of other HTM nodes by some unknown mechanism ...can probably gather some ideas from modern neural networks.

No comments: