unsupervised learning the hebb rule – neurons that fire together wire together. pca rf development...

Post on 26-Dec-2015

218 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Unsupervised learning

• The Hebb rule – Neurons that fire together wire together.

• PCA

• RF development with PCA

Classical Conditioning and Hebb’s rule

“When an axon in cell A is near enough to excite cell B and repeatedly and persistently takes part in firing it, some growth process or metabolic change takes place in one or both cells such that A’s efficacy in firing B is increased”

Ear

Tongue

Nose

A

B

D. O. Hebb (1949)

The generalized Hebb rule:

where xi are the inputs

and y the output is assumed linear:

Results in 2D

jj

j

ii

xwy

yxdt

dw

-2 -1 0 1 2-2

-1

0

1

2

x1

x 2 m

=/3

Example of Hebb in 2D

w

(Note: here inputs have a mean of zero)

On the board:

• Solve simple linear first order ODE • Fixed points and their stability for non linear ODE.

In the simplest case, the change in synaptic weight w is:

where x are input vectors and y is the neural response.

Assume for simplicity a linear neuron:

So we get:

Now take an average with respect to the distribution of inputs, get:

Δwi =ηx iy

y = w j

j

∑ x j

Δwi = η xixjwjj

∑ ⎛

⎝ ⎜

⎠ ⎟

jj

ijj

jjii wQwxxEwE

