Union processing of sequences of patterns

Embodiments relate to a processing node of a hierarchical temporal memory (HTM) system with a union processor that enables a more stable representation of sequences by unionizing or pooling patterns of a temporal sequence. The union processor biases the HTM system so a learned temporal sequence may be more quickly recognized. The union processor includes union elements that are associated with incoming spatial patterns or with cells that represent temporal relationships between the spatial patterns. A union element of the union processor may be activated if a persistence score of the union element satisfies a predetermined criterion. The persistence score of the detector is updated based on the activation states of the spatial patterns or cells associated with the detector. After activation, the union element remains active for a period longer than a time step for performing the spatial pooling.

BACKGROUND

1. Field of the Disclosure

The present disclosure relates to learning and processing spatial patterns and temporal sequences in a temporal memory system.

2. Description of the Related Arts

Hierarchical Temporal Memory (HTM) systems represent a new approach to machine intelligence. In an HTM system, training data including temporal sequences and/or spatial patterns are presented to a network of nodes. The HTM network then builds a model of the statistical structure inherent to the spatial patterns and temporal sequences in the training data, and thereby learns the underlying ‘causes’ of the temporal sequences of patterns and sequences in the training data. The hierarchical structures of the HTM system enables modeling of very high dimensional input spaces using reasonable amounts of memory and processing capacity.

The training process of the HTM system is largely a form of unsupervised machine learning. During a training process, one or more processing nodes of the HTM system form relationships between temporal sequences and/or spatial patterns present in training input and their associated causes or events. During the learning process, indexes indicative of the cause of events corresponding to the training input may be presented to the HTM system to allow the HTM system to associate particular categories, causes, or events with the training input.

Once an HTM system has built a model of a particular input space, it can perform inference or prediction. To perform inference or prediction, a novel input including temporal sequences or spatial patterns is presented to the HTM system. During the inference stage, each node in the HTM system produces an output that can be more invariant and temporally stable than its input. In other words, the output from a node in the HTM system is more abstract and invariant compared to its input. At its highest node, the HTM system will generate an output indicative of the underlying cause or event associated with the novel input.

SUMMARY

Embodiments relate to a processing node for temporally processing input data. The input data has a plurality of elements having their activation states change over time. Spatial pooling is performed on the input data by selecting, for each time step, elements in a series of vectors to be activated based on active elements of the input data mapped to the elements in the vectors. Each of the vectors is in sparse distributed representation. The processing node generates an output data having one or more elements activated based on the selected elements in each of the vectors. The activated elements in the output data remaining active for a duration longer than the time step.

Embodiments also relate to a processing node having a sequence processor with its state updated responsive to receiving input data for each time step. The state information represents the updated state of the sequence processor and indicates detection or prediction of temporal sequences in the input data. The one or more elements in the output data activated based on activation of elements of the state information mapped to the one or more elements in the output data. An output data having one or more elements is generated. The output data is activated based on the activation of elements of the state information mapped to the one or more elements in the output data. The activated elements in the output data remaining active for a duration longer than the time step.

DETAILED DESCRIPTION OF EMBODIMENTS

In the following description of embodiments, numerous specific details are set forth in order to provide more thorough understanding. However, note that the present invention may be practiced without one or more of these specific details. In other instances, well-known features have not been described in detail to avoid unnecessarily complicating the description.

A preferred embodiment is now described with reference to the figures where like reference numbers indicate identical or functionally similar elements. Also in the figures, the left most digits of each reference number corresponds to the figure in which the reference number is first used.

Certain aspects of the embodiments include process steps and instructions described herein in the form of an algorithm. It should be noted that the process steps and instructions of the embodiments could be embodied in software, firmware or hardware, and when embodied in software, could be downloaded to reside on and be operated from different platforms used by a variety of operating systems.

The language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, the disclosure set forth herein is intended to be illustrative, but not limiting, of the scope, which is set forth in the claims.

Embodiments relate to a processing node that generates a more stable representation of temporal sequences in input data by unionizing or pooling spatial patterns of a temporal sequence. Spatial pooling is performed on the input data by selecting a subset of elements in a vector where each element of the vector is mapped to one or more elements of the input data. Output data from the processing node may have its elements activated based on elements in the vector selected for activation. After an element of the output data is activated, the element remains active longer than a time step for processing the input data at the processing node. As a result, the output data becomes a unionized version of the vector or an intermediate data that is derived by temporally processing the vector.

Architecture of Temporal Memory System

A temporal memory system stores temporal relationships in sequences of spatial patterns and generates useful information based on the stored relationships. The useful information may include, for example, prediction of spatial patterns to be received, identification of spatial patterns, or a higher level cause associated with the spatial patterns in input data. The temporal memory system may be of a non-hierarchical structure or be of a hierarchical structure.

FIG. 1Ais a conceptual diagram of a single processing node104in a non-hierarchical system. The processing node104receives input data, processes temporal sequences in the input data and generates an output. The output of the processing node104is based on the temporal relationships between spatial patterns. For example, the output may indicate prediction on what spatial patterns are to follow or indicate how well the prediction matched a subsequent spatial pattern in the input data.

FIG. 1Bis a conceptual diagram of processing nodes organized in a hierarchical manner. Such a hierarchically structured temporal memory system is referred to as a Hierarchical Temporal Memory (HTM) system. In an HTM system, multiple processing nodes learn, predict, and infer input at different levels of abstraction. An example HTM system100ofFIG. 1Bcomprises three levels where each level L1, L2, and L3includes one processing node110,120, and130, respectively. HTM system100has three levels L1, L2, L3, with level L1being the lowest level, level L3being the highest level, and level L2being an intermediate level between levels L1and L3. Processing node110at the lowest level L1receives a sensed input that changes over time. Processing node110processes the sensed input and outputs a signal that is fed to its parent node120at level L2. Processing node120at level L2in turn processes the signal from processing node120and outputs a signal to processing node130at the highest level L3. Processing node120outputs a signal that represents likely causes or events associated with the input data.

The HTM system100has three levels L1, L2, and L3, where level L1is the lowest level, level is L3is the highest level, and level L2is an intermediate level between levels L1and L3. Processing node110at the lowest level L1receives a sensed input that changes over time. Processing node110processes the sensed input and outputs a signal that is fed to its parent node120at level L2. Processing node120at level L2in turn processes the signal from processing node120and outputs a signal to processing node130at the highest level L3. Processing node120outputs a signal that represents likely causes or events associated with the input data.

