88
Hypercubes and Neural Networks bill wolfe 10/23/2005

Hypercubes and Neural Networks

  • Upload
    mattox

  • View
    38

  • Download
    3

Embed Size (px)

DESCRIPTION

Hypercubes and Neural Networks. bill wolfe 10/23/2005. Modeling. Simple Neural Model. a i Activation e i External input w ij Connection Strength Assume: w ij = w ji (“symmetric” network)  W = (w ij ) is a symmetric matrix. Net Input. Vector Format:. Dynamics. Basic idea:. - PowerPoint PPT Presentation

Citation preview

Page 1: Hypercubes  and  Neural Networks

Hypercubes and

Neural Networks

bill wolfe

10/23/2005

Page 2: Hypercubes  and  Neural Networks
Page 3: Hypercubes  and  Neural Networks
Page 4: Hypercubes  and  Neural Networks
Page 5: Hypercubes  and  Neural Networks
Page 6: Hypercubes  and  Neural Networks
Page 7: Hypercubes  and  Neural Networks
Page 8: Hypercubes  and  Neural Networks
Page 9: Hypercubes  and  Neural Networks
Page 10: Hypercubes  and  Neural Networks
Page 11: Hypercubes  and  Neural Networks
Page 12: Hypercubes  and  Neural Networks
Page 13: Hypercubes  and  Neural Networks
Page 14: Hypercubes  and  Neural Networks
Page 15: Hypercubes  and  Neural Networks
Page 16: Hypercubes  and  Neural Networks
Page 17: Hypercubes  and  Neural Networks
Page 18: Hypercubes  and  Neural Networks
Page 19: Hypercubes  and  Neural Networks
Page 20: Hypercubes  and  Neural Networks

Modeling

Page 21: Hypercubes  and  Neural Networks

Simple Neural Model

• ai Activation

• ei External input

• wij Connection Strength

Assume: wij = wji (“symmetric” network)

W = (wij) is a symmetric matrix

ai ajwij

ei ej

Page 22: Hypercubes  and  Neural Networks

Net Input

eaWnet

i

j

jiji eawnet ai

aj

wij

Vector Format:

Page 23: Hypercubes  and  Neural Networks

Dynamics

• Basic idea:

ai

neti > 0

ai

neti < 0

ii

ii

anet

anet

0

0

netdt

adnet

dt

dai

i eaW

Page 24: Hypercubes  and  Neural Networks

Energy

aeaWaE TT 21

Page 25: Hypercubes  and  Neural Networks

net

netnet

ewew

aEaE

E

n

j

nnj

j

j

n

,...,

,...,

/,....,/

1

11

1

netE

Page 26: Hypercubes  and  Neural Networks

Lower Energy

• da/dt = net = -grad(E) seeks lower energy

net

Energy

a

Page 27: Hypercubes  and  Neural Networks

Problem: Divergence

Energy

net a

Page 28: Hypercubes  and  Neural Networks

