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.

Thursday, January 1, 2009

Non Hodgkins Lymphoma Primer - Part 1

My mother has been a cancer patient since the year 2000. Her cancer type is Non-Hodgkin's Lymphoma (NHL) - Large B Cell type. I've accompanied my mother to nearly all her doctor appointments, imaging scans, therapy treatments and surgeries during the last 8 years and I would like to share our particular timeline, my observations and some recommendations. Cancer comes in many flavors and with many varying personalities and I can only speak to NHL.

NHL is a lymphatic system based cancer - meaning that it occurs within the lymph tissue of your body. The lymphatic system is an entire network of nodes, ducts, vessels and tissues that produce and transport lymph fluid across the body and is a major part of our immune system. It's like a secondary bloodstream network but instead of blood it transports lymph fluid.


Clusters of lymph nodes exist in and around your neck area, your underarms and your abdomen. Tonsils are the most "popular" form of lymph tissue where infections lead to their removal.


The Early days - Winter 2000
During the winter of 2000, mom started experiencing a set of maladies that seem disconnected at the time. She experienced frequent back pain, which she attributed to frequently standing in her job. At the same time, she started experiencing a diffuse pain and discomfort in her abdomen. Her primary care physician was suspicious but unsure on the cause so she sent her to get Pap smears and gynecological exams. These exams came back clear, the primary care physician was reluctant to send her to any specialists because of a lack of health insurance.

LESSON #1 - MAKE SURE YOU HAVE HEALTH INSURANCE - IN America today, if you have cancer and no health insurance - you will bankrupt your family and most probably die.

One day during the winter of 2000, mom's legs started shutting down. Both her legs from her knee down were showing signs of atrophy exhibited by a darkening of her skin. We took her to the hospital. Poor circulation (due to Diabetes) and a viral infection were the two prominent theories given by the ER doctors but I was immediately suspicious of the viral infection theory since both legs were showing the atrophy and it didn't seem "localized" as a leg-based viral infection should exhibit itself (in my mind anyway). There seemed to be some hesitation to get scans performed which I now realize was due to her health insurance situation.

LESSON #2 - MAKE SURE YOU HAVE HEALTH INSURANCE - It really is a matter of life or death if you come down with a life threatening illness.

After a CAT scan was finally performed, the diagnosis was then obviously clear... huge tumors were present in mom's lymphatic system throughout her neck, chest, back and abdomen.

LESSON #3 - Imaging technology such as CAT, PET and PET fusion scans are the most reliable methods to gather information on the current state of cancer activity in your body.

A CAT scan is a detailed imaging study which in mom's case is primarily (and frequently) used to determine lymph node sizes. Enlarged lymph nodes are usually indicative of a problem - either infection or in mom's case - lymphoma. The patient will be given a milk-like drink to consume prior to testing to help increase the scan's contrast and effectiveness. We use the spanish term for a cat -- "gato" - when playfully referring to this scan.

A PET scan is a much more interesting beast. This scan "sniffs out" cells that are using abnormal amounts of glucose from the body. Increased glucose uptake is a signature of energy-hungry cancer cells and a PET scan can detect this at very detailed levels. So detailed that a CAT scan can potentially show that all lymph nodes are normal and present no indications that cancer is active while a PET scan the same week can show active cancer cells in the same lymph nodes - a testament to the PET scan's sensitivity. We use the spanish term for dog - "perro" - when referring to this scan.


After some uncomfortable AIDS related questions, the cancer diagnosis was clear and we needed to extract a sample of a tumor to gather more specific information on the type of cancer we were dealing with. This tumor cell extraction surgery is known as a biopsy. The biopsy is a critical component in your fight with cancer and should not be avoided ... since doctors can now employ more targeted medicines to battle specific types of cancer.

Chemotherapy is usually the initial salvo in your war against cancer (and believe me folks .. its a war). The prevailing "gold standard" in chemotherapy treatments is known as CHOP, which is a chemical cocktail of drugs used to "punish" rapidly dividing cells. The good news is that its effective across many different cancer types since most involve uncontrolled cell division. The bad news is that its also "effective" against good cells in your body that also divide rapidly. Side effects are notorious and are every bit as bad as you have heard. Severe nausea, complete loss of hair, fatigue, low blood cell counts, etc. But if there is a silver lining ... this happened to be the worst part of the treatment regimen (and we've had many) ... probably due more to the emotional shock of not knowing or of never having experienced such a shock to the body and spirit.


LESSON #4 - Caretakers, usually family members, react in wildly different ways during these initial treatments and surgeries. I would advise that at least 1 family member (preferably the same one) be "very present" in most if not all of the initial scans, surgeries and treatment cycles, not just for emotional support but because there will be a whirlwind of doctors, specialists, technicians, health care professionals, etc that will now invade your life. The "continuity" of information gathering and information transfer is very important and that is best done by a non-sick caretaker because doctors are way too busy with their multitude of patients, healthcare regulations, liability concerns and parade of pharmaceutical reps to effectively manage all the various details of each patient's treatment.

To be continued ....


References
  1. National Cancer Institue - http://www.cancer.gov/
  2. MedlinePlus
  3. Leukemia & Lymphoma Society
  4. American Cancer Society
  5. Chemotherapy.com

Charity - Support - Donate