Showing posts with label neocortex. Show all posts
Showing posts with label neocortex. Show all posts

Saturday, July 9, 2011

UML Models - AI Behavior Machine, Sensors, Motors, Neurons

Looking up some old visio models.  Here's some early work regarding a simple behavior system.  This particular behavior system is based on a basic set of sensor and servo systems fed into hierarchical temporal memory networks (HTM) chained up in functional sensor and motor clusters.  Eventually fed into a simplistic behavior machine that has access to an outcomes memory bank to perform (or simulate) goal-directed behaviors.



Created this one to simulate a neuronal-based sensor system for some computational neural network algorithms. Its a very high level domain model (class model) of neuron and dendrites including some specialized neuron types including sensory, motor and cortical neurons.



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 :( ....

Thursday, January 11, 2007

2007 - Spheres, Bots & Brains.

Spheres of Knowledge - The team defined two major spheres of knowledge plus an integration sphere.
Sphere #1 - Artificial Intelligence - specifically Memory Prediction Frameworks (HTMs)
Sphere #2 - Robotics - specificially humanoid or reptilian (2 or 4 legs), sensory networks (laser, acoustic, visual, tactile feedback, etc.) and motion hardware (servos, motors, gyros, etc.).
Sphere #3 - Integration, CPUs & Memory, Simulation & Training

One member assigned to each sphere and the remaining member assigned to master both spheres of knowledge and the integration between the two. We're hoping this setup is optimal for a 3-man team to absorb the mountains of information in each sphere while maintaining some overlap of knowledge and expertise.

The Artificial Intelligence Sphere will center around memory prediction frameworks popularized by Jeff Hawkins of Numenta. Hawkins outlined an algorithmic framework sometimes 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). 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. The team has decided that a framework based on Hawkins HTM ideas show the most promise for our venture. An excellent working knowledge of Bayesian statistical methods will be essential. The other major aspect of this sphere will be the potential integration of knowledge bases (common sense databases, internet sources, etc.) along with the HTM framework to facilitate training and increase functional intelligence of the AI system. Rob has been selected to lead this sphere.

The Robotics Sphere is really The Substrate Sphere, we were primarily looking for a substrate to apply our AI efforts... we all quickly agreed that Robotics provided the most challenging (and fun) platform to test our AI-based engines. Since a career can be spent on development of a particular robotics platform -- we've decided to focus on COTS-based robots. Aligning with the recent MS release of Robotics Studio, the team will focus only on platforms that are supported by the Robotics Studio. This will leverage our current .NET programming expertise, allow us to integrate any .NET based AI algorithms while minimizing our time investment on the robotics side of the house by not focusing on proprietary hardware. The important aspects of this sphere are primarily hardware related including wireless communication between AI node and robotic brain, acuity (granularity) of sensors, noise filtration and locomotive strategy. Trev will lead this sphere.

The Third Sphere is an integration of the first 2 spheres with responsbilities covering development environments, integration, computational hardware (CPUs, memory, etc.), simulation and AI/Robot training. Training is a significant issue in both AI and robot development and requires careful planning and implementation. Duties involve mastery of MS Robotics Studio and Concurrency & Coordination Runtime (CCR), multithreading / multicore concepts, integration of AI engines and robotic "nervous system". Non functional duties involve facilitating cohesiveness between leaders of both spheres and ensuring that all members are working toward the stated goals.

It is important that each person masters their respective sphere and cross-train the rest of the team. Each member will present a technical summary by next meeting covering their corresponding sphere. This action item is meant to ramp up teammates on the relevant technical concepts and to get the team used to adjusting their busy schedules to include time for this new venture.
  • Trev will present a technical robotics summary including robotics jargon & definitions, details on different sensor types and an overview on the initial platform selected - LEGO Mindstorms NXT.
  • Rob will present a summary of the AI sphere concentrating on HTM concepts & algorithms.
  • Bert will present an overview of the MS Robotics Studio and the CCR.

Some relevant links:

Artificial Intelligence Sphere:
Bayesian Models of Inductive Learning- Berkeley PowerPoint
onIntelligence Forum
Hierarchial Temporal Memory - Wikipedia
Science AAAS - article on Brain Science / HTM

Robotics Sphere:
MS Robotics Studio - Lego Mindstorms Tutorial
Lego Mindstorms NXT Community Site
Lego Mindstorms NXT Blog
Robotics Connection Store
The Tech Museum - Robotics