Design of Neuromorphic Cognitive Module based on ... - Science Direct

3 downloads 164 Views 478KB Size Report
The DNN implementations typically have superior performance optimizations ... web server), the model would later learn these patterns and would not ... simplified implementation of HTM (derived from the python full implementation NuPIC),.
Procedia Computer Science Volume 88, 2016, Pages 232–238 7th Annual International Conference on Biologically Inspired Cognitive Architectures, BICA 2016

Design of Neuromorphic Cognitive Module based on Hierarchical Temporal Memory and demonstrated on Anomaly Detection Marek Otahal1 , Michal Najman1 , and Olga Stepankova1 Czech Technical University, Prague, Czech republic [email protected] {najmami2, stepanko}@fel.cvut.cz

Abstract Our presented idea is to integrate artificial neural network (probably of BICA type) with a real biological network (ideally in the future with the human brain) in order to extend or enhance cognitive- and sensory- capabilities (e.g. by associating existing and artificial sensory inputs). We propose to design such neuro-module using Hierarchical Temporal Memory (HTM) which is a biologically-inspired model of the mammalian neocortex. A complex task of contextual anomaly detection was chosen as our case-study, where we evaluate capabilities of a HTM module on a specifically designed synthetic dataset and propose improvements to the anomaly model. HTM is framed within other common AI/ML approaches and we conclude that HTM is a plausible and useful model for designing a direct brain-extension module and draft a design of a neuromorphic interface for processing asynchronous inputs. Outcome of this study is the practical evaluation of HTM’s capabilities on the designed synthetic anomaly dataset, a review of problems of the HTM theory and the current implementation, extended with suggested interesting research direction for the future. Keywords: hierarchical temporal memory, neuromorphic, cognitive module, anomaly detection, BCI, human enhancement

1 1.1

Introduction Motivation

The conceptual idea of the presented paper is to use an Artificial Neural Network (ANN) as a component/“extension” module in Brain-Computer Interface (BCI) experiments where we wish to integrate an artificial and biological neural network into a single system. Purpose of the artificial module is to provide a novel or improved functionality. 232

Selection and peer-review under responsibility of the Scientific Programme Committee of BICA 2016 c The Authors. Published by Elsevier B.V. 

doi:10.1016/j.procs.2016.07.430

HTM Neuromorphic Module Extension

1.2

Otahal, Najman and Stepankova

Hierarchical Temporal Memory

Hierarchical Temporal Memory (HTM) is a machine learning technique inspired closely by the structural and algorithmic properties of the mammalian neocortex. The observation is that most of the high level cognitive tasks – vision, motor movements, planning or even language processing are performed by the neocortex and, on the contrary to the wide functionality span, all parts of the neocortex exhibit a remarkably uniform neural structure [12], [3], [10]; i.e. organization into vertical columns and horizontal layers with neurons (cells) grouped into (micro)columns1 . HTM is a memory-based learning system which performs unsupervised on-line learning and continuous predictions; where the role of time is implicit 2 and allows for contextual Anomaly Detection (AD). More details are explained in the section 2.

1.3

Hypothesis

• Is the model biologically plausible and exposes sufficient details? We evaluate HTM as the candidate model. • The model has to provide an extended functionality - cognitive enhancement.3

2

Materials & Methods

In order to evaluate suitability of the HTM theory for a direct brain-functionality emulation, an as detailed as possible evaluation of the biological plausibility, its limitations, and a practical speed/quality performance of the model is required. In this section, HTM is framed in context with other Machine learning (ML) approaches.

2.1

Comparison of “biological” ML models to HTM

For use-case of this paper, the main focus is on biological models and deep learning. 2.1.1

“Deep” neural networks

Deep Neural Network (DNN) architectures, which gained enermous popularity in recent years, would be the most similar system to HTM, due to the fact that both rely on hierarchies for emergence of stable and more abstract features. The DNN implementations typically have superior performance optimizations (e.g. GPGPU), as processing “big data” is what gives deep learning its popularity. On the other hand, HTM implementation called Numenta Platform for Intelligent Computing (NuPIC) does not come near the raw speeds of deep learning, but as the model of neurons is much more advanced, HTM requires comparatively smaller number of samples and neurons to successfully learn from data[9], making it effectively fast.

1 To avoid possible misunderstandings, a cortical “column” in HTM consists of tens of cells, therefore refers to a biological microcolumn. Such column is a main computational unit in HTM (as a neuron in “classical” artificial networks), thus a region consists of columns. 2 expressed by sequential order, i.e. all inputs are time-series. Typical example in human brains are neural spike-trains. 3 The ANN has to be “useful”. Anomaly detection is chosen as the benchmarked task.

233

HTM Neuromorphic Module Extension

2.1.2

Otahal, Najman and Stepankova

Biologically inspired models

