SPATIAL POOLER BY GIL SHOTAN. PRIMARY GOALS AND OBJECTIVES Move towards pure C++ implementation of CLA Easier to create bindings with other environments.

Slides:



Advertisements
Similar presentations
SE-292 High Performance Computing
Advertisements

SE-292 High Performance Computing Memory Hierarchy R. Govindarajan
1 COMP 206: Computer Architecture and Implementation Montek Singh Wed., Oct. 23, 2002 Topic: Memory Hierarchy Design (HP3 Ch. 5) (Caches, Main Memory and.
Digital Design Copyright © 2006 Frank Vahid 1 FPGA Internals: Lookup Tables (LUTs) Basic idea: Memory can implement combinational logic –e.g., 2-address.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 3 Memory Management Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
1 COMP 206: Computer Architecture and Implementation Montek Singh Mon, Oct 31, 2005 Topic: Memory Hierarchy Design (HP3 Ch. 5) (Caches, Main Memory and.
Main Index Contents 11 Main Index Contents Pointer Illustration Pointer Illustration Vertical / Horizontal View. Vertical / Horizontal View. Data Addresses.
1 Case Study 2: Windows 2000 Chapter History of windows Programming windows System structure 11.4 Processes and threads in.
1 COMP 206: Computer Architecture and Implementation Montek Singh Mon., Nov. 3, 2003 Topic: Memory Hierarchy Design (HP3 Ch. 5) (Caches, Main Memory and.
Chapter 3.2 : Virtual Memory
The Human Visual System Vonikakis Vasilios, Antonios Gasteratos Democritus University of Thrace
Lecture 33: Chapter 5 Today’s topic –Cache Replacement Algorithms –Multi-level Caches –Virtual Memories 1.
Delivery, Forwarding and
Highly Available ACID Memory Vijayshankar Raman. Introduction §Why ACID memory? l non-database apps: want updates to critical data to be atomic and persistent.
Ceng Operating Systems 11-1 Chapter 11 : Case Study - Win 2000 History of windows 2000 Programming windows 2000 System structure Processes and threads.
By: Adam Hebert.  Why Sudoku?  Attempts at an App  MATLAB Implementation - Use of webcam - Algorithm  Problems with method  Demonstration  Questions.
CMPE 421 Parallel Computer Architecture
Winrunner Usage - Best Practices S.A.Christopher.
Advances in Modeling Neocortex and its impact on machine intelligence Jeff Hawkins Numenta Inc. VS265 Neural Computation December 2, 2010 Documentation.
Data and its manifestations. Storage and Retrieval techniques.
Chapter 14 Protection Bernard Chen Spring Goal of Protection Protection was originally conceived as an adjunct to multiprogramming operation.
1 Chapter 3.2 : Virtual Memory What is virtual memory? What is virtual memory? Virtual memory management schemes Virtual memory management schemes Paging.
Chapter 4 Storage Management (Memory Management).
Practical Heirarchical Temporal Memory for Time Series Prediction
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 6 System Calls OS System.
GNRS Assisted Inter-Domain Routing SUJA SRINIVASAN.
10/18: Lecture topics Memory Hierarchy –Why it works: Locality –Levels in the hierarchy Cache access –Mapping strategies Cache performance Replacement.
Chapter 4 Memory Management Virtual Memory.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
Modeling Neural Networks Christopher Krycho Advisor: Dr. Eric Abraham May 14, 2009.
Speed up the local inhibition Hideaki Suzuki September 5, 2013.
Memory Systems Slides Created By Kevin Ulin. What is Main Memory? 1) Sometimes called primary memory 2) Stores machine instructions for the CPU 3) Stores.
Swap Space and Other Memory Management Issues Operating Systems: Internals and Design Principles.
White Box Testing by : Andika Bayu H.
What is GIS? “A powerful set of tools for collecting, storing, retrieving, transforming and displaying spatial data”
Lecture 4 Page 1 CS 111 Online Modularity and Memory Clearly, programs must have access to memory We need abstractions that give them the required access.
Digital Image Processing CCS331 Relationships of Pixel 1.
Database (Microsoft Access). Database A database is an organized collection of related data about a specific topic or purpose. Examples of databases include:
Basics of Computational Neuroscience. What is computational neuroscience ? The Interdisciplinary Nature of Computational Neuroscience.
COSC2410: LAB 19 INTRODUCTION TO MEMORY/CACHE DIRECT MAPPING 1.
System Components Operating System Services System Calls.
SLC/VER1.0/OS CONCEPTS/OCT'99
Memory Management.
Virtual Memory CSSE 332 Operating Systems
Chapter 14: Protection Modified by Dr. Neerja Mhaskar for CS 3SH3.
Chapter 14: System Protection
Lecture 12 Virtual Memory.
Matrices - Addition and Subtraction
Chapter 9: Virtual Memory
Ramya Kandasamy CS 147 Section 3
Computer Architecture & Operations I
Challenges in Network Troubleshooting In big scale networks, when an issue like latency or packet drops occur its very hard sometimes to pinpoint.
CSCI206 - Computer Organization & Programming
Chapter 9: Virtual-Memory Management
Soo Park and Janine Aquino
Memory and cache CPU Memory I/O.
Case Study 2: Windows History of windows 2000
Main Memory Background Swapping Contiguous Allocation Paging
Matrices Elements, Adding and Subtracting
Chapter 2: Operating-System Structures
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Number Systems Instructions, Compression & Truth Tables.
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Human vision: function
Chapter 2: Operating-System Structures
Design principles for packet parsers
Memory Principles.
Chapter Contents 7.1 The Memory Hierarchy 7.2 Random Access Memory
Presentation transcript:

