Hierarchical Temporal Memory (HTM): The Brain-Inspired AI Approach for Unsupervised Learning

Introduction

While deep learning has made remarkable progress and achieved state-of-the-art results across many domains in recent years, most of its success has been in supervised learning tasks with large labeled datasets. However, the human brain does not learn in a purely supervised manner – we constantly absorb information and detect patterns in the streams of sensory inputs we receive, even without explicit labels. Our brains build models of the world in a largely unsupervised fashion.

This has motivated research into new approaches that more closely mimic the unsupervised learning capabilities of the brain. One promising direction is Hierarchical Temporal Memory (HTM), a machine learning model that aims to capture the structural and algorithmic properties of the neocortex. HTM was first proposed by Jeff Hawkins and Dileep George in 2004 and has been steadily developed by Numenta over the past decade.

In this post, we‘ll dive into the key concepts behind HTM and explore how it offers an alternative paradigm for AI that is especially well-suited for unsupervised learning from streaming data. While HTM has not yet achieved the headline-grabbing results of deep learning, it has some unique strengths that make it worth paying attention to, both from a theoretical and practical perspective.

The Thousand Brains Theory

At a high level, HTM is based on Numenta‘s "Thousand Brains Theory" of intelligence. The key insight is that rather than learning one big model of the world, the brain builds many models that operate in parallel. Each of these models learns the structure of a different object or environment, using the same underlying algorithms.

Information flows up and down hierarchically organized regions of the neocortex. Higher regions learn more abstract concepts, while lower regions deal with more specific sensory data. But there is no "master" region that puts it all together – intelligence emerges from the interactions between these distributed models.

HTM incorporates several properties that allow it to function like the neocortex:

  1. Sparse Distributed Representations (SDRs): HTM encodes information using SDRs, which are binary vectors where only a small percentage of the bits are 1‘s. SDRs provide a robust and efficient way to represent data, analogous to activation patterns in the brain. The sparsity of the representation allows a small number of active neurons to encode a large amount of information.

  2. Spatial Pooling: HTM networks contain columns of neurons, where each column learns to recognize a particular spatial pattern. Spatial pooling converts input patterns into a sparse set of active columns, such that different inputs that are semantically similar will map to a similar set of columns. This process helps the network learn invariant representations.

  3. Temporal Memory: While spatial pooling deals with static patterns, temporal memory learns sequences and makes predictions. Neurons are connected horizontally to form mini-columns. Each active neuron forms connections to neurons that were active prior to it. Over time, this allows the network to learn transitions between patterns and predict what will happen next based on the current sequence and context.

  4. Continual Learning: Unlike most deep learning models which require offline batch training, HTM is able to learn continuously from streaming data. The learning algorithms are unsupervised and allow the model to constantly adapt to changes in the data without forgetting what it has learned before. This is essential for real-world applications where data is constantly changing.

Applications of HTM

So what can HTM be used for in practice? One of the main application areas that Numenta has focused on is anomaly detection in streaming data. For example:

  • IT analytics: Detecting unusual patterns in server metrics, application logs, network traffic to identify issues and threats in real-time
  • Industrial IoT: Recognizing anomalies in sensor data from machines and industrial systems for predictive maintenance and optimization
  • Health monitoring: Finding abnormalities in vital signs and other physiological signals for early disease detection

The ability of HTM to learn continuously from data streams and detect when patterns deviate from the norm make it well-suited for these types of applications. It can model complex temporal patterns and adapt to changing statistics in the data without needing to retrain the whole model.

Numenta has developed several prototype applications using HTM, including:

  • Grok: A commercial application for IT analytics and anomaly detection. It models streaming metrics in real-time and automatically identifies anomalies without needing thresholds or manual rules.

  • HTM for Stocks: Analyzing stock market data to detect anomalies in trading volume and price. It processes stock data and Twitter feeds to spot unusual events.

  • Geospatial Tracking: Modeling trajectories of moving objects like people, vehicles, or animals based on geospatial coordinates and detecting unusual movements.

Comparing HTM and Deep Learning

While HTM takes inspiration from neuroscience, most deep learning models are only very loosely "brain-like". Some key differences:

  • HTM uses sparse representations, while most neural nets use dense representations
  • HTM does not rely on backpropagation of error gradients. It uses Hebbian-like learning rules that are more biologically plausible.
  • HTM has a clear delineation between spatial pooling and temporal memory, allowing it to learn spatial and temporal patterns separately. Most neural nets do not have this separation.
  • HTM is inherently an unsupervised/self-supervised learning approach, while deep learning is primarily used for supervised learning (though this is changing).

Currently, deep learning still outperforms HTM significantly in areas like image and speech recognition. The hierarchical structure of CNNs and the ability to train very large, deep models has enabled remarkable progress there.

However, HTM has some advantages over deep learning when it comes to learning from time-series data and dealing with changing statistics. Most DL sequence models like RNNs still require fixed-length segments and offline training. HTM‘s continual learning abilities make it more flexible.

It‘s still early days for HTM and it has a long way to go to compete with DL in terms of raw capabilities and results. But the progress so far is encouraging and it may carve out a niche for data streaming applications.

The Road Ahead

While the core ideas of HTM were proposed almost 20 years ago, it remains a relatively niche area of research compared to the explosive growth of deep learning. Numenta continues to develop and refine the theory and publish their work as open source.

Recent developments include a new framework called Thalamus that acts as a central routing mechanism for sensory inputs in an HTM system. This allows integrating multiple sensory modalities and motor information for more complete models.

Another interesting direction is applying principles from HTM to more traditional deep learning architectures. For example, using local Hebbian learning rules instead of backpropagation, or incorporating ideas like temporal pooling and continual learning into neural nets.

Unsupervised learning remains an open challenge in AI and an active area of research. While supervised learning has been successful for pattern recognition, intelligence requires being able to learn from raw observations with rewards or labels.

As the field progresses, we will likely see a convergence of ideas from neuroscience, deep learning, reinforcement learning, and other areas. HTM presents a thought-provoking approach that can potentially enrich and inspire new techniques.

The path to artificial general intelligence is still uncertain, but studying the brain and drawing insights from its structure and function seems like a necessary part of the solution. Jeff Hawkins and Numenta have been unwavering in their pursuit of that mission over the past 17 years. It will be fascinating to see how HTM evolves and what breakthroughs emerge in the years ahead.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Similar Posts