Each processing node110,120,130may perform spatial pooling and/or temporal processing, as described below in detail with reference toFIG. 4. As a result, the output signals from each processing node110,120,130are more abstract or invariant over time compared to their input signals. In one embodiment, the top node130generates a final output of HTM system100that is of the highest abstraction (e.g., likely causes or events) among the outputs generated in HTM system100. The final output may include distributions indicating likelihood that certain causes or events are associated with the sensed input.

Some of the functions performed by a processing node include, for example, spatial pooling and temporal processing. Spatial pooling herein refers to the process of mapping a set of distinct but similar spatial patterns into a spatial co-occurrence. Temporal processing may include, but is not limited to, learning temporal sequences, performing inference, recognizing temporal sequences, predicting temporal sequences, labeling temporal sequences, and temporal pooling. Learning temporal sequences herein refers to one or more of initializing, expanding, contracting, merging, and splitting temporal sequences. Predicting temporal sequences herein refers to assessing the likelihood that certain spatial patterns will appear subsequently in the input data. Temporal pooling herein refers to processing input data to provide an output that is more stable and invariable over time compared to spatial patterns in the input data. Hardware, software, firmware, or a combination thereof for performing spatial pooling is hereinafter referred to as a spatial pooler. Hardware, software, firmware or a combination thereof for performing the temporal processing is hereinafter referred to as a sequence processor. The sequence processor may perform one or more of learning temporal sequences, performing inference, recognizing temporal sequences, predicting temporal sequences, labeling temporal sequences and temporal pooling.

In one embodiment, a processing node includes only a sequence processor or the spatial pooler. For example, nodes at the first level of the HTM system may consist of processing nodes having only spatial poolers, and the nodes at the second level of the HTM system may consist of processing nodes having only sequence processors. Processing nodes performing other functions (e.g., filtering) may also be placed within the HTM system. Alternatively, a processing node may include two or more levels of interconnected sequence processors or spatial poolers.

The processing nodes of the HTM system may be arranged so that the number of processing nodes decreases as level increases.FIG. 2Ais a diagram illustrating HTM system200having three levels L1, L2, and L3, where level L1is the lowest level, level L3is the highest level, and level L2is an intermediate level between levels L1and L3. HTM system200is hierarchically structured so that the processing nodes cover a larger input space as the level ascends. Level L1has nodes210A,210B,210C, and210D; level L2has nodes220A and220B; and level L3has node230. Nodes210A,210B,210C,210D,220A,220B, and230are hierarchically connected in a tree-like structure such that each processing node has several children nodes (that is, nodes connected at a lower level) and one parent node (that is, node connected at a higher level).

Further, HTM system200propagates bottom-up signals up the hierarchy and propagates top-down signals down the hierarchy. That is, each processing node210A,210B,210C,210D,220A,220B, and230may be arranged (i) to propagate information up the HTM hierarchy to a connected parent node, and (ii) to propagate information down the HTM hierarchy to any connected children nodes.

The number of levels and arrangement of processing modes inFIGS. 1 and 2are merely illustrative. Many variants of an HTM system may be developed and deployed depending on the specific application. For example, the number of levels may be increased to provide different levels of abstraction/invariance or to accommodate different types of sensed inputs (e.g., visual data and audio data). Further, a parent node may also receive partially overlapping bottom-up signals from multiple children nodes. An external supervision signal may also be fed to each of the processing nodes to enhance spatial and/or temporal processing performance.

In one embodiment, one or more nodes of the temporal memory system receives sensed inputs representing images, videos, audio signals, sensor signals, data related to network traffic, financial transaction data, communication signals (e.g., emails, text messages and instant messages), documents, insurance records, biometric information, parameters for manufacturing process (e.g., semiconductor fabrication parameters), inventory counts, energy or power usage data, data representing genes, results of scientific experiments or parameters associated with operation of a machine (e.g., vehicle operation), or medical treatment data. The temporal memory system may process such inputs and produce an output representing, among others, identification of objects shown in an image, identification of recognized gestures, classification of digital images as pornographic or non-pornographic, identification of email messages as unsolicited bulk email (‘spam’) or legitimate email (‘non-spam’), prediction of a trend in financial market, prediction of failures in a large-scale power system, identification of a speaker in an audio recording, classification of loan applicants as good or bad credit risks, identification of network traffic as malicious or benign, identification of a person appearing in the image, interpretation of meaning using natural language processing, prediction of a weather forecast, identification of patterns in a person's behavior, generation of control signals for machines (e.g., automatic vehicle navigation), determination of gene expression and protein interactions, determination of analytic information describing access to resources on a network, determination of parameters for optimizing a manufacturing process, prediction of inventory, prediction of energy usage in a building or facility, predictions of links or advertisement that users are likely to click, identification of anomalous patterns in insurance records, prediction of experiment results, indication of illness that a person is likely to experience, selection of contents that may be of interest to a user, prediction of a person's behavior (e.g., ticket purchase, no-show behavior), prediction of election results, prediction or detection of adverse events, identification of a string of text in an image, identification of a topic in text, and a prediction of a patient's reaction to medical treatments. The underlying representation (e.g., image, audio, video, text) can be stored in a non-transitory, computer-readable storage medium.

Structure of Example Processing Node and Overall Process

FIG. 3is a block diagram illustrating processing node300in a temporal memory system, according to one embodiment. The processing node300may be a stand-alone node for operating without other processing nodes. Alternatively, the processing node300may be part of a hierarchy of processing nodes, for example, as described above in detail with reference toFIGS. 1A through 2. Particularly, the processing node300may be the lowest node240A receiving sensor data and action data as its input, whereas upper processing nodes are embodied using a different structure as described below in detail with reference toFIG. 10.

Processing node300may include, among other components, a sequence processor314and a spatial pooler320. Spatial pooler320receives bottom-up input328, performs spatial pooling, and sends sparse vector342in a sparse distributed representation to sequence processor314. The sparse vector342includes information about patterns detected in the bottom-up input328. For a processing node300at the lowest level, the bottom-up input328may be sensed input. For processing nodes at intermediate and top levels, the bottom-up input328may be a bottom-up output from a child node or children nodes. The spatial pooling is described below in detail with reference toFIG. 5. The processing nodes at different hierarchical levels may have a different structure, for example, as described below in detail with reference toFIG. 10.