SPATIAL POOLER BY GIL SHOTAN

PRIMARY GOALS AND OBJECTIVES Move towards pure C++ implementation of CLA Easier to create bindings with other environments Boost performance Learn about the algorithm

SECONDARY GOALS AND OBJECTIVES In redesigning the spatial pooler, I had the following guiding principles in mind: Simplicity - Reduce barrier to Open Source Community Use terminology of CLA white paper Testability Maintenance of dual Python/C++ implementations Decouple “Grok-Specific” functionality into separate sub class called “Flat Spatial Pooler”

FILES $NUPIC/py/nupic/research/spatial_pooler.py $NUPIC/py/nupic/research/flat_spatial_pooler.py $NUPIC/nta/algorithms/spatial_pooler.[hc]pp $NUPIC/nta/algorithms/flat_spatial_pooler.[hc]pp $NUPIC/py/nupic/research/FDRCSpatial2.py << OLD

USAGE To switch between the implementations, change the value of the newly added model parameter “spatialImp”, which can be cound under “spParams”. model_params.py MODEL_PARAMS = { ‘spParams’ : { ‘spatialImp’ : “cpp” / “py”

BACKGROUND Basically, learning in the spatial pooler consists of changing the permanence values between columns and input bits Columns Input Bits Permanences

OLD ARCHITECTURE The following slides will present the main architecture changes in the spatial pooler module.

OLD ARCHITECTURE The old architecture, which was designed for vision, had permanence matrix for each column (which represented a receptive field for a v1 neuron in the brain), which was overlaid on top of a 2D input grid. Inputs Permanence Values For a Column (Receptive Field)

OLD ARCHITECTURE The permanence matrices of the columns were mapped onto the grid in such a way that certain parts of the image had overlapped. Inputs Permanence Values For a Column (Receptive Field)

OLD ARCHITECTURE In addition, some columns, mostly those columns mapped to the edge of the input region, had only a subset of the Values of the permanence matrix valid. Inputs

OLD ARCHITECTURE This leads to two additional data structures: one representing the subset of inputs in the input grid that are relevant for each column (red), and the other is the subset of the entries in the permanence matrix that are valid for the column (yellow) Inputs

OLD ARCHITECTURE Therefore even such a basic operation as accessing the permanence values for a column requires a lookup in 3 different places! Inputs

NEW ARCHITECTURE The new architecture tries to address this by simply maintaining one big matrix. The rows of the matrix represent cortical columns whereas the columns of the matrix represent input bits. Access is now fast and simple The new design is agnostic to any topological structure inherent in the data and allows the developer to implement any topology he or she wishes to with the modification of 1 method: mapPotential Illustration is on the next page

NEW ARCHITECTURE Inputs Columns Arbitrary Topology: Initialization + Neighbors(5) -> [3,7,8] numpy.reshape(-1) Permanence Matrix: The permanence between column 5 and input 7 is 0.2

NEW ARCHITECTURE There is an additional data structure called the potentialPool matrix which stores the ‘receptive field’ of a column.

NEW ARCHITECTURE Inputs Columns Potential Pool Matrix: column 3 is connected to inputs 6,7,8,9, whereas column 5 is connected to inputs bits 7,8,9,

TESTS Substantial unit tests for both C++ and python implementations Tests to ensure both implementations are identical Tests to ensure both implementations conform to the same public API $NUPIC/tests/unit/py2/nupic/research/flat_spatial_pooler_compatability_test.py $NUPIC/tests/unit/py2/nupic/research/flat_spatial_pooler_cpp_api_test.py $NUPIC/tests/unit/py2/nupic/research/flat_spatial_pooler_py_api_test.py $NUPIC/tests/unit/py2/nupic/research/flat_spatial_pooler_unit_test.py $NUPIC/tests/unit/py2/nupic/research/spatial_pooler_compatability_test.py $NUPIC/tests/unit/py2/nupic/research/spatital_pooler_cpp_api_test.py $NUPIC/tests/unit/py2/nupic/research/spatial_pooler_py_api_test.py $NUPIC/tests/unit/py2/nupic/research/spatial_pooler_unit_test.py $NUPIC/nta/algorithms/unittest/SpatialPoolerTest.[hc]pp

TESTS Running Hotgym with 3 different spatial poolers:

RESULTS Python Implementation Cleaner, commented, tested (100% coverage), readable code 2x Slower (Spatial Pooler alone) 2x Slower (Whole algorithm) 15% reduction in memory usage 15x Reduction in size on disk (Spatial Pooler alone) C++ Implementation Cleaner, commented, tested (100% coverage), readable code 10-20x Faster* (Spatial Pooler alone) 40% Faster* (Whole algorithm) 15% reduction in memory usage 15x Reduction in size on disk (Spatial Pooler alone) (*)doesn’t apply to anomaly models (which use a random spatial pooler)