73
Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Lecture 8 (chapter 6) Artificial neural Artificial neural networks: networks: Supervised learning Supervised learning The perceptron Quick Review The perceptron Quick Review Multilayer neural networks Multilayer neural networks Accelerated learning in multilayer Accelerated learning in multilayer neural networks neural networks The Hopfield network The Hopfield network Bidirectional associative memories Bidirectional associative memories (BAM) (BAM) Summary Summary

© Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

Embed Size (px)

Citation preview

Page 1: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 1

Lecture 8 (chapter 6) Lecture 8 (chapter 6) Artificial neural networks: Artificial neural networks: Supervised learningSupervised learning The perceptron Quick ReviewThe perceptron Quick Review Multilayer neural networksMultilayer neural networks Accelerated learning in multilayer neural networksAccelerated learning in multilayer neural networks The Hopfield networkThe Hopfield network Bidirectional associative memories (BAM)Bidirectional associative memories (BAM) SummarySummary

Page 2: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 2

Perceptron ReviewPerceptron Review

A perceptron can learn the operations A perceptron can learn the operations AND AND and and OROR, , but but not not Exclusive-ORExclusive-OR. In other word, the perceptron can . In other word, the perceptron can learn only linearly separable functions.learn only linearly separable functions.

To cop with nonlinearly separable functions, we need To cop with nonlinearly separable functions, we need multilayer neural networksmultilayer neural networks

n

iii pwpxsteppY

