Chapter 9
Chapter 9
Outline
Introduction Categories Hopfield Net Perceptron Single Layer Multi Layer
Neural Networks
(Chapter 9)
Introduction
Human brain is superior to digital computer at many tasks + e.g., processing of visual information + robust and fault tolerant (nerve cells in the brain die every day) + flexible; adjusts to new environment + can deal with information that is sparse, imprecise, noisy, inconsistent + highly parallel + small, compact, dissipates very little power - slower in primarily (simple) arithmetic operations
3 4
Neurons
McCulloch & Pitts (1943) - simple model of neuron as a binary threshold unit
Real Neurons
Real Neurons - use not even approximately threshold devices - it is assumed they use a non-linear summation method - produce a sequence of pulses (not a single output level) - do not have the same fixed delay (t-> t+1) - are not updated synchronously - amount of transmitter substance varies unpredictably
5 6
Issues
What does that leave us with? What is the best architecture? (layers, connections, activation functions, updating, # units?) How can it be programmed? (can it learn, # examples needed, time to learn, amount of supervision, real-time learning) What can it do? (how many tasks, how well, how fast, how robust, level of generalization)
Page 1
10/2/2001
Reinforcement Learning
Temporal Difference Learning Q-Learning
Unsupervised Learning
Competitive learning networks Kohonen self-organizing networks ART (adaptive resonant theory)
7 8
input pattern
output
Hopfield Model
Associative Memory is considered the fruit fly of this field. It illustrates in the simplest possible manner the way that collective computation can work. Store a set of patterns in such a way that when presented with a new pattern, the network responds by producing the closest stored pattern. Conventional approach: store a list of patterns, compute the Hamming distance, find the smallest, et voila!
9 10
Hopfield Architecture
- Recurrent Network - Symmetric Architecture - Evaluation until no more changes are observed i.e., network settles into local minimum config.
wij
E=
1 w x x 2 i , j ij i j
Page 2
10/2/2001
wii = 0
where
1 if x 0 sgn( x ) = - 1 if x < 0
13
14
Hopfield Example
Learn x=[1 1 -1 -1] which gives us the weight matrix w=[0 1 -1 -1 1 -1 -1 -1 1 0]
1 wij w14=-1 w13=-1 w12=-1 w34=-1 2 3 w23=-1 w24=-1 4
Hopfield Example
Learn second pattern x=[-1 -1 1 1] which gives us the new weight matrix w=[0 2 -2 -2 2 0 -2 -2 -2 -2 0 2 -2 -2 2 0] Now lets check the slightly corrupted pattern p=[-1 -1 -1 1] which will restore the pattern y=[-1 -1 1 1] with an energy level of E=-12
16
0 -1 -1 0 -1 1
Now lets check the slightly corrupted pattern p=[1 1 -1 1] which will restore the pattern found close y=[1 1 -1 -1]
15
17
18
Page 3
10/2/2001
Hopfield: Issues
- Other memories can get lost - Memories are created that were not supposed to be there - crosstalk: if there are many memories, they might interfere - no emphasis on learning; rather handcrafting to get desired properties - goes towards optimization
Perceptrons
-Rosenblatt: 1950s -Input patterns represented is binary -Single layer network can be trained easily -Output o is computed by
n o = f wi xi i =1
19
is some threshold (weight of constant input) 1 if x > 0 f(.) is the activation function f ( x ) = sgn( x ) = 0 otherwise
Single-Layer Perceptrons
Network architecture
x1 x2 x3 w1 w2 w3 y = signum(wi xi + w0) w0
Single-Layer Perceptron
Example: Gender classification (according to Jang)
Network Arch. w1 w2 v (voice freq.) h w0 y v Training data
y = signum(hw1+vw2+w0) =
21 22
Perceptron
Learning: select an input vector if the response is incorrect, modify all weights
wi = t i x i
ADALINE
single layer network (conceived by Widrow and Hoff) output is weighted linear combination of weights
o = wi xi w0
i =1 n
where If a set of weights for converged state exists, then a method for tuning towards convergence exists (Rosenblatt, 1962) tp is the target output op is the actual output
23
24
Page 4
10/2/2001
ADALINE
To decrease the error, the derivative wrt the weights is taken
E p = 2 t p o p xi wi
decrease wi is xi is negative
XOR
Minsky and Papert reported a severe shortcoming of single layer perceptrons, the XOR problem x1 x2 output 1 x O 0 0 0 0 1 1 1 0 1 0 O x 1 1 0 0 1 not linearly separable
XOR
Minsky and Papert reported a severe shortcoming of single layer perceptrons, the XOR problem x1 x2 output 1 x O 0 0 0 0 1 1 1 0 1 0 O x 1 1 0 0 1 not linearly separable
0 w1 + 0 w 2 + w0 0 w0 0 0 w1 + 1w 2 + w0 > 0 w 2 > w0 1w1 + 0 w 2 + w0 > 0 w1 > w0
27
28
1w1 + 1w 2 + w0 0 w1 + w2 w0
29
30
Page 5
10/2/2001
Multilayer Perceptrons
Two-layer perceptron
1.5
1.5
x1 x2
+1 +1 +1 +1 0.5
x3
-1 +1 0.5
x1
+1 +1
x3 -1 +1 +1 x5
x5
x2
+1 0.5
x4
0.5
x4
31
32
Multi-Layer Perceptrons
-Recall the output
n o = f wi xi i =1
Ek =
(
n k =1
t k p ok )
Learning rule:
33
or
f (x ) =
Steepest descent (Backprop) Conjugate gradient method All optim. methods using first derivative Derivative-free optim.
34
1 e x x = tanh 2 1 + e x
or
f (x ) = x
then the learning rule for each node can be derived using the chain rule...
Multi-Layer Perceptrons
-Recall the output
n o = f wi xi i =1
Backpropagation
make incremental change in the direction dE/dw to decrease the error.
(
n k =1
Ek =
t k p ok )
The learning rule for each node can be derived using the chain rule... to propagate the error back through a multilayer perceptron. E
parameters
1 1 + ex
or
f (x ) =
1 e x = tanh 2 1 + e x
1 0.5 0 -0.5 -1 -10 -5 0 5 10
or
f (x ) = x
-0.5 -1 -10 0 x 10
squashing functions
35
36
w ki =
p
E p w ki
Page 6
error
10/2/2001
Back-prop procedure
1. Initialize weights to small random values 2. Choose a pattern and apply it to input layer 3. Propagate the signal forward through the network 4. Compute the deltas for the output layer 5. Compute the deltas for the preceding layers by propagating the error backwards 6. Update all weights 7. Go back to step 2 and repeat for next pattern 8. Repeat until error rate is acceptable
37 38
Step 3
Propagate signal forward through the network
Oim = g
w
j
m m 1 ij O j
until all outputs have been calculated For m=0 (input layer), the output is the pattern.
Step 4
Compute the deltas for the output layer
iM
= g hiM tip OiM
Step 5
( )[
Compute the deltas for the preceding layers by propagating the errors backwards
im1 = g him1
( )w
n j
m m ij j
by comparing the actual output O with the target output t for the pattern p considered
for m=M, M-1, M-2, until a delta has been calculated for every unit
39
40
Step 6
Use
m wij = imOm1 j
too small
+ wij
41
42
Page 7
10/2/2001
Momentum
If error minimum in long narrow valley, then updating can happen to zig-zag down the valley
Overfitting
Error on learning cases
error
epoch
w = w E + w prev
44
epoch
Local Minima
There is no guarantee that the algorithm converges to a global minimum
error
epoch
46
Interwined
Network architecture
x1 x2 y1 y2
2-layer: Convex
A B
B A A B
3-layer: Arbitrary
A B
B A A B
47
48
Page 8
10/2/2001
RBF
Output: weighted sum weighted average linear combination Location of Center: Use (fuzzy) k-means clustering Size of Variance: Use knn-classifier and take average distance
x 0 0 1 1
XOR, revisited
y 0 1 0 1 output 0 1 1 0
49
50
Modular Networks
Task decomposition Local Experts Fuse information
local expert 1
O1
c1
c2
c3
Input x
O2
fuse
On
53
52
last slide
Page 9