Sequence processor314receives the sparse vector342, performs temporal processing and generates the bottom-up output324. The bottom-up output324represents information describing temporal sequences detected or predicted in the spatial patterns of the bottom-up input328. Bottom-up output324is fed to a parent node, which may have a similar or the same structure as processing node300.

FIG. 4is a flowchart illustrating an overall process at processing node300, according to one embodiment. Spatial pooler320receives412bottom-up input328. Then spatial pooler320performs416spatial pooling for co-occurrences detected in bottom-up input328, as described below in detail with reference toFIG. 5A. As a result, spatial pooler342generates sparse vector342that is sent to sequence processor314.

Sequence processor314receives sparse vector342and performs420temporal processing based on spatially pooled co-occurrences, as described below in detail with reference toFIG. 10. Sequence processor314then generates424bottom-up output324that is sent to a parent node.

The process described inFIG. 4is merely illustrative. Various additional steps may be added, and certain steps may be omitted from the step depending on the structure and function of the processing nodes.

Spatial Pooling Using Local Inhibition

Spatial pooler320performs spatial pooling by producing the sparse vector342in the form of a sparse distributed representation. In a sparse distributed representation, a number of elements in the sparse vector342are inactive (e.g., assigned a value of zero) while the remaining elements are active (e.g., assigned a value of one). For example, sparse vector342may have approximately 10% of its elements active while approximately 90% of its elements are inactive. The percentage of active elements may be fixed (i.e., a fixed-sparsity representation) or the percentage of active elements may change over time.

Spatial pooling is the process of grouping similar spatial patterns and representing these spatial patterns using a single vector. Taking an example of processing input data for 100×100 input space (i.e., 10,000 elements), the total number of unique spatial patterns is 210,000, assuming that each element of the input data is binary (i.e., zero or one).

Referring toFIG. 3, spatial pooler320includes, among other components, a sparsity generator318and a plurality of co-occurrence detectors (CDs)1through Z. CDs detect co-occurrences in bottom-up input328, and generate match scores336. Match scores336indicate the degree of match between a spatial pattern of the bottom-up input328and a co-occurrence pattern associated with each CD. In one embodiment, a higher match score indicates more overlap between bottom-up input328and the associated co-occurrence pattern of each CD. The match scores336are provided to the sparsity generator318. In response, the sparsity generator318generates sparse vector342in the form of a sparse distributed representation.

In one embodiment, each CD is mapped to a subset of elements in the bottom-up input328within predefined input space. As illustrated inFIG. 3by lines extending from CD1to a subset of arrows of bottom-up input328, CD1is mapped to receive a subset332A of elements of the bottom-up input328within input space IS1. Similarly, CD2is mapped to receive a subset of elements of the bottom-up input328within input space IS2. Although illustrated inFIG. 3as one-dimensional for the sake of simplification, the input space (e.g., IS1, IS2) may consist of two or more dimensions.

The input space of each CD may be mutually exclusive or may partially overlap. Also, each CD may be mapped to receive the same number of input elements or a different number of input elements. Each input element could be binary or contain scalar values. In one embodiment, CDs are arranged to have topological relationships to their input space. For example, adjacent CDs cover adjacent portions of input space.

The sparsity generator318collects the match scores336from the CDs, selects a number of CDs satisfying conditions based on their match scores and match scores of nearby CDs to generate sparse vector342. In one embodiment, when a CD becomes dominant (e.g., the CD has a high match score), the CD inhibits selection of other CDs within a predetermined range (hereinafter referred to as “an inhibition range”). The inhibition range may extend only to CDs immediately adjacent to the dominant CD or may extend to CDs that are separated from the dominant CD by a predetermined distance. Alternatively, sparsity generator318may select a subset of CDs with highest match scores among all CDs in the processing node300.

In one embodiment, the inhibition range of processing nodes increases at a higher level of the HTM system compared to the inhibition range of processing nodes at a lower level of the HTM system. The inhibition ranges of the processing nodes may be set so that the densities of the sparse vectors in the processing nodes at different levels are the same or within a predetermined range. The processing nodes at a higher level cover a larger range of input space than the processing nodes at a lower level. Hence, in order to achieve the same level of density across different levels of processing nodes, the inhibition range for processing nodes may be increased as the level in the hierarchy increases.

In one embodiment, a greedy winner selection algorithm is used to select the dominant CD.

In an example of sparse vector342, elements corresponding to the chosen CDs are indicated as being active, and elements corresponding to unselected CDs are indicated as being inactive. Assume that the spatial pooler includes 10 CDs of which the first CD and the fourth CD were selected for high match scores. In this example, the sparse vector may be (1, 0, 0, 1, 0, 0, 0, 0, 0, 0), where the first and fourth elements are active but other elements are inactive. The density of the spatial vector representing the ratio of selected CDs among all CDs is governed by the inhibition range and the selection threshold value (the density of sparse vector342increases as the as the percentage of selected CDs increases). As the inhibitory range of a dominant CD increases, the density of the sparse vector342decreases. Further, as the selection threshold value increases, the density of the sparse vector increases. Conversely, as the inhibitory range of a dominant CD decreases, the density of the sparse vector342increases. Also, as the selection threshold value decreases, the density of the sparse vector342decreases. The combination of inhibitory range and the selection threshold value maintains the density of sparse vector342within a certain range. Alternatively, a fixed number of CDs may be selected from all CDs based on the match scores (e.g., a certain number of CDs with highest match scores).

When a new spatial pattern is presented, the match scores from the CDs may be updated accordingly. The updated match scores may prompt changes in sparse vector342. In one embodiment, sparsity generator318implements hysteresis by retaining a previously chosen CD in the top CDs until a competing CD has a match score exceeding the match score of the chosen CD by a threshold score (e.g., a match score 20% higher). In this way, the sparse vector becomes more stable over time and more robust to noise.

FIG. 5is a flowchart illustrating a method of performing spatial pooling in processing node300, according to one embodiment. First, the elements of bottom-up input328are sent512to CDs according to the mappings between the input elements of the bottom-up input328and CDs.

