Beruflich Dokumente
Kultur Dokumente
Dynamic Memory
Neural Networks
Lecture 6: Associative Memory II
H.A Talebi
Farzaneh Abdollahi
Winter 2011
Neural Networks
Lecture 6
1/50
Outline
Dynamic Memory
Dynamic Memory
Hopfield Networks
Stability Analysis
Performance Analysis
Memory Convergence versus Corruption
Neural Networks
Lecture 6
2/50
Outline
Dynamic Memory
Hopfield Networks
I
Neural Networks
Lecture 6
3/50
Outline
Dynamic Memory
In FB networks:
I
I
Neural Networks
Lecture 6
4/50
Outline
Dynamic Memory
FB in the network
I
I
associations or classifications
optimization problem solution
restoration of patterns
In general, as with perceptron networks, they can be viewed as mapping
networks
Neural Networks
Lecture 6
5/50
Outline
Dynamic Memory
Neural Networks
Lecture 6
6/50
Outline
Dynamic Memory
W is defined:
W =
0 w12 w13
w21 0 w23
w31 w32 0
..
..
..
.
.
.
wn1 wn2 wn3
. . . w1n
. . . w2n
. . . w3n
..
...
.
...
For a given time, only a single neuron (only one entry in vector V ) is
allowed to update its output
The next update in a series uses the already updated vector V .
Neural Networks
Lecture 6
7/50
Outline
Dynamic Memory
Neural Networks
Lecture 6
8/50
Outline
Dynamic Memory
Neural Networks
Lecture 6
9/50
Outline
Dynamic Memory
Stability Analysis
I
Note that since W has zeros in its diagonal terms, it is sign indefinite
(its sign depend on the signs of vj and vi ) E does not have
minimum in unconstrained space
Neural Networks
Lecture 6
10/50
Outline
Dynamic Memory
k+1
k
is updated: 4v = v
v =
4vi
..
.
0
4E = neti 4vi
Neural Networks
kth
instant ith node of output
Lecture 6
11/50
Outline
Dynamic Memory
neti < 0
neti > 0
4vi 0
4vi 0
4E is always neg.
Neural Networks
Lecture 6
12/50
Outline
Dynamic Memory
E (v ) = 12 v T Wv
E (v ) = E (v )
min E (v ) = min E (v )
Neural Networks
Lecture 6
13/50
Outline
Dynamic Memory
Example
Neural Networks
Lecture 6
14/50
Outline
Dynamic Memory
Example 2: Consider W =
0
I v 1 = sgn(Wv ) = sgn(
1
0
2
I v = sgn(Wv ) = sgn(
1
0
1
1
0
1
0
1
1
, v0 =
0
1
1
1
)=
1
1
1
1
)=
1
1
v0 = v1
0
1
1 1
1
0
1 1
I Example 3: Consider W =
1
1
0 1
1 1 1 0
I The energy function becomes
0
1
1 1
v1
1
0
1
1
v2
E (v ) = 21 [v1 v2 v3 v4 ]
1
1
0 1 v3
1 1 1 0
v4
v1 (v2 + v3 v4 ) v2 (v3 v4 ) + v3 v4
I
Neural Networks
Lecture 6
a fix point
15/50
Outline
Dynamic Memory
It can be verifying
that all possible
energy levels are
6, 0, 2
By asynchronous
updates, finally the
energy ends up to its
min value -6.
Neural Networks
Lecture 6
16/50
Outline
Dynamic Memory
Assume v 0 = [1 1 1 1]T
v 1 = sgn(Wv 0 ) = [1 1 1 1]
v 2 = sgn(Wv 1 ) = [1 1 1 1] = v 0
It gets neither to lower energy (both are 2) nor fixed point
Storage Algorithm
I
I
I
Neural Networks
Lecture 6
17/50
Outline
Dynamic Memory
P
In W = pm=1 s (m) s (m)T the diagonal terms are always positive and
P
(p) (p)T
mostly dominant (wii = Pp=1 si si
)
Neural Networks
Lecture 6
18/50
Outline
Dynamic Memory
1X
HD(x, y ) =
|xi yi |
2
i=1
Neural Networks
Lecture 6
19/50
Outline
Dynamic Memory
Example
I
The
weight matrix is
0
0 2 0
0
0
0 2
2 0
0
0
0 2 0
0
The energy function is
E (v ) = 2(v1 v3 + v2 v4 )
Assume v 0 = [1 1 1 1],
update asynchronously in
ascending order
Neural Networks
Lecture 6
20/50
Outline
Dynamic Memory
= [1 1 1 1]T
v 2 = [1 1 1 1]T
v 3 = v 4 = ... = [1 1 1 1]T
I
v 1 = [1 1 1 1]T
v 2 = v 3 = ... = v 1
I
It reaches to s (1)
(2)
Neural Networks
Lecture 6
21/50
Outline
Dynamic Memory
I
I
The larger the HD value, the more difficult it is to ascertain that the
gradient component indeed remains negative due to the large potential
contribution of the second sum term to the right side of expression
Neural Networks
Lecture 6
22/50
Outline
Dynamic Memory
Performance Analysis
I
(m)
P
X
p=1
(m)
= ns
Ps (m) +
P
X
=
s (p) s (p)T s (m)
p6=m
I
Neural Networks
Lecture 6
s (m)T s (m) = n
23/50
Outline
Dynamic Memory
P
X
1
1
= v T ( (s (p) s (p)T )v + v T PIv
2
2
p=1
1
= (n2 Pn)
2
2. If the stored patterns are not orthogonal(Statistically they are not fully
independent):
I
I
I
6= 0
may affect the sign of net
The noise term
increases for an increased number of stored patterns
becomes relatively significant when the factor (n p) decreases
Neural Networks
Lecture 6
24/50
Outline
Dynamic Memory
Neural Networks
Lecture 6
25/50
Outline
Dynamic Memory
Neural Networks
Lecture 6
26/50
Outline
Dynamic Memory
Neural Networks
Lecture 6
27/50
Outline
Dynamic Memory
Problems
Uncertain Recovery
I
Heavily overloaded memory (p/n > 50%) may not be able to provide
error-free or efficient recovery of stored pattern.
Theres are some examples of convergence that are not toward the closest
memory as measured with the HD value
Undesired Equilibria
I
Spurious points are stable equilibria with minimum energy that are
additional to the patterns we already stored.
The undesired equilibria may be unstable. Therefore, any noise in the
system will move the network out of them.
Neural Networks
Lecture 6
28/50
Outline
Dynamic Memory
Example
Neural Networks
Lecture 6
29/50
Outline
Dynamic Memory
It is a heteroassociative,
content-addressable memory
consisting of two layers.
Neural Networks
Lecture 6
30/50
Outline
Dynamic Memory
Memory Architecture
I
b 0 = [W 0 a0 ]
n
X
bj0 = sgn(
wij ai ), j = 1, ..., m
i=1
Neural Networks
Lecture 6
31/50
Outline
Dynamic Memory
a1 = [Wb 0 ]
b 2 = [W T a1 ]
a3 = [Wb 2 ]
..
.
(1)
Neural Networks
Lecture 6
32/50
Outline
Dynamic Memory
Storage Algorithm :
I
p
X
a(i) b (i)T
i=1
wij =
P
X
(m) (m)
bj
ai
m=1
I
Stability Analysis
I
I
I
bidirectionally stable means that the updates continue and the memory
comes to its equilibrium at the k th step, we have ak b k ak+2 , and
ak+2 = ak
Consider the energy function E (a, b) = 12 (aT Wb) 21 (b T W T a)
Since a and b are vectors E (a, b) = (aT Wb)
Neural Networks
Lecture 6
33/50
Outline
Dynamic Memory
Energy changes due to the single bit increments 4ai and 4bj :
4Eai
4Ebi
m
X
= (
wij bj )4ai i = 1, ..., n
j=1
n
X
= (
i=1
Neural Networks
Lecture 6
34/50
Outline
Dynamic Memory
m
2
j=1 wij bj > 0
Pn
2 Pi=1 wij ai < 0
0 Pni=1 wij ai = 0
4bj =
n
2
i=1 wij ai > 0
4E 0
and E is bounded : E
to a stable point
PN PM
i=1
Neural Networks
j=1 |wij |
Lecture 6
35/50
Outline
Dynamic Memory
Example
I
a(4) = [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]T ,
b (4) = [1 1 1 1 1 1 1]T ,
P
W = pi=1 a(i) b (i)T
Neural Networks
Lecture 6
36/50
Outline
Dynamic Memory
Therefore:
b 2 = [16 16 0 0 32 16 0]T = [1 1 0 0 1 1 0]T ,
a3 = [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]T ,
b 4 = [1 1 1 1 1 1 1]T ,
a5 = [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]T ,
b 6 = b 4 , a7 = a5
Neural Networks
Lecture 6
37/50
Outline
Dynamic Memory
Neural Networks
Lecture 6
38/50
Outline
Dynamic Memory
WAB
i=1
WAC
p
X
c (i) b (i)T
i=1
a(i) c (i)T
i=1
Neural Networks
Lecture 6
39/50
Outline
Dynamic Memory
Neural Networks
Lecture 6
40/50
Outline
Dynamic Memory
Neural Networks
Lecture 6
41/50
Outline
Dynamic Memory
The model of a
gradient-type neural system
using electrical components
is shown in Fig.
It has n neurons,
Neural Networks
Lecture 6
42/50
Outline
Dynamic Memory
Conductance wij connects the output of the jth neuron to the input of
the ith neuron.
I
I
wij = wji
wii = 0 , the outputs of neurons are not connected back to their own
inputs
Neural Networks
Lecture 6
43/50
Outline
Dynamic Memory
j6=i
Pn
(2)
Neural Networks
Lecture 6
(3)
44/50
Outline
Dynamic Memory
dE [v (t)]
dt
= E t (v )v ; E t (v ) = [ Ev(v1 )
R vi
fi 1 (z)dz) = Gi ui
dE [v (t)]
dt
E (v )
v2
...
dE [v (t)]
dt
E (v )
vn ]
d
d vi
Using the inverse activation function f 1 (vi ) and chain rule leads to
10 (v ) dvi
i
Ci du
i dt
dt = Ci f
(Gi
dvi
dt
and
dE [v (t)]
dt
= (Wv i + Gu)t v
t dv
= (C du
dt ) dt
dui
dt have the same sign
(t)]
( dE [v
), is toward lower
dt
Neural Networks
Lecture 6
values of energy.
45/50
Outline
Dynamic Memory
dE [v (t)]
dt
dui
dt
When
The challenge will be defining W and I s.t. fit the dynamics and
objective of the problem to (3) and above equation.
=0
= 0 for i = 1, ..., n
Neural Networks
Lecture 6
46/50
Outline
Dynamic Memory
The problem is min tour length through a number of cities with only
one visit of each city
I
I
I
I
Neural Networks
Lecture 6
47/50
Outline
Dynamic Memory
Neural Networks
Lecture 6
48/50
Outline
Dynamic Memory
Let us express
P P our
P objective in math:
E1 = A PX P i Pj vXi vXj for i 6= j
E2 = B i X Y vXi vYi for X 6= Y
E1 be zero
E2 be zero
each column has at most one 1
P P
E3 = C ( X i vXi n)2
Neural Networks
Lecture 6
49/50
Outline
Dynamic Memory
iXi = 2Cn
Neural Networks
Lecture 6
50/50