Your SlideShare is downloading. ×
0
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

6

309

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
309
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
32
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Artificial Neural Networks - MLP Artificial Intelligence Department of Industrial Engineering and Management Cheng Shiu University
  • 2. Outline  Logic problem for linear classification  Multilayer perceptron  Feedforward and backforward  Back-propagation neural network  Supervised training/learning  Recurrent neural network  Bidirectional associative memory
  • 3. Two-dimensional plots of basic logical operationsTwo-dimensional plots of basic logical operations x1 x2 1 (a) AND (x1 ∩x2) 1 x1 x2 1 1 (b) OR (x1 ∪x2) x1 x2 1 1 (c) Exclusive-OR (x1 ⊕x2) 00 0 A perceptron can learn the operationsA perceptron can learn the operations ANDAND andand OROR,, but notbut not Exclusive-ORExclusive-OR..
  • 4. Multilayer neural networksMultilayer neural networks A multilayer perceptron (MLP) is a feedforwardA multilayer perceptron (MLP) is a feedforward neural network with one or more hidden layers.neural network with one or more hidden layers. The network consists of anThe network consists of an input layerinput layer of sourceof source neurons, at least one middle orneurons, at least one middle or hidden layerhidden layer ofof computational neurons, and ancomputational neurons, and an output layeroutput layer ofof computational neurons.computational neurons. The input signals are propagated in a forwardThe input signals are propagated in a forward direction on a layer-by-layer basis.direction on a layer-by-layer basis.
  • 5. Multilayer perceptron with two hidden layersMultilayer perceptron with two hidden layers Input layer First hidden layer Second hidden layer Output layer OutputSignals InputSignals
  • 6. What does the middle layer hide?What does the middle layer hide? A hidden layer “hides” its desired output.A hidden layer “hides” its desired output. Neurons in the hidden layer cannot be observedNeurons in the hidden layer cannot be observed through the input/output behaviour of the network.through the input/output behaviour of the network. There is no obvious way to know what the desiredThere 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 andCommercial ANNs incorporate three and sometimes four layers, including one or twosometimes four layers, including one or two hidden layers. Each layer can contain from 10 tohidden layers. Each layer can contain from 10 to 1000 neurons. Experimental neural networks may1000 neurons. Experimental neural networks may have five or even six layers, including three orhave five or even six layers, including three or four hidden layers, and utilise millions of neurons.four hidden layers, and utilise millions of neurons.
  • 7. Back-propagation neural networkBack-propagation neural network Learning in a multilayer network proceeds theLearning 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 theA training set of input patterns is presented to the network.network. The network computes its output pattern, and ifThe network computes its output pattern, and if there is an errorthere is an error −− or in other words a differenceor in other words a difference between actual and desired output patternsbetween actual and desired output patterns −− thethe weights are adjusted to reduce this error.weights are adjusted to reduce this error.
  • 8. In a back-propagation neural network, the learningIn a back-propagation neural network, the learning algorithm has two phases.algorithm has two phases. First, a training input pattern is presented to theFirst, a training input pattern is presented to the network input layer. The network propagates thenetwork input layer. The network propagates the input pattern from layer to layer until the outputinput 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 propagatedan error is calculated and then propagated backwards through the network from the outputbackwards through the network from the output layer to the input layer. The weights are modifiedlayer to the input layer. The weights are modified as the error is propagated.as the error is propagated.
  • 9. Three-layer back-propagation neural networkThree-layer back-propagation neural network Input layer xi x1 x2 xn 1 2 i n Output layer 1 2 k l yk y1 y2 yl Input signals Error signals wjk Hidden layer wij 1 2 j m
  • 10. Step 1Step 1: Initialisation: Initialisation Set all the weights and threshold levels of theSet all the weights and threshold levels of the network to random numbers uniformlynetwork to random numbers uniformly distributed inside a small range:distributed inside a small range: wherewhere FFii is the total number of inputs of neuronis the total number of inputs of neuron ii in the network. The weight initialisation is donein the network. The weight initialisation is done on a neuron-by-neuron basis.on a neuron-by-neuron basis. The back-propagation training algorithmThe back-propagation training algorithm       +− ii FF 4.2 , 4.2
  • 11. Step 2Step 2: Activation: Activation Activate the back-propagation neural network byActivate the back-propagation neural network by applying inputsapplying inputs xx11((pp),), xx22((pp),…,),…, xxnn((pp) and desired) and desired outputsoutputs 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: wherewhere nn is the number of inputs of neuronis the number of inputs of neuron jj in thein the hidden layer, andhidden layer, and sigmoidsigmoid is theis the sigmoidsigmoid activationactivation function.function.         θ−⋅= ∑ = j n i ijij pwpxsigmoidpy 1 )()()(
  • 12. ((bb) Calculate the actual outputs of the neurons in) Calculate the actual outputs of the neurons in the output layer:the output layer: wherewhere mm is the number of inputs of neuronis the number of inputs of neuron kk in thein the output layer.output layer.         θ−⋅= ∑ = k m j jkjkk pwpxsigmoidpy 1 )()()( Step 2Step 2: Activation (continued): Activation (continued)
  • 13. Step 3Step 3: Weight training: Weight training Update the weights in the back-propagation networkUpdate the weights in the back-propagation network propagating backward the errors associated withpropagating backward the errors associated with output neurons.output neurons. ((aa) Calculate the error gradient for the neurons in the) Calculate the error gradient for the neurons in the output layer: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)()( pepypyp kkkk ⋅−⋅=δ )()()( , pypype kkdk −= )()()( ppypw kjjk δα ⋅⋅=∆ )()()1( pwpwpw jkjkjk ∆+=+
  • 14. ((bb) Calculate the error gradient for the neurons in) Calculate the error gradient for the neurons in the hidden layer:the hidden layer: 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 k kjjj ∑ = ⋅−⋅= δδ )()()( ppxpw jiij δα ⋅⋅=∆ )()()1( pwpwpw ijijij ∆+=+ Step 3Step 3: Weight training (continued): Weight training (continued)
  • 15. Step 4Step 4: Iteration: Iteration Increase iterationIncrease iteration pp by one, go back toby one, go back to Step 2Step 2 andand repeat the process until the selected error criterionrepeat the process until the selected error criterion is satisfied.is satisfied. As an example, we may consider the three-layerAs an example, we may consider the three-layer back-propagation network. Suppose that theback-propagation network. Suppose that the network is required to perform logical operationnetwork 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 thecould not do this operation. Now we will apply the three-layer net.three-layer net.
  • 16. Three-layer network for solving theThree-layer network for solving the Exclusive-OR operationExclusive-OR operation y55 x1 31 x2 Input layer Output layer Hidden layer 42 θ3 w13 w24 w23 w24 w35 w45 θ4 θ5 −1 −1 −1
  • 17. The effect of the threshold applied to a neuron in theThe 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 toconnected to a fixed input equal to −−1.1. The initial weights and threshold levels are setThe 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, ww3535 == −−1.2,1.2, ww4545 = 1.1,= 1.1, θθ33 = 0.8,= 0.8, θθ44 == −−0.1 and0.1 and θθ55 = 0.3.= 0.3.
  • 18. We consider a training set where inputsWe consider a training set where inputs xx11 andand xx22 areare equal to 1 and desired outputequal to 1 and desired output yydd,5,5 is 0. The actualis 0. The actual outputs of neurons 3 and 4 in the hidden layer areoutputs of neurons 3 and 4 in the hidden layer are calculated ascalculated as [ ] 5250.01/1)( )8.014.015.01( 32321313 =+=θ−+= ⋅−⋅+⋅− ewxwxsigmoidy [ ] 8808.01/1)( )1.010.119.01( 42421414 =+=θ−+= ⋅+⋅+⋅− ewxwxsigmoidy Now the actual output of neuron 5 in the output layerNow 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: [ ] 5097.01/1)( )3.011.18808.02.15250.0( 54543535 =+=θ−+= ⋅−⋅+⋅−− ewywysigmoidy 5097.05097.0055, −=−=−= yye d
  • 19. The next step is weight training. To update theThe next step is weight training. To update the weights and threshold levels in our network, weweights 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 inFirst, we calculate the error gradient for neuron 5 in the output layer:the output layer: 1274.05097).0(0.5097)(10.5097)1( 555 −=−⋅−⋅=−= eyyδ Then we determine the weight corrections assumingThen 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: 0112.0)1274.0(8808.01.05445 −=−⋅⋅=⋅⋅=∆ δα yw 0067.0)1274.0(5250.01.05335 −=−⋅⋅=⋅⋅=∆ δα yw 0127.0)1274.0()1(1.0)1( 55 −=−⋅−⋅=⋅−⋅=θ∆ δα
  • 20. Next we calculate the error gradients for neurons 3Next 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 =⋅⋅=⋅⋅=∆ δα xw 0038.00381.011.03223 =⋅⋅=⋅⋅=∆ δα xw 0038.00381.0)1(1.0)1( 33 −=⋅−⋅=⋅−⋅=θ∆ δα 0015.0)0147.0(11.04114 −=−⋅⋅=⋅⋅=∆ δα xw 0015.0)0147.0(11.04224 −=−⋅⋅=⋅⋅=∆ δα xw 0015.0)0147.0()1(1.0)1( 44 =−⋅−⋅=⋅−⋅=θ∆ δα
  • 21. At last, we update all weights and threshold:At last, we update all weights and threshold: 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 =+=θ∆+θ=θ 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.
  • 22. Learning curve for operationLearning curve for operation Exclusive-ORExclusive-OR 0 50 100 150 200 101 Epoch Sum-SquaredError Sum-SquaredNetworkError for 224Epochs 100 10-1 10-2 10-3 10-4
  • 23. Final results of three-layer network learningFinal results of three-layer network learning Inputs x1 x2 1 0 1 0 1 1 0 0 0 1 1 Desired output yd 0 0.0155 Actual output y5 Y Error e Sum of squared errors e 0.9849 0.9849 0.0175 −0.0155 0.0151 0.0151 −0.0175 0.0010
  • 24. Network represented by McCulloch-Pitts modelNetwork represented by McCulloch-Pitts model for solving thefor solving the Exclusive-ORExclusive-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
  • 25. ((aa) Decision boundary constructed by hidden neuron 3;) Decision 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 Decision boundariesDecision boundaries
  • 26. Accelerated learning in multilayerAccelerated learning in multilayer neural networksneural networks A multilayer network learns much faster when theA multilayer network learns much faster when the sigmoidal activation function is represented by asigmoidal activation function is represented by a hyperbolic tangenthyperbolic tangent:: wherewhere aa andand bb are constants.are constants. Suitable values forSuitable values for aa andand bb are:are: aa = 1.716 and= 1.716 and bb = 0.667= 0.667 a e a Y bX htan − + = − 1 2
  • 27. We also can accelerate training by including aWe also can accelerate training by including a momentum termmomentum term in the delta rule:in the delta rule: wherewhere ββ is a positive number (0is a positive number (0 ≤≤ ββ << 1) called the1) called the momentum constantmomentum constant. Typically, the momentum. Typically, the momentum constant is set to 0.95.constant is set to 0.95. This equation is called theThis equation is called the generalised delta rulegeneralised delta rule.. )()()1()( ppypwpw kjjkjk δαβ ⋅⋅+−∆⋅=∆
  • 28. Learning with momentum for operationLearning with momentum for operation Exclusive-ORExclusive-OR 0 20 40 60 80 100 120 10-4 10-2 100 102 Epoch Sum-SquaredError Trainingfor 126Epochs 0 100 140 -1 -0.5 0 0.5 1 1.5 Epoch LearningRate 10-3 101 10-1 20 40 60 80 120
  • 29. Learning with adaptive learning rateLearning with adaptive learning rate To accelerate the convergence and yet avoid theTo 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 sameIf the change of the sum of squared errors has the same algebraic sign for several consequent epochs, then thealgebraic sign for several consequent epochs, then the learning rate parameter,learning rate parameter, αα, should be increased., should be increased. Heuristic 2Heuristic 2 If the algebraic sign of the change of the sum ofIf the algebraic sign of the change of the sum of squared errors alternates for several consequentsquared errors alternates for several consequent epochs, then the learning rate parameter,epochs, then the learning rate parameter, αα, should be, should be decreased.decreased.
  • 30. Adapting the learning rate requires some changesAdapting 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 epochIf the sum of squared errors at the current epoch exceeds the previous value by more than aexceeds the previous value by more than a predefined ratio (typically 1.04), the learning ratepredefined ratio (typically 1.04), the learning rate parameter is decreased (typically by multiplyingparameter is decreased (typically by multiplying by 0.7) and new weights and thresholds areby 0.7) and new weights and thresholds are calculated.calculated. If the error is less than the previous one, theIf the error is less than the previous one, the learning rate is increased (typically by multiplyinglearning rate is increased (typically by multiplying by 1.05).by 1.05).
  • 31. Learning with adaptive learning rateLearning with adaptive learning rate 0 10 20 30 40 50 60 70 80 90 100 Epoch Trainingfor103Epochs 0 20 40 60 80 100 120 0 0.2 0.4 0.6 0.8 1 Epoch LearningRate 10-4 10-2 100 102 Sum-SquaredError 10-3 101 10-1
  • 32. Learning with momentum and adaptive learning rateLearning with momentum and adaptive learning rate 0 10 20 30 40 50 60 70 80 Epoch Trainingfor85Epochs 0 10 20 30 40 50 60 70 80 90 0 0.5 1 2.5 Epoch LearningRate 10-4 10-2 100 102 Sum-SquaredError 10-3 101 10-1 1.5 2
  • 33. Neural networks were designed on analogy withNeural networks were designed on analogy with the brain. The brain’s memory, however, worksthe brain. The brain’s memory, however, works by association. For example, we can recognise aby association. For example, we can recognise a familiar face even in an unfamiliar environmentfamiliar face even in an unfamiliar environment within 100-200 ms. We can also recall awithin 100-200 ms. We can also recall a complete sensory experience, including soundscomplete sensory experience, including sounds and scenes, when we hear only a few bars ofand scenes, when we hear only a few bars of music. The brain routinely associates one thingmusic. The brain routinely associates one thing with another.with another. The Hopfield NetworkThe Hopfield Network
  • 34. Multilayer neural networks trained with the back-Multilayer neural networks trained with the back- propagation algorithm are used for patternpropagation algorithm are used for pattern recognition problems. However, to emulate therecognition problems. However, to emulate the human memory’s associative characteristics wehuman memory’s associative characteristics we need a different type of network: aneed a different type of network: a recurrentrecurrent neural networkneural network.. A recurrent neural network has feedback loopsA recurrent neural network has feedback loops from its outputs to its inputs. The presence offrom its outputs to its inputs. The presence of such loops has a profound impact on the learningsuch loops has a profound impact on the learning capability of the network.capability of the network.
  • 35. The stability of recurrent networks intriguedThe 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 networkHowever, none was able to predict which network would be stable, and some researchers werewould be stable, and some researchers were pessimistic about finding a solution at all. Thepessimistic about finding a solution at all. The problem was solved only in 1982, whenproblem was solved only in 1982, when JohnJohn HopfieldHopfield formulated the physical principle offormulated the physical principle of storing information in a dynamically stablestoring information in a dynamically stable network.network.
  • 36. Single-layerSingle-layer nn-neuron Hopfield network-neuron Hopfield network xi x1 x2 xn InputSignals yi y1 y2 yn 1 2 i n OutputSignals
  • 37. The Hopfield network uses McCulloch and PittsThe Hopfield network uses McCulloch and Pitts neurons with theneurons with the sign activation functionsign activation function as itsas its computing element:computing element:      0= 0<− >+ = XY X X Y sign if, if,1 0if,1
  • 38. The current state of the Hopfield network isThe 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-layerThus, for a single-layer nn-neuron network, the state-neuron network, the state can be defined by thecan be defined by the state vectorstate vector as:as:               = ny y y  2 1 Y
  • 39. In the Hopfield network, synaptic weights betweenIn the Hopfield network, synaptic weights between neurons are usually represented in matrix form asneurons are usually represented in matrix form as follows:follows: wherewhere MM is the number of states to be memorisedis the number of states to be memorised by the network,by the network, YYmm is theis the nn-dimensional binary-dimensional binary vector,vector, II isis nn ×× nn identity matrix, and superscriptidentity matrix, and superscript TT denotes a matrix transposition.denotes a matrix transposition. IYYW M M m T mm −= ∑ =1
  • 40. Possible states for the three-neuronPossible 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
  • 41. The stable state-vertex is determined by the weightThe stable state-vertex is determined by the weight matrixmatrix WW, the current input vector, the current input vector XX, and the, and the threshold matrixthreshold matrix θθ. If the input vector is partially. If the input vector is partially incorrect or incomplete, the initial state will convergeincorrect or incomplete, the initial state will converge into the stable state-vertex after a few iterations.into the stable state-vertex after a few iterations. Suppose, for instance, that our network is required toSuppose, 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, oror wherewhere YY11 andand YY22 are the three-dimensional vectors.are the three-dimensional vectors.           = 1 1 1 1Y           − − − = 1 1 1 2Y [ ]1111 =T Y [ ]1112 −−−=T Y
  • 42. The 3The 3 ×× 3 identity matrix3 identity matrix II isis Thus, we can now determine the weight matrix asThus, we can now determine the weight matrix as follows:follows: Next, the network is tested by the sequence of inputNext, the network is tested by the sequence of input vectors,vectors, XX11 andand XX22, which are equal to the output (or, which are equal to the output (or target) vectorstarget) vectors YY11 andand YY22, respectively., respectively.           = 100 010 001 I [ ] [ ]           −−−−           − − − +           = 100 010 001 2111 1 1 1 111 1 1 1 W           = 022 202 220
  • 43. First, we activate the Hopfield network by applyingFirst, we activate the Hopfield network by applying the input vectorthe input vector XX. Then, we calculate the actual. Then, we calculate the actual output vectoroutput vector YY, and finally, we compare the result, and finally, we compare the result with the initial input vectorwith 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
  • 44. 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 unstableThe 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 of1). Each of these unstable states represents a single error,these unstable states represents a single error, compared to the fundamental memory (1, 1, 1).compared to the fundamental memory (1, 1, 1). The fundamental memory (The fundamental memory (−−1,1, −−1,1, −−1) attracts1) attracts unstable states (unstable 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 anThus, the Hopfield network can act as an errorerror correction networkcorrection network..
  • 45. Storage capacityStorage capacity isis or the largest number ofor the largest number of fundamental memories that can be stored andfundamental memories that can be stored and retrieved correctly.retrieved correctly. The maximum number of fundamental memoriesThe maximum number of fundamental memories MMmaxmax that can be stored in thethat can be stored in the nn-neuron recurrent-neuron recurrent network is limited bynetwork is limited by nMmax 15.0= Storage capacity of the Hopfield networkStorage capacity of the Hopfield network
  • 46. The Hopfield network represents anThe Hopfield network represents an autoassociativeautoassociative type of memorytype of memory −− it can retrieve a corrupted orit can retrieve a corrupted or incomplete memory but cannot associate this memoryincomplete memory but cannot associate this memory with another different memory.with another different memory. Human memory is essentiallyHuman memory is essentially associativeassociative. One thing. One thing may remind us of another, and that of another, and somay remind us of another, and that of another, and so on. We use a chain of mental associations to recoveron. We use a chain of mental associations to recover a lost memory. If we forget where we left ana lost memory. If we forget where we left an umbrella, we try to recall where we last had it, whatumbrella, we try to recall where we last had it, what we were doing, and who we were talking to. Wewe were doing, and who we were talking to. We attempt to establish a chain of associations, andattempt to establish a chain of associations, and thereby to restore a lost memory.thereby to restore a lost memory. Bidirectional associative memory (BAM)Bidirectional associative memory (BAM)
  • 47. To associate one memory with another, we need aTo associate one memory with another, we need a recurrent neural network capable of accepting anrecurrent neural network capable of accepting an input pattern on one set of neurons and producinginput pattern on one set of neurons and producing a related, but different, output pattern on anothera related, but different, output pattern on another set of neurons.set of neurons. Bidirectional associative memoryBidirectional associative memory (BAM)(BAM), first, first proposed byproposed by Bart KoskoBart Kosko, is a heteroassociative, is a heteroassociative network. It associates patterns from one set, setnetwork. It associates patterns from one set, set AA,, to patterns from another set, setto patterns from another set, set BB, and vice versa., and vice versa. Like a Hopfield network, the BAM can generaliseLike a Hopfield network, the BAM can generalise and also produce correct outputs despite corruptedand also produce correct outputs despite corrupted or incomplete inputs.or incomplete inputs.
  • 48. BAM operationBAM operation yj(p) y1(p) y2(p) ym(p) 1 2 j m Output layer Input layer xi(p) x1(p) x2(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 Output layer Input layer 2 i n 1 (a) Forward direction. (b) Backward direction.
  • 49. The basic idea behind the BAM is to storeThe basic idea behind the BAM is to store pattern pairs so that whenpattern pairs so that when nn-dimensional vector-dimensional vector XX from setfrom set AA is presented as input, the BAMis presented as input, the BAM recallsrecalls mm-dimensional vector-dimensional vector YY from setfrom set BB, but, but whenwhen YY is presented as input, the BAM recallsis presented as input, the BAM recalls XX..
  • 50. To develop the BAM, we need to create aTo develop the BAM, we need to create a correlation matrix for each pattern pair we want tocorrelation matrix for each pattern pair we want to store. The correlation matrix is the matrix productstore. The correlation matrix is the matrix product of the input vectorof the input vector XX, and the transpose of the, and the transpose of the output vectoroutput 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, wherewhere MM is the number of pattern pairs to be storedis the number of pattern pairs to be stored in the BAM.in the BAM. T m M m m YXW ∑ = = 1
  • 51. The BAM isThe BAM is unconditionally stableunconditionally stable. This means that. This means that any set of associations can be learned without risk ofany set of associations can be learned without risk of instability.instability. The maximum number of associations to be storedThe maximum number of associations to be stored in the BAM should not exceed the number ofin 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 isThe 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, aalways produce the closest association. In fact, a stable association may be only slightly related tostable association may be only slightly related to the initial input vector.the initial input vector. Stability and storage capacity of the BAMStability and storage capacity of the BAM
  • 52. Advantages of Neural Methods  Can be trained on new data as it becomes available.  Will track changes in the data set.  Can be made robust against outliers.  Now many different types of artificial neural networks which can be used together.

×