Each CD then generates a match score indicating the extent to which a co-occurrence pattern associated with the CD matches the received input elements. Based on the match scores336from CDs, sparsity generator318selects 516 CDs that have high match scores336. In selecting the CDs, local inhibition may be employed to partially or entirely exclude CDs within an inhibition range of a dominant CD. As a result of the selection, a subset of CDs is selected from the entire CDs (e.g., 50 CDs are selected from a total of 500 CDs). Sparsity generator318then generates520sparse vector342in the form of a sparse distributed representation to indicate the selected CDs.

Since each sparse vector may represent one or more spatial patterns, the spatial pooling achieves abstraction and generalization in spatial domain. A sparse vector342that changes over time is then provided to sequence processor314to perform abstraction and generalization in the temporal domain.

Temporal Processing in Sequence Processor

Temporal processing includes various time-based processing of spatial patterns such as recognizing, predicting, or labeling of temporal sequences. Sequence processor314learns and stores transitions between spatial patterns as represented by sparse vector342. Based on the learned transitions, sequence processor314recognizes and predicts the same or similar transitions in a new input signal. Embodiments provide a temporal processing mechanism that takes advantage of the characteristics of sparse distributed representation vectors to learn, recognize, and predict temporal sequences of spatial patterns or parts of spatial patterns.

Sequence processor314may learn, store and detect temporal sequences of different lengths (also referred to as “variable order” temporal processing). The variable order temporal processing enables learning and detection of more temporal sequences and enhances prediction, inference, or other capabilities of the processing node.

Sequence processor314may also learn, store, and detect temporal sequences while performing inference, prediction or other temporal processing (also referred to as “online learning”). The online learning combines a learning (or training) phase and a temporal processing (e.g., predicting) phase into a single phase. By combining two distinct phases into a single phase, sequence processor314can process information in a more time-efficient manner.

In one embodiment, the sequence processor314receives a sparse vector342that remain constant until a next discrete time steps. A time step herein refers to a division of time for performing digital processing at the processing node300. During each time step, the sparse vector342is assumed to maintain a particular set of values. For instance, the sparsity generator318periodically samples the match score336to output a sparse vector342that may be updated after each time step. Alternatively or additionally, the bottom-up input328is converted into discrete values at discrete time steps, and the processing node300determines values at discrete time steps. Accordingly, the sequence processor314may learn, store, and detect temporal sequences of values that are updated over discrete time steps. Using discrete time steps is advantageous, among other reasons, because computational complexity is reduced.

FIG. 6is a block diagram illustrating sequence processor314, according to one embodiment. Sequence processor314may include, among other components, output generator612, columns of cells (in dashed boxes), column managers, and column activator618. The column activator618receives sparse vector342from spatial pooler320. In response, column activator618generates column activation signals634indicating which columns to be activated based on sparse vector342.

The number of total columns may coincide with the total number of elements in sparse vector342. The column activator618receives sparse vector342and determines which elements of sparse vector342are active. Then, column activator618sends column activation signals634to corresponding columns to activate these columns.

In one embodiment, each column includes the same number (N) of cells. A cell has three states: inactive, predictive, and active. A cell becomes activated (i.e., in an active state) in response to activation by the select signal646. When a cell in a column becomes activated, the active cell inhibits activation of other cells in the same column except in certain limited circumstances. The predictive state represents a prediction that the cell will be activated by the select signal646at a next time step. A cell becomes predictive (i.e., in a predictive state) in response to current sequence outputs from other cells in the same processing node300or level. Alternatively or additionally, the cell becomes predictive due to any combination of inputs from other nodes, inputs from action information, and to sparse vector342. For example, an input from a higher-level node represents context used to predict cell activation corresponding to behavior generated in response to the context. As another example, an input from a lower-level node represents a change in orientation or position of a sensor used to predict cell activation corresponding to recognition of a pattern from the sensor input. In some embodiments, a cell may simultaneously be activated and predictive. In some embodiments, a cell is either activated or predictive, and a cell having inputs meeting conditions to make the cell both active and predictive becomes active. A cell that is in neither an active state nor a predictive state is referred to as inactive (i.e., in an inactive state).

Each column is connected to an associated column manager. The column manager receives the column activation signal634, determines activation states of cells in the column (based on prediction signal642), and sends select signal646to activate one or more cells in the column under certain circumstances. The prediction signal642identifies which cells in the column are in a predictive state. In one embodiment, the column manager sends the select signal646to one or more cells in the column to activate those cells in response to the column activation signal634.

In one embodiment, the column manager selects the cells to activate according to the prediction signal642. For example, the column manager selects one or more of the cells in the column that are currently in a predictive state (as indicated by the prediction signal642). Continuing the example, if the prediction signal642indicates that no cell in the column is currently in a predictive state, the column manager selects one or more of the cells (e.g., all of the cells in the column) to activate. When no cell in the column is currently in a predictive state, the column manager may select a cell in the column for activation based on how recently the cell was activated. Specifically, the cell most recently activated in the column may be selected for activation. If no prior activated cell exists, then the best matching cell or the least used cell may be chosen for activation.

In another embodiment, the column manager selects one or more cells in the column even though the prediction signal642indicates that other cells are in the predictive state. For example, the column manager may select the cell to learn the connections randomly or according to a predetermined list. The column manager sends the select signal646to activate the selected cells. The selected cells then learn a temporal sequence by making connections to active cells in other columns, as described below in detail with reference toFIGS. 7 and 8. The selected cells may also make connections to any combinations of active cells in other processing nodes (including processing nodes both in the same layer as the processing node300and in different layers from processing node300), inputs from different levels and action information.

The cells individually, or collectively as a column, send pooling output622to output generator612. The pooling output622identifies the state of the cells. For instance, the pooling output622indicates which cells are activated and/or which cells are predictive. In certain applications (e.g., flash inference), a column generates a pooling output622to indicate whether any of the cells in the column are activated. In such application, once any cell in the column is activated, the column sends a pooling output622indicating that the column is active. The pooling output may be represented as a binary value such as a two-bit binary value, with one bit indicating whether the cell is activated and one bit indicating whether the cell is predictive. Although the pooling output622takes a binary value in most cases, the pooling output622may also be a non-binary value. For example, the pooling output622may include an integer or real-number value indicating the strength of the cell's cell activated state or predictive state.

