66
San Jose Meetup 3/14/14 Jeff Hawkins [email protected] Sensory-Motor Integration in HTM Theory Research Theory, Algorithms NuPIC Open source community Products for streaming analytics Based on cortical algorithms Numenta Catalyst for machine intelligence

San Jose Meetup 3/14/14 Jeff Hawkins jhawkins@Numenta

  • Upload
    nhi

  • View
    39

  • Download
    0

Embed Size (px)

DESCRIPTION

Sensory-Motor Integration in HTM Theory. Numenta. Catalyst for machine intelligence. San Jose Meetup 3/14/14 Jeff Hawkins [email protected]. NuPIC Open source community. Research Theory, Algorithms. Products for streaming analytics Based on cortical algorithms. - PowerPoint PPT Presentation

Citation preview

Page 1: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

San Jose Meetup 3/14/14Jeff [email protected]

Sensory-Motor Integrationin HTM Theory

ResearchTheory, Algorithms

NuPICOpen source community

Products for streaming analyticsBased on cortical algorithms

NumentaCatalyst for machine intelligence

Page 2: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

What is the Problem?

Sensory-motor integrationSensorimotor contingenciesEmbodied A.I.Symbol grounding

- Most changes in sensor data are due to our own actions.- Our model of the world is a “sensory-motor model”

1) How does the cortex learn this sensory-motor model?

2) How does the cortex generate behavior?

Page 3: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Hierarchical Temporal Memory (Review)

1) Hierarchy of nearly identical regions

- across species- across modalities

retina

cochlea

somatic2) Regions are mostly sequence memory

- inference- motor

3) Feedforward: Temporal stability - inference

- the world seems stable

Feedback: Unfold sequences- motor/prediction

data stream

Page 4: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Cortical Learning Algorithm (Review)

A Model of a Layer of Cells in CortexSequence Memory

- Converts input to sparse representations- Learns sequences- Makes predictions and detects anomalies

Capabilities- On-line learning- Large capacity- High-order- Simple local learning rules- Fault tolerant

Page 5: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

sensory data

Old brain - spinal cord- brain stem- basal ganglia

retina

cochlea

somatic

proprioceptive

vestibular

muscles

Old brain has complex behaviors.

Cortex evolved “on top” of old brain.

Cortex receives both sensory data and copies of motor commands. - It has the information needed for sensory-motor inference.

Cortex learns to “control” old brain(via associative linking). - It has the connections needed to generate goal-oriented behavior.

Cortex and Behavior (The big picture)

motor copy

Page 6: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

2.5 mm

Region

Layers

Layers &Mini-columns

2/3456

2/3

4

5

6

1) The cellular layer is unit of cortical computation.2) Each layer implements a variant of the CLA.3) Mini-columns play critical role in how layers learn sequences.

Sequence memory

Sequence memory

Sequence memory

Sequence memory

Page 7: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

2/3

4

5

6

L4 and L2/3: Feedforward Inference

Copy of motor commands

Sensor/afferent data

Learns sensory-motor transitions

Learns high-order sequences

Stable Unique

Predicted

Pass throughchanges

Un-predicted

Layer 4 learns changes in input due to behavior.Layer 3 learns sequences of L4 remainders.

These are universal inference steps.They apply to all sensory modalities.

Next higher region

A-B-C-DX-B-C-Y

A-B-C- ? DX-B-C- ? Y

Page 8: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

2/3

4

5

6

L5 and L6: Feedback, Behavior and Attention

Learns sensory-motor transitions

Learns high-order sequences

Well understood (CLA)tested / commercial

Recalls motor sequences

Attention

90% understoodtesting in progress

50% understood

10% understood

Feed

forw

ard

Feed

bac

k

Old brain

Page 9: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

2/3

4

5

6

L3: Existing CLA Learns High-order Sequences

Learns high-order sequences

Learns sensory-motor transitions

Recalls motor sequences

Attention

Page 10: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

2/3

4

5

6

L4: CLA With Motor Command Input Learns Sensory-motor Transitions