Δ ][][

If a small change Δw occurs over a short time Δt then:(in matrix notation)

If <x>=0 , Q is the covariance function.

What is then the solution of this simple first order linear ODE ?

(Show on board)

www

Qdt

d

t

ΔΔ

The change in synaptic weight w is:

where x are input vectors and y is the neural response.

Assume for simplicity a linear neuron:

So we get:

Mathematics of the generalized Hebb rule

))(( 00 yyxxw ii Δ

jj

jxwy

Δ

j jjjijjii xywxxxywxxw 0000

Δ

j jjjijjii xywxExxEywxxEwE 0000 ][][][][

Δ

j jjjiji xywxywQwE 0000][

ijji QxxE ][ ][ ixE

Taking an average of the the distribution of inputs

And using and

We obtain

E[Δw ] =η Q − x0μJ[ ] W − y0(μ − x0) =η Q− k2J[ ]w − e^

k1

In matrix form

Where J is a matrix of ones, e is a unit vector in direction (1,1,1 … 1), and

or

Where

)( 001 xyk 02 xk

1

^

][ keE Δ wQw '

JkQQ 2'

The equation therefore has the form

]ˆ[ 1' ekQ

dt

d w

w

If k1 is not zero, this has a fixed point, however it is usually not stable.

If k1=0 then have: ww 'Qdt

d

The Hebb rule is unstable – how can it be stabilized while preserving its properties?

The stabilized Hebb (Oja) rule.

2'' )(/))(()1( Δww Δ iii wtwtw

NormalizeWhere |w(t)|=1

Appoximate to first order in Δw: (show on board)

Now insert

Get:

yxw ii Δ

)()()()1( '' twwtwwtwtwj

jjiiii ΔΔ

jjjiii

jjjiiii

wxytwyxtw

tywxtwyxtwtw

'''

''''

)()(

)()()()1(

}y

))(()()1( 2'''' ytwyxtwtww iiiii Δ

Therefore

The Oja rule therefore has the form:

)( 2ywyxdt

dwii

i

k kjjkjkiikk

i

k kjkjkjikkiii

i

wwxxwxxwdt

dw

wwxxwwxxywyxdt

dw

,

,

2 )(

Average

In matrix form:

Qw)w(wQww Tdt

d

Using this rule the weight vector converges tothe eigen-vector of Q with the highest eigen-value. It is often called a principal component or PCA rule.

•The exact dynamics of the Oja rule have been solved by Wyatt and Elfaldel 1995

•Variants of networks that extract several principal components have been proposed (e.g: Sanger 1989)

Therefore a stabilized Hebb (Oja neuron) carries out Eigen-vector, or principal component analysis (PCA).

-1 -0.5 0 0.5 1-1

-0.5

0

0.5

1

x1

x 2

=/3

Another way to look at this:

Where for the Oja rule:

At the f.p: where

So the f.p is an eigen-vector of Q.

The condition means that w is normalized.

Why? Could there be other choices for β?

))(( wQww

ydt

d

2)( yy

0dt

dw

Using this rule the weight vector converges tothe eigen-vector of Q with the highest eigen-value. It is often called a principal component or PCA rule.

wQw

= y 2

=y 2

Show that the Oja rule converges to the state |w^2|=1

The Oja rule in matrix form:

What is

Bonus question for H.W: The equivalence above, why does it prove convergence to normalization.

)( 2yydt

dwx

w

d | w2 |

dt= 2ηy2(1− | w2 |)

d | w2 |

dt=

d(wT ⋅w)

dt= 2wT ⋅

dw

dt

Show that the f.p of the Oja rule is such that the largest eigen-vector with the largest eigen-value (PC) is stable while others are not (from HKP – pg 202).

Start with:

Assume w=ua+εub where ua and ub are eigen-vectors with eigen-values λa,b

Qw)w(wQww Tdt

d

dt

ud

dt

du

dt

d ba )(w

)(()()( babababa uuuuuuuu )Q(Q T

)(()()( babababa uuuuuuuudt

d )Q(Qw T

d(ua + εub )

dt=η λ aua + ελ bub − λ aua −ελ aub −ελ bua( ) +O(ε 2)

Get: (show on board)

Therefore:

That is stable only when λa> λb for every b.

abdt

d

Finding multiple principal components – the Sanger algorithm.

))((1

1iij

i

kkjkji

ij ywwyxydt

dw

Subtract projection onto accounted for subspace (Grahm-Schimdtt)

))((1

i

kkjkji

ij wyxydt

dw

Standard Oja Normalization

Homework 1: (due in 1/28) Implement a simple Hebb neuron with random 2D input, tilted at an angle, θ=30o

with variances 1 and 3 and mean 0. Show the synaptic weight evolution. (200 patterns at least)1b) Calculate the correlation matrix of the input data. Find the eigen-values, eigen-vectors of this matrix. Compare to 1a.1c) Repeat 1a for an Oja neuron, compare to 1b.+ bonus question above (another 25 pt)

What did we learn up to here?

Visual Pathway

Area17

LGN

Visual Cortex

Retinalight electrical signals

•Monocular•Radially Symmetric

•Binocular•Orientation Selective

Receptive fields are:

Receptive fields are:

Re s

pon

se (

s pik

e s/s

e c)

Left Right

Tuning curves

0 180 36090 270

RightLeft

Orientation Selectivity

Binocular Binocular DeprivationDeprivation

NormalNormal

Adult

Eye-opening angle angle

Res

pon

se (

spik

es/s

ec)

Res

pon

se (

spik

es/s

ec)

Eye-opening

Adult

Monocular Monocular DeprivationDeprivation

NormalNormal

Left Right

% o

f ce

lls

group group

angleangleRes

pon

se (

spik

es/s

ec)

1 2 3 4 5 6 7

10

20

1 2 3 4 5 6 7

30

15

RightLeft

Rittenhouse et. al.

First use Hebb/PCA with toy examplesthen used with more realistic examples

Aim get selective neurons using a Hebb/PCA rule

Simple example: ))(cos(1)( '' rrqrrQ

r r r r

Why?The eigen-value equation has the form:

Q can be rewritten in the equivalent form:

And a possible solution can be written as the sum:

)()()( ''1

1

' rwrwrrQdr

))sin()sin()cos()(cos(1)( ''' rrrrqrrQ

1

0 )sin()cos()(l

ll lrblraarW

Inserting, and by orthogonality get:

))sin()cos(()sin()cos(21

0110 lrblraarqbrqaa lll

So for l=0, λ=2, and for l=1, λ=q, for l>1 there is no solution.

So either w(r)= const with λ=2 or with λ=q.)sin()cos()( 11 rbrarw

Orientation selectivity from a natural environment:

The Images:

Natural Images, Noise, and Learning

image retinal activity

•present patches

•update weights

•Patches from retinal activity image

•Patches from noise

Retina

LGN

Cortex

Raw images: (fig 5.8)

Preprocessed images: (fig 5.9)

Monocular Monocular DeprivationDeprivation

NormalNormal

Left Right

% o

f ce

lls

group group

angleangleRes

pon

se (

spik

es/s

ec)

1 2 3 4 5 6 7

10

20

1 2 3 4 5 6 7

30

15

RightLeft

Rittenhouse et. al.

Binocularity – simple examples.

Q is a 2-eye correlation function.

What is the solution of the eigen-value equation:

mmQ

baba

21

21

1

1

2

1

1

1

2

1

mm

In a higher dimensional case:

Qll, Qlr etc. are now matrixes.And Qlr=Qrl.

The eigen-vectors now have the form

rrrl

lrll

QQ

QQ2Q

m

m

m

m

2

1

2

1 21 mm

In a simpler case

This implies Qll=Qrr, that is eyes are equivalent.And the cross eye correlation is a scaled version of the one eye correlation.

If: then:

with

QQ

QQ

2Q

mQm

m

m

m

m

2

1

2

1 21 mm

)1(2,1

Positive correlations (η=0.2)

Negative correlations (η=-0.2)

Hebb with lower saturation at 0

Lets now assume that Q is as above for the 1Dselectivity example.

QQ

QQ

2Q

With 2D space included

2 partially overlapping eyes using natural images

RightLeft

Orientation selectivity and Ocular Dominance

PCA

Left Eye

Right Eye

Right SynapsesLeft

Synapses

0

50

100

0

50

100

0

50

100

0

50

100

1 3 5Bin

No

. of

Cel

ls

What did we learned today?

The Hebb rule is unstable – how can it be stabilized while preserving its properties?

The stabilized Hebb (Oja) rule.

This is has a fixed point at:

Where:

The only stable fixed point is for λmax

top related