In one embodiment, output generator612collects the pooling outputs622from the cells or columns and concatenates these outputs into a vector. The concatenated vector may be sent as bottom-up output324of the sequence processor314to a parent processing node for further temporal processing and/or spatial pooling. Alternatively, the concatenated vector may be provided as an output of the temporal memory system or be further processed to identify a higher level cause of the input signal. The output generator612may also function as a buffer and synchronize signals from sibling processing nodes.

The bottom-up output324is also a vector in a sparse distributed representation. The percentage of active (or inactive) elements in the bottom-up output324may be any percentage, but the percentage is often less than approximately 10%.

In one embodiment, the output generator612collects the pooling outputs622and outputs an active cell (AC) vector (identifying activated cells) and a predicted active cell (PAC) vector identifying activated cells that were correctly predicted to become active. The output generator612identifies the predicted active cells by comparing a list of currently activated cells to a list of cells in the predictive state at a last time step before the current time step. The predicted cell vector includes those cells in common between the list of currently activated cells and the list of cells in the predictive state at the last time step. Because the predicted active cells are a subset of the activated cells (or include all the activated cells), the number of active elements in the first vector equals or exceeds the number of elements in the second vector.

Example Operation and Function of Cell in Sequence Processor

Sequence processor314performs temporal processing by selectively activating cells (and columns), and learning previous states of cell activations. As the learning at the cells progresses, the cells learn to anticipate spatial patterns in the bottom-up input328and correspondingly enter a predictive state before corresponding spatial patterns appear in bottom-up input328, causing those cells to then transition to an activated state. When a cell transitions from a predictive state to an active state, the cell may remain in the active state for a time after the transition. As cells remains active for a longer time, the cells produce a more stable and invariant bottom-up output314to a parent node.

FIG. 7is a diagram illustrating columns and output signals from the cells, according to one embodiment. Each circle inFIG. 7represents a cell. When each cell becomes active, the cell sends out pooling output622. An activated cell may also send out a sequence output714to other cells to indicate its activation state. A basic idea behind implementing temporal processing is to have a learning cell, upon activation, detect activation states of other cells and store the activation states in a “temporal memory segment.” The stored activation states may be current activation states and/or previous activation states of other cells. A “temporal memory segment” herein refers to a data structure for storing the activation states of other cells.

In storing the activation states, the cell selects a subset of active cells and stores only the states of the selected cells. A large number of cells in a processing node300may be active at the same time. Therefore, a large memory space may be needed to store activation states of all activated cells in the processing node. To reduce the memory requirement, a small number of active cells may be sub-sampled and states of the sub-sampled cells may be stored in the temporal memory segments of the cell. For example, when cell Z1is first activated, cell Z1could receive activation states of all active cells (e.g., 50 cells) at this time step but stores information for only a select number of cells (e.g., 10 cells). The sub-sampling of cells may also contribute to generalization of spatial patterns and/or temporal sequences.

In one embodiment, each temporal memory segment stores the activation states of the same number of cells. In another embodiment, each temporal memory segment stores the activation states of a different number of cells.

When a cell detects activation of all or over a percentage of cells stored in its temporal memory segments, the cell enters into a predictive state and produces a pooling output622indicating its predictive state. This transition is predictive in nature because the transition to the predictive state is based on activation of other connected cells and not based on receiving a column activation signal (via select signal646) to activate the cell.

For example, a cell may become predictive when more than 90% of cells identified in a temporal memory segment are active. Under certain conditions, the cell may also produce sequence output714sent to other cells to indicate its activation state. In one embodiment, a cell becomes predictive when a fixed number of cells or more than a threshold percentage of cells stored in one of its temporal memory segments become active. In other embodiments, the cells become predictive when the activation states of other cells partially or entirely match a list of stored activation states.

FIG. 8is a conceptual diagram illustrating signals associated with a cell890, according to one embodiment. Cell890includes a body894and a dendrite891. The dendrite891of cell890receives sequence inputs830and the body894of cell890receives select signal646. Sequence inputs830are collective sequence outputs714sent out by other cells having connections with cell890. Cell890establishes connections with the other cells during learning to monitor their activation states. Cell890also receives select signal646. In one embodiment, the select signal646becomes active when: (i) cell890is in a predictive state, then transitions to an active state in response to the column activation signal634, and/or (ii) cell890is not in a predictive state but is nonetheless selected for activation in response to the column activation signal634. For example, the column containing cell890receives a column activation signal634but no cells in the column are in a predictive state, so the column manager selects cell890as a candidate cell for learning. In this example, cell890may be selected as a candidate cell according to a ranking of cells in the column by likelihood of entering the predictive state.

Activation states of other connective cells associated with the cell890transitioning to the predictive state may be stored in temporal memory segments SN0-through SNZ-N Cell890generates pooling output622and sequence output714based on select signal646and sequence inputs830. Pooling output622is generated whenever cell890becomes active or predictive. Sequence output714is generated when certain conditions are met, as described below in detail with reference toFIG. 9.

FIG. 9is a functional block diagram illustrating cell890, according to one embodiment. Cell890may include, among other components, a sequence signal monitor912, a cell activation predictor916, a cell activator918, a temporal memory manager (TMM)920, and a column inhibitor924. The sequence signal monitor912is software, firmware, hardware or a combination thereof for receiving sequence inputs830from other cells in the same processing node or level. The sequence signal monitor912buffers sequence inputs912. The stored sequence inputs912are referenced by TMM920for processing.

TMM920is software, firmware, hardware, or a combination thereof for managing temporal memory segments. TMM920performs various operations associated with writing, updating, retrieving, and comparing cell activation states. As described above in detail with reference toFIG. 8, cell activation states stored in different temporal memory segments of TMM920represent activation states of other cells at different times. When learning is activated, TMM920detects current and/or previous states of cell activations based on the sequence inputs830and stores the detected cell activation states in temporal memory segments. TMM920also compares the sequence inputs830to cell activation states stored in temporal memory segments. If the sequence inputs830indicate that (i) all elements of a temporal memory segment are active or (ii) a number or percentage of elements of a temporal memory segment above a threshold is active, TMM920sends hit signal930to cell activation predictor916. The hit signal930indicates that the cell is in a predictive state due to activation of cells whose activation corresponded to subsequent activation of the cell890. The temporal memory manager920may activate learning in response to (i) sending the hit signal930indicating that the cell is in a predictive state, or (ii) receiving learning signal932indicating that the cell in in an active state.