Learns sensory-motor transitions

Learns high-order sequences

Recalls motor sequences

Attention

Copy of motor commands

Sensor/afferent data

Page 11: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta
Page 12: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta
Page 13: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

+W +SE

+N

+SW

+NE

+E +NW +S +NE +SW

With motor context, CLA will form unique representations.

With motor context, CLA will form unique representations.

Page 14: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

2/3

4

5

6

How Does L5 Generate Motor Commands?

Learns sensory-motor transitions

Learns high-order sequences

Recalls motor sequences

Attention

Old brain

Page 15: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

sensory encoderCLA, high-ordersequence memory

One extreme: Dynamic world no behavior

Grok: Detects Anomalies In Servers

Page 16: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Other extreme: Static world

Behavior is needed for any change in sensory stream

1) Move sensor: saccade, turn head, walk2) Interact with world: push, lift, open, talk

Page 17: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Review: Mammals have pre-wired, sub-cortical behaviors

walkingrunningeye movementshead turninggraspingreachingbreathingblinking, etc.

Pre-wiredbehaviorgenerators

Body + old brain

Page 18: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Review: Cortex models behavior of body and old brain

Pre-wiredbehaviorgenerators

Body + old brain

Cortex (CLA)

Cortex learns sensory patterns.Cortex also learns sensory-motor patterns.Makes much better predictions knowing behavior.

Page 19: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

How does cortex control behavior?

L4/L3 is a sensory-motor model of the worldL3 projects to L5 and they share column activationsThink of L5 as a copy of L3

L5 associatively links to sub-cortical behaviorCortex can now invoke behaviors

Q. Why L5 in addition to L3?A. To separate inference from behavior.

- Inference: L4/L3 (L3->L5->old brain learns associative link)- Behavior: L5 (L5 generates behavior before

feedforward inference)

Pre-wiredbehaviorgenerators

Body + old brain

L4/L3

L5

Page 20: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Cortical Hierarchy

Each cortical region treats the region below it in the hierarchy as the first region treats the pre-wired areas.

Sub-corticalbehaviorgenerator

Body + old brain L

6

L3/L4

L5

L4/L3

L5

L4/L3

L5L6

Copy of motor

comm

and

Increasing

invariance

slower changing

faster changing

Stablefeedback

Page 21: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

2/3

4

5

6

Goal Oriented Behavior via Feedback

Copy of motor commands

Sensor/afferent data

simple cells

complex cells

Stable feedback invokes union of sparse states in multiple sequences. (“Goal”)

Feedforward input selects one state and plays back motor sequence from there.

Sub-corticalmotor

simple cells

complex cells

Stable/Invariant patternfrom higher region

Higherregion

Copy of motor

comm

and

Page 22: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Short term goal: Build a one region sensorimotor system

Pre-wiredbehaviorgenerators

Body + old brain

L4/L3

L5

Hypothesis:The only way to build machines with intelligent goal oriented behavior is to use the same principles as the neocortex.

Page 23: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta
Page 24: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

sensory data

retina

cochlea

somatic

Old brainbehaviors

proprioceptive

vestibular

Spine

Brainstem

Basal ganglia

Cortex 1

Cortex 2

Page 25: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Af1f2

f4f3

Page 26: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Cortical Principles

retina

cochlea

somatic

1) On-line learning from streaming data

data stream

Page 27: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Cortical Principles

2) Hierarchy of memory regions

retina

cochlea

somatic

1) On-line learning from streaming data

data stream

Page 28: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Cortical Principles

2) Hierarchy of memory regions

retina

cochlea

somatic

3) Sequence memory- inference- motordata stream

1) On-line learning from streaming data

Page 29: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Cortical Principles

4) Sparse Distributed Representations

2) Hierarchy of memory regions

retina

cochlea

somatic

3) Sequence memory

data stream

1) On-line learning from streaming data

Page 30: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Cortical Principles

retina

cochlea

somatic

data stream