As the imperative of HTM theory is to address biological plausibility with regards to processes in the cortex, HTM should be compared with projects pursuing the similar goal - Biologicallyinspired Cognitive Architecture (BICA). In our comparison we include spiking neural networks, connectomes and “wet” (real) models. Connectomes Connectomes take plausibility to a greater detail where even chemical reactions on ion-gates on synapses would be modeled. HTM models dendrites and a large number of synapses, but there is an example of a simplification - the weights in a SDR are binary. Spiking neural networks Both Spiking Neural Network (SNN) and HTM model the biological processes more precisely than the classical neurons in Multi-layer perceptron (MLP). Compared to connectomes both focus also on practical usability and decide to omit some (noncritical) details for the sake of optimization (e.g. binary weights in HTM). SNNs are also suitable for temporal data processing, but the information representation is completely different (SDR in HTM vs. spike trains and integration in SNN). Examples of neuron models in SNNs include Leaky Integrate-and-Fire (LIF) and HodgkinHuxley (HH) neurons. These are very biologically accurate models that produce a spike train, i.e. a time-series data stream. Self-organizing maps Self-Organizing Map (SOM) and the spatial pooling mechanism in HTM both store topologically-aware, approximated representation of the input4 . Both associate concurrent concepts and can reconstruct memories based on the activation of a portion of the receptive array. Both Spatial Pooling (SP) and SOM can be used in vision and clustering, and there are also extensions for SOM to handle temporal data [8] (natively in HTM). “Wet computing” It is nowadays possible to grow colonies of real neurons in vitro [1, 6] and in silico, [11],[5], and we can expose these neurons to stimulation, observe their life and even train them. This is also called “wet computing”. 2.1.3

Discussion

HTM aims to model the cortical structure and function to precise details, it would be therefore suitable to compare recordings of real and HTM neuron colonies and their responses to similar stimuli.

3

Experiments & Results

3.1

Synthetic dataset and Anomaly categorization

We focused on categorization of anomalies into several atomic classes, resulting in a synthetic dataset Synthetic Anomaly Dataset and Categorization (SADC) for rigorous analysis of anomaly detection performance on atomic problems5 That gives us a tool to properly benchmark HTM’s 4 This

is called “energy minimization” is available at https://github.com/breznak/neural.benchmark

5 SADC

234

HTM Neuromorphic Module Extension

Otahal, Najman and Stepankova

anomaly detection capabilities, in addition to the existing (annotated) real-world datasets in Numenta Anomaly Benchmark (NAB) [9]. Some examples of the categories of anomalies we designed are: • Point anomaly • Section anomaly • Trend is an interesting type of anomalies. Composed of two modulated functions, a carrier (a high frequency function, typically a sine fn.) and a trend which is a low frequency function, e.g. a sigmoid. This type of data stresses the ability of the model to generalize well and to adapt to the changes. • Multi-modal data • Recurring anomalies: Reported from the industrial applications is the detection of “recurring anomalies”. As these can occur quite often, or periodically (e.g. attacks on a web server), the model would later learn these patterns and would not classify them as anomalies.

Figure 1: Demonstration of some anomaly categories we produced in our Synthetic anomaly dataset. Source: ML.benchmark

3.2

Evaluation of Anomaly detection

We applied HTM as an anomaly detection system to streaming biological data (biosignals), real world industrial data, etc. Comparative results can be found in the NAB study[9]. Our experience derives from the experiments in a synthetic anomaly benchmark and categorization dataset and the datasets, results and figures can be found in our project SADC where we evaluated HTM and Recurrent Neural Network (RNN) on the datasets, compared the results and propose several conclusions. 235

HTM Neuromorphic Module Extension

Otahal, Najman and Stepankova

Figure 2: Anomaly results on the simple, synthetic data open a discussion which implementation has advantages and how it could be modified. Here we see data of a sine function with “data loss” anomalies (top subplot). Anomaly scores of different anomaly detection implementations are shown below: a “raw” method (middle) and “likelihood” (bottom). We can observe the raw model always detects the anomaly correctly, but adapts (too?) quickly and fades to normal, while the likelihood model does keep a high anomaly score of the duration of the true anomaly, but then it produces too high anomaly score even on normal data. Source: ML.benchmark We have preliminary results (fig. 2) of HTM models on the synthetic data, which allow us to discuss advantages and drawbacks of the HTM model itself, as well as of some of its specific implementation details.

3.3

Proposal for Neural extension Design

This is a draft how a neuromorphic cognitive-extension module should be designed. If we take a minimalist course of action, the sub goals are: • Cognitive module: For example anomaly detection module presented here, or a multi-step prediction. Of course, for something more useful, the “cognitive connectome” functionality ought to be replicated in the final modules, e.g. short-term memory, multi-step predictions, association module, a module assigning emotions to the inputs, or a generator of creativity, language encoding center, etc. • Architecture: Another step is bridging the functionality of two or more of these cognition modules and sensory data into a useful architecture. Such BICA architecture can be 236

HTM Neuromorphic Module Extension

Otahal, Najman and Stepankova

realized by a connectome6 . • Interfacing The next step would be to test interfacing the network to “a real brain”7 , which is translated into interfacing to a model with a different encoding/concept representation scheme. For example HTM to a database, or spiking neural network, or recordings of real cortical activity8 . Promising data would be if the model is able to create more stable representations on the predicted output.