Cell activation predictor916receives hit signal930from TMM920and generates pooling output622aindicating that the cell890is in a predictive state. The cell activation predictor916may send indications of the cell's previous predictive states to the cell activator918. For example, the cell activation predictor916indicates to the cell activator918whether the cell890was in a predictive state during a last time step.

The cell activator918receives the select signal646and the inhibition signal918and places the cell890in an activated state when certain conditions are met. If the cell890is placed in an activated state, the cell activator918generates pooling output622b, sequence output714, and learning signal932.

One condition for cell activation is that there be no inhibition signals918from other cells in the same column or in a different column. If inhibition signal918is received from other cells, cell890is not activated despite select signal646. In one embodiment, pooling output622bis generated regardless of the reasons cell890is activated whereas sequence output714is generated under certain conditions. Specifically, the sequence output714is generated (i) when the activation of cell890was predicted based activation states of other cells and (ii) the prediction of the cell890turned out to be correct. By generating sequence output714only when the prediction of the cell890was correct, other cells connected to cell890learn temporal sequences that are productive to correct prediction while discarding meaningless or noisy temporal sequences that do not contribute to prediction. Alternatively, the sequence output714is generated even when the activation of the cell890was inaccurately predicted. The sequence output714and/or the pooling output622bindicate that the cell890is activated for a longer time to enable more connected cells to learn the activation state of the cell890while the sequence output714is activated for a short time when the activation of the cell890was inaccurately predicted.

In response to activation of the cell890by the cell activator918, column inhibitor924generates inhibition signal928. Inhibition signals are sent to other cells in the same column or in a different column to inhibit activation of the other cells. The cells communicating the inhibition signals may be within a predefined inhibition range, as described above in detail with reference toFIG. 3.

In one embodiment, TMM920uses a dynamic threshold for generating hit signal930. Specifically, TMM920dynamically adjusts the number or percentage of elements of sequence inputs830that should match the elements stored in a temporal memory segment or an activation window before hit signal930can be generated.

The cell890transitioning to a predictive state represents a prediction based on activation of other cells in sequence processor314. By lowering the number of percentage of coinciding elements to generate hit signal930, the cell890may be activated more frequently. More frequent transitions of the cell890to the predictive state indicate making more liberal predictions for when the cell will be activated. Lowering the requirement for coinciding elements has a similar effect of forcing the cells or the temporal memory system to make predictions that would otherwise not be made. To the contrary, raising the requirement for coinciding elements has a similar effect of restricting the cells or the temporal memory system to making only conservative and limited predictions.

The threshold for generating the hit signal930may be adjusted by detecting activation states of cells corresponding to a certain segment of input space. If the level of cell activation for such a segment drops below a level, the dynamic threshold of cells for the segment of input space is lowered to prompt more transitions to the predictive state by cells. Conversely, if the level of cell activation of a segment of input space it above a level, the dynamic threshold may be increased to reduce transitions to the predictive state by cells.

In one embodiment, TMM920compares the activation and predictive states of cell890to the column activation signal634to determine if the cell activation states stored in a temporal memory segment resulted in improper transitions by cell890to the predictive state.

For each temporal memory segment or set of cell activation prediction states, TMM920tallies a productivity score that is increased or decreased depending on whether column activation signal634activating the column followed early transitions by cell890to the predictive state. If cell activation states stored in a temporal memory segment resulted in the cell890becoming predictive but the transition was not followed by column activation signal634activating the column, the productivity score for the cell activation states or temporal memory segment is reduced. Conversely, the productivity score is increased if the stored cell activation states or temporal memory segment contributed to correct activation of cell890. If the productivity score drops below a threshold, the cell activation states are deleted or the temporal memory segment is initialized to “forget” the learned connections.

Example Temporal Pooling in Union Processor

FIG. 10Ais a block diagram illustrating a hierarchy of processing nodes, according to one embodiment. The hierarchy of processing nodes includes a lower processing node300and an upper processing node1000. The lower processing node300receives input data (not shown), processes the input signal as described above with reference toFIGS. 3 through 9, and outputs bottom-up output324.

The upper processing node1000is coupled to a lower processing node300to receive bottom-up output324. The upper processing node1000may include, among other components, a union processor1012and a spatial pooler1020. Unlike the processing node300ofFIG. 3, the upper processing node1000includes the union processor1012instead of a sequence processor. The spatial pooler1020of the upper processing node1000generates sparse vector1042based on the bottom-up output324, as described above in detail with reference toFIG. 3.

Union processor1012receives sparse vector1042from the optional spatial pooler1020, performs a predetermined temporal pooling process, and as a result, generates bottom-up output1008that represents the activation states of co-occurrence detectors in the spatial pooler1020pooled over time, as described below in detail with reference toFIG. 10B. Bottom-up output1008may be fed to a parent node, to another processing node, or to any other component (not shown) for further processing.

FIG. 10Bis a conceptual diagram illustrating the operation of the union processor1012inFIG. 10A, according to one embodiment. The union processor1012includes a plurality of union elements UD1through UD10for performing union processing of sparse vectors1042that vary over time. For this purpose, each of the union elements UD1through UD10in the union processor1012is associated with a subset of elements in the sparse vector1042. In the embodiment as shown inFIG. 10B, each of the union elements UD1through UD10has a one-to-one mapping relationship with the co-occurrence detectors CD1through CD10(i.e., union element UD1is mapped to co-occurrence detector CD1, union element UD2is mapped to co-occurrence detector CD2, and so forth). However, in other embodiments, the union elements may have one-to-multiple mapping relationship with the co-occurrence detectors (e.g., union element UD1mapped to co-occurrence detectors CD1and CD2, union element UD1mapped to co-occurrence detectors CD3and CD4, and so forth).

Based on such relationships or mappings, the union processor1012performs temporal pooling by rendering the states of union elements UD1through UD10to be more stable over time relative to the change in the sparse vector1042or the activation states of the co-occurrence detectors CD1through CD10. One of many ways of performing temporal pooling is by assigning a persistence score to each of the union elements, changing the persistence score based on activation of co-occurrence detectors mapped to the union elements, and activating or deactivating the union elements based on the persistence scores. For example, a persistence score of a union element is changed (e.g., increased) when one or more co-occurrence detectors mapped to the union element is activated. The amount of increase in the persistence score based on the activation of the mapped co-occurrence detector may be determined based on, for example, a sigmoid function. The persistent score is changed (e.g., decreased) over time at a certain rate when the one or more co-occurrence detectors mapped to the union element is deactivated. The amount of decrease in the persistence score is determined based on, for example, a decaying exponential function.