2) Hierarchy of memory regions

3) Sequence memory

5) All regions are sensory and motor

4) Sparse Distributed Representations

Motor

1) On-line learning from streaming data

Page 31: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Cortical Principles

retina

cochlea

somatic

data stream

x xxx x x

x x x x x xx

2) Hierarchy of memory regions

3) Sequence memory

5) All regions are sensory and motor6) Attention

4) Sparse Distributed Representations

1) On-line learning from streaming data

Page 32: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Cortical Principles

4) Sparse Distributed Representations

2) Hierarchy of memory regions

retina

cochlea

somatic

3) Sequence memory

5) All regions are sensory and motor6) Attention

data stream

1) On-line learning from streaming data

These six principles are necessary and sufficient for biological and machine intelligence.

Page 33: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

What the Cortex Does

data streamretina

cochlea

somatic

The neocortex learns a model from sensory data

- predictions - anomalies - actions

The neocortex learns a sensory-motor model of the world

Page 34: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Attributes of Solution

Independent of sensory modality and motor modality

Should work with biological and non-biological senses- Biological: Vision, audition, touch, proprioception- Non-biological: M2M data, IT data, financial data, etc.

Can be understood in a single region

Must work in a hierarchy

Will be based on CLA principles

Page 35: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

How does a layer of neurons learn sequences?

2/3

4

5

6

Learns high-order sequences

First:- Sparse Distributed Representations- Neurons

Page 36: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Sparse Distributed Representations (SDRs) • Many bits (thousands)

• Few 1’s mostly 0’s• Example: 2,000 bits, 2% active

• Each bit has semantic meaningLearned

01000000000000000001000000000000000000000000000000000010000…………01000

Dense Representations• Few bits (8 to 128)• All combinations of 1’s and 0’s• Example: 8 bit ASCII

• Bits have no inherent meaningArbitrarily assigned by programmer

01101101 = m

Page 37: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

SDR Properties

1) Similarity: shared bits = semantic similarity

subsampling is OK

3) Union membership:

Indices12|10

Is this SDRa member?

2) Store and Compare: store indices of active bits

Indices12345|40

1)2)3)

….10)

2%

20%Union

Page 38: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Model neuronFeedforward

100’s of synapses“Classic” receptive fieldContext

1,000’s of synapsesDepolarize neuron“Predicted state”

Active Dendrites

Pattern detectorsEach cell can recognize100’s of unique patterns

Neurons

Page 39: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Learning TransitionsFeedforward activation

Page 40: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Learning TransitionsInhibition

Page 41: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Learning TransitionsSparse cell activation

Page 42: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Time = 1Learning Transitions

Page 43: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Time = 2Learning Transitions

Page 44: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Learning TransitionsForm connections to previously active cells.Predict future activity.

Page 45: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

This is a first order sequence memory.It cannot learn A-B-C-D vs. X-B-C-Y.

Learning TransitionsMultiple predictions can occur at once.A-B A-C A-D

Page 46: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

High-order Sequences Require Mini-columnsA-B-C-D vs. X-B-C-Y

A

X B

B

C

C

Y

D

Before trainingA

X B’’

B’

C’’

C’

Y’’

D’

After training

Same columns,but only one cell active per column.

IF 40 active columns, 10 cells per columnTHEN 1040 ways to represent the same input in different contexts

Page 47: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Cortical Learning Algorithm (CLA)aka Cellular Layer

Converts input to sparse representations in columnsLearns transitionsMakes predictions and detects anomalies

Applications1) High-order sequence inference L2/32) Sensory-motor inference L43) Motor sequence recall L5

Capabilities- On-line learning- High capacity- Simple local learning rules- Fault tolerant- No sensitive parameters

Basic building block of neocortex/Machine Intelligence

Page 48: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

CLA

Encoder

SDR

Prediction Point anomaly Time average Historical comparison Anomaly score

Metric(s)

SystemAnomalyScore

Anomaly Detection Using CLA

CLA

Encoder

SDR