4 4.1

Discussion Problems and suggested improvements to Anomaly Detection with HTM

To sum up main ideas for improvement of the anomaly detection: • More stable anomalies • Anomaly detection with confidence • Anomaly prediction • Feedback used in anomaly computation

4.2

Implementation challenges

There are also practical limitations of the current implementation which we would like to see improved. • simplified implementation of HTM (derived from the python full implementation NuPIC), it should be stripped off of any unnecessary codebase, leaving only the implementations of the input layer (encoders), spatial and temporal memory, and the anomaly module and classifier. • speed issue. Proposed solutions include: GPGPU support, optimized C++ code, speed modifications to the network, etc. Primarily use of optimized 3rd party algebra libraries (Eigen,...) should be targeted. • Improved design of the implementation, as how objects are abstracted, use of interfaces and proper OOP paradigm throughout the codebase.

5

Conclusion

We have evaluated HTM with regards to other state of the art ML approaches 2.1, the most recent research in neuroscience (compiled in 2) suggests HTM is a viable and promising model (with regards to how information is represented (Sparse Distributed Representation (SDR)) and how the cortical learning is performed (Cortical Learning Algorithm (CLA))). Practical qualities of an HTM model used for anomaly detection (2) suggest HTM offers a novel and successful anomaly detector for complex contextual patterns. Therefore we propose a design of a neuromorphic extension module ?? that could cooperate with a truly biological, or bio-inspired model of, a brain. 6 A simple and already available connectome would be the OpenWorm [13], which is creating a virtual C. Elegans. 7 Prof. Nicholas (“adding” phantom limps or artificial senses to rodents and monkeys), and prof. Warwick (first human neural interface, [4]) are pioneers in this area 8 Data of real cortical recordings (from a neural electrode array) are available [7, 14, 2].

237

HTM Neuromorphic Module Extension

5.1

Otahal, Najman and Stepankova

Future work

As an upcoming challenge we identify processing of asynchronous (e.g. from neuromorphic HW, or real neural recordings) inputs, which will help both speed and sensitivity in processing the asynchronous information. And collaboration with a biological laboratory on first experiments regarding isolation of a living brain and attaching BCI sensors 9

References [1] Feraz Azhar and William S. Anderson. Predicting single-neuron activity in locally connected networks. Neural Computation, 24(10), 2655-2677, (2012), June 2015. [2] Qing Bai and Kensall D. Wise. Single-unit neural recording with active microelectrode arrays. IEEE Trans. Biomed. Engineering, 48(8):911–920, 2001. [3] O. D. Creutzfeldt. Generality of the Functional Structure of the Neocortex. Naturwissenshaften, 64:507–517, 1977. [4] Ian Daly, Slawomir J. Nasuto, and Kevin Warwick. Brain computer interface control via functional connectivity dynamics. Pattern Recognition, 45(6):2123–2136, 2012. ¨ [5] Mikael Djurfeldt, Mikael Lundqvist, Christopher Johansson, Martin Rehn, Orjan Ekeberg, and Anders Lansner. Brain-scale simulation of the neocortex on the IBM Blue Gene/L supercomputer. IBM Journal of Research and Development, 52(1-2):31–42, 2008. [6] P. G. Finlayson and M. S. Cynader. Synaptic Depression in Visual Cortex Tissue Slices: An in vitro Model for Cortical Neuron Adaptation. Experimental Brain Research, 106(1):145–155, 1995. [7] Alyson K. Fletcher, Jon Viventi, and Sundeep Rangan. Neural mass spatio-temporal modeling from high-density electrode array recordings. In ITA, pages 319–321. IEEE, 2015. [8] Julian Hagenauer and Marco Helbich. Hierarchical self-organizing maps for clustering spatiotemporal data. International Journal of Geographical Information Science, 27(10):2026–2042, 2013. [9] Alexander Lavin and Subutai Ahmad. Evaluating Real-time Anomaly Detection Algorithms - the Numenta Anomaly Benchmark. CoRR, abs/1510.03336, November 2015. [10] D. Marr. A theory for cerebral neocortex. Proceedings of the Royal Society (London) B, 176:161– 234, 1970. [11] Patrick Meuth. Thalamic neurons in silico. PhD thesis, Universit¨ at M¨ unster, 2011. [12] A. J. Rockel, R. W. Hiorns, and T. P. S. Powell. The Basic Uniformity in Structure of the Neocortex. Brain, 103:221–244, 1980. [13] Bal´ azs Szigeti, Padraig Gleeson, Michael Vella, Sergey Khayrulin, Andrey Palyanov, Jim Hokanson, Michael Currie, Matteo Cantarelli, Giovanni Idili, and Stephen Larson. OpenWorm: an open-science approach to modeling Caenorhabditis elegans. Front Comput Neurosci, 8:137, 2014. [14] Bronwyn Woods. Spatio-temporal patterns in multi-electrode array local field potential recordings, January 2015.

9 Electrode

238

arrays connected directly to areas of interest on the cerebellum

Suggest Documents