Taking the example ofFIG. 10B, the spatial pooler1020outputs a series of sparse vectors1042to the union processor1012from time t to t+2. In this example, the sparse vector1042at time t indicates co-occurrence CD8as being activated, sparse vector1042at time t+1 indicates co-occurrences CD3, CD9, and CD10as being activated, and sparse vector1042at time t+2 indicates co-occurrences CD2and CD6as being activated. The persistence score of union element UD8in the union processor1012is increased at time t because the sparse vector1042at time t indicates co-occurrence CD8mapped to the union element UD8as being activated. Similarly, the persistence scores of union elements UD3, UD9, and UD10are increased at time t+1 because the sparse vector1042at time t+1 indicates co-occurrences CD3, CD9and CD10as being activated; and the persistence scores of union elements UD2, and UD6are increased at time t+2 because the sparse vector1042at time t+2 indicates co-occurrences CD2, and CD10as being activated.

In the example ofFIG. 10B, the persistence score for a union element is decreased at a time step when the associated element of sparse vector1042is inactive (i.e., the associated co-occurrence detector is inactive). For example, inFIG. 10B, the persistence score of union element UD8in the union processor1012is decreased at times t+1 and t+2, since the element of the sparse vector1042corresponding to the co-occurrence detector CD8is no longer active at times t+1 and t+2.

After union elements in the union processor1012are activated, the activated union elements remain active beyond the current time step as long as the persistence scores satisfy a predetermined criterion. In one embodiment, a union element may be activated if its persistence score is above a threshold. For example, since the persistence score of the union element UD8remains above the predetermined threshold at time t+2, the union element UD8continues to remain active from time t through time t+2 even though its persistence score was decreased at times t+1 and t+2. Similarly, union elements UD2, UD3, UD6, UD8, UD9, and UD10in the union processor1012are collectively in an active state at time t+2 because the persistence scores for each of these union elements are above the predetermined threshold at time t+2.

In one or more embodiments, the union processor1012may impose constraints on the sparsity of the activated union elements. In such embodiments, only a proportion of union elements with the highest persistence scores may be activated in the union processor1012. For example, only 10% of the union elements with the highest persistence scores may be activated in the union processor1012.

The length of time a union element remains active from the time of its initial activation can be adjusted by controlling the magnitude of increase or decrease in persistence scores or adjusting the threshold. As discussed above, the union processor1012increases the persistence score of a union element if it receives input from an activated sparse vector element, but decreases the persistence score of the union element if the associated sparse vector element is inactive. Thus, a union element in the union processor1012may be activated for a longer time if the union processor1012decreases the persistence scores by smaller amounts, if the union processor1012increases the persistence scores by larger amounts, or the threshold for remaining active is lowered.

The unionized representation in the bottom-up output1008of the union processor1012may be provided to sequence processors or spatial poolers in any processing node including the processing node1000. For example, the bottom-up output1008of the union processor1012may be provided to processing nodes at a lower level than the processing node1000. The union processor1012enables a more stable representation of sequence patterns by maintaining the activation states of union elements beyond the current time step. The union processor1012unionizes patterns of a temporal sequence and biases the HTM system by providing the bottom-up output1008to other processing nodes so that a learned temporal sequence may be more quickly and accurately recognized.

In one embodiment, the union elements of the union processor1012may provide their activation states to cells in a sequence processor or sparse vector elements in a spatial pooler in any processing node including processing node1000. In addition, the union processor1012may provide the bottom-up output1008to a sequence processor such that the cells in the sequence processor become active or predictive according to the activation states of the union elements in the union processor1012.

For example, the HTM may receive a sequence of notes corresponding to the beginning of a learned melody. Over time, the union processor1012may provide the bottom-up output1008to sequence processor314in a lower-level processing node300. Upon receiving the bottom-up output1008over time, the cells in the sequence processor314related to the learned melody will become predicted or activated at once. Consequently, upon receiving an accidentally incorrect pattern in the sequence (e.g., an incorrect note accidentally inserted in the learned melody), the union processor1012biases the HTM to continue predicting subsequent patterns of the recognized sequence (e.g., subsequent notes of the recognized melody). In other words, the union processor1012biases the HTM to predict familiar temporal sequences. The union elements of the union processor1012maintain a shorter activation time if the HTM receives a temporal sequence that is not learned.

In embodiments where a union element is associated with two or more elements of sparse vector1042, the persistence score of the union elements may be changed depending on a threshold number or proportion of the mapped co-occurrence detectors. In such embodiments, the persistence score of the union element may be decreased if less than a threshold proportion or number of mapped co-occurrence detectors is active while the persistent score may be increased when more than the threshold portion of the mapped co-occurrence detectors is inactive.

FIG. 11Ais a block diagram illustrating a hierarchy of processing nodes, according to another embodiment. The hierarchy of processing nodes includes a lower processing node300and an upper processing node1000. The upper processing node1000is connected to the lower processing node300to receive bottom-up output324. The upper processing node1000may include, among other components, a union processor1012, a sequence processor1016, and a spatial pooler1020.

Compared to the embodiment ofFIG. 10A, the embodiment ofFIG. 11Aincludes the additional component of the sequence processor1014which feeds the sequence processor state1032to the union processor1012. The sequence processor1014may have the same structure and function as the sequence processor314described above in detail with reference toFIG. 6. Distinct from the embodiment inFIG. 10A, union elements in the union processor1012ofFIG. 11Ais associated with a subset of cells in the sequence processor1016. Each of the union elements in the union processor1012may have a one-to-one mapping relationship with the cells in the sequence processor1016. Alternatively, the union elements may have one-to-multiple mapping relationship with the cells in the sequence processor1016(where multiple cells in the sequence processor1016are mapped to one union element).

Union processor1012receives sequence processor states1032from the sequence processor1016, performs a predetermined temporal pooling process, and sends bottom-up output1008indicating which union elements in the union processor1012are active. Bottom-up output1008may be fed to a parent node, to another processing node, or to any other component (not shown) for further processing.