A Fix: Saturation

))(1( iiii

aanetdt

da

corner-seeking

lower energy

10 ia

Page 29: Hypercubes  and  Neural Networks

Keeps the activation vector inside the hypercube boundaries

a

Energy

0 1

))(1( iiii

aanetdt

da

corner-seeking

lower energy

Encourages convergence to corners

Page 30: Hypercubes  and  Neural Networks

Summary: The Neural Model

))(1( iiii

aanetdt

da

i

j

jiji eawnet

ai Activation ei External Inputwij Connection StrengthW (wij = wji) Symmetric

10 ia

Page 31: Hypercubes  and  Neural Networks

Example: Inhibitory Networks

• Completely inhibitory– wij = -1 for all i,j– k-winner

• Inhibitory Grid– neighborhood inhibition

Page 32: Hypercubes  and  Neural Networks

Traveling Salesman Problem

• Classic combinatorial optimization problem

• Find the shortest “tour” through n cities

• n!/2n distinct tours

D

D

AE

B

C

AE

B

C

ABCED

ABECD

Page 33: Hypercubes  and  Neural Networks

TSP solution for 15,000 cities in Germany

Page 34: Hypercubes  and  Neural Networks

TSP

50 City Example

Page 35: Hypercubes  and  Neural Networks

Random

Page 36: Hypercubes  and  Neural Networks

Nearest-City

Page 37: Hypercubes  and  Neural Networks

2-OPT

Page 38: Hypercubes  and  Neural Networks

http://www.jstor.org/view/0030364x/ap010105/01a00060/0

An Effective Heuristic for the Traveling Salesman Problem

S. Lin and B. W. Kernighan

Operations Research, 1973

Page 39: Hypercubes  and  Neural Networks

Centroid

Page 40: Hypercubes  and  Neural Networks

Monotonic

Page 41: Hypercubes  and  Neural Networks

Neural Network Approach

D

C

B

A1 2 3 4

time stops

cities neuron

Page 42: Hypercubes  and  Neural Networks

Tours – Permutation Matrices

D

C

B

A

tour: CDBA

permutation matrices correspond to the “feasible” states.

Page 43: Hypercubes  and  Neural Networks

Not Allowed

D

C

B

A

Page 44: Hypercubes  and  Neural Networks

Only one city per time stopOnly one time stop per city

Inhibitory rows and columns

inhibitory

Page 45: Hypercubes  and  Neural Networks

Distance Connections:

Inhibit the neighboring cities in proportion to their distances.

D

C

B

A-dAC

-dBC

-dDC

D

A

B

C

Page 46: Hypercubes  and  Neural Networks

D

C

B

A-dAC

-dBC

-dDC

putting it all together:

Page 47: Hypercubes  and  Neural Networks

Research Questions

• Which architecture is best?• Does the network produce:

– feasible solutions?– high quality solutions?– optimal solutions?

• How do the initial activations affect network performance?

• Is the network similar to “nearest city” or any other traditional heuristic?

• How does the particular city configuration affect network performance?

• Is there a better way to understand the nonlinear dynamics?

Page 48: Hypercubes  and  Neural Networks

A

B

C

D

E

F

G

1 2 3 4 5 6 7

typical state of the network before convergence

Page 49: Hypercubes  and  Neural Networks

“Fuzzy Readout”

A

B

C

D

E

F

G

1 2 3 4 5 6 7

à GAECBFD

A

B

C

D

E

F

G

Page 50: Hypercubes  and  Neural Networks

Neural ActivationsFuzzy Tour

Initial Phase

Page 51: Hypercubes  and  Neural Networks
Page 52: Hypercubes  and  Neural Networks

Neural ActivationsFuzzy Tour

Monotonic Phase

Page 53: Hypercubes  and  Neural Networks

Neural ActivationsFuzzy Tour

Nearest-City Phase

Page 54: Hypercubes  and  Neural Networks

24

23

22

21

20

19

18

17

16

15

14

13

12

11

10

9

8

7

6

to

ur

len

gt

h

10009008007006005004003002001000iteration

Fuzzy Tour Lengths

centroidphase

monotonicphase

nearest-cityphase

monotonic (19.04)

centroid (9.76)nc-worst (9.13)

nc-best (7.66)2opt (6.94)

Fuzzy Tour Lengthstour length

iteration

Page 55: Hypercubes  and  Neural Networks

12

11

10

9

8

7

6

5

4

3

2

tour length

70656055504540353025201510# cities

average of 50 runs per problem size

centroid

nc-w

nc-bneur

2-opt

Average Results for n=10 to n=70 cities

(50 random runs per n)

# cities

Page 56: Hypercubes  and  Neural Networks

DEMO 2

Applet by Darrell Longhttp://hawk.cs.csuci.edu/william.wolfe/TSP001/TSP1.html

Page 57: Hypercubes  and  Neural Networks

Conclusions

• Neurons stimulate intriguing computational models.

• The models are complex, nonlinear, and difficult to analyze.

• The interaction of many simple processing units is difficult to visualize.

• The Neural Model for the TSP mimics some of the properties of the nearest-city heuristic.

• Much work to be done to understand these models.

Page 58: Hypercubes  and  Neural Networks

a1 a2

a3

w12

w23w13

3 Neuron Example

Page 59: Hypercubes  and  Neural Networks

000

111

100110

010

001 011

a1

a2

a3

Brain State: <a1, a2, a3>

Page 60: Hypercubes  and  Neural Networks

000

111

100110

010

001 011

a1

a2

a3

“Thinking”

Page 61: Hypercubes  and  Neural Networks

Binary Model

aj = 0 or 1

Neurons are either “on” or “off”

Page 62: Hypercubes  and  Neural Networks

Binary Stability

aj = 1 and Netj >=0

Or

aj = 0 and Netj <=0

Page 63: Hypercubes  and  Neural Networks

Hypercubes

Page 64: Hypercubes  and  Neural Networks

n=0

n=1

n=2

Page 65: Hypercubes  and  Neural Networks
Page 66: Hypercubes  and  Neural Networks

4-Cube

Page 67: Hypercubes  and  Neural Networks

4-Cube

Page 68: Hypercubes  and  Neural Networks
Page 69: Hypercubes  and  Neural Networks
Page 70: Hypercubes  and  Neural Networks

5-Cube

Page 71: Hypercubes  and  Neural Networks

5-Cube

Page 72: Hypercubes  and  Neural Networks

5-Cube

Page 73: Hypercubes  and  Neural Networks
Page 74: Hypercubes  and  Neural Networks

http://www1.tip.nl/~t515027/hypercube.html

Hypercube Computer Game

Page 75: Hypercubes  and  Neural Networks

00

01 11

100

1

2

3

2-Cube

0123

0 1 2 3

0110

0110

1001

1001

Q2 =Adjacency Matrix:

Hypercube Graph

Page 76: Hypercubes  and  Neural Networks

I

QQ

nn

1

1nQ

I

Recursive Definition

Page 77: Hypercubes  and  Neural Networks

Theorem 1: If v is an eigenvector of Qn-1 with eigenvalue x then the concatenated vectors [v,v] and [v,-v] are eigenvectors of Qn with eigenvalues x+1 and x-1 respectively.

Eigenvectors of the Adjacency Matrix

Page 78: Hypercubes  and  Neural Networks

v

vQn

I

Qn 1

1nQ

I

v

v

vv

vv

vQv

vvQ

v

v

n

n)1(

1

1

Proof

Page 79: Hypercubes  and  Neural Networks

= +1

11

= -1

1-1

= +2

1111

= 0

11-1-1

= 0

1-11-1

= -2

1-1-11

= +3

11111111

= +1

1111-1-1-1-1

= +1

11-1-111-1-1

= -1

11-1-1-1-111

= +1

1-11-11-11-1

= -1

1-11-1-11-11

= -1

1-1-111-1-11

= -3

1-1-11-111-1

+1

+1

+1 +1 +1 +1

+1

-1

-1

-1-1

-1

-1 -1

n=0

n=1

n=2

n=3

Generating Eigenvectors and Eigenvalues

Page 80: Hypercubes  and  Neural Networks

Walsh Functions for n=1, 2, 3

Page 81: Hypercubes  and  Neural Networks
Page 82: Hypercubes  and  Neural Networks
Page 83: Hypercubes  and  Neural Networks

1

1

1

1

-1

-1

-1

-1

000

001

010

011

100

101

110

111

eigenvector binary number

000

100 110

010

111000

001 011

x

y

z

Page 84: Hypercubes  and  Neural Networks

x

=-1k=1

=-1k=1

=+1k=2

=+1k=2

=+1k=2

=-3k=0

=-1k=1

y

z n=3

n=3

Page 85: Hypercubes  and  Neural Networks

Theorem 3: Let k be the number of +1 choices in the recursive construction of the eigenvectors of the n-cube. Then for k not equal to n each Walsh state has 2n-k-1 non adjacent subcubes of dimension k that are labeled +1 on their vertices, and 2n-k-1 non adjacent subcubes of dimension k that are labeled -1 on their vertices. If k = n then all the vertices are labeled +1. (Note: Here, "non adjacent" means the subcubes do not share any edges or vertices and there are no edges between the subcubes).

Page 86: Hypercubes  and  Neural Networks

n=5k=3

reduced graph

n=5k=2

reduced graph

Schamtice of the 5-cube Schamtice of the 5-cube

n=5, k= 3 n=5, k= 2

Page 87: Hypercubes  and  Neural Networks

-1

-1

-1

-1

-1

-1

-1

-1

-1

-1

-1 -1

Inhibitory Hypercube

Page 88: Hypercubes  and  Neural Networks

Theorem 5: Each Walsh state with positive, zero, or negative eigenvalue is an unstable, weakly stable, or strongly stable state of the inhibitory hypercube network, respectively.