Prediction Point anomaly Time average Historical comparison Anomaly score

SDRMetric N

.

.

.

Page 49: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Grok for Amazon AWS“Breakthrough Science for Anomaly Detection”

Automated model creation Ranks anomalous instances Continuously updated Continuously learning

Page 50: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Technology can be applied to any kind of data, financial, manufacturing, web sales, etc.

Unique Value of Cortical Algorithms

Page 51: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Application: CEPT Systems

Document corpus(e.g. Wikipedia)

128 x 128

100K “Word SDRs”

- =Apple Fruit Computer

MacintoshMicrosoftMacLinuxOperating system….

Page 52: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Sequences of Word SDRs

Training setfrog eats fliescow eats grainelephant eats leavesgoat eats grasswolf eats rabbitcat likes ballelephant likes watersheep eats grasscat eats salmonwolf eats micelion eats cowdog likes sleepelephant likes watercat likes ballcoyote eats rodentcoyote eats rabbitwolf eats squirreldog likes sleepcat likes ball---- ---- -----

Word 3Word 2Word 1

Page 53: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Sequences of Word SDRs

Training set

eats“fox”

?

frog eats fliescow eats grainelephant eats leavesgoat eats grasswolf eats rabbitcat likes ballelephant likes watersheep eats grasscat eats salmonwolf eats micelion eats cowdog likes sleepelephant likes watercat likes ballcoyote eats rodentcoyote eats rabbitwolf eats squirreldog likes sleepcat likes ball---- ---- -----

Page 54: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Sequences of Word SDRs

Training set

eats“fox”

rodent

1)Word SDRs created unsupervised

2)Semantic generalizationSDR: lexicalCLA: grammatic

3)Commercial applicationsSentiment analysisAbstractionImproved text to speechDialog, Reporting, etc.www.Cept.at

frog eats fliescow eats grainelephant eats leavesgoat eats grasswolf eats rabbitcat likes ballelephant likes watersheep eats grasscat eats salmonwolf eats micelion eats cowdog likes sleepelephant likes watercat likes ballcoyote eats rodentcoyote eats rabbitwolf eats squirreldog likes sleepcat likes ball---- ---- -----

Page 55: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Cept and Grok use exact same code base

eats“fox”

rodent

Page 56: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Source code for:- Cortical Learning Algorithm- Encoders- Support libraries

Single source tree (used by GROK), GPLv3

Active and growing community- 80 contributors as of 2/2014- 533 mailing list subscribers

Education Resources / Hackathons

www.Numenta.org

NuPIC Open Source Project (created July 2013)

Page 57: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Research- Implement and test L4 sensory/motor inference- Introduce hierarchy- Publish

NuPIC- Grow open source community- Support partners, e.g. IBM Almaden, CEPT

Grok- Demonstrate commercial value for CLA

Attract resources (people and money)Provide a “target” and market for HW

- Explore new application areas

Goals For 2014

Page 58: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

The Limits of Software

• One layer, no hierarchy• 2000 mini-columns• 30 cells per mini-column• Up to 128 dendrite segments per cell• Up to 40 active synapses per segment• Thousands of potential synapses per segment

One millionth human cortex50 msec per inference/training step (highly optimized)

40

12 8

2000 columns

30

We need HW for the usual reasons.- Speed- Power- Volume

Page 59: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta
Page 60: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

Start of supplemental material

Page 61: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta
Page 62: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta
Page 63: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta
Page 64: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

“If you invent a breakthrough so computers can learn, that is worth 10 Microsofts”

Page 65: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

"If you invent a breakthrough so computers that learn that is worth 10 Micros

1) What principles will we use to build intelligent machines?

2) What applications will drive adoption in the near and long term?

Machine Intelligence

Page 66: San Jose  Meetup  3/14/14 Jeff Hawkins jhawkins@Numenta

1) Flexible (universal learning machine)

2) Robust

3) If we knew how the neocortex worked, we would be in a race to build them.

Machine intelligence will be built on the principles of the neocortex