1

)()()(

Input output mappingInput output mapping

Learning ruleLearning rule

Page 3: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 3

MultilayerMultilayer neuralneural networksnetworks

A multilayer perceptron is a feedforward neural A multilayer perceptron is a feedforward neural network with one or more hidden layers. network with one or more hidden layers.

The network consists of an The network consists of an input layer input layer of source of source neurons, at least one middle or neurons, at least one middle or hidden layer hidden layer of of computational neurons, and an computational neurons, and an output layer output layer of of computational neurons.computational neurons.

The input signals are propagated in a forward The input signals are propagated in a forward direction on a layer-by-layer basis.direction on a layer-by-layer basis.

Page 4: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 4

Multilayer perceptron with two hidden layersMultilayer perceptron with two hidden layers

Inputlayer

Firsthiddenlayer

Secondhiddenlayer

Outputlayer

I n

p u

t

S i g

n a

l

I n

p u

t

S i g

n a

l

ss O u

t p

u t

S

i g

n

p u

t

S i g

n

a l s

a l s

Page 5: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 5

What does the middle layer hide?What does the middle layer hide? A hidden layer “hides” its A hidden layer “hides” its desired outputdesired output. .

Neurons in the hidden layer cannot be observed Neurons in the hidden layer cannot be observed through the input/output behavior of the network. through the input/output behavior of the network. There is no obvious way to know what the desired There is no obvious way to know what the desired output of the hidden layer should be.output of the hidden layer should be.

Commercial ANNs incorporate three and Commercial ANNs incorporate three and sometimes four layers, including one or two sometimes four layers, including one or two hidden layers. Each layer can contain from 10 to hidden layers. Each layer can contain from 10 to 1000 neurons. Experimental neural networks may 1000 neurons. Experimental neural networks may have five or even six layers, including three or four have five or even six layers, including three or four hidden layers, and utilize millions of neurons.hidden layers, and utilize millions of neurons.

Page 6: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 6

Back-propagation neural networkBack-propagation neural network Learning in a multilayer network proceeds the Learning in a multilayer network proceeds the

same way as for a perceptron.same way as for a perceptron.

A training set of input patterns is presented to the A training set of input patterns is presented to the network.network.

The network computes its output pattern, and if The network computes its output pattern, and if there is an error there is an error or in other words a difference or in other words a difference between actual and desired output patterns between actual and desired output patterns the the weights are weights are adjusted to reduce this erroradjusted to reduce this error..

Page 7: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 7

In a back-propagation neural network, the learning In a back-propagation neural network, the learning algorithm has two phases. algorithm has two phases.

First, a training input pattern is presented to the First, a training input pattern is presented to the network input layer. The network propagates the network input layer. The network propagates the input pattern from layer to layer until the output input pattern from layer to layer until the output pattern is generated by the output layer.pattern is generated by the output layer.

If this pattern is different from the desired output, If this pattern is different from the desired output, an error is calculated and then propagated an error is calculated and then propagated backwards through the network from the output backwards through the network from the output layer to the input layer. The weights are modified layer to the input layer. The weights are modified as the error is propagated.as the error is propagated.

Page 8: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 8

Three-layer back-propagation neural networkThree-layer back-propagation neural network

Inputlayer

xi

x1

x2

xn

1

2

i

n

Outputlayer

1

2

k

l

yk

y1

y2

yl

Inputsignals

Error signals

wjk

Hiddenlayer

wij

1

2

j

m

Page 9: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 9

The back-propagation training algorithmThe back-propagation training algorithm

Step 1Step 1: Initialisation : Initialisation Set all the weights and threshold levels of the Set all the weights and threshold levels of the network to random numbers uniformly network to random numbers uniformly distributed inside a small range:distributed inside a small range:

where where FFii is the total number of inputs of neuron is the total number of inputs of neuron i i

in the network. The weight initialisation is done in the network. The weight initialisation is done on a neuron-by-neuron basis.on a neuron-by-neuron basis.

ii FF4.2

,4.2

Page 10: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 10

Step 2Step 2: Activation : Activation Activate the back-propagation neural Activate the back-propagation neural network by applying inputs network by applying inputs xx11((pp), ), xx22((pp),…, ),…, xxnn((pp) )

and desired outputs and desired outputs yydd,1,1((pp), ), yydd,2,2((pp),…, ),…, yydd,,nn((pp).).

((aa) Calculate the actual outputs of the neurons in ) Calculate the actual outputs of the neurons in the hidden layer:the hidden layer:

where where n n is the number of inputs of neuron is the number of inputs of neuron j j in the in the hidden layer, and hidden layer, and sigmoid sigmoid is the is the sigmoid sigmoid activation activation function.function.

j

n

iijij pwpxsigmoidpy

1

)()()(

Page 11: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 11

((bb) Calculate the actual outputs of the neurons in ) Calculate the actual outputs of the neurons in the output layer:the output layer:

Step 2Step 2 : Activation (continued): Activation (continued)

where where m m is the number of inputs of neuron is the number of inputs of neuron k k in the in the output layer.output layer.

k

m

jjkjkk pwpxsigmoidpy

1

)()()(

Page 12: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 12

Step 3Step 3: Weight training : Weight training Update the weights in the back-propagation Update the weights in the back-propagation network propagating backward the errors associated network propagating backward the errors associated with output neurons. with output neurons. ( (aa) Calculate the error gradient for the neurons in ) Calculate the error gradient for the neurons in the output layer:the output layer:

wherewhere

Calculate the weight corrections:Calculate the weight corrections:

Update the weights at the output neurons:Update the weights at the output neurons:

)()()1( pwpwpw jkjkjk

)()(1)()( pepypyp kkkk

)()()( , pypype kkdk

)()()( ppypw kjjk

Page 13: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 13

((bb) Calculate the error gradient for the neurons in ) Calculate the error gradient for the neurons in the hidden layer:the hidden layer:

Step 3Step 3: Weight training (continued): Weight training (continued)

Calculate the weight corrections:Calculate the weight corrections:

Update the weights at the hidden neurons:Update the weights at the hidden neurons:

)()()(1)()(1

][ pwppypyp jk

l

kkjjj

)()()( ppxpw jiij

)()()1( pwpwpw ijijij

Page 14: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 14

Step 4Step 4: Iteration : Iteration Increase iteration Increase iteration p p by one, go back to by one, go back to Step 2 Step 2 and and repeat the process until the selected error criterion repeat the process until the selected error criterion is satisfied.is satisfied.

As an example, we may consider the three-layer As an example, we may consider the three-layer back-propagation network. Suppose that the back-propagation network. Suppose that the network is required to perform logical operation network is required to perform logical operation Exclusive-ORExclusive-OR. Recall that a single-layer perceptron . Recall that a single-layer perceptron could not do this operation. Now we will apply the could not do this operation. Now we will apply the three-layer net.three-layer net.

Page 15: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 15

Three-layer network for solving the Three-layer network for solving the Exclusive-OR operationExclusive-OR operation

y55

x1 31

x2

Inputlayer

Outputlayer

Hiddenlayer

42

3w13

w24

w23

w24

w35

w45

4

5

1

1

1

Page 16: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 16

The effect of the threshold applied to a neuron in the The effect of the threshold applied to a neuron in the hidden or output layer is represented by its weight, hidden or output layer is represented by its weight, , , connected to a fixed input equal to connected to a fixed input equal to 1.1.

The initial weights and threshold levels are set The initial weights and threshold levels are set randomly as follows: randomly as follows: ww1313 = 0.5, = 0.5, ww1414 = 0.9, = 0.9, ww2323 = 0.4, = 0.4, ww2424 = 1.0, = 1.0, ww35 35 = = 1.2, 1.2,

ww4545 = 1.1, = 1.1, 33 = 0.8, = 0.8, 44 = = 0.1 and 0.1 and 55 = 0.3. = 0.3.

Page 17: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 17

We consider a training set where inputs We consider a training set where inputs xx1 1 and and xx22 are are

equal to 1 and desired output equal to 1 and desired output yydd,5,5 is 0. The actual is 0. The actual

outputs of neurons 3 and 4 in the hidden layer are outputs of neurons 3 and 4 in the hidden layer are calculated ascalculated as

Now the actual output of neuron 5 in the output layer Now the actual output of neuron 5 in the output layer is determined as:is determined as:

Thus, the following error is obtained:Thus, the following error is obtained:

5250.01/1)( )8.014.015.01(32321313 ewxwxsigmoidy

8808.01/1)( )1.010.119.01(42421414 ewxwxsigmoidy

5097.01/1)( )3.011.18808.02.15250.0(54543535 ewywysigmoidy

5097.05097.0055, yye d

Page 18: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 18

The next step is weight training. To update the The next step is weight training. To update the weights and threshold levels in our network, we weights and threshold levels in our network, we propagate the error, propagate the error, ee, from the output layer , from the output layer backward to the input layer.backward to the input layer.

First, we calculate the error gradient for neuron 5 in First, we calculate the error gradient for neuron 5 in the output layer:the output layer:

Then we determine the weight corrections assuming Then we determine the weight corrections assuming that the learning rate parameter, that the learning rate parameter, , is equal to 0.1:, is equal to 0.1:

1274.05097).0(0.5097)(10.5097)1( 555 eyy

0112.0)1274.0(8808.01.05445 yw0067.0)1274.0(5250.01.05335 yw

0127.0)1274.0()1(1.0)1( 55

Page 19: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 19

Next we calculate the error gradients for neurons 3 Next we calculate the error gradients for neurons 3 and 4 in the hidden layer:and 4 in the hidden layer:

We then determine the weight corrections:We then determine the weight corrections:

0381.0)2.1(0.1274)(0.5250)(10.5250)1( 355333 wyy

0.0147.114)0.127(0.8808)(10.8808)1( 455444 wyy

0038.00381.011.03113 xw0038.00381.011.03223 xw

0038.00381.0)1(1.0)1( 33 0015.0)0147.0(11.04114 xw0015.0)0147.0(11.04224 xw

0015.0)0147.0()1(1.0)1( 44

Page 20: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 20

At last, we update all weights and threshold:At last, we update all weights and threshold:

The training process is repeated until the sum ofThe training process is repeated until the sum of squared errors is less than 0.001.squared errors is less than 0.001.

5038.00038.05.0131313 www

8985.00015.09.0141414 www

4038.00038.04.0232323 www

9985.00015.00.1242424 www

2067.10067.02.1353535 www

0888.10112.01.1454545 www

7962.00038.08.0333

0985.00015.01.0444

3127.00127.03.0555

Page 21: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 21

Learning curve for operation Learning curve for operation Exclusive-ORExclusive-OR

0 50 100 150 200

10 1

Epoch

Sum-Squared Network Error for 224 Epochs

100

10-1

10-2

10 -3

10 -4

Su

m-S

qu

ared

Err

or

Page 22: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 22

Final results of three-layer network learningFinal results of three-layer network learning

Inputs

x1 x2

1010

1100

011

Desiredoutput

yd

0

0.0155

Actualoutput

y5 e

Sum ofsquarederrors

0.98490.98490.0175

0.0010

Page 23: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 23

Network represented by McCulloch-Pitts model Network represented by McCulloch-Pitts model for solving the for solving the Exclusive-OR Exclusive-OR operationoperation

y55

x1 31

x2 42

+1.0

1

1

1+1.0

+1.0

+1.0

+1.5

+1.0

+0.5

+0.5 2.0

Page 24: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 24

Decision boundariesDecision boundaries

(a)(a) DecisionDecision boundary constructed by hidden neuron 3; boundary constructed by hidden neuron 3; ((bb) Decision boundary constructed by hidden neuron 4; ) Decision boundary constructed by hidden neuron 4; ((cc) Decision boundaries constructed by the complete ) Decision boundaries constructed by the complete

three-layer networkthree-layer network

x1

x2

1

(a)

1

x2

1

1

(b)

00

x1 +x2 – 1.5 =0 x1 +x2 – 0.5 =0

x1 x1

x2

1

1

(c)

0

Page 25: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 25

Accelerated learning in multilayer Accelerated learning in multilayer neural networksneural networks

A multilayer network learns much faster when the A multilayer network learns much faster when the sigmoidal activation function is represented by a sigmoidal activation function is represented by a hyperbolic tangenthyperbolic tangent::

where where a a and and bb are constants.are constants.

Suitable values for Suitable values for a a and and b b are: are: a a = 1.716 and = 1.716 and b b = 0.= 0.667667

ae

aY bX

htan

1

2

Page 26: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 26

We also can accelerate training by including a We also can accelerate training by including a momentum term momentum term in the delta rule:in the delta rule:

where where is a positive number (0 is a positive number (0 1) called 1) called the the momentum constantmomentum constant. Typically, the . Typically, the momentum constant is set to 0.95. momentum constant is set to 0.95.

This equation is called the This equation is called the generalised delta rulegeneralised delta rule..

)()()1()( ppypwpw kjjkjk

Page 27: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 27

Learning with momentum for operation Learning with momentum for operation Exclusive-ORExclusive-OR

0 20 40 60 80 100 12010 -4

10 -2

10 0

10 2

Epoch

Training for 126 Epochs

0 100 140-1

-0.5

0

0.5

1

1.5

Epoch

10 -3

10 1

10 -1

20 40 60 80 120

Lea

rnin

g R

ate

Page 28: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 28

Learning with adaptive learning rateLearning with adaptive learning rate

To accelerate the convergence and yet avoid the To accelerate the convergence and yet avoid the danger of instability, we can apply two heuristics:danger of instability, we can apply two heuristics:

Heuristic 1Heuristic 1

If the change of the sum of squared errors has the If the change of the sum of squared errors has the same algebraic sign for several consequent epochs, same algebraic sign for several consequent epochs, then the learning rate parameter, then the learning rate parameter, , should be , should be increased.increased.

Heuristic 2Heuristic 2

If the algebraic sign of the change of the sum of If the algebraic sign of the change of the sum of squared errors alternates for several consequent squared errors alternates for several consequent epochs, then the learning rate parameter, epochs, then the learning rate parameter, , should be , should be decreased.decreased.

Page 29: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 29

Adapting the learning rate requires some changes Adapting the learning rate requires some changes in the back-propagation algorithm. in the back-propagation algorithm.

If the sum of squared errors at the current epoch If the sum of squared errors at the current epoch exceeds the previous value by more than a exceeds the previous value by more than a predefined ratio (typically 1.04), the learning rate predefined ratio (typically 1.04), the learning rate parameter is decreased (typically by multiplying parameter is decreased (typically by multiplying by 0.7) and new weights and thresholds are by 0.7) and new weights and thresholds are calculated.calculated.

If the error is less than the previous one, the If the error is less than the previous one, the learning rate is increased (typically by multiplying learning rate is increased (typically by multiplying by 1.05).by 1.05).

Page 30: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 30

Learning with adaptive learning rateLearning with adaptive learning rate

0 10 20 30 40 50 60 70 80 90 100Epoch

Training for 103Epochs

0 20 40 60 80 100 1200

0.2

0.4

0.6

0.8

1

Epoch

10-4

10-2

100

102

10-3

101

10-1

Su

m-S

qu

are

d

Su

m-S

qu

are

d

Err

oErr

oLearn

ing

Learn

ing

R

ate

Rate

Page 31: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 31

Learning with momentum and adaptive learning rateLearning with momentum and adaptive learning rate

0 10 20 30 40 50 60 70 80Epoch

Trainingfor 85Epochs

0 10 20 30 40 50 60 70 80 900

0.5

1

2.5

Epoch

10-4

10-2

100

102

10-3

101

10-1

1.5

2

Su

m-S

qu

are

d

Su

m-S

qu

are

d

Err

oErr

oLearn

ing

Learn

ing

R

ate

Rate

Page 32: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 32

The Hopfield NetworkThe Hopfield Network

Neural networks were designed on analogy with Neural networks were designed on analogy with the brain. The brain’s memory, however, works the brain. The brain’s memory, however, works by association. For example, we can recognize a by association. For example, we can recognize a familiar face even in an unfamiliar environment familiar face even in an unfamiliar environment within 100-200 ms. We can also recall a within 100-200 ms. We can also recall a complete sensory experience, including sounds complete sensory experience, including sounds and scenes, when we hear only a few bars of and scenes, when we hear only a few bars of music. The brain routinely music. The brain routinely associates one thing associates one thing with anotherwith another..

Page 33: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 33

Multilayer neural networks trained with the back-Multilayer neural networks trained with the back-propagation algorithm are used for pattern propagation algorithm are used for pattern recognition problems. However, to emulate the recognition problems. However, to emulate the human memory’s associative characteristics we human memory’s associative characteristics we need a different type of network: a need a different type of network: a recurrent recurrent neural networkneural network..

A recurrent neural network has A recurrent neural network has feedbackfeedback loops loops from its outputs to its inputs. The presence of from its outputs to its inputs. The presence of such loops has a profound impact on the learning such loops has a profound impact on the learning capability of the network.capability of the network.

Page 34: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 34

The stability of recurrent networks intrigued The stability of recurrent networks intrigued several researchers in the 1960s and 1970s. several researchers in the 1960s and 1970s. However, none was able to predict which network However, none was able to predict which network would be stable, and some researchers were would be stable, and some researchers were doubtful about finding a solution at all. The doubtful about finding a solution at all. The problem was solved only in 1982, when problem was solved only in 1982, when John John Hopfield Hopfield formulated the physical principle of formulated the physical principle of storing information in a dynamically stable storing information in a dynamically stable network.network.

Page 35: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 35

Single-layer Single-layer nn-neuron Hopfield network-neuron Hopfield network

xi

x1

x2

xn

yi

y1

y2

yn

1

2

i

nI n

p u

t

S i

g n

a l

sI

n p

u t

S

i g

n a

l s

O u

t p

u t

S

i g

n a

l s

O u

t p

u t

S

i g

n a

l s

Page 36: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 36

The Hopfield network uses McCulloch and Pitts The Hopfield network uses McCulloch and Pitts neurons with the neurons with the sign activation function sign activation function as its as its computing element:computing element:

XY

X

X

Ysign

if,

if,1

0if,1

However, if the neuron’s weighted However, if the neuron’s weighted input is exactly zeroinput is exactly zero, its , its output remains unchangedoutput remains unchanged – in other words, a neuron remains in – in other words, a neuron remains in itsitsprevious state, regardless of whether it is +1 or -1.previous state, regardless of whether it is +1 or -1.

Page 37: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 37

The current state of the Hopfield network is The current state of the Hopfield network is determined by the current outputs of all neurons, determined by the current outputs of all neurons, yy11, ,

yy22, . . ., , . . ., yynn..

Thus, for a single-layer Thus, for a single-layer nn-neuron network, the state -neuron network, the state can be defined by the can be defined by the state vector state vector as:as:

ny

y

y

2

1

Y

Page 38: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 38

In the Hopfield network, synaptic weights between In the Hopfield network, synaptic weights between neurons are usually represented in matrix form as neurons are usually represented in matrix form as follows:follows:

where where MM is the number of states to be memorised is the number of states to be memorised by the network, Yby the network, Ymm is the n-dimensional binary is the n-dimensional binary

vector, I is vector, I is nn nn identity matrix, and superscript identity matrix, and superscript T T denotes matrix transposition.denotes matrix transposition.

IYYW MM

m

Tmm

1

Page 39: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 39

Possible states for the three-neuron Possible states for the three-neuron Hopfield networkHopfield network

y1

y2

y3

(1, 1,1)( 1, 1,1)

( 1, 1, 1) (1, 1, 1)

(1, 1,1)( 1,1,1)

(1, 1, 1)( 1,1, 1)

0

Page 40: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 40

Hopfield network training algorithmHopfield network training algorithm Step 1: StorageStep 1: Storage

– The n-neuron Hopfield network is required to store a The n-neuron Hopfield network is required to store a set of M fundamental memories, Yset of M fundamental memories, Y11;Y;Y22; . . . ;Y; . . . ;YMM. The . The

synaptic weight from neuron i to neuron j is synaptic weight from neuron i to neuron j is calculated ascalculated as

– where ywhere ym,im,i;i ;i and yand ym,jm,jj j are the iare the ithth and the j and the jthth elements of elements of the fundamental memory Ythe fundamental memory Ymm, respectively, respectively

Page 41: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 41

Hopfield network training algorithmHopfield network training algorithm Step 1: StorageStep 1: Storage

– In matrix form, the synaptic weights between In matrix form, the synaptic weights between neurons are represented asneurons are represented as

Page 42: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 42

Hopfield network training algorithmHopfield network training algorithm Step 1: StorageStep 1: Storage

– The Hopfield network can store a set of fundamental memories if The Hopfield network can store a set of fundamental memories if the weight matrix is symmetrical, with zeros in its main diagonalthe weight matrix is symmetrical, with zeros in its main diagonal

where wwhere wijij = w = wjiji..

Once the weights are calculated, they remain fixed.Once the weights are calculated, they remain fixed.

Page 43: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 43

Hopfield network training algorithmHopfield network training algorithm Step 2: TestingStep 2: Testing

– We need to confirm that the Hopfield network is capable of We need to confirm that the Hopfield network is capable of recalling all fundamental memories. recalling all fundamental memories.

– In other words, the network must recall any fundamental memory In other words, the network must recall any fundamental memory YYmm when presented with it as an input. That is, when presented with it as an input. That is,

where ywhere ym,im,i is the i is the ithth element of the actual output vector element of the actual output vector

YYmm, and x, and xm,jm,j is the j is the jthth element of the input vector X element of the input vector Xmm. .

Page 44: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 44

Hopfield network training algorithmHopfield network training algorithm Step 2: TestingStep 2: Testing

– In matrix form,In matrix form,

If all fundamental memories are recalled perfectly we If all fundamental memories are recalled perfectly we may proceed to the next step.may proceed to the next step.

Page 45: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 45

Hopfield network training algorithmHopfield network training algorithm Step 3: RetrievalStep 3: Retrieval

– Present an unknown n-dimensional vector Present an unknown n-dimensional vector (probe), X, to the network and retrieve a stable (probe), X, to the network and retrieve a stable state. state.

– Typically, the probe represents a corrupted or Typically, the probe represents a corrupted or incomplete version of the fundamental incomplete version of the fundamental memory, that is,memory, that is,

Page 46: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 46

Hopfield network training algorithmHopfield network training algorithm Step 3: RetrievalStep 3: Retrieval

Page 47: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 47

Hopfield network training algorithmHopfield network training algorithm Step 3: RetrievalStep 3: Retrieval

Page 48: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 48

Hopfield network training algorithmHopfield network training algorithm Step 3: RetrievalStep 3: Retrieval

Page 49: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 49

The stable state-vertex is determined by the The stable state-vertex is determined by the weight matrix weight matrix WW, the current input vector , the current input vector XX, and , and the threshold matrix the threshold matrix . .

If the input vector is partially incorrect or If the input vector is partially incorrect or incomplete, the initial state will converge into incomplete, the initial state will converge into the stable state-vertex after a few iterations.the stable state-vertex after a few iterations.

Stable stateStable state

Page 50: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 50

Suppose, for instance, that our network is required to Suppose, for instance, that our network is required to memorise two opposite states, (1, 1, 1) and (memorise two opposite states, (1, 1, 1) and (1, 1, 1, 1, 1). 1). Thus,Thus,

where where YY11 and and YY22 are the three-dimensional vectors. are the three-dimensional vectors.

oror

1

1

1

1Y

1

1

1

2Y 1111 TY 1112 TY

Example with 2 statesExample with 2 states

Page 51: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 51

The 3 The 3 3 identity matrix 3 identity matrix I I isis

Thus, we can now determine the weight matrix as Thus, we can now determine the weight matrix as follows:follows:

Next, the network is tested by the sequence of input Next, the network is tested by the sequence of input vectors, vectors, XX11 and and XX22, which are equal to the output (or, which are equal to the output (or

target) vectors target) vectors YY11 and and YY22, respectively., respectively.

100

010

001

I

100

010

001

2111

1

1

1

111

1

1

1

W

022

202

220

Page 52: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 52

First, we activate the Hopfield network by applying First, we activate the Hopfield network by applying the input vector the input vector XX. Then, we calculate the actual . Then, we calculate the actual output vector output vector YY, and finally, we compare the result , and finally, we compare the result with the initial input vector with the initial input vector XX. .

1

1

1

0

0

0

1

1

1

022

202

220

1 signY

1

1

1

0

0

0

1

1

1

022

202

220

2 signY

Page 53: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 53

Example with 2 statesExample with 2 states

Page 54: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 54

The remaining six states are all unstable. However, The remaining six states are all unstable. However, stable states (also calledstable states (also called fundamental memoriesfundamental memories) are ) are capable of attracting states that are close to them.capable of attracting states that are close to them.

The fundamental memory (1, 1, 1) attracts unstable The fundamental memory (1, 1, 1) attracts unstable states (states (1, 1, 1), (1, 1, 1, 1), (1, 1, 1) and (1, 1, 1, 1) and (1, 1, 1). Each of these 1). Each of these unstable states represents a single error, compared to unstable states represents a single error, compared to the fundamental memory (1, 1, 1). the fundamental memory (1, 1, 1).

The fundamental memory (The fundamental memory (1, 1, 1, 1, 1) attracts unstable 1) attracts unstable states (states (1, 1, 1, 1), (1, 1), (1, 1, 1, 1, 1) and (1, 1) and (1, 1, 1, 1). 1).

Thus, the Hopfield network can act as an Thus, the Hopfield network can act as an error error correction networkcorrection network..

Page 55: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 55

Storage capacity of the Hopfield networkStorage capacity of the Hopfield network

Storage capacity Storage capacity is is or the largest number of or the largest number of fundamental memories that can be stored and fundamental memories that can be stored and retrieved correctly.retrieved correctly.

The maximum number of fundamental memories The maximum number of fundamental memories MMmaxmax that can be stored in the that can be stored in the nn-neuron recurrent -neuron recurrent

network is limited bynetwork is limited by

nMmax 0.15

Page 56: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 56

Storage capacity of the Hopfield networkStorage capacity of the Hopfield network

We also may define the storage capacity of a Hopfield network We also may define the storage capacity of a Hopfield network on the basis that most of the fundamental memories are to be on the basis that most of the fundamental memories are to be retrieved perfectly (Amit, 1989):retrieved perfectly (Amit, 1989):

What if we want all the fundamental memories to be retrieved What if we want all the fundamental memories to be retrieved perfectly? It can be shown that to retrieve all the fundamental perfectly? It can be shown that to retrieve all the fundamental memories perfectly, their number must be halved (Amit, memories perfectly, their number must be halved (Amit, 1989):1989):

Page 57: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 57

Bidirectional associative memory (BAM)Bidirectional associative memory (BAM) The Hopfield network represents an The Hopfield network represents an autoassociative autoassociative

type of memory type of memory it can retrieve a corrupted or it can retrieve a corrupted or incomplete memory but incomplete memory but cannot associate this cannot associate this memory with another different memorymemory with another different memory..

Human memory is essentially Human memory is essentially associativeassociative. . One thing One thing may remind us of another, and that of another, and so may remind us of another, and that of another, and so on. We use a chain of mental associations to recover on. We use a chain of mental associations to recover a lost memory. If we forget where we left an a lost memory. If we forget where we left an umbrella, we try to recall where we last had it, what umbrella, we try to recall where we last had it, what we were doing, and who we were talking to. We we were doing, and who we were talking to. We attempt to establish a chain of associations, and attempt to establish a chain of associations, and thereby to restore a lost memory.thereby to restore a lost memory.

Page 58: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 58

To associate one memory with another, we need a To associate one memory with another, we need a recurrent neural network capable of accepting an recurrent neural network capable of accepting an input pattern on one set of neurons and producing input pattern on one set of neurons and producing a related, but different, output pattern on another a related, but different, output pattern on another set of neurons.set of neurons.

Bidirectional associative memory (BAM)Bidirectional associative memory (BAM), first , first proposed by proposed by Bart KoskoBart Kosko, is a heteroassociative , is a heteroassociative network. It associates patterns from one set, set network. It associates patterns from one set, set AA, , to patterns from another set, set to patterns from another set, set BB, and vice versa. , and vice versa. Like a Hopfield network, the BAM can generalise Like a Hopfield network, the BAM can generalise and also produce correct outputs despite corrupted and also produce correct outputs despite corrupted or incomplete inputs.or incomplete inputs.

Page 59: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 59

BAM operationBAM operation

yj(p)

y1(p)

y2(p)

ym(p)

1

2

j

m

Outputlayer

Inputlayer

xi(p)

x1

x2

(p)

(p)

xn(p)

2

i

n

1

xi(p+1)

x1(p+1)

x2(p+1)

xn(p+1)

yj(p)

y1(p)

y2(p)

ym(p)

1

2

j

m

Outputlayer

Inputlayer

2

i

n

1

(a) Forward direction. (b) Backward direction.

Page 60: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 60

The basic idea behind the BAM is to store The basic idea behind the BAM is to store pattern pairs so that when pattern pairs so that when nn-dimensional vector -dimensional vector X X from set from set A A is presented as input, the BAM is presented as input, the BAM recalls recalls mm-dimensional vector -dimensional vector Y Y from set from set BB, but , but when when Y Y is presented as input, the BAM recalls is presented as input, the BAM recalls XX..

Page 61: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 61

To develop the BAM, we need to create a To develop the BAM, we need to create a correlation matrix for each pattern pair we want to correlation matrix for each pattern pair we want to store. The correlation matrix is the matrix product store. The correlation matrix is the matrix product of the input vector of the input vector XX, and the transpose of the , and the transpose of the output vector output vector YYTT. The BAM weight matrix is the . The BAM weight matrix is the sum of all correlation matrices, that is,sum of all correlation matrices, that is,

where where M M is the number of pattern pairs to be stored is the number of pattern pairs to be stored in the BAM.in the BAM.

Tm

M

mm YXW

1

Page 62: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 62

BAM training algorithmBAM training algorithm

Step 1: StorageStep 1: Storage– The BAM is required to store M pairs of patterns. For The BAM is required to store M pairs of patterns. For

example, we may wish to store four pairs:example, we may wish to store four pairs:

Page 63: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 63

BAM training algorithmBAM training algorithm

Page 64: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 64

BAM training algorithmBAM training algorithm

Step 2: TestingStep 2: Testing– The BAM should be able to receive any vector from set A and retrieve The BAM should be able to receive any vector from set A and retrieve

the associated vector from set B, and receive any vector from set B the associated vector from set B, and receive any vector from set B and retrieve the associated vector from set A. and retrieve the associated vector from set A.

Page 65: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 65

BAM training algorithmBAM training algorithm– Thus, first we need to confirm that the BAM is able to Thus, first we need to confirm that the BAM is able to

recall Yrecall Ymm when presented with X when presented with Xmm. That is,. That is,

Page 66: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 66

BAM training algorithmBAM training algorithm– Then, we confirm that the BAM recalls XThen, we confirm that the BAM recalls Xmm when when

presented with Ypresented with Ymm. That is,. That is,

In our example, all four pairs are recalled perfectly, and In our example, all four pairs are recalled perfectly, and we can proceed to the next step.we can proceed to the next step.

Page 67: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 67

BAM training algorithmBAM training algorithm

Step 3: RetrievalStep 3: Retrieval– Present an unknown vector (probe) X to the Present an unknown vector (probe) X to the

BAM and retrieve a stored association. BAM and retrieve a stored association. – The probe may present a corrupted or The probe may present a corrupted or

incomplete version of a pattern from set A (or incomplete version of a pattern from set A (or from set B) stored in the BAM.from set B) stored in the BAM.

– That is,That is,

Page 68: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 68

BAM training algorithmBAM training algorithm

(a) Initialise the BAM retrieval algorithm by (a) Initialise the BAM retrieval algorithm by settingsetting

and calculate the BAM output at iteration pand calculate the BAM output at iteration p

Page 69: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 69

BAM training algorithmBAM training algorithm

(b) Update the input vector X(p): (b) Update the input vector X(p):

• and repeat the iteration until equilibrium, and repeat the iteration until equilibrium, when input and output vectors remain when input and output vectors remain unchanged with further iterations. unchanged with further iterations.

• The input and output patterns will then The input and output patterns will then represent an associated pair.represent an associated pair.

Page 70: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 70

Stability and storage capacity of the BAMStability and storage capacity of the BAM The BAM is The BAM is unconditionally stableunconditionally stable. This means that . This means that

any set of associations can be learned without risk of any set of associations can be learned without risk of instability.instability.

The maximum number of associations to be stored in The maximum number of associations to be stored in the BAM should not exceed the number of the BAM should not exceed the number of neurons in the smaller layer.neurons in the smaller layer.

The more serious problem with the BAM is The more serious problem with the BAM is incorrect convergenceincorrect convergence. The BAM may not . The BAM may not always produce the closest association. In fact, a always produce the closest association. In fact, a stable association may be only slightly related to stable association may be only slightly related to the initial input vector. the initial input vector.

Page 71: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 71

Error correction in BAMError correction in BAM

Let us now return to our example. Suppose we use vector Let us now return to our example. Suppose we use vector X as a probe. X as a probe.

It represents a single error compared with the pattern XIt represents a single error compared with the pattern X11

from set A:from set A:

This probe applied as the BAM input produces the This probe applied as the BAM input produces the output vector Youtput vector Y11 from set B. from set B.

The vector YThe vector Y11 is then used as input to retrieve the is then used as input to retrieve the

vector Xvector X11 from set A. from set A.

Thus, the BAM is indeed capable of error correction.Thus, the BAM is indeed capable of error correction.

Page 72: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 72

BAM and HopfieldBAM and Hopfield There is also a close relationship between the There is also a close relationship between the

BAM and the Hopfield network.BAM and the Hopfield network. If the BAM weight matrix is square and If the BAM weight matrix is square and

symmetrical, then W = Wsymmetrical, then W = WTT . . In this case, input and output layers are of the In this case, input and output layers are of the

same size, and the BAM can be reduced to same size, and the BAM can be reduced to the autoassociative Hopfield network. the autoassociative Hopfield network.

Thus, the Hopfield network can be considered Thus, the Hopfield network can be considered as a BAM special case.as a BAM special case.

Page 73: © Negnevitsky, Pearson Education, 2005 1 Lecture 8 (chapter 6) Artificial neural networks: Supervised learning The perceptron Quick Review The perceptron

© Negnevitsky, Pearson Education, 2005 73

Want to know more?Want to know more?

Free e-book about neural networksFree e-book about neural networks http://lia.univ-avignon.fr/fileadmin/docume

nts/Users/Intranet/chercheurs/torres/livres/book-neuro-intro.pdf