Each of the union elements may be assigned with a persistence score that depends on the activation states of the associated cells in the sequence processor1016. The union element is activated if its persistence score meets a predetermined criterion, and stays activated beyond the current time step as long as the criterion is satisfied. Similar to the embodiment inFIG. 10A, the union elements of the union processor1012inFIG. 11Aunionize the activation states of the cells of sequence processor1016over time to generate a more stable output.

FIG. 11Bis an example illustrating operation of the union processor1012inFIG. 11A. Union elements Ell through E6nof the union processor1012are associated with corresponding cells C11through C6nin the sequence processor1016. From time t to t+2, the sequence processor1016outputs a series of sequence processor states1032to the union processor1012that indicate the activation states of the cells C11through C6nin the sequence processor1016. For example, cells C1n, C2n, and C4nare active at time t, cells C41, C4n, and C61are active at time t+1, and cells C12and C4nare active at time t+2. AlthoughFIG. 11Billustrates only 6 columns of cells and union elements, this is merely for the sake of explanation and there can be many more columns of cells and union elements in practical applications.

The persistence score for a union element is changed depending on the activation of an associated cell in the sequence processor1016. In one embodiment, the persistence score of a union element is increased when the associated cell of the sequence processor1016is activated. For example, inFIG. 11B, the persistence score of union element E4nin the union processor1012is increased at time t, when the sequence processor state1032at time t indicates that cell C4nin the sequence processor1016is activated.

Conversely, the persistence score for a union element is decreased over time at a predetermined rate when the associated cells of the sequence processor1016remain inactive. For example, inFIG. 11B, the persistence score of union element E2nin the union processor1012is decreased at times t+1 and t+2 because a corresponding cell C2nin the sequence processor1016is not active at times t+1 and t+2. The amount of decrease in the persistence score may be determined based on, for example, a decaying exponential function.

As in the embodiment inFIG. 10A, the union elements in the union processor1012inFIG. 11Aare activated and remain active beyond the current time step as long as the persistence scores satisfy a predetermined criterion. As discussed in reference toFIG. 10A, the criterion may require the persistence score to be above a threshold, or may require a maximum sparsity on the activation states of the union processors.

As in the embodiment inFIG. 10A, the union processor1012inFIG. 11Aenables a more stable representation of sequence patterns by maintaining the activation states of union elements beyond the current time step, and may also provide the bottom-up output1008to sequence processors and/or spatial poolers in any processing node including the processing node1000. Similar to the union processor1012inFIG. 10A, the union elements in the union processor1012inFIG. 11Amay provide their activation states to cells of a sequence processor or sparse vector elements of a spatial pooler in any processing node including processing node1000. However, the union processor1012inFIG. 11Aallows a further increase in activation time for union elements that are associated with a higher proportion of PACs. The high number of PACs indicates that a temporal sequence of patterns learned by the union element was correctly predicted, and hence, the union element may continue to influence the HTM by remaining active for a longer period of time.

In one embodiment, a union element in the union processor1012is associated with two or more cells of the sequence processor1016. In such embodiment, the number of predicted active cells (PACs) or a proportion of PACs relative to active cells not previously predicted for activation may be used to obtain a weighted sum. If the weighted sum is above a threshold, the persistence score for the union element may be increased. Further, the amount of increase in the persistence score for a union element may be greater if it is associated with a higher number or proportion of predicted active cells relative to active cells not predicted for activation. For example, the amount of increase in the persistence score for a union element associated with a predicted active (PAC) cell is larger than the amount of increase for another union element associated with a cell that was activated but was not previously predicted to become active. As another example, the amount of increase in the persistence score assigned to a union element may be determined by the proportion or number of PACs associated with the union element. For example, the amount of increase in the persistence score of a union element may be a function of the proportion of PACs associated with the union element. Similarly, the persistence score of the union element may be decreased if the weighted sum of the proportion or number of predicted active cells (PACs) is below a threshold.

In another embodiment, instead of using persistent scores, an activated union element remains active over a predetermined number of time steps when a co-occurrence detector mapped to the union element is activated. For example, after a union element is activated, it remains active for three consecutive time steps. If the associated co-occurrence detector or cell turns active while the union element is active, the activation of union element is extended over the subsequent three time steps.

FIG. 12is a flowchart illustrating an overall process in a processing node including a union processor, according to one embodiment. The spatial pooler1020receives1212bottom-up input signal from a lower processing node. The spatial pooler1020performs1216spatial pooling on the bottom-up input and outputs a sparse vector.

If the processing node does not include a sequence processor, the union processor1012performs1228union processing based on the sparse vector received from the spatial pooler1020. The union processor1012generates1232a bottom-up output signal indicating active states of the union elements.

If the processing node includes a sequence processor1016, the sequence processor1016performs1220temporal processing based on the received sparse vector from the spatial pooler1020. As a result, the sequence processor1016generates1224sequence processor states indicating activation states of the cells in the sequence processor1016. The union processor1012performs1228union processing based on the received sequence processor states and generates1232the bottom-up output signal indicating active states of the union elements.

FIG. 13is a flowchart illustrating a method of performing union processing in a processing node, according to one embodiment. Each union element is associated with1312or mapped to a subset of sparse vector elements or a subset of cells from a sequence processor. The union processor receives1316activation states of sparse vector elements or activation states of cells in the sequence processor.

The persistence score for a union element is updated1320based on the activation states of the elements or cells associated with the union element. A subset of union elements is selected1324to be active based on their persistence scores. The union processor generates1328bottom-up output indicating active states of the union elements.

FIG. 14is a block diagram of a computing device1400for implementing nodes according to embodiments. The computing device1400may include, among other components, a processor1402, a memory1406, an input interface1410, an output interface1414, a network interface1418and a bus1420connecting these components. The processor1402retrieves and executes commands stored in memory1406. The memory1406store software components including, for example, operating systems and modules for instantiating and executing nodes as described herein. The input interface1410receives data from external sources such as sensor data or action information. The output interface1414is a component for providing the result of computation in various forms (e.g., image or audio signals). The network interface1418enables the computing device1400to communicate with other computing devices by a network. When multiple nodes or components of a single node is embodied in multiple computing devices, information associated with temporal sequencing, spatial pooling and management of nodes may be communicated between computing devices